Repository: inspec/inspec-gcp Branch: main Commit: 36f22c34f68c Files: 3428 Total size: 8.1 MB Directory structure: gitextract_5gedj5wk/ ├── .changelog/ │ ├── 3013.txt │ ├── 3021.txt │ ├── 3022.txt │ ├── 3026.txt │ ├── 3029.txt │ ├── 3031.txt │ └── 3033.txt ├── .codeclimate.yml ├── .expeditor/ │ ├── buildkite/ │ │ └── verify.sh │ ├── config.yml │ ├── update_version.sh │ └── verify.pipeline.yml ├── .github/ │ ├── CODEOWNERS │ ├── PULL_REQUEST_TEMPLATE.MD │ ├── dependabot.yml │ └── workflows/ │ └── ci-main-pull-request-stub.yml ├── .gitignore ├── .rspec ├── .rubocop.yml ├── .travis.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── Gemfile ├── ISSUE_TEMPLATE.md ├── LICENSE ├── README.md ├── Rakefile ├── SECURITY.md ├── VERSION ├── docs/ │ └── version_1_upgrade.md ├── docs-chef-io/ │ ├── content/ │ │ ├── _index.md │ │ ├── google_access_context_manager_access_level.md │ │ ├── google_access_context_manager_access_levels.md │ │ ├── google_access_context_manager_access_policies.md │ │ ├── google_access_context_manager_access_policy.md │ │ ├── google_access_context_manager_service_perimeter.md │ │ ├── google_access_context_manager_service_perimeters.md │ │ ├── google_apigee_endpoint_attachment.md │ │ ├── google_apigee_endpoint_attachments.md │ │ ├── google_apigee_organization.md │ │ ├── google_apigee_organization_api.md │ │ ├── google_apigee_organization_apis.md │ │ ├── google_apigee_organization_envgroup.md │ │ ├── google_apigee_organization_envgroup_attachment.md │ │ ├── google_apigee_organization_envgroup_attachments.md │ │ ├── google_apigee_organization_envgroups.md │ │ ├── google_apigee_organization_instance_attachment.md │ │ ├── google_apigee_organization_instance_attachments.md │ │ ├── google_apigee_organizations.md │ │ ├── google_appengine_standard_app_version.md │ │ ├── google_appengine_standard_app_versions.md │ │ ├── google_artifactregistry_project_location_repositories.md │ │ ├── google_artifactregistry_project_location_repository.md │ │ ├── google_bigquery_dataset.md │ │ ├── google_bigquery_datasets.md │ │ ├── google_bigquery_table.md │ │ ├── google_bigquery_tables.md │ │ ├── google_bigtableadmin_cluster.md │ │ ├── google_bigtableadmin_cluster_backup.md │ │ ├── google_bigtableadmin_cluster_backups.md │ │ ├── google_bigtableadmin_clusters.md │ │ ├── google_bigtableadmin_instance_app_profile.md │ │ ├── google_bigtableadmin_instance_app_profiles.md │ │ ├── google_billing_project_billing_info.md │ │ ├── google_cloud_scheduler_job.md │ │ ├── google_cloud_scheduler_jobs.md │ │ ├── google_cloudbuild_trigger.md │ │ ├── google_cloudbuild_triggers.md │ │ ├── google_cloudfunctions_cloud_function.md │ │ ├── google_cloudfunctions_cloud_functions.md │ │ ├── google_composer_project_location_environment.md │ │ ├── google_composer_project_location_environments.md │ │ ├── google_composer_project_location_image_versions.md │ │ ├── google_compute_accelerator_type.md │ │ ├── google_compute_accelerator_types.md │ │ ├── google_compute_address.md │ │ ├── google_compute_addresses.md │ │ ├── google_compute_autoscaler.md │ │ ├── google_compute_autoscalers.md │ │ ├── google_compute_backend_bucket.md │ │ ├── google_compute_backend_buckets.md │ │ ├── google_compute_backend_service.md │ │ ├── google_compute_backend_services.md │ │ ├── google_compute_disk.md │ │ ├── google_compute_disk_type.md │ │ ├── google_compute_disk_types.md │ │ ├── google_compute_disks.md │ │ ├── google_compute_external_vpn_gateway.md │ │ ├── google_compute_external_vpn_gateways.md │ │ ├── google_compute_firewall.md │ │ ├── google_compute_firewalls.md │ │ ├── google_compute_forwarding_rule.md │ │ ├── google_compute_forwarding_rules.md │ │ ├── google_compute_global_address.md │ │ ├── google_compute_global_addresses.md │ │ ├── google_compute_global_forwarding_rule.md │ │ ├── google_compute_global_forwarding_rules.md │ │ ├── google_compute_global_network_endpoint_group.md │ │ ├── google_compute_global_network_endpoint_groups.md │ │ ├── google_compute_global_operation.md │ │ ├── google_compute_global_operations.md │ │ ├── google_compute_health_check.md │ │ ├── google_compute_health_check_service.md │ │ ├── google_compute_health_check_services.md │ │ ├── google_compute_health_checks.md │ │ ├── google_compute_http_health_check.md │ │ ├── google_compute_http_health_checks.md │ │ ├── google_compute_https_health_check.md │ │ ├── google_compute_https_health_checks.md │ │ ├── google_compute_image.md │ │ ├── google_compute_image_family_view.md │ │ ├── google_compute_instance.md │ │ ├── google_compute_instance_group.md │ │ ├── google_compute_instance_group_manager.md │ │ ├── google_compute_instance_group_managers.md │ │ ├── google_compute_instance_groups.md │ │ ├── google_compute_instance_template.md │ │ ├── google_compute_instance_templates.md │ │ ├── google_compute_instances.md │ │ ├── google_compute_interconnect.md │ │ ├── google_compute_interconnect_attachment.md │ │ ├── google_compute_interconnect_attachments.md │ │ ├── google_compute_interconnect_location.md │ │ ├── google_compute_interconnect_locations.md │ │ ├── google_compute_interconnects.md │ │ ├── google_compute_license.md │ │ ├── google_compute_license_code.md │ │ ├── google_compute_licenses.md │ │ ├── google_compute_machine_image.md │ │ ├── google_compute_machine_images.md │ │ ├── google_compute_machine_type.md │ │ ├── google_compute_machine_types.md │ │ ├── google_compute_network.md │ │ ├── google_compute_network_attachment.md │ │ ├── google_compute_network_attachments.md │ │ ├── google_compute_network_edge_security_service.md │ │ ├── google_compute_network_endpoint_group.md │ │ ├── google_compute_network_endpoint_groups.md │ │ ├── google_compute_network_firewall_policies.md │ │ ├── google_compute_network_firewall_policy.md │ │ ├── google_compute_networks.md │ │ ├── google_compute_node_group.md │ │ ├── google_compute_node_groups.md │ │ ├── google_compute_node_template.md │ │ ├── google_compute_node_templates.md │ │ ├── google_compute_node_type.md │ │ ├── google_compute_node_types.md │ │ ├── google_compute_packet_mirroring.md │ │ ├── google_compute_packet_mirrorings.md │ │ ├── google_compute_project_info.md │ │ ├── google_compute_public_delegated_prefix.md │ │ ├── google_compute_public_delegated_prefixes.md │ │ ├── google_compute_region.md │ │ ├── google_compute_region_autoscaler.md │ │ ├── google_compute_region_autoscalers.md │ │ ├── google_compute_region_backend_service.md │ │ ├── google_compute_region_backend_services.md │ │ ├── google_compute_region_commitment.md │ │ ├── google_compute_region_commitments.md │ │ ├── google_compute_region_disk_type.md │ │ ├── google_compute_region_disk_types.md │ │ ├── google_compute_region_health_check.md │ │ ├── google_compute_region_health_checks.md │ │ ├── google_compute_region_instance_group.md │ │ ├── google_compute_region_instance_group_manager.md │ │ ├── google_compute_region_instance_group_managers.md │ │ ├── google_compute_region_instance_groups.md │ │ ├── google_compute_region_network_endpoint_group.md │ │ ├── google_compute_region_network_endpoint_groups.md │ │ ├── google_compute_region_operation.md │ │ ├── google_compute_region_operations.md │ │ ├── google_compute_region_security_policies.md │ │ ├── google_compute_region_security_policy.md │ │ ├── google_compute_region_ssl_policies.md │ │ ├── google_compute_region_ssl_policy.md │ │ ├── google_compute_region_target_http_proxies.md │ │ ├── google_compute_region_target_http_proxy.md │ │ ├── google_compute_region_target_https_proxies.md │ │ ├── google_compute_region_target_https_proxy.md │ │ ├── google_compute_region_url_map.md │ │ ├── google_compute_region_url_maps.md │ │ ├── google_compute_regional_disk.md │ │ ├── google_compute_regional_disks.md │ │ ├── google_compute_regions.md │ │ ├── google_compute_reservation.md │ │ ├── google_compute_reservations.md │ │ ├── google_compute_resource_policies.md │ │ ├── google_compute_resource_policy.md │ │ ├── google_compute_route.md │ │ ├── google_compute_router.md │ │ ├── google_compute_router_nat.md │ │ ├── google_compute_router_nats.md │ │ ├── google_compute_routers.md │ │ ├── google_compute_routes.md │ │ ├── google_compute_security_policies.md │ │ ├── google_compute_security_policy.md │ │ ├── google_compute_service_attachment.md │ │ ├── google_compute_service_attachments.md │ │ ├── google_compute_snapshot.md │ │ ├── google_compute_snapshots.md │ │ ├── google_compute_ssl_certificate.md │ │ ├── google_compute_ssl_certificates.md │ │ ├── google_compute_ssl_policies.md │ │ ├── google_compute_ssl_policy.md │ │ ├── google_compute_subnetwork.md │ │ ├── google_compute_subnetwork_iam_binding.md │ │ ├── google_compute_subnetwork_iam_policy.md │ │ ├── google_compute_subnetworks.md │ │ ├── google_compute_target_grpc_proxies.md │ │ ├── google_compute_target_grpc_proxy.md │ │ ├── google_compute_target_http_proxies.md │ │ ├── google_compute_target_http_proxy.md │ │ ├── google_compute_target_https_proxies.md │ │ ├── google_compute_target_https_proxy.md │ │ ├── google_compute_target_instance.md │ │ ├── google_compute_target_instances.md │ │ ├── google_compute_target_pool.md │ │ ├── google_compute_target_pools.md │ │ ├── google_compute_target_ssl_proxies.md │ │ ├── google_compute_target_ssl_proxy.md │ │ ├── google_compute_target_tcp_proxies.md │ │ ├── google_compute_target_tcp_proxy.md │ │ ├── google_compute_target_vpn_gateway.md │ │ ├── google_compute_target_vpn_gateways.md │ │ ├── google_compute_url_map.md │ │ ├── google_compute_url_maps.md │ │ ├── google_compute_vpn_gateway.md │ │ ├── google_compute_vpn_gateways.md │ │ ├── google_compute_vpn_tunnel.md │ │ ├── google_compute_vpn_tunnels.md │ │ ├── google_compute_xpn_resources.md │ │ ├── google_compute_zone.md │ │ ├── google_compute_zone_operation.md │ │ ├── google_compute_zone_operations.md │ │ ├── google_compute_zones.md │ │ ├── google_container_cluster.md │ │ ├── google_container_clusters.md │ │ ├── google_container_node_pool.md │ │ ├── google_container_node_pools.md │ │ ├── google_container_regional_cluster.md │ │ ├── google_container_regional_clusters.md │ │ ├── google_container_regional_node_pool.md │ │ ├── google_container_regional_node_pools.md │ │ ├── google_container_server_config.md │ │ ├── google_data_fusion_instance.md │ │ ├── google_data_fusion_instances.md │ │ ├── google_dataflow_project_location_job.md │ │ ├── google_dataflow_project_location_jobs.md │ │ ├── google_dataproc_autoscaling_policies.md │ │ ├── google_dataproc_autoscaling_policy.md │ │ ├── google_dataproc_batch.md │ │ ├── google_dataproc_batches.md │ │ ├── google_dataproc_cluster.md │ │ ├── google_dataproc_clusters.md │ │ ├── google_dataproc_job.md │ │ ├── google_dataproc_jobs.md │ │ ├── google_dataproc_metastore_federation.md │ │ ├── google_dataproc_metastore_federations.md │ │ ├── google_dataproc_metastore_service.md │ │ ├── google_dataproc_metastore_service_backup.md │ │ ├── google_dataproc_metastore_service_backups.md │ │ ├── google_dataproc_metastore_services.md │ │ ├── google_dataproc_session.md │ │ ├── google_dataproc_sessions.md │ │ ├── google_dataproc_workflow_template.md │ │ ├── google_dataproc_workflow_templates.md │ │ ├── google_dlp_dt.md │ │ ├── google_dlp_dts.md │ │ ├── google_dlp_inspect_template.md │ │ ├── google_dlp_inspect_templates.md │ │ ├── google_dlp_job.md │ │ ├── google_dlp_job_trigger.md │ │ ├── google_dlp_job_triggers.md │ │ ├── google_dlp_jobs.md │ │ ├── google_dlp_stored_info_type.md │ │ ├── google_dlp_stored_info_types.md │ │ ├── google_dns_managed_zone.md │ │ ├── google_dns_managed_zones.md │ │ ├── google_dns_resource_record_set.md │ │ ├── google_dns_resource_record_sets.md │ │ ├── google_filestore_instance.md │ │ ├── google_filestore_instances.md │ │ ├── google_iam_custom_role.md │ │ ├── google_iam_custom_roles.md │ │ ├── google_iam_organization_custom_role.md │ │ ├── google_iam_organization_custom_roles.md │ │ ├── google_iam_service_account.md │ │ ├── google_iam_service_account_key.md │ │ ├── google_iam_service_account_keys.md │ │ ├── google_iam_service_accounts.md │ │ ├── google_kms_crypto_key.md │ │ ├── google_kms_crypto_key_iam_binding.md │ │ ├── google_kms_crypto_key_iam_bindings.md │ │ ├── google_kms_crypto_key_iam_policy.md │ │ ├── google_kms_crypto_key_version.md │ │ ├── google_kms_crypto_key_versions.md │ │ ├── google_kms_crypto_keys.md │ │ ├── google_kms_ekm_connection.md │ │ ├── google_kms_ekm_connections.md │ │ ├── google_kms_key_ring.md │ │ ├── google_kms_key_ring_iam_binding.md │ │ ├── google_kms_key_ring_iam_bindings.md │ │ ├── google_kms_key_ring_iam_policy.md │ │ ├── google_kms_key_ring_import_job.md │ │ ├── google_kms_key_ring_import_jobs.md │ │ ├── google_kms_key_rings.md │ │ ├── google_kms_location.md │ │ ├── google_kms_locations.md │ │ ├── google_logging_folder_exclusion.md │ │ ├── google_logging_folder_exclusions.md │ │ ├── google_logging_folder_log_sink.md │ │ ├── google_logging_folder_log_sinks.md │ │ ├── google_logging_organization_log_sink.md │ │ ├── google_logging_organization_log_sinks.md │ │ ├── google_logging_project_exclusion.md │ │ ├── google_logging_project_exclusions.md │ │ ├── google_logging_project_sink.md │ │ ├── google_logging_project_sinks.md │ │ ├── google_memcache_instance.md │ │ ├── google_memcache_instances.md │ │ ├── google_ml_engine_model.md │ │ ├── google_ml_engine_models.md │ │ ├── google_monitoring_group.md │ │ ├── google_monitoring_groups.md │ │ ├── google_organization.md │ │ ├── google_organization_iam_binding.md │ │ ├── google_organization_iam_policy.md │ │ ├── google_organization_policy.md │ │ ├── google_organizations.md │ │ ├── google_orgpolicy_folder_constraints.md │ │ ├── google_orgpolicy_folder_policies.md │ │ ├── google_orgpolicy_folder_policy.md │ │ ├── google_orgpolicy_organization_constraints.md │ │ ├── google_orgpolicy_organization_policies.md │ │ ├── google_orgpolicy_organization_policy.md │ │ ├── google_orgpolicy_project_constraints.md │ │ ├── google_orgpolicy_project_policies.md │ │ ├── google_orgpolicy_project_policy.md │ │ ├── google_project.md │ │ ├── google_project_alert_policies.md │ │ ├── google_project_alert_policy.md │ │ ├── google_project_alert_policy_condition.md │ │ ├── google_project_iam_binding.md │ │ ├── google_project_iam_bindings.md │ │ ├── google_project_iam_custom_role.md │ │ ├── google_project_iam_custom_roles.md │ │ ├── google_project_iam_policy.md │ │ ├── google_project_logging_audit_config.md │ │ ├── google_project_metric.md │ │ ├── google_project_metrics.md │ │ ├── google_project_service.md │ │ ├── google_project_services.md │ │ ├── google_projects.md │ │ ├── google_pubsub_subscription.md │ │ ├── google_pubsub_subscription_iam_binding.md │ │ ├── google_pubsub_subscription_iam_policy.md │ │ ├── google_pubsub_subscriptions.md │ │ ├── google_pubsub_topic.md │ │ ├── google_pubsub_topic_iam_binding.md │ │ ├── google_pubsub_topic_iam_policy.md │ │ ├── google_pubsub_topics.md │ │ ├── google_redis_instance.md │ │ ├── google_redis_instances.md │ │ ├── google_resourcemanager_folder.md │ │ ├── google_resourcemanager_folder_iam_binding.md │ │ ├── google_resourcemanager_folder_iam_policy.md │ │ ├── google_resourcemanager_folders.md │ │ ├── google_resourcemanager_organization_policy.md │ │ ├── google_resourcemanager_project_iam_binding.md │ │ ├── google_resourcemanager_project_iam_policy.md │ │ ├── google_run_job.md │ │ ├── google_run_jobs.md │ │ ├── google_run_service.md │ │ ├── google_run_services.md │ │ ├── google_runtime_config_config.md │ │ ├── google_runtime_config_config_iam_binding.md │ │ ├── google_runtime_config_config_iam_policy.md │ │ ├── google_runtime_config_configs.md │ │ ├── google_runtime_config_variable.md │ │ ├── google_runtime_config_variables.md │ │ ├── google_secret_manager_secret.md │ │ ├── google_secret_manager_secrets.md │ │ ├── google_service_account.md │ │ ├── google_service_account_key.md │ │ ├── google_service_account_keys.md │ │ ├── google_service_accounts.md │ │ ├── google_service_networking_service_connections.md │ │ ├── google_sourcerepo_repositories.md │ │ ├── google_sourcerepo_repository.md │ │ ├── google_spanner_database.md │ │ ├── google_spanner_databases.md │ │ ├── google_spanner_instance.md │ │ ├── google_spanner_instance_iam_binding.md │ │ ├── google_spanner_instance_iam_policy.md │ │ ├── google_spanner_instances.md │ │ ├── google_sql_connect.md │ │ ├── google_sql_database.md │ │ ├── google_sql_database_instance.md │ │ ├── google_sql_database_instances.md │ │ ├── google_sql_databases.md │ │ ├── google_sql_flags.md │ │ ├── google_sql_operation.md │ │ ├── google_sql_operations.md │ │ ├── google_sql_ssl_cert.md │ │ ├── google_sql_ssl_certs.md │ │ ├── google_sql_user.md │ │ ├── google_sql_users.md │ │ ├── google_storage_bucket.md │ │ ├── google_storage_bucket_acl.md │ │ ├── google_storage_bucket_iam_binding.md │ │ ├── google_storage_bucket_iam_bindings.md │ │ ├── google_storage_bucket_iam_policy.md │ │ ├── google_storage_bucket_object.md │ │ ├── google_storage_bucket_objects.md │ │ ├── google_storage_buckets.md │ │ ├── google_storage_default_object_acl.md │ │ ├── google_storage_object_acl.md │ │ ├── google_user.md │ │ ├── google_users.md │ │ ├── google_vertex_ai_batch_prediction_job.md │ │ ├── google_vertex_ai_batch_prediction_jobs.md │ │ ├── google_vertex_ai_custom_job.md │ │ ├── google_vertex_ai_custom_jobs.md │ │ ├── google_vertex_ai_dataset.md │ │ ├── google_vertex_ai_dataset_data_item_annotations.md │ │ ├── google_vertex_ai_datasets.md │ │ ├── google_vertex_ai_datasets_annotation_spec.md │ │ ├── google_vertex_ai_datasets_data_items.md │ │ ├── google_vertex_ai_datasets_saved_queries.md │ │ ├── google_vertex_ai_endpoint.md │ │ ├── google_vertex_ai_endpoints.md │ │ ├── google_vertex_ai_featurestore.md │ │ ├── google_vertex_ai_featurestore_entity_type_feature.md │ │ ├── google_vertex_ai_featurestore_entity_type_features.md │ │ ├── google_vertex_ai_featurestores.md │ │ ├── google_vertex_ai_featurestores_entity_type.md │ │ ├── google_vertex_ai_featurestores_entity_types.md │ │ ├── google_vertex_ai_hyperparameter_tuning_job.md │ │ ├── google_vertex_ai_hyperparameter_tuning_jobs.md │ │ ├── google_vertex_ai_index.md │ │ ├── google_vertex_ai_index_endpoint.md │ │ ├── google_vertex_ai_index_endpoints.md │ │ ├── google_vertex_ai_indices.md │ │ ├── google_vertex_ai_metadata_store.md │ │ ├── google_vertex_ai_metadata_stores.md │ │ ├── google_vertex_ai_metadata_stores_artifact.md │ │ ├── google_vertex_ai_metadata_stores_artifacts.md │ │ ├── google_vertex_ai_metadata_stores_context.md │ │ ├── google_vertex_ai_metadata_stores_contexts.md │ │ ├── google_vertex_ai_metadata_stores_execution.md │ │ ├── google_vertex_ai_metadata_stores_executions.md │ │ ├── google_vertex_ai_metadata_stores_metadata_schema.md │ │ ├── google_vertex_ai_metadata_stores_metadata_schemas.md │ │ ├── google_vertex_ai_model.md │ │ ├── google_vertex_ai_model_deployment_monitoring_job.md │ │ ├── google_vertex_ai_model_deployment_monitoring_jobs.md │ │ ├── google_vertex_ai_model_evaluation_slice.md │ │ ├── google_vertex_ai_model_evaluation_slices.md │ │ ├── google_vertex_ai_models.md │ │ ├── google_vertex_ai_models_evaluation.md │ │ ├── google_vertex_ai_models_evaluations.md │ │ ├── google_vertex_ai_nas_job.md │ │ ├── google_vertex_ai_nas_jobs.md │ │ ├── google_vertex_ai_nas_jobs_nas_trial_detail.md │ │ ├── google_vertex_ai_nas_jobs_nas_trial_details.md │ │ ├── google_vertex_ai_pipeline_job.md │ │ ├── google_vertex_ai_pipeline_jobs.md │ │ ├── google_vertex_ai_schedule.md │ │ ├── google_vertex_ai_schedules.md │ │ ├── google_vertex_ai_studies.md │ │ ├── google_vertex_ai_studies_trial.md │ │ ├── google_vertex_ai_studies_trials.md │ │ ├── google_vertex_ai_study.md │ │ ├── google_vertex_ai_tensorboard.md │ │ ├── google_vertex_ai_tensorboard_experiment_run.md │ │ ├── google_vertex_ai_tensorboard_experiment_run_time_series_resource.md │ │ ├── google_vertex_ai_tensorboard_experiment_run_time_series_resources.md │ │ ├── google_vertex_ai_tensorboard_experiment_runs.md │ │ ├── google_vertex_ai_tensorboards.md │ │ ├── google_vertex_ai_tensorboards_experiment.md │ │ ├── google_vertex_ai_tensorboards_experiments.md │ │ ├── google_vertex_ai_training_pipeline.md │ │ └── google_vertex_ai_training_pipelines.md │ └── go.mod ├── generate/ │ ├── Gemfile │ ├── README.md │ ├── gen-controls/ │ │ ├── bigquery_dataset.rb │ │ ├── bigquery_table.rb │ │ ├── cloudfunctions_cloud_function.rb │ │ ├── compute_autoscaler.rb │ │ ├── compute_backend_bucket.rb │ │ ├── compute_backend_service.rb │ │ ├── compute_disk.rb │ │ ├── compute_firewall.rb │ │ ├── compute_global_address.rb │ │ ├── compute_global_forwarding_rule.rb │ │ ├── compute_health_check.rb │ │ ├── compute_http_health_check.rb │ │ ├── compute_https_health_check.rb │ │ ├── compute_instance.rb │ │ ├── compute_instance_group_manager.rb │ │ ├── compute_instance_template.rb │ │ ├── compute_network.rb │ │ ├── compute_network_endpoint_group.rb │ │ ├── compute_node_group.rb │ │ ├── compute_node_template.rb │ │ ├── compute_region_backend_service.rb │ │ ├── compute_route.rb │ │ ├── compute_router.rb │ │ ├── compute_snapshot.rb │ │ ├── compute_ssl_certificate.rb │ │ ├── compute_ssl_policy.rb │ │ ├── compute_subnetwork.rb │ │ ├── compute_target_http_proxy.rb │ │ ├── compute_target_https_proxy.rb │ │ ├── compute_target_pool.rb │ │ ├── compute_target_tcp_proxy.rb │ │ ├── compute_url_map.rb │ │ ├── dataproc_cluster.rb │ │ ├── dns_resource_record_set.rb │ │ ├── filestore_instance.rb │ │ ├── mlengine_model.rb │ │ ├── pubsub_subscription.rb │ │ ├── pubsub_topic.rb │ │ └── redis_instance.rb │ ├── generate-profile/ │ │ ├── README.md │ │ ├── attributes.yml │ │ ├── inspec.yml │ │ └── libraries/ │ │ └── .gitkeep │ ├── generated_test_template.erb │ ├── inspec.yml │ └── libraries/ │ ├── gcp_backend.rb │ ├── google/ │ │ ├── bigquery/ │ │ │ └── property/ │ │ │ ├── dataset_access.rb │ │ │ ├── dataset_access_view.rb │ │ │ ├── dataset_dataset_reference.rb │ │ │ ├── dataset_default_encryption_configuration.rb │ │ │ ├── table_encryption_configuration.rb │ │ │ ├── table_external_data_configuration.rb │ │ │ ├── table_external_data_configuration_bigtable_options.rb │ │ │ ├── table_external_data_configuration_bigtable_options_column_families.rb │ │ │ ├── table_external_data_configuration_bigtable_options_column_families_columns.rb │ │ │ ├── table_external_data_configuration_csv_options.rb │ │ │ ├── table_external_data_configuration_google_sheets_options.rb │ │ │ ├── table_external_data_configuration_schema.rb │ │ │ ├── table_external_data_configuration_schema_fields.rb │ │ │ ├── table_schema.rb │ │ │ ├── table_schema_fields.rb │ │ │ ├── table_streaming_buffer.rb │ │ │ ├── table_table_reference.rb │ │ │ ├── table_time_partitioning.rb │ │ │ ├── table_view.rb │ │ │ └── table_view_user_defined_function_resources.rb │ │ ├── cloudbuild/ │ │ │ └── property/ │ │ │ ├── trigger_build.rb │ │ │ ├── trigger_build_steps.rb │ │ │ ├── trigger_build_steps_volumes.rb │ │ │ └── trigger_trigger_template.rb │ │ ├── cloudfunctions/ │ │ │ └── property/ │ │ │ ├── cloudfunction_event_trigger.rb │ │ │ ├── cloudfunction_https_trigger.rb │ │ │ └── cloudfunction_source_repository.rb │ │ ├── compute/ │ │ │ └── property/ │ │ │ ├── autoscaler_autoscaling_policy.rb │ │ │ ├── autoscaler_autoscaling_policy_cpu_utilization.rb │ │ │ ├── autoscaler_autoscaling_policy_custom_metric_utilizations.rb │ │ │ ├── autoscaler_autoscaling_policy_load_balancing_utilization.rb │ │ │ ├── backendbucket_cdn_policy.rb │ │ │ ├── backendservice_backends.rb │ │ │ ├── backendservice_cdn_policy.rb │ │ │ ├── backendservice_cdn_policy_cache_key_policy.rb │ │ │ ├── backendservice_connection_draining.rb │ │ │ ├── backendservice_iap.rb │ │ │ ├── disk_disk_encryption_key.rb │ │ │ ├── disk_source_image_encryption_key.rb │ │ │ ├── disk_source_snapshot_encryption_key.rb │ │ │ ├── firewall_allowed.rb │ │ │ ├── firewall_denied.rb │ │ │ ├── globalforwardingrule_metadata_filters.rb │ │ │ ├── globalforwardingrule_metadata_filters_filter_labels.rb │ │ │ ├── healthcheck_http2_health_check.rb │ │ │ ├── healthcheck_http_health_check.rb │ │ │ ├── healthcheck_https_health_check.rb │ │ │ ├── healthcheck_ssl_health_check.rb │ │ │ ├── healthcheck_tcp_health_check.rb │ │ │ ├── instance_disks.rb │ │ │ ├── instance_disks_disk_encryption_key.rb │ │ │ ├── instance_disks_initialize_params.rb │ │ │ ├── instance_disks_initialize_params_source_image_encryption_key.rb │ │ │ ├── instance_guest_accelerators.rb │ │ │ ├── instance_network_interfaces.rb │ │ │ ├── instance_network_interfaces_access_configs.rb │ │ │ ├── instance_network_interfaces_alias_ip_ranges.rb │ │ │ ├── instance_scheduling.rb │ │ │ ├── instance_service_accounts.rb │ │ │ ├── instance_shielded_instance_config.rb │ │ │ ├── instance_tags.rb │ │ │ ├── instancegroupmanager_current_actions.rb │ │ │ ├── instancegroupmanager_named_ports.rb │ │ │ ├── instancetemplate_properties.rb │ │ │ ├── instancetemplate_properties_disks.rb │ │ │ ├── instancetemplate_properties_disks_disk_encryption_key.rb │ │ │ ├── instancetemplate_properties_disks_initialize_params.rb │ │ │ ├── instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb │ │ │ ├── instancetemplate_properties_guest_accelerators.rb │ │ │ ├── instancetemplate_properties_network_interfaces.rb │ │ │ ├── instancetemplate_properties_network_interfaces_access_configs.rb │ │ │ ├── instancetemplate_properties_network_interfaces_alias_ip_ranges.rb │ │ │ ├── instancetemplate_properties_scheduling.rb │ │ │ ├── instancetemplate_properties_service_accounts.rb │ │ │ ├── instancetemplate_properties_tags.rb │ │ │ ├── nodetemplate_node_type_flexibility.rb │ │ │ ├── region_deprecated.rb │ │ │ ├── region_quotas.rb │ │ │ ├── regionbackendservice_backends.rb │ │ │ ├── regionbackendservice_connection_draining.rb │ │ │ ├── router_bgp.rb │ │ │ ├── router_bgp_advertised_ip_ranges.rb │ │ │ ├── snapshot_snapshot_encryption_key.rb │ │ │ ├── snapshot_source_disk_encryption_key.rb │ │ │ ├── sslpolicy_warnings.rb │ │ │ ├── urlmap_host_rules.rb │ │ │ ├── urlmap_path_matchers.rb │ │ │ ├── urlmap_path_matchers_path_rules.rb │ │ │ └── urlmap_tests.rb │ │ ├── container/ │ │ │ └── property/ │ │ │ ├── regionalcluster_addons_config.rb │ │ │ ├── regionalcluster_addons_config_horizontal_pod_autoscaling.rb │ │ │ ├── regionalcluster_addons_config_http_load_balancing.rb │ │ │ ├── regionalcluster_addons_config_kubernetes_dashboard.rb │ │ │ ├── regionalcluster_addons_config_network_policy_config.rb │ │ │ ├── regionalcluster_conditions.rb │ │ │ ├── regionalcluster_default_max_pods_constraint.rb │ │ │ ├── regionalcluster_ip_allocation_policy.rb │ │ │ ├── regionalcluster_legacy_abac.rb │ │ │ ├── regionalcluster_master_auth.rb │ │ │ ├── regionalcluster_master_auth_client_certificate_config.rb │ │ │ ├── regionalcluster_master_authorized_networks_config.rb │ │ │ ├── regionalcluster_master_authorized_networks_config_cidr_blocks.rb │ │ │ ├── regionalcluster_network_policy.rb │ │ │ ├── regionalcluster_node_config.rb │ │ │ ├── regionalcluster_node_config_accelerators.rb │ │ │ ├── regionalcluster_node_config_taints.rb │ │ │ ├── regionalcluster_private_cluster_config.rb │ │ │ ├── regionalnodepool_autoscaling.rb │ │ │ ├── regionalnodepool_conditions.rb │ │ │ ├── regionalnodepool_config.rb │ │ │ ├── regionalnodepool_config_accelerators.rb │ │ │ ├── regionalnodepool_config_taints.rb │ │ │ ├── regionalnodepool_management.rb │ │ │ ├── regionalnodepool_management_upgrade_options.rb │ │ │ └── regionalnodepool_max_pods_constraint.rb │ │ ├── dataproc/ │ │ │ └── property/ │ │ │ ├── cluster_config.rb │ │ │ ├── cluster_config_encryption_config.rb │ │ │ ├── cluster_config_gce_cluster_config.rb │ │ │ ├── cluster_config_initialization_actions.rb │ │ │ ├── cluster_config_master_config.rb │ │ │ ├── cluster_config_master_config_disk_config.rb │ │ │ ├── cluster_config_master_config_managed_group_config.rb │ │ │ ├── cluster_config_secondary_worker_config.rb │ │ │ ├── cluster_config_secondary_worker_config_disk_config.rb │ │ │ ├── cluster_config_secondary_worker_config_managed_group_config.rb │ │ │ ├── cluster_config_security_config.rb │ │ │ ├── cluster_config_security_config_kerberos_config.rb │ │ │ ├── cluster_config_software_config.rb │ │ │ ├── cluster_config_worker_config.rb │ │ │ ├── cluster_config_worker_config_disk_config.rb │ │ │ └── cluster_config_worker_config_managed_group_config.rb │ │ ├── filestore/ │ │ │ └── property/ │ │ │ ├── instance_file_shares.rb │ │ │ └── instance_networks.rb │ │ ├── iam/ │ │ │ └── property/ │ │ │ ├── iam_policy_audit_configs.rb │ │ │ ├── iam_policy_audit_configs_audit_log_configs.rb │ │ │ └── iam_policy_bindings.rb │ │ ├── mlengine/ │ │ │ └── property/ │ │ │ └── model_default_version.rb │ │ ├── pubsub/ │ │ │ └── property/ │ │ │ ├── subscription_expiration_policy.rb │ │ │ ├── subscription_push_config.rb │ │ │ └── topic_message_storage_policy.rb │ │ └── resourcemanager/ │ │ └── property/ │ │ ├── organizationpolicy_boolean_policy.rb │ │ └── organizationpolicy_list_policy.rb │ ├── google_appengine_standard_app_version.rb │ ├── google_appengine_standard_app_versions.rb │ ├── google_bigquery_dataset.rb │ ├── google_bigquery_datasets.rb │ ├── google_bigquery_table.rb │ ├── google_bigquery_tables.rb │ ├── google_cloudbuild_trigger.rb │ ├── google_cloudbuild_triggers.rb │ ├── google_cloudfunctions_cloud_function.rb │ ├── google_cloudfunctions_cloud_functions.rb │ ├── google_compute_address.rb │ ├── google_compute_autoscaler.rb │ ├── google_compute_autoscalers.rb │ ├── google_compute_backend_bucket.rb │ ├── google_compute_backend_buckets.rb │ ├── google_compute_backend_service.rb │ ├── google_compute_backend_services.rb │ ├── google_compute_disk.rb │ ├── google_compute_disks.rb │ ├── google_compute_firewall.rb │ ├── google_compute_firewalls.rb │ ├── google_compute_forwarding_rule.rb │ ├── google_compute_forwarding_rules.rb │ ├── google_compute_global_address.rb │ ├── google_compute_global_addresses.rb │ ├── google_compute_global_forwarding_rule.rb │ ├── google_compute_global_forwarding_rules.rb │ ├── google_compute_health_check.rb │ ├── google_compute_health_checks.rb │ ├── google_compute_http_health_check.rb │ ├── google_compute_http_health_checks.rb │ ├── google_compute_https_health_check.rb │ ├── google_compute_https_health_checks.rb │ ├── google_compute_image.rb │ ├── google_compute_instance.rb │ ├── google_compute_instance_group.rb │ ├── google_compute_instance_group_manager.rb │ ├── google_compute_instance_group_managers.rb │ ├── google_compute_instance_groups.rb │ ├── google_compute_instance_template.rb │ ├── google_compute_instance_templates.rb │ ├── google_compute_instances.rb │ ├── google_compute_network.rb │ ├── google_compute_network_endpoint_group.rb │ ├── google_compute_network_endpoint_groups.rb │ ├── google_compute_networks.rb │ ├── google_compute_node_group.rb │ ├── google_compute_node_groups.rb │ ├── google_compute_node_template.rb │ ├── google_compute_node_templates.rb │ ├── google_compute_project_info.rb │ ├── google_compute_region.rb │ ├── google_compute_region_backend_service.rb │ ├── google_compute_region_backend_services.rb │ ├── google_compute_region_instance_group_manager.rb │ ├── google_compute_region_instance_group_managers.rb │ ├── google_compute_regional_disk.rb │ ├── google_compute_regions.rb │ ├── google_compute_route.rb │ ├── google_compute_router.rb │ ├── google_compute_routers.rb │ ├── google_compute_routes.rb │ ├── google_compute_snapshot.rb │ ├── google_compute_snapshots.rb │ ├── google_compute_ssl_certificate.rb │ ├── google_compute_ssl_certificates.rb │ ├── google_compute_ssl_policies.rb │ ├── google_compute_ssl_policy.rb │ ├── google_compute_subnetwork.rb │ ├── google_compute_subnetwork_iam_policy.rb │ ├── google_compute_subnetworks.rb │ ├── google_compute_target_http_proxies.rb │ ├── google_compute_target_http_proxy.rb │ ├── google_compute_target_https_proxies.rb │ ├── google_compute_target_https_proxy.rb │ ├── google_compute_target_pool.rb │ ├── google_compute_target_pools.rb │ ├── google_compute_target_tcp_proxies.rb │ ├── google_compute_target_tcp_proxy.rb │ ├── google_compute_url_map.rb │ ├── google_compute_url_maps.rb │ ├── google_compute_vpn_tunnel.rb │ ├── google_compute_vpn_tunnels.rb │ ├── google_compute_zone.rb │ ├── google_compute_zones.rb │ ├── google_container_cluster.rb │ ├── google_container_clusters.rb │ ├── google_container_node_pool.rb │ ├── google_container_node_pools.rb │ ├── google_container_regional_cluster.rb │ ├── google_container_regional_clusters.rb │ ├── google_container_regional_node_pool.rb │ ├── google_container_regional_node_pools.rb │ ├── google_dataproc_cluster.rb │ ├── google_dataproc_clusters.rb │ ├── google_dns_managed_zone.rb │ ├── google_dns_managed_zones.rb │ ├── google_dns_resource_record_set.rb │ ├── google_dns_resource_record_sets.rb │ ├── google_filestore_instance.rb │ ├── google_filestore_instances.rb │ ├── google_kms_crypto_key.rb │ ├── google_kms_crypto_key_iam_binding.rb │ ├── google_kms_crypto_key_iam_bindings.rb │ ├── google_kms_crypto_keys.rb │ ├── google_kms_key_ring.rb │ ├── google_kms_key_ring_iam_binding.rb │ ├── google_kms_key_ring_iam_bindings.rb │ ├── google_kms_key_rings.rb │ ├── google_logging_folder_exclusion.rb │ ├── google_logging_folder_exclusions.rb │ ├── google_logging_folder_log_sink.rb │ ├── google_logging_folder_log_sinks.rb │ ├── google_logging_organization_log_sink.rb │ ├── google_logging_organization_log_sinks.rb │ ├── google_logging_project_exclusion.rb │ ├── google_logging_project_sink.rb │ ├── google_logging_project_sinks.rb │ ├── google_ml_engine_model.rb │ ├── google_ml_engine_models.rb │ ├── google_organization.rb │ ├── google_organization_policy.rb │ ├── google_organizations.rb │ ├── google_project.rb │ ├── google_project_alert_policies.rb │ ├── google_project_alert_policy.rb │ ├── google_project_alert_policy_condition.rb │ ├── google_project_iam_binding.rb │ ├── google_project_iam_bindings.rb │ ├── google_project_iam_custom_role.rb │ ├── google_project_logging_audit_config.rb │ ├── google_project_metric.rb │ ├── google_project_metrics.rb │ ├── google_projects.rb │ ├── google_pubsub_subscription.rb │ ├── google_pubsub_subscription_iam_policy.rb │ ├── google_pubsub_subscriptions.rb │ ├── google_pubsub_topic.rb │ ├── google_pubsub_topic_iam_policy.rb │ ├── google_pubsub_topics.rb │ ├── google_redis_instance.rb │ ├── google_redis_instances.rb │ ├── google_resourcemanager_folder.rb │ ├── google_resourcemanager_folders.rb │ ├── google_resourcemanager_organization_policy.rb │ ├── google_resourcemanager_project_iam_policy.rb │ ├── google_runtime_config_config.rb │ ├── google_runtime_config_config_iam_policy.rb │ ├── google_runtime_config_configs.rb │ ├── google_runtime_config_variable.rb │ ├── google_runtime_config_variables.rb │ ├── google_service_account.rb │ ├── google_service_account_key.rb │ ├── google_service_account_keys.rb │ ├── google_service_accounts.rb │ ├── google_sourcerepo_repositories.rb │ ├── google_sourcerepo_repository.rb │ ├── google_sql_database_instance.rb │ ├── google_sql_database_instances.rb │ ├── google_sql_users.rb │ ├── google_storage_bucket.rb │ ├── google_storage_bucket_acl.rb │ ├── google_storage_bucket_iam_binding.rb │ ├── google_storage_bucket_iam_bindings.rb │ ├── google_storage_bucket_object.rb │ ├── google_storage_bucket_objects.rb │ ├── google_storage_buckets.rb │ ├── google_storage_default_object_acl.rb │ ├── google_storage_object_acl.rb │ ├── google_user.rb │ └── google_users.rb ├── inspec.yml ├── libraries/ │ ├── gcp_backend.rb │ ├── google/ │ │ ├── accesscontextmanager/ │ │ │ └── property/ │ │ │ ├── accesslevel_basic.rb │ │ │ ├── accesslevel_basic_conditions.rb │ │ │ ├── accesslevel_basic_conditions_device_policy.rb │ │ │ ├── accesslevel_basic_conditions_device_policy_os_constraints.rb │ │ │ ├── accesslevel_custom.rb │ │ │ ├── accesslevel_custom_expr.rb │ │ │ ├── serviceperimeter_spec.rb │ │ │ ├── serviceperimeter_spec_vpc_accessible_services.rb │ │ │ ├── serviceperimeter_status.rb │ │ │ └── serviceperimeter_status_vpc_accessible_services.rb │ │ ├── apigee/ │ │ │ └── property/ │ │ │ ├── organization_addons_config.rb │ │ │ ├── organization_addons_config_advanced_api_ops_config.rb │ │ │ ├── organization_addons_config_analytics_config.rb │ │ │ ├── organization_addons_config_api_security_config.rb │ │ │ ├── organization_addons_config_connectors_platform_config.rb │ │ │ ├── organization_addons_config_integration_config.rb │ │ │ ├── organization_addons_config_monetization_config.rb │ │ │ ├── organization_properties.rb │ │ │ ├── organization_properties_property.rb │ │ │ ├── organizationapi_labels.rb │ │ │ └── organizationapi_meta_data.rb │ │ ├── appengine/ │ │ │ └── property/ │ │ │ ├── standardappversion_automatic_scaling.rb │ │ │ ├── standardappversion_automatic_scaling_standard_scheduler_settings.rb │ │ │ ├── standardappversion_basic_scaling.rb │ │ │ ├── standardappversion_manual_scaling.rb │ │ │ └── standardappversion_vpc_access_connector.rb │ │ ├── artifactregistry/ │ │ │ └── property/ │ │ │ ├── projectlocationrepository_cleanup_policies.rb │ │ │ ├── projectlocationrepository_docker_config.rb │ │ │ ├── projectlocationrepository_labels.rb │ │ │ ├── projectlocationrepository_maven_config.rb │ │ │ ├── projectlocationrepository_remote_repository_config.rb │ │ │ ├── projectlocationrepository_remote_repository_config_apt_repository.rb │ │ │ ├── projectlocationrepository_remote_repository_config_apt_repository_public_repository.rb │ │ │ ├── projectlocationrepository_remote_repository_config_docker_repository.rb │ │ │ ├── projectlocationrepository_remote_repository_config_maven_repository.rb │ │ │ ├── projectlocationrepository_remote_repository_config_npm_repository.rb │ │ │ ├── projectlocationrepository_remote_repository_config_python_repository.rb │ │ │ ├── projectlocationrepository_remote_repository_config_upstream_credentials.rb │ │ │ ├── projectlocationrepository_remote_repository_config_yum_repository.rb │ │ │ ├── projectlocationrepository_remote_repository_config_yum_repository_public_repository.rb │ │ │ ├── projectlocationrepository_rrcucup_credentials.rb │ │ │ ├── projectlocationrepository_virtual_repository_config.rb │ │ │ └── projectlocationrepository_virtual_repository_config_upstream_policies.rb │ │ ├── bigquery/ │ │ │ └── property/ │ │ │ ├── dataset_access.rb │ │ │ ├── dataset_access_view.rb │ │ │ ├── dataset_dataset_reference.rb │ │ │ ├── dataset_default_encryption_configuration.rb │ │ │ ├── table_encryption_configuration.rb │ │ │ ├── table_external_data_configuration.rb │ │ │ ├── table_external_data_configuration_bigtable_options.rb │ │ │ ├── table_external_data_configuration_bigtable_options_column_families.rb │ │ │ ├── table_external_data_configuration_bigtable_options_column_families_columns.rb │ │ │ ├── table_external_data_configuration_csv_options.rb │ │ │ ├── table_external_data_configuration_google_sheets_options.rb │ │ │ ├── table_external_data_configuration_schema.rb │ │ │ ├── table_external_data_configuration_schema_fields.rb │ │ │ ├── table_schema.rb │ │ │ ├── table_schema_fields.rb │ │ │ ├── table_streaming_buffer.rb │ │ │ ├── table_table_reference.rb │ │ │ ├── table_time_partitioning.rb │ │ │ ├── table_view.rb │ │ │ └── table_view_user_defined_function_resources.rb │ │ ├── bigtableadmin/ │ │ │ └── property/ │ │ │ ├── cluster_cluster_config.rb │ │ │ ├── cluster_cluster_config_cluster_autoscaling_config.rb │ │ │ ├── cluster_cluster_config_cluster_autoscaling_config_autoscaling_limits.rb │ │ │ ├── cluster_cluster_config_cluster_autoscaling_config_autoscaling_targets.rb │ │ │ ├── cluster_encryption_config.rb │ │ │ ├── clusterbackup_encryption_info.rb │ │ │ ├── clusterbackup_encryption_info_encryption_status.rb │ │ │ ├── instanceappprofile_data_boost_isolation_read_only.rb │ │ │ ├── instanceappprofile_multi_cluster_routing_use_any.rb │ │ │ ├── instanceappprofile_single_cluster_routing.rb │ │ │ └── instanceappprofile_standard_isolation.rb │ │ ├── cloudbuild/ │ │ │ └── property/ │ │ │ ├── trigger_build.rb │ │ │ ├── trigger_build_artifacts.rb │ │ │ ├── trigger_build_artifacts_objects.rb │ │ │ ├── trigger_build_artifacts_objects_timing.rb │ │ │ ├── trigger_build_options.rb │ │ │ ├── trigger_build_options_volumes.rb │ │ │ ├── trigger_build_secrets.rb │ │ │ ├── trigger_build_source.rb │ │ │ ├── trigger_build_source_repo_source.rb │ │ │ ├── trigger_build_source_storage_source.rb │ │ │ ├── trigger_build_steps.rb │ │ │ ├── trigger_build_steps_volumes.rb │ │ │ ├── trigger_github.rb │ │ │ ├── trigger_github_pull_request.rb │ │ │ ├── trigger_github_push.rb │ │ │ └── trigger_trigger_template.rb │ │ ├── cloudfunctions/ │ │ │ └── property/ │ │ │ ├── cloudfunction_event_trigger.rb │ │ │ ├── cloudfunction_https_trigger.rb │ │ │ └── cloudfunction_source_repository.rb │ │ ├── cloudscheduler/ │ │ │ └── property/ │ │ │ ├── job_app_engine_http_target.rb │ │ │ ├── job_app_engine_http_target_app_engine_routing.rb │ │ │ ├── job_http_target.rb │ │ │ ├── job_http_target_oauth_token.rb │ │ │ ├── job_http_target_oidc_token.rb │ │ │ ├── job_pubsub_target.rb │ │ │ └── job_retry_config.rb │ │ ├── composer/ │ │ │ └── property/ │ │ │ ├── projectlocationenvironment_config.rb │ │ │ ├── projectlocationenvironment_config_database_config.rb │ │ │ ├── projectlocationenvironment_config_encryption_config.rb │ │ │ ├── projectlocationenvironment_config_maintenance_window.rb │ │ │ ├── projectlocationenvironment_config_master_authorized_networks_config.rb │ │ │ ├── projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks.rb │ │ │ ├── projectlocationenvironment_config_node_config.rb │ │ │ ├── projectlocationenvironment_config_node_config_ip_allocation_policy.rb │ │ │ ├── projectlocationenvironment_config_private_environment_config.rb │ │ │ ├── projectlocationenvironment_config_private_environment_config_networking_config.rb │ │ │ ├── projectlocationenvironment_config_private_environment_config_private_cluster_config.rb │ │ │ ├── projectlocationenvironment_config_recovery_config.rb │ │ │ ├── projectlocationenvironment_config_recovery_config_scheduled_snapshots_config.rb │ │ │ ├── projectlocationenvironment_config_software_config.rb │ │ │ ├── projectlocationenvironment_config_software_config_airflow_config_overrides.rb │ │ │ ├── projectlocationenvironment_config_software_config_env_variables.rb │ │ │ ├── projectlocationenvironment_config_software_config_pypi_packages.rb │ │ │ ├── projectlocationenvironment_config_web_server_config.rb │ │ │ ├── projectlocationenvironment_config_web_server_network_access_control.rb │ │ │ ├── projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges.rb │ │ │ ├── projectlocationenvironment_config_workloads_config.rb │ │ │ ├── projectlocationenvironment_config_workloads_config_scheduler.rb │ │ │ ├── projectlocationenvironment_config_workloads_config_triggerer.rb │ │ │ ├── projectlocationenvironment_config_workloads_config_web_server.rb │ │ │ ├── projectlocationenvironment_config_workloads_config_worker.rb │ │ │ ├── projectlocationenvironment_labels.rb │ │ │ └── projectlocationenvironment_storage_config.rb │ │ ├── compute/ │ │ │ └── property/ │ │ │ ├── acceleratortype_deprecated.rb │ │ │ ├── autoscaler_autoscaling_policy.rb │ │ │ ├── autoscaler_autoscaling_policy_cpu_utilization.rb │ │ │ ├── autoscaler_autoscaling_policy_custom_metric_utilizations.rb │ │ │ ├── autoscaler_autoscaling_policy_load_balancing_utilization.rb │ │ │ ├── autoscaler_autoscaling_policy_scale_down_control.rb │ │ │ ├── autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas.rb │ │ │ ├── autoscaler_autoscaling_policy_scale_in_control.rb │ │ │ ├── autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas.rb │ │ │ ├── autoscaler_autoscaling_policy_scaling_schedules.rb │ │ │ ├── backendbucket_cdn_policy.rb │ │ │ ├── backendbucket_cdn_policy_negative_caching_policy.rb │ │ │ ├── backendservice_backends.rb │ │ │ ├── backendservice_cdn_policy.rb │ │ │ ├── backendservice_cdn_policy_cache_key_policy.rb │ │ │ ├── backendservice_cdn_policy_negative_caching_policy.rb │ │ │ ├── backendservice_circuit_breakers.rb │ │ │ ├── backendservice_circuit_breakers_connect_timeout.rb │ │ │ ├── backendservice_connection_draining.rb │ │ │ ├── backendservice_consistent_hash.rb │ │ │ ├── backendservice_consistent_hash_http_cookie.rb │ │ │ ├── backendservice_consistent_hash_http_cookie_ttl.rb │ │ │ ├── backendservice_iap.rb │ │ │ ├── backendservice_log_config.rb │ │ │ ├── backendservice_outlier_detection.rb │ │ │ ├── backendservice_outlier_detection_base_ejection_time.rb │ │ │ ├── backendservice_outlier_detection_interval.rb │ │ │ ├── disk_disk_encryption_key.rb │ │ │ ├── disk_source_image_encryption_key.rb │ │ │ ├── disk_source_snapshot_encryption_key.rb │ │ │ ├── disktype_deprecated.rb │ │ │ ├── externalvpngateway_interfaces.rb │ │ │ ├── firewall_allowed.rb │ │ │ ├── firewall_denied.rb │ │ │ ├── firewall_log_config.rb │ │ │ ├── globalforwardingrule_metadata_filters.rb │ │ │ ├── globalforwardingrule_metadata_filters_filter_labels.rb │ │ │ ├── globalnetworkendpointgroup_annotations.rb │ │ │ ├── globalnetworkendpointgroup_app_engine.rb │ │ │ ├── globalnetworkendpointgroup_cloud_function.rb │ │ │ ├── globalnetworkendpointgroup_cloud_run.rb │ │ │ ├── globalnetworkendpointgroup_psc_data.rb │ │ │ ├── healthcheck_grpc_health_check.rb │ │ │ ├── healthcheck_http2_health_check.rb │ │ │ ├── healthcheck_http_health_check.rb │ │ │ ├── healthcheck_https_health_check.rb │ │ │ ├── healthcheck_log_config.rb │ │ │ ├── healthcheck_ssl_health_check.rb │ │ │ ├── healthcheck_tcp_health_check.rb │ │ │ ├── image_deprecated.rb │ │ │ ├── image_guest_os_features.rb │ │ │ ├── image_image_encryption_key.rb │ │ │ ├── image_raw_disk.rb │ │ │ ├── image_source_disk_encryption_key.rb │ │ │ ├── imagefamilyview_image.rb │ │ │ ├── imagefamilyview_image_deprecated.rb │ │ │ ├── imagefamilyview_image_image_encryption_key.rb │ │ │ ├── imagefamilyview_image_raw_disk.rb │ │ │ ├── imagefamilyview_image_source_disk_encryption_key.rb │ │ │ ├── imagefamilyview_image_source_snapshot_encryption_key.rb │ │ │ ├── imagefamilyview_image_source_snapshot_encryption_key_dbs.rb │ │ │ ├── imagefamilyview_image_source_snapshot_encryption_key_dbxs.rb │ │ │ ├── imagefamilyview_image_source_snapshot_encryption_key_keks.rb │ │ │ ├── imagefamilyview_image_source_snapshot_encryption_key_pk.rb │ │ │ ├── instance_disks.rb │ │ │ ├── instance_disks_disk_encryption_key.rb │ │ │ ├── instance_disks_initialize_params.rb │ │ │ ├── instance_disks_initialize_params_source_image_encryption_key.rb │ │ │ ├── instance_guest_accelerators.rb │ │ │ ├── instance_network_interfaces.rb │ │ │ ├── instance_network_interfaces_access_configs.rb │ │ │ ├── instance_network_interfaces_alias_ip_ranges.rb │ │ │ ├── instance_scheduling.rb │ │ │ ├── instance_service_accounts.rb │ │ │ ├── instance_shielded_instance_config.rb │ │ │ ├── instance_tags.rb │ │ │ ├── instancegroup_named_ports.rb │ │ │ ├── instancegroupmanager_current_actions.rb │ │ │ ├── instancegroupmanager_named_ports.rb │ │ │ ├── instancetemplate_properties.rb │ │ │ ├── instancetemplate_properties_disks.rb │ │ │ ├── instancetemplate_properties_disks_disk_encryption_key.rb │ │ │ ├── instancetemplate_properties_disks_initialize_params.rb │ │ │ ├── instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb │ │ │ ├── instancetemplate_properties_guest_accelerators.rb │ │ │ ├── instancetemplate_properties_network_interfaces.rb │ │ │ ├── instancetemplate_properties_network_interfaces_access_configs.rb │ │ │ ├── instancetemplate_properties_network_interfaces_alias_ip_ranges.rb │ │ │ ├── instancetemplate_properties_scheduling.rb │ │ │ ├── instancetemplate_properties_service_accounts.rb │ │ │ ├── instancetemplate_properties_tags.rb │ │ │ ├── interconnect_circuit_infos.rb │ │ │ ├── interconnect_expected_outages.rb │ │ │ ├── interconnectattachment_configuration_constraints.rb │ │ │ ├── interconnectattachment_configuration_constraints_bgp_peer_asn_ranges.rb │ │ │ ├── interconnectattachment_labels.rb │ │ │ ├── interconnectattachment_partner_metadata.rb │ │ │ ├── interconnectattachment_private_interconnect_info.rb │ │ │ ├── license_resource_requirements.rb │ │ │ ├── licensecode_license_alias.rb │ │ │ ├── machineimage_instance_properties.rb │ │ │ ├── machineimage_instance_properties_advanced_machine_features.rb │ │ │ ├── machineimage_instance_properties_confidential_instance_config.rb │ │ │ ├── machineimage_instance_properties_disks.rb │ │ │ ├── machineimage_instance_properties_disks_disk_encryption_key.rb │ │ │ ├── machineimage_instance_properties_disks_guest_os_features.rb │ │ │ ├── machineimage_instance_properties_disks_initialize_params.rb │ │ │ ├── machineimage_instance_properties_disks_initialize_params_labels.rb │ │ │ ├── machineimage_instance_properties_disks_initialize_params_resource_manager_tags.rb │ │ │ ├── machineimage_instance_properties_disks_initialize_params_source_image_encryption_key.rb │ │ │ ├── machineimage_instance_properties_disks_initialize_params_source_snapshot_encryption_key.rb │ │ │ ├── machineimage_instance_properties_disks_shielded_instance_initial_state.rb │ │ │ ├── machineimage_instance_properties_disks_shielded_instance_initial_state_dbs.rb │ │ │ ├── machineimage_instance_properties_disks_shielded_instance_initial_state_dbxs.rb │ │ │ ├── machineimage_instance_properties_disks_shielded_instance_initial_state_keks.rb │ │ │ ├── machineimage_instance_properties_disks_shielded_instance_initial_state_pk.rb │ │ │ ├── machineimage_instance_properties_guest_accelerators.rb │ │ │ ├── machineimage_instance_properties_labels.rb │ │ │ ├── machineimage_instance_properties_metadata.rb │ │ │ ├── machineimage_instance_properties_metadata_items.rb │ │ │ ├── machineimage_instance_properties_network_interfaces.rb │ │ │ ├── machineimage_instance_properties_network_interfaces_access_configs.rb │ │ │ ├── machineimage_instance_properties_network_interfaces_alias_ip_ranges.rb │ │ │ ├── machineimage_instance_properties_network_interfaces_ipv6_access_configs.rb │ │ │ ├── machineimage_instance_properties_network_performance_config.rb │ │ │ ├── machineimage_instance_properties_reservation_affinity.rb │ │ │ ├── machineimage_instance_properties_resource_manager_tags.rb │ │ │ ├── machineimage_instance_properties_scheduling.rb │ │ │ ├── machineimage_instance_properties_scheduling_local_ssd_recovery_timeout.rb │ │ │ ├── machineimage_instance_properties_scheduling_node_affinities.rb │ │ │ ├── machineimage_instance_properties_service_accounts.rb │ │ │ ├── machineimage_instance_properties_shielded_instance_config.rb │ │ │ ├── machineimage_instance_properties_tags.rb │ │ │ ├── machineimage_machine_image_encryption_key.rb │ │ │ ├── machineimage_saved_disks.rb │ │ │ ├── machineimage_source_disk_encryption_keys.rb │ │ │ ├── machineimage_source_disk_encryption_keys_disk_encryption_key.rb │ │ │ ├── machineimage_source_instance_properties.rb │ │ │ ├── machineimage_source_instance_properties_disks.rb │ │ │ ├── machineimage_source_instance_properties_disks_disk_encryption_key.rb │ │ │ ├── machineimage_source_instance_properties_disks_guest_os_features.rb │ │ │ ├── machineimage_source_instance_properties_guest_accelerators.rb │ │ │ ├── machineimage_source_instance_properties_labels.rb │ │ │ ├── machineimage_source_instance_properties_metadata.rb │ │ │ ├── machineimage_source_instance_properties_metadata_items.rb │ │ │ ├── machineimage_source_instance_properties_network_interfaces.rb │ │ │ ├── machineimage_source_instance_properties_network_interfaces_access_configs.rb │ │ │ ├── machineimage_source_instance_properties_network_interfaces_alias_ip_ranges.rb │ │ │ ├── machineimage_source_instance_properties_network_interfaces_ipv6_access_configs.rb │ │ │ ├── machineimage_source_instance_properties_scheduling.rb │ │ │ ├── machineimage_source_instance_properties_scheduling_local_ssd_recovery_timeout.rb │ │ │ ├── machineimage_source_instance_properties_scheduling_node_affinities.rb │ │ │ ├── machineimage_source_instance_properties_service_accounts.rb │ │ │ ├── machineimage_source_instance_properties_tags.rb │ │ │ ├── machinetype_accelerators.rb │ │ │ ├── machinetype_deprecated.rb │ │ │ ├── machinetype_scratch_disks.rb │ │ │ ├── network_peerings.rb │ │ │ ├── network_routing_config.rb │ │ │ ├── networkattachment_connection_endpoints.rb │ │ │ ├── networkfirewallpolicy_associations.rb │ │ │ ├── networkfirewallpolicy_rules.rb │ │ │ ├── networkfirewallpolicy_rules_match.rb │ │ │ ├── networkfirewallpolicy_rules_match_layer4_configs.rb │ │ │ ├── networkfirewallpolicy_rules_match_src_secure_tags.rb │ │ │ ├── networkfirewallpolicy_rules_target_secure_tags.rb │ │ │ ├── nodegroup_autoscaling_policy.rb │ │ │ ├── nodetemplate_node_type_flexibility.rb │ │ │ ├── nodetemplate_server_binding.rb │ │ │ ├── nodetype_deprecated.rb │ │ │ ├── packetmirroring_collector_ilb.rb │ │ │ ├── packetmirroring_filter.rb │ │ │ ├── packetmirroring_mirrored_resources.rb │ │ │ ├── packetmirroring_mirrored_resources_instances.rb │ │ │ ├── packetmirroring_mirrored_resources_subnetworks.rb │ │ │ ├── packetmirroring_network.rb │ │ │ ├── projectinfo_common_instance_metadata.rb │ │ │ ├── projectinfo_common_instance_metadata_items.rb │ │ │ ├── projectinfo_quotas.rb │ │ │ ├── region_deprecated.rb │ │ │ ├── region_quotas.rb │ │ │ ├── regionautoscaler_autoscaling_policy.rb │ │ │ ├── regionautoscaler_autoscaling_policy_cpu_utilization.rb │ │ │ ├── regionautoscaler_autoscaling_policy_custom_metric_utilizations.rb │ │ │ ├── regionautoscaler_autoscaling_policy_load_balancing_utilization.rb │ │ │ ├── regionautoscaler_autoscaling_policy_scale_down_control.rb │ │ │ ├── regionautoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas.rb │ │ │ ├── regionautoscaler_autoscaling_policy_scale_in_control.rb │ │ │ ├── regionautoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas.rb │ │ │ ├── regionautoscaler_autoscaling_policy_scaling_schedules.rb │ │ │ ├── regionautoscaler_scaling_schedule_status.rb │ │ │ ├── regionautoscaler_status_details.rb │ │ │ ├── regionbackendservice_backends.rb │ │ │ ├── regionbackendservice_cdn_policy.rb │ │ │ ├── regionbackendservice_cdn_policy_cache_key_policy.rb │ │ │ ├── regionbackendservice_cdn_policy_negative_caching_policy.rb │ │ │ ├── regionbackendservice_circuit_breakers.rb │ │ │ ├── regionbackendservice_circuit_breakers_connect_timeout.rb │ │ │ ├── regionbackendservice_connection_draining.rb │ │ │ ├── regionbackendservice_consistent_hash.rb │ │ │ ├── regionbackendservice_consistent_hash_http_cookie.rb │ │ │ ├── regionbackendservice_consistent_hash_http_cookie_ttl.rb │ │ │ ├── regionbackendservice_failover_policy.rb │ │ │ ├── regionbackendservice_log_config.rb │ │ │ ├── regionbackendservice_outlier_detection.rb │ │ │ ├── regionbackendservice_outlier_detection_base_ejection_time.rb │ │ │ ├── regionbackendservice_outlier_detection_interval.rb │ │ │ ├── regioncommitment_license_resource.rb │ │ │ ├── regioncommitment_reservations.rb │ │ │ ├── regioncommitment_reservations_aggregate_reservation.rb │ │ │ ├── regioncommitment_reservations_aggregate_reservation_in_use_resources.rb │ │ │ ├── regioncommitment_reservations_aggregate_reservation_in_use_resources_accelerator.rb │ │ │ ├── regioncommitment_reservations_aggregate_reservation_reserved_resources.rb │ │ │ ├── regioncommitment_reservations_aggregate_reservation_reserved_resources_accelerator.rb │ │ │ ├── regioncommitment_reservations_delete_after_duration.rb │ │ │ ├── regioncommitment_reservations_resource_policies.rb │ │ │ ├── regioncommitment_reservations_resource_status.rb │ │ │ ├── regioncommitment_reservations_resource_status_specific_sku_allocation.rb │ │ │ ├── regioncommitment_reservations_share_settings.rb │ │ │ ├── regioncommitment_reservations_share_settings_folder_map.rb │ │ │ ├── regioncommitment_reservations_share_settings_project_map.rb │ │ │ ├── regioncommitment_reservations_specific_reservation.rb │ │ │ ├── regioncommitment_reservations_specific_reservation_instance_properties.rb │ │ │ ├── regioncommitment_reservations_specific_reservation_instance_properties_guest_accelerators.rb │ │ │ ├── regioncommitment_reservations_specific_reservation_instance_properties_local_ssds.rb │ │ │ ├── regioncommitment_resource_status.rb │ │ │ ├── regioncommitment_resource_status_cancellation_information.rb │ │ │ ├── regioncommitment_resource_status_cancellation_information_canceled_commitment.rb │ │ │ ├── regioncommitment_resource_status_cancellation_information_cancellation_cap.rb │ │ │ ├── regioncommitment_resource_status_cancellation_information_cancellation_fee.rb │ │ │ ├── regioncommitment_resources.rb │ │ │ ├── regiondisktype_deprecated.rb │ │ │ ├── regionhealthcheck_grpc_health_check.rb │ │ │ ├── regionhealthcheck_http2_health_check.rb │ │ │ ├── regionhealthcheck_http_health_check.rb │ │ │ ├── regionhealthcheck_https_health_check.rb │ │ │ ├── regionhealthcheck_log_config.rb │ │ │ ├── regionhealthcheck_ssl_health_check.rb │ │ │ ├── regionhealthcheck_tcp_health_check.rb │ │ │ ├── regioninstancegroup_named_ports.rb │ │ │ ├── regioninstancegroupmanager_auto_healing_policies.rb │ │ │ ├── regioninstancegroupmanager_current_actions.rb │ │ │ ├── regioninstancegroupmanager_named_ports.rb │ │ │ ├── regionnetworkendpointgroup_annotations.rb │ │ │ ├── regionnetworkendpointgroup_app_engine.rb │ │ │ ├── regionnetworkendpointgroup_cloud_function.rb │ │ │ ├── regionnetworkendpointgroup_cloud_run.rb │ │ │ ├── regionnetworkendpointgroup_psc_data.rb │ │ │ ├── regionsecuritypolicy_adaptive_protection_config.rb │ │ │ ├── regionsecuritypolicy_adaptive_protection_config_auto_deploy_config.rb │ │ │ ├── regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config.rb │ │ │ ├── regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs.rb │ │ │ ├── regionsecuritypolicy_advanced_options_config.rb │ │ │ ├── regionsecuritypolicy_advanced_options_config_json_custom_config.rb │ │ │ ├── regionsecuritypolicy_apclddctctg_configs.rb │ │ │ ├── regionsecuritypolicy_associations.rb │ │ │ ├── regionsecuritypolicy_cloud_armor_config.rb │ │ │ ├── regionsecuritypolicy_ddos_protection_config.rb │ │ │ ├── regionsecuritypolicy_labels.rb │ │ │ ├── regionsecuritypolicy_recaptcha_options_config.rb │ │ │ ├── regionsecuritypolicy_rules.rb │ │ │ ├── regionsecuritypolicy_rules_header_action.rb │ │ │ ├── regionsecuritypolicy_rules_header_action_request_headers_to_adds.rb │ │ │ ├── regionsecuritypolicy_rules_match.rb │ │ │ ├── regionsecuritypolicy_rules_match_config.rb │ │ │ ├── regionsecuritypolicy_rules_match_config_dest_ports.rb │ │ │ ├── regionsecuritypolicy_rules_match_config_layer4_configs.rb │ │ │ ├── regionsecuritypolicy_rules_match_expr.rb │ │ │ ├── regionsecuritypolicy_rules_match_expr_options.rb │ │ │ ├── regionsecuritypolicy_rules_match_expr_options_recaptcha_options.rb │ │ │ ├── regionsecuritypolicy_rules_network_match.rb │ │ │ ├── regionsecuritypolicy_rules_network_match_user_defined_fields.rb │ │ │ ├── regionsecuritypolicy_rules_preconfigured_waf_config.rb │ │ │ ├── regionsecuritypolicy_rules_preconfigured_waf_config_exclusions.rb │ │ │ ├── regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_cookies_to_exclude.rb │ │ │ ├── regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_headers_to_exclude.rb │ │ │ ├── regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_query_params_to_exclude.rb │ │ │ ├── regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_uris_to_exclude.rb │ │ │ ├── regionsecuritypolicy_rules_rate_limit_options.rb │ │ │ ├── regionsecuritypolicy_rules_rate_limit_options_ban_threshold.rb │ │ │ ├── regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs.rb │ │ │ ├── regionsecuritypolicy_rules_rate_limit_options_exceed_action_rpc_status.rb │ │ │ ├── regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options.rb │ │ │ ├── regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold.rb │ │ │ ├── regionsecuritypolicy_rules_redirect_options.rb │ │ │ ├── regionsecuritypolicy_user_defined_fields.rb │ │ │ ├── regionsslpolicy_tls_settings.rb │ │ │ ├── regionsslpolicy_tls_settings_proxy_tls_context.rb │ │ │ ├── regionsslpolicy_tls_settings_proxy_tls_context_certificate_context.rb │ │ │ ├── regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_certificate_paths.rb │ │ │ ├── regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config.rb │ │ │ ├── regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config_grpc_service_config.rb │ │ │ ├── regionsslpolicy_tls_settings_proxy_tls_context_validation_context.rb │ │ │ ├── regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config.rb │ │ │ ├── regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config_grpc_service_config.rb │ │ │ ├── regionsslpolicy_tsptcccscgscc_credentials.rb │ │ │ ├── regionsslpolicy_tsptcccscgsccc_certificates.rb │ │ │ ├── regionsslpolicy_tsptcccscgscccf_plugin.rb │ │ │ ├── regionsslpolicy_tsptcvcscgscc_credentials.rb │ │ │ ├── regionsslpolicy_tsptcvcscgsccc_certificates.rb │ │ │ ├── regionsslpolicy_tsptcvcscgscccf_plugin.rb │ │ │ ├── regionsslpolicy_warnings.rb │ │ │ ├── regionsslpolicy_warnings_data.rb │ │ │ ├── regionurlmap_default_custom_error_response_policy.rb │ │ │ ├── regionurlmap_default_custom_error_response_policy_error_response_rules.rb │ │ │ ├── regionurlmap_default_route_action.rb │ │ │ ├── regionurlmap_default_route_action_cors_policy.rb │ │ │ ├── regionurlmap_default_route_action_fault_injection_policy.rb │ │ │ ├── regionurlmap_default_route_action_fault_injection_policy_abort.rb │ │ │ ├── regionurlmap_default_route_action_fault_injection_policy_delay.rb │ │ │ ├── regionurlmap_default_route_action_fault_injection_policy_delay_fixed_delay.rb │ │ │ ├── regionurlmap_default_route_action_max_stream_duration.rb │ │ │ ├── regionurlmap_default_route_action_request_mirror_policy.rb │ │ │ ├── regionurlmap_default_route_action_retry_policy.rb │ │ │ ├── regionurlmap_default_route_action_retry_policy_per_try_timeout.rb │ │ │ ├── regionurlmap_default_route_action_timeout.rb │ │ │ ├── regionurlmap_default_route_action_url_rewrite.rb │ │ │ ├── regionurlmap_default_route_action_weighted_backend_services.rb │ │ │ ├── regionurlmap_default_route_action_weighted_backend_services_header_action.rb │ │ │ ├── regionurlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add.rb │ │ │ ├── regionurlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add.rb │ │ │ ├── regionurlmap_default_url_redirect.rb │ │ │ ├── regionurlmap_header_action.rb │ │ │ ├── regionurlmap_header_action_request_headers_to_add.rb │ │ │ ├── regionurlmap_header_action_response_headers_to_add.rb │ │ │ ├── regionurlmap_host_rules.rb │ │ │ ├── regionurlmap_path_matchers.rb │ │ │ ├── regionurlmap_path_matchers_default_custom_error_response_policy.rb │ │ │ ├── regionurlmap_path_matchers_default_custom_error_response_policy_error_response_rules.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_cors_policy.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_fault_injection_policy.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_fault_injection_policy_abort.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_max_stream_duration.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_request_mirror_policy.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_retry_policy.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_retry_policy_per_try_timeout.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_timeout.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_url_rewrite.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_weighted_backend_services.rb │ │ │ ├── regionurlmap_path_matchers_default_route_action_weighted_backend_services_header_action.rb │ │ │ ├── regionurlmap_path_matchers_default_url_redirect.rb │ │ │ ├── regionurlmap_path_matchers_header_action.rb │ │ │ ├── regionurlmap_path_matchers_header_action_request_headers_to_add.rb │ │ │ ├── regionurlmap_path_matchers_header_action_response_headers_to_add.rb │ │ │ ├── regionurlmap_path_matchers_path_rules.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_custom_error_response_policy.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_custom_error_response_policy_error_response_rules.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_cors_policy.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_max_stream_duration.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_request_mirror_policy.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_retry_policy.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_timeout.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_url_rewrite.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_weighted_backend_services.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action.rb │ │ │ ├── regionurlmap_path_matchers_path_rules_url_redirect.rb │ │ │ ├── regionurlmap_path_matchers_route_rules.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_custom_error_response_policy.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_custom_error_response_policy_error_response_rules.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_header_action.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_header_action_request_headers_to_add.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_header_action_response_headers_to_add.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_http_filter_configs.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_http_filter_metadata.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_match_rules.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_match_rules_header_matches.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_match_rules_header_matches_range_match.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_match_rules_metadata_filters.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_match_rules_metadata_filters_filter_labels.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_match_rules_query_parameter_matches.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_cors_policy.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_max_stream_duration.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_request_mirror_policy.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_retry_policy.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_timeout.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_url_rewrite.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_weighted_backend_services.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action.rb │ │ │ ├── regionurlmap_path_matchers_route_rules_url_redirect.rb │ │ │ ├── regionurlmap_pmdrawbsharht_add.rb │ │ │ ├── regionurlmap_pmprrawbsharht_add.rb │ │ │ ├── regionurlmap_pmrrrawbsharht_add.rb │ │ │ ├── regionurlmap_tests.rb │ │ │ ├── regionurlmap_tests_headers.rb │ │ │ ├── reservation_aggregate_reservation.rb │ │ │ ├── reservation_aggregate_reservation_in_use_resources.rb │ │ │ ├── reservation_aggregate_reservation_in_use_resources_accelerator.rb │ │ │ ├── reservation_aggregate_reservation_reserved_resources.rb │ │ │ ├── reservation_aggregate_reservation_reserved_resources_accelerator.rb │ │ │ ├── reservation_delete_after_duration.rb │ │ │ ├── reservation_resource_policies.rb │ │ │ ├── reservation_resource_status.rb │ │ │ ├── reservation_resource_status_specific_sku_allocation.rb │ │ │ ├── reservation_share_settings.rb │ │ │ ├── reservation_share_settings_folder_map.rb │ │ │ ├── reservation_share_settings_project_map.rb │ │ │ ├── reservation_specific_reservation.rb │ │ │ ├── reservation_specific_reservation_instance_properties.rb │ │ │ ├── reservation_specific_reservation_instance_properties_guest_accelerators.rb │ │ │ ├── reservation_specific_reservation_instance_properties_local_ssds.rb │ │ │ ├── resourcepolicy_group_placement_policy.rb │ │ │ ├── resourcepolicy_instance_schedule_policy.rb │ │ │ ├── resourcepolicy_instance_schedule_policy_vm_start_schedule.rb │ │ │ ├── resourcepolicy_instance_schedule_policy_vm_stop_schedule.rb │ │ │ ├── resourcepolicy_resource_status.rb │ │ │ ├── resourcepolicy_resource_status_instance_schedule_policy.rb │ │ │ ├── resourcepolicy_snapshot_schedule_policy.rb │ │ │ ├── resourcepolicy_snapshot_schedule_policy_retention_policy.rb │ │ │ ├── resourcepolicy_snapshot_schedule_policy_schedule.rb │ │ │ ├── resourcepolicy_snapshot_schedule_policy_schedule_daily_schedule.rb │ │ │ ├── resourcepolicy_snapshot_schedule_policy_schedule_hourly_schedule.rb │ │ │ ├── resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule.rb │ │ │ ├── resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule_day_of_weeks.rb │ │ │ ├── resourcepolicy_snapshot_schedule_policy_snapshot_properties.rb │ │ │ ├── resourcepolicy_snapshot_schedule_policy_snapshot_properties_labels.rb │ │ │ ├── resourcepolicy_vm_maintenance_policy.rb │ │ │ ├── resourcepolicy_vm_maintenance_policy_concurrency_control_group.rb │ │ │ ├── resourcepolicy_vm_maintenance_policy_maintenance_window.rb │ │ │ ├── resourcepolicy_vm_maintenance_policy_maintenance_window_daily_maintenance_window.rb │ │ │ ├── router_bgp.rb │ │ │ ├── router_bgp_advertised_ip_ranges.rb │ │ │ ├── routernat_log_config.rb │ │ │ ├── routernat_subnetwork.rb │ │ │ ├── securitypolicy_rules.rb │ │ │ ├── securitypolicy_rules_match.rb │ │ │ ├── securitypolicy_rules_match_config.rb │ │ │ ├── securitypolicy_rules_match_expr.rb │ │ │ ├── serviceattachment_connected_endpoints.rb │ │ │ ├── serviceattachment_consumer_accept_lists.rb │ │ │ ├── serviceattachment_psc_service_attachment_id.rb │ │ │ ├── snapshot_snapshot_encryption_key.rb │ │ │ ├── snapshot_source_disk_encryption_key.rb │ │ │ ├── sslpolicy_warnings.rb │ │ │ ├── subnetwork_log_config.rb │ │ │ ├── subnetwork_secondary_ip_ranges.rb │ │ │ ├── targetvpngateway_labels.rb │ │ │ ├── urlmap_default_route_action.rb │ │ │ ├── urlmap_default_route_action_cors_policy.rb │ │ │ ├── urlmap_default_route_action_fault_injection_policy.rb │ │ │ ├── urlmap_default_route_action_fault_injection_policy_abort.rb │ │ │ ├── urlmap_default_route_action_fault_injection_policy_delay.rb │ │ │ ├── urlmap_default_route_action_fault_injection_policy_delay_fixed_delay.rb │ │ │ ├── urlmap_default_route_action_request_mirror_policy.rb │ │ │ ├── urlmap_default_route_action_retry_policy.rb │ │ │ ├── urlmap_default_route_action_retry_policy_per_try_timeout.rb │ │ │ ├── urlmap_default_route_action_timeout.rb │ │ │ ├── urlmap_default_route_action_url_rewrite.rb │ │ │ ├── urlmap_default_route_action_weighted_backend_services.rb │ │ │ ├── urlmap_default_route_action_weighted_backend_services_header_action.rb │ │ │ ├── urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add.rb │ │ │ ├── urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add.rb │ │ │ ├── urlmap_default_url_redirect.rb │ │ │ ├── urlmap_header_action.rb │ │ │ ├── urlmap_header_action_request_headers_to_add.rb │ │ │ ├── urlmap_header_action_response_headers_to_add.rb │ │ │ ├── urlmap_host_rules.rb │ │ │ ├── urlmap_path_matchers.rb │ │ │ ├── urlmap_path_matchers_default_route_action.rb │ │ │ ├── urlmap_path_matchers_default_route_action_cors_policy.rb │ │ │ ├── urlmap_path_matchers_default_route_action_fault_injection_policy.rb │ │ │ ├── urlmap_path_matchers_default_route_action_fault_injection_policy_abort.rb │ │ │ ├── urlmap_path_matchers_default_route_action_fault_injection_policy_delay.rb │ │ │ ├── urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay.rb │ │ │ ├── urlmap_path_matchers_default_route_action_request_mirror_policy.rb │ │ │ ├── urlmap_path_matchers_default_route_action_retry_policy.rb │ │ │ ├── urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout.rb │ │ │ ├── urlmap_path_matchers_default_route_action_timeout.rb │ │ │ ├── urlmap_path_matchers_default_route_action_url_rewrite.rb │ │ │ ├── urlmap_path_matchers_default_url_redirect.rb │ │ │ ├── urlmap_path_matchers_header_action.rb │ │ │ ├── urlmap_path_matchers_header_action_request_headers_to_add.rb │ │ │ ├── urlmap_path_matchers_header_action_response_headers_to_add.rb │ │ │ ├── urlmap_tests.rb │ │ │ ├── vpngateway_labels.rb │ │ │ ├── vpngateway_vpn_interfaces.rb │ │ │ └── zone_deprecated.rb │ │ ├── container/ │ │ │ └── property/ │ │ │ ├── cluster_addons_config.rb │ │ │ ├── cluster_addons_config_gce_persistent_disk_csi_driver_config.rb │ │ │ ├── cluster_addons_config_horizontal_pod_autoscaling.rb │ │ │ ├── cluster_addons_config_http_load_balancing.rb │ │ │ ├── cluster_addons_config_kubernetes_dashboard.rb │ │ │ ├── cluster_addons_config_network_policy_config.rb │ │ │ ├── cluster_binary_authorization.rb │ │ │ ├── cluster_conditions.rb │ │ │ ├── cluster_database_encryption.rb │ │ │ ├── cluster_default_max_pods_constraint.rb │ │ │ ├── cluster_fleet.rb │ │ │ ├── cluster_ip_allocation_policy.rb │ │ │ ├── cluster_legacy_abac.rb │ │ │ ├── cluster_master_auth.rb │ │ │ ├── cluster_master_auth_client_certificate_config.rb │ │ │ ├── cluster_master_authorized_networks_config.rb │ │ │ ├── cluster_master_authorized_networks_config_cidr_blocks.rb │ │ │ ├── cluster_network_config.rb │ │ │ ├── cluster_network_policy.rb │ │ │ ├── cluster_node_config.rb │ │ │ ├── cluster_node_config_accelerators.rb │ │ │ ├── cluster_node_config_shielded_instance_config.rb │ │ │ ├── cluster_node_config_taints.rb │ │ │ ├── cluster_node_pools.rb │ │ │ ├── cluster_pod_security_policy_config.rb │ │ │ ├── cluster_private_cluster_config.rb │ │ │ ├── cluster_release_channel.rb │ │ │ ├── cluster_shielded_nodes.rb │ │ │ ├── nodepool_autoscaling.rb │ │ │ ├── nodepool_conditions.rb │ │ │ ├── nodepool_config.rb │ │ │ ├── nodepool_config_accelerators.rb │ │ │ ├── nodepool_config_shielded_instance_config.rb │ │ │ ├── nodepool_config_taints.rb │ │ │ ├── nodepool_config_workload_meta_config.rb │ │ │ ├── nodepool_management.rb │ │ │ ├── nodepool_management_upgrade_options.rb │ │ │ ├── nodepool_max_pods_constraint.rb │ │ │ └── serverconfig_channels.rb │ │ ├── dataflow/ │ │ │ └── property/ │ │ │ ├── projectlocationjob_environment.rb │ │ │ ├── projectlocationjob_environment_debug_options.rb │ │ │ ├── projectlocationjob_environment_debug_options_data_sampling.rb │ │ │ ├── projectlocationjob_environment_internal_experiments.rb │ │ │ ├── projectlocationjob_environment_sdk_pipeline_options.rb │ │ │ ├── projectlocationjob_environment_user_agent.rb │ │ │ ├── projectlocationjob_environment_version.rb │ │ │ ├── projectlocationjob_environment_worker_pools.rb │ │ │ ├── projectlocationjob_environment_worker_pools_autoscaling_settings.rb │ │ │ ├── projectlocationjob_environment_worker_pools_data_disks.rb │ │ │ ├── projectlocationjob_environment_worker_pools_metadata.rb │ │ │ ├── projectlocationjob_environment_worker_pools_packages.rb │ │ │ ├── projectlocationjob_environment_worker_pools_pool_args.rb │ │ │ ├── projectlocationjob_environment_worker_pools_sdk_harness_container_images.rb │ │ │ ├── projectlocationjob_environment_worker_pools_taskrunner_settings.rb │ │ │ ├── projectlocationjob_environment_worker_pools_taskrunner_settings_parallel_worker_settings.rb │ │ │ ├── projectlocationjob_execution_info.rb │ │ │ ├── projectlocationjob_execution_info_stages.rb │ │ │ ├── projectlocationjob_job_metadata.rb │ │ │ ├── projectlocationjob_job_metadata_big_table_details.rb │ │ │ ├── projectlocationjob_job_metadata_bigquery_details.rb │ │ │ ├── projectlocationjob_job_metadata_datastore_details.rb │ │ │ ├── projectlocationjob_job_metadata_file_details.rb │ │ │ ├── projectlocationjob_job_metadata_pubsub_details.rb │ │ │ ├── projectlocationjob_job_metadata_sdk_version.rb │ │ │ ├── projectlocationjob_job_metadata_sdk_version_bugs.rb │ │ │ ├── projectlocationjob_job_metadata_spanner_details.rb │ │ │ ├── projectlocationjob_job_metadata_user_display_properties.rb │ │ │ ├── projectlocationjob_labels.rb │ │ │ ├── projectlocationjob_pipeline_description.rb │ │ │ ├── projectlocationjob_pipeline_description_display_data.rb │ │ │ ├── projectlocationjob_pipeline_description_execution_pipeline_stage.rb │ │ │ ├── projectlocationjob_pipeline_description_execution_pipeline_stage_component_source.rb │ │ │ ├── projectlocationjob_pipeline_description_execution_pipeline_stage_component_transform.rb │ │ │ ├── projectlocationjob_pipeline_description_execution_pipeline_stage_input_source.rb │ │ │ ├── projectlocationjob_pipeline_description_execution_pipeline_stage_output_source.rb │ │ │ ├── projectlocationjob_pipeline_description_original_pipeline_transform.rb │ │ │ ├── projectlocationjob_pipeline_description_original_pipeline_transform_display_data.rb │ │ │ ├── projectlocationjob_runtime_updatable_params.rb │ │ │ ├── projectlocationjob_stage_states.rb │ │ │ ├── projectlocationjob_steps.rb │ │ │ ├── projectlocationjob_steps_properties.rb │ │ │ └── projectlocationjob_transform_name_mapping.rb │ │ ├── datafusion/ │ │ │ └── property/ │ │ │ ├── instance_accelerators.rb │ │ │ ├── instance_available_version.rb │ │ │ ├── instance_crypto_key_config.rb │ │ │ ├── instance_event_publish_config.rb │ │ │ ├── instance_labels.rb │ │ │ ├── instance_maintenance_policy.rb │ │ │ ├── instance_maintenance_policy_maintenance_exclusion_window.rb │ │ │ ├── instance_maintenance_policy_maintenance_window.rb │ │ │ ├── instance_maintenance_policy_maintenance_window_recurring_time_window.rb │ │ │ ├── instance_maintenance_policy_maintenance_window_recurring_time_window_window.rb │ │ │ ├── instance_network_config.rb │ │ │ ├── instance_network_config_private_service_connect_config.rb │ │ │ └── instance_options.rb │ │ ├── dataproc/ │ │ │ └── property/ │ │ │ ├── autoscalingpolicy_basic_algorithm.rb │ │ │ ├── autoscalingpolicy_basic_algorithm_spark_standalone_config.rb │ │ │ ├── autoscalingpolicy_basic_algorithm_yarn_config.rb │ │ │ ├── autoscalingpolicy_labels.rb │ │ │ ├── autoscalingpolicy_secondary_worker_config.rb │ │ │ ├── autoscalingpolicy_worker_config.rb │ │ │ ├── batch_environment_config.rb │ │ │ ├── batch_environment_config_execution_config.rb │ │ │ ├── batch_environment_config_peripherals_config.rb │ │ │ ├── batch_environment_config_peripherals_config_spark_history_server_config.rb │ │ │ ├── batch_labels.rb │ │ │ ├── batch_pyspark_batch.rb │ │ │ ├── batch_runtime_config.rb │ │ │ ├── batch_runtime_config_properties.rb │ │ │ ├── batch_runtime_config_repository_config.rb │ │ │ ├── batch_runtime_config_repository_config_pypi_repository_config.rb │ │ │ ├── batch_runtime_info.rb │ │ │ ├── batch_runtime_info_approximate_usage.rb │ │ │ ├── batch_runtime_info_current_usage.rb │ │ │ ├── batch_runtime_info_endpoints.rb │ │ │ ├── batch_spark_batch.rb │ │ │ ├── batch_spark_r_batch.rb │ │ │ ├── batch_spark_sql_batch.rb │ │ │ ├── batch_spark_sql_batch_query_variables.rb │ │ │ ├── batch_state_history.rb │ │ │ ├── cluster_config.rb │ │ │ ├── cluster_config_encryption_config.rb │ │ │ ├── cluster_config_gce_cluster_config.rb │ │ │ ├── cluster_config_initialization_actions.rb │ │ │ ├── cluster_config_master_config.rb │ │ │ ├── cluster_config_master_config_disk_config.rb │ │ │ ├── cluster_config_master_config_managed_group_config.rb │ │ │ ├── cluster_config_secondary_worker_config.rb │ │ │ ├── cluster_config_secondary_worker_config_disk_config.rb │ │ │ ├── cluster_config_secondary_worker_config_managed_group_config.rb │ │ │ ├── cluster_config_security_config.rb │ │ │ ├── cluster_config_security_config_kerberos_config.rb │ │ │ ├── cluster_config_software_config.rb │ │ │ ├── cluster_config_worker_config.rb │ │ │ ├── cluster_config_worker_config_disk_config.rb │ │ │ ├── cluster_config_worker_config_managed_group_config.rb │ │ │ ├── job_driver_scheduling_config.rb │ │ │ ├── job_flink_job.rb │ │ │ ├── job_flink_job_logging_config.rb │ │ │ ├── job_flink_job_logging_config_driver_log_levels.rb │ │ │ ├── job_flink_job_properties.rb │ │ │ ├── job_hadoop_job.rb │ │ │ ├── job_hadoop_job_logging_config.rb │ │ │ ├── job_hadoop_job_logging_config_driver_log_levels.rb │ │ │ ├── job_hadoop_job_properties.rb │ │ │ ├── job_hive_job.rb │ │ │ ├── job_hive_job_properties.rb │ │ │ ├── job_hive_job_query_list.rb │ │ │ ├── job_hive_job_script_variables.rb │ │ │ ├── job_labels.rb │ │ │ ├── job_pig_job.rb │ │ │ ├── job_pig_job_logging_config.rb │ │ │ ├── job_pig_job_logging_config_driver_log_levels.rb │ │ │ ├── job_pig_job_properties.rb │ │ │ ├── job_pig_job_query_list.rb │ │ │ ├── job_pig_job_script_variables.rb │ │ │ ├── job_placement.rb │ │ │ ├── job_placement_cluster_labels.rb │ │ │ ├── job_presto_job.rb │ │ │ ├── job_presto_job_logging_config.rb │ │ │ ├── job_presto_job_logging_config_driver_log_levels.rb │ │ │ ├── job_presto_job_properties.rb │ │ │ ├── job_presto_job_query_list.rb │ │ │ ├── job_pyspark_job.rb │ │ │ ├── job_pyspark_job_logging_config.rb │ │ │ ├── job_pyspark_job_logging_config_driver_log_levels.rb │ │ │ ├── job_pyspark_job_properties.rb │ │ │ ├── job_reference.rb │ │ │ ├── job_scheduling.rb │ │ │ ├── job_spark_job.rb │ │ │ ├── job_spark_job_logging_config.rb │ │ │ ├── job_spark_job_logging_config_driver_log_levels.rb │ │ │ ├── job_spark_job_properties.rb │ │ │ ├── job_spark_r_job.rb │ │ │ ├── job_spark_r_job_logging_config.rb │ │ │ ├── job_spark_r_job_logging_config_driver_log_levels.rb │ │ │ ├── job_spark_r_job_properties.rb │ │ │ ├── job_spark_sql_job.rb │ │ │ ├── job_spark_sql_job_logging_config.rb │ │ │ ├── job_spark_sql_job_logging_config_driver_log_levels.rb │ │ │ ├── job_spark_sql_job_properties.rb │ │ │ ├── job_spark_sql_job_query_list.rb │ │ │ ├── job_spark_sql_job_script_variables.rb │ │ │ ├── job_status.rb │ │ │ ├── job_status_history.rb │ │ │ ├── job_trino_job.rb │ │ │ ├── job_trino_job_logging_config.rb │ │ │ ├── job_trino_job_logging_config_driver_log_levels.rb │ │ │ ├── job_trino_job_properties.rb │ │ │ ├── job_trino_job_query_list.rb │ │ │ ├── job_yarn_applications.rb │ │ │ ├── session_environment_config.rb │ │ │ ├── session_environment_config_execution_config.rb │ │ │ ├── session_environment_config_peripherals_config.rb │ │ │ ├── session_environment_config_peripherals_config_spark_history_server_config.rb │ │ │ ├── session_jupyter_session.rb │ │ │ ├── session_labels.rb │ │ │ ├── session_runtime_config.rb │ │ │ ├── session_runtime_config_properties.rb │ │ │ ├── session_runtime_config_repository_config.rb │ │ │ ├── session_runtime_config_repository_config_pypi_repository_config.rb │ │ │ ├── session_runtime_info.rb │ │ │ ├── session_runtime_info_approximate_usage.rb │ │ │ ├── session_runtime_info_current_usage.rb │ │ │ ├── session_runtime_info_endpoints.rb │ │ │ ├── session_state_history.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_node_group.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_node_group_labels.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_node_group_node_group_config.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_node_group_node_group_config_accelerators.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_node_group_node_group_config_disk_config.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_flexibility_policy.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_references.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_node_group_node_group_config_managed_group_config.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_node_group_node_group_config_startup_config.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_policy_instance_selection_list.rb │ │ │ ├── workflowtemplate_auxiliary_node_groups_policy_instance_selection_results.rb │ │ │ ├── workflowtemplate_encryption_config.rb │ │ │ ├── workflowtemplate_gke_cluster_config.rb │ │ │ ├── workflowtemplate_gke_cluster_config_namespaced_gke_deployment_target.rb │ │ │ ├── workflowtemplate_gke_cluster_config_node_pool_target.rb │ │ │ ├── workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config.rb │ │ │ ├── workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_autoscaling.rb │ │ │ ├── workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config.rb │ │ │ ├── workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config_accelerators.rb │ │ │ ├── workflowtemplate_jobs.rb │ │ │ ├── workflowtemplate_jobs_flink_job.rb │ │ │ ├── workflowtemplate_jobs_flink_job_logging_config.rb │ │ │ ├── workflowtemplate_jobs_flink_job_logging_config_driver_log_levels.rb │ │ │ ├── workflowtemplate_jobs_flink_job_properties.rb │ │ │ ├── workflowtemplate_jobs_hadoop_job.rb │ │ │ ├── workflowtemplate_jobs_hadoop_job_logging_config.rb │ │ │ ├── workflowtemplate_jobs_hadoop_job_logging_config_driver_log_levels.rb │ │ │ ├── workflowtemplate_jobs_hadoop_job_properties.rb │ │ │ ├── workflowtemplate_jobs_hive_job.rb │ │ │ ├── workflowtemplate_jobs_hive_job_properties.rb │ │ │ ├── workflowtemplate_jobs_hive_job_query_list.rb │ │ │ ├── workflowtemplate_jobs_hive_job_script_variables.rb │ │ │ ├── workflowtemplate_jobs_labels.rb │ │ │ ├── workflowtemplate_jobs_pig_job.rb │ │ │ ├── workflowtemplate_jobs_pig_job_logging_config.rb │ │ │ ├── workflowtemplate_jobs_pig_job_logging_config_driver_log_levels.rb │ │ │ ├── workflowtemplate_jobs_pig_job_properties.rb │ │ │ ├── workflowtemplate_jobs_pig_job_query_list.rb │ │ │ ├── workflowtemplate_jobs_pig_job_script_variables.rb │ │ │ ├── workflowtemplate_jobs_presto_job.rb │ │ │ ├── workflowtemplate_jobs_presto_job_logging_config.rb │ │ │ ├── workflowtemplate_jobs_presto_job_logging_config_driver_log_levels.rb │ │ │ ├── workflowtemplate_jobs_presto_job_properties.rb │ │ │ ├── workflowtemplate_jobs_presto_job_query_list.rb │ │ │ ├── workflowtemplate_jobs_pyspark_job.rb │ │ │ ├── workflowtemplate_jobs_pyspark_job_logging_config.rb │ │ │ ├── workflowtemplate_jobs_pyspark_job_logging_config_driver_log_levels.rb │ │ │ ├── workflowtemplate_jobs_pyspark_job_properties.rb │ │ │ ├── workflowtemplate_jobs_scheduling.rb │ │ │ ├── workflowtemplate_jobs_spark_job.rb │ │ │ ├── workflowtemplate_jobs_spark_job_logging_config.rb │ │ │ ├── workflowtemplate_jobs_spark_job_logging_config_driver_log_levels.rb │ │ │ ├── workflowtemplate_jobs_spark_job_properties.rb │ │ │ ├── workflowtemplate_jobs_spark_r_job.rb │ │ │ ├── workflowtemplate_jobs_spark_r_job_logging_config.rb │ │ │ ├── workflowtemplate_jobs_spark_r_job_logging_config_driver_log_levels.rb │ │ │ ├── workflowtemplate_jobs_spark_r_job_properties.rb │ │ │ ├── workflowtemplate_jobs_spark_sql_job.rb │ │ │ ├── workflowtemplate_jobs_spark_sql_job_logging_config.rb │ │ │ ├── workflowtemplate_jobs_spark_sql_job_logging_config_driver_log_levels.rb │ │ │ ├── workflowtemplate_jobs_spark_sql_job_properties.rb │ │ │ ├── workflowtemplate_jobs_spark_sql_job_query_list.rb │ │ │ ├── workflowtemplate_jobs_spark_sql_job_script_variables.rb │ │ │ ├── workflowtemplate_jobs_trino_job.rb │ │ │ ├── workflowtemplate_jobs_trino_job_logging_config.rb │ │ │ ├── workflowtemplate_jobs_trino_job_logging_config_driver_log_levels.rb │ │ │ ├── workflowtemplate_jobs_trino_job_properties.rb │ │ │ ├── workflowtemplate_jobs_trino_job_query_list.rb │ │ │ ├── workflowtemplate_labels.rb │ │ │ ├── workflowtemplate_master_config.rb │ │ │ ├── workflowtemplate_master_config_accelerators.rb │ │ │ ├── workflowtemplate_master_config_disk_config.rb │ │ │ ├── workflowtemplate_master_config_instance_flexibility_policy.rb │ │ │ ├── workflowtemplate_master_config_instance_flexibility_policy_instance_selection_list.rb │ │ │ ├── workflowtemplate_master_config_instance_flexibility_policy_instance_selection_results.rb │ │ │ ├── workflowtemplate_master_config_instance_references.rb │ │ │ ├── workflowtemplate_master_config_managed_group_config.rb │ │ │ ├── workflowtemplate_master_config_startup_config.rb │ │ │ ├── workflowtemplate_parameters.rb │ │ │ ├── workflowtemplate_parameters_validation.rb │ │ │ ├── workflowtemplate_parameters_validation_regex.rb │ │ │ ├── workflowtemplate_parameters_validation_values.rb │ │ │ ├── workflowtemplate_placement.rb │ │ │ ├── workflowtemplate_placement_cluster_selector.rb │ │ │ ├── workflowtemplate_placement_cluster_selector_cluster_labels.rb │ │ │ ├── workflowtemplate_placement_managed_cluster.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_autoscaling_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_auxiliary_node_groups.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_dataproc_metric_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_dataproc_metric_config_metrics.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_encryption_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_endpoint_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_endpoint_config_http_ports.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_gce_cluster_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_gce_cluster_config_confidential_instance_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_gce_cluster_config_metadata.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_gce_cluster_config_node_group_affinity.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_gce_cluster_config_reservation_affinity.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_gce_cluster_config_shielded_instance_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_initialization_actions.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_lifecycle_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_metastore_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_security_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_security_config_kerberos_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_software_config.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_config_software_config_properties.rb │ │ │ ├── workflowtemplate_placement_managed_cluster_labels.rb │ │ │ ├── workflowtemplate_secondary_worker_config.rb │ │ │ ├── workflowtemplate_secondary_worker_config_accelerators.rb │ │ │ ├── workflowtemplate_secondary_worker_config_disk_config.rb │ │ │ ├── workflowtemplate_secondary_worker_config_instance_flexibility_policy.rb │ │ │ ├── workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_list.rb │ │ │ ├── workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_results.rb │ │ │ ├── workflowtemplate_secondary_worker_config_instance_references.rb │ │ │ ├── workflowtemplate_secondary_worker_config_managed_group_config.rb │ │ │ ├── workflowtemplate_secondary_worker_config_startup_config.rb │ │ │ ├── workflowtemplate_security_config_identity_config.rb │ │ │ ├── workflowtemplate_security_config_identity_config_user_service_account_mapping.rb │ │ │ ├── workflowtemplate_worker_config.rb │ │ │ ├── workflowtemplate_worker_config_accelerators.rb │ │ │ ├── workflowtemplate_worker_config_disk_config.rb │ │ │ ├── workflowtemplate_worker_config_instance_flexibility_policy.rb │ │ │ ├── workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_list.rb │ │ │ ├── workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_results.rb │ │ │ ├── workflowtemplate_worker_config_instance_references.rb │ │ │ ├── workflowtemplate_worker_config_managed_group_config.rb │ │ │ └── workflowtemplate_worker_config_startup_config.rb │ │ ├── dataprocmetastore/ │ │ │ └── property/ │ │ │ ├── federation_backend_metastores.rb │ │ │ ├── federation_labels.rb │ │ │ ├── service_encryption_config.rb │ │ │ ├── service_hive_metastore_config.rb │ │ │ ├── service_hive_metastore_config_auxiliary_versions.rb │ │ │ ├── service_hive_metastore_config_config_overrides.rb │ │ │ ├── service_hive_metastore_config_kerberos_config.rb │ │ │ ├── service_hive_metastore_config_kerberos_config_keytab.rb │ │ │ ├── service_labels.rb │ │ │ ├── service_maintenance_window.rb │ │ │ ├── service_metadata_integration.rb │ │ │ ├── service_metadata_integration_data_catalog_config.rb │ │ │ ├── service_metadata_integration_dataplex_config.rb │ │ │ ├── service_metadata_integration_dataplex_config_lake_resources.rb │ │ │ ├── service_metadata_management_activity.rb │ │ │ ├── service_metadata_management_activity_metadata_exports.rb │ │ │ ├── service_metadata_management_activity_restores.rb │ │ │ ├── service_network_config.rb │ │ │ ├── service_network_config_consumers.rb │ │ │ ├── service_scaling_config.rb │ │ │ ├── service_scaling_config_autoscaling_config.rb │ │ │ ├── service_scaling_config_autoscaling_config_limit_config.rb │ │ │ ├── service_scheduled_backup.rb │ │ │ ├── service_scheduled_backup_latest_backup.rb │ │ │ ├── service_telemetry_config.rb │ │ │ ├── servicebackup_service_revision.rb │ │ │ ├── servicebackup_service_revision_encryption_config.rb │ │ │ ├── servicebackup_service_revision_hive_metastore_config.rb │ │ │ ├── servicebackup_service_revision_hive_metastore_config_auxiliary_versions.rb │ │ │ ├── servicebackup_service_revision_hive_metastore_config_config_overrides.rb │ │ │ ├── servicebackup_service_revision_hive_metastore_config_kerberos_config.rb │ │ │ ├── servicebackup_service_revision_hive_metastore_config_kerberos_config_keytab.rb │ │ │ ├── servicebackup_service_revision_labels.rb │ │ │ ├── servicebackup_service_revision_maintenance_window.rb │ │ │ ├── servicebackup_service_revision_metadata_integration.rb │ │ │ ├── servicebackup_service_revision_metadata_integration_data_catalog_config.rb │ │ │ ├── servicebackup_service_revision_metadata_integration_dataplex_config.rb │ │ │ ├── servicebackup_service_revision_metadata_integration_dataplex_config_lake_resources.rb │ │ │ ├── servicebackup_service_revision_metadata_management_activity.rb │ │ │ ├── servicebackup_service_revision_metadata_management_activity_metadata_exports.rb │ │ │ ├── servicebackup_service_revision_metadata_management_activity_restores.rb │ │ │ ├── servicebackup_service_revision_network_config.rb │ │ │ ├── servicebackup_service_revision_network_config_consumers.rb │ │ │ ├── servicebackup_service_revision_scaling_config.rb │ │ │ ├── servicebackup_service_revision_scaling_config_autoscaling_config.rb │ │ │ ├── servicebackup_service_revision_scaling_config_autoscaling_config_limit_config.rb │ │ │ ├── servicebackup_service_revision_scheduled_backup.rb │ │ │ ├── servicebackup_service_revision_scheduled_backup_latest_backup.rb │ │ │ └── servicebackup_service_revision_telemetry_config.rb │ │ ├── dlp/ │ │ │ └── property/ │ │ │ ├── dt_config.rb │ │ │ ├── dt_config_info_type_tf.rb │ │ │ ├── dt_config_info_type_tf_tf.rb │ │ │ ├── dt_config_info_type_tf_tf_info_types.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_character_mask_config.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_replace_config.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value.rb │ │ │ ├── dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value.rb │ │ │ ├── inspecttemplate_inspect_config.rb │ │ │ ├── inspecttemplate_inspect_config_custom_info_types.rb │ │ │ ├── inspecttemplate_inspect_config_custom_info_types_dictionary.rb │ │ │ ├── inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path.rb │ │ │ ├── inspecttemplate_inspect_config_custom_info_types_dictionary_word_list.rb │ │ │ ├── inspecttemplate_inspect_config_custom_info_types_info_type.rb │ │ │ ├── inspecttemplate_inspect_config_custom_info_types_regex.rb │ │ │ ├── inspecttemplate_inspect_config_custom_info_types_stored_type.rb │ │ │ ├── inspecttemplate_inspect_config_info_types.rb │ │ │ ├── inspecttemplate_inspect_config_limits.rb │ │ │ ├── inspecttemplate_inspect_config_limits_max_findings_per_info_type.rb │ │ │ ├── inspecttemplate_inspect_config_limits_max_findings_per_info_type_info_type.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_info_types.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_exclusion_rule.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_hotword_rule.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment.rb │ │ │ ├── inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity.rb │ │ │ ├── job_act_det.rb │ │ │ ├── job_act_det_deidentify_stats.rb │ │ │ ├── job_act_det_deidentify_stats_requested_options.rb │ │ │ ├── job_act_det_deidentify_stats_requested_options_details.rb │ │ │ ├── job_act_det_dt_det.rb │ │ │ ├── job_act_det_dt_det_de_stats.rb │ │ │ ├── job_act_det_dt_det_req_opt.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_di_template.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_di_template_config.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_dt.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_dt_config.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types_sensitivity_score.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_field.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_fields.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_field.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_structured_dt.rb │ │ │ ├── job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config.rb │ │ │ ├── job_adddrosirdcrtftceccnvd_val.rb │ │ │ ├── job_adddrosirdcrtftceccnvt_val.rb │ │ │ ├── job_errors.rb │ │ │ ├── job_errors_details.rb │ │ │ ├── job_errors_details_status.rb │ │ │ ├── job_errors_details_status_details.rb │ │ │ ├── jobtrigger_inspect_job.rb │ │ │ ├── jobtrigger_inspect_job_actions.rb │ │ │ ├── jobtrigger_inspect_job_actions_save_findings.rb │ │ │ ├── jobtrigger_inspect_job_actions_save_findings_output_config.rb │ │ │ ├── jobtrigger_inspect_job_actions_save_findings_output_config_table.rb │ │ │ ├── jobtrigger_inspect_job_storage_config.rb │ │ │ ├── jobtrigger_inspect_job_storage_config_big_query_options.rb │ │ │ ├── jobtrigger_inspect_job_storage_config_big_query_options_table_reference.rb │ │ │ ├── jobtrigger_inspect_job_storage_config_cloud_storage_options.rb │ │ │ ├── jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set.rb │ │ │ ├── jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set.rb │ │ │ ├── jobtrigger_inspect_job_storage_config_datastore_options.rb │ │ │ ├── jobtrigger_inspect_job_storage_config_datastore_options_kind.rb │ │ │ ├── jobtrigger_inspect_job_storage_config_datastore_options_partition_id.rb │ │ │ ├── jobtrigger_inspect_job_storage_config_timespan_config.rb │ │ │ ├── jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field.rb │ │ │ ├── jobtrigger_triggers.rb │ │ │ ├── jobtrigger_triggers_schedule.rb │ │ │ ├── storedinfotype_dictionary.rb │ │ │ ├── storedinfotype_dictionary_cloud_storage_path.rb │ │ │ ├── storedinfotype_dictionary_word_list.rb │ │ │ ├── storedinfotype_large_custom_dictionary.rb │ │ │ ├── storedinfotype_large_custom_dictionary_big_query_field.rb │ │ │ ├── storedinfotype_large_custom_dictionary_big_query_field_field.rb │ │ │ ├── storedinfotype_large_custom_dictionary_big_query_field_table.rb │ │ │ ├── storedinfotype_large_custom_dictionary_cloud_storage_file_set.rb │ │ │ ├── storedinfotype_large_custom_dictionary_output_path.rb │ │ │ └── storedinfotype_regex.rb │ │ ├── dns/ │ │ │ └── property/ │ │ │ ├── managedzone_dnssec_config.rb │ │ │ ├── managedzone_dnssec_config_default_key_specs.rb │ │ │ ├── managedzone_forwarding_config.rb │ │ │ ├── managedzone_forwarding_config_target_name_servers.rb │ │ │ ├── managedzone_peering_config.rb │ │ │ ├── managedzone_peering_config_target_network.rb │ │ │ ├── managedzone_private_visibility_config.rb │ │ │ ├── managedzone_private_visibility_config_networks.rb │ │ │ ├── managedzone_service_directory_config.rb │ │ │ └── managedzone_service_directory_config_namespace.rb │ │ ├── filestore/ │ │ │ └── property/ │ │ │ ├── instance_file_shares.rb │ │ │ ├── instance_file_shares_nfs_export_options.rb │ │ │ └── instance_networks.rb │ │ ├── iam/ │ │ │ └── property/ │ │ │ ├── iam_binding_condition.rb │ │ │ ├── iam_policy_audit_configs.rb │ │ │ ├── iam_policy_audit_configs_audit_log_configs.rb │ │ │ └── iam_policy_bindings.rb │ │ ├── kms/ │ │ │ └── property/ │ │ │ ├── cryptokey_version_template.rb │ │ │ ├── cryptokeyversion_attestation.rb │ │ │ ├── cryptokeyversion_external_protection_level_options.rb │ │ │ ├── ekmconnection_service_resolvers.rb │ │ │ ├── ekmconnection_service_resolvers_server_certificates.rb │ │ │ ├── keyringimportjob_attestation.rb │ │ │ └── keyringimportjob_public_key.rb │ │ ├── logging/ │ │ │ └── property/ │ │ │ ├── metric_bucket_options.rb │ │ │ ├── metric_bucket_options_explicit_buckets.rb │ │ │ ├── metric_bucket_options_exponential_buckets.rb │ │ │ ├── metric_bucket_options_linear_buckets.rb │ │ │ ├── metric_metric_descriptor.rb │ │ │ └── metric_metric_descriptor_labels.rb │ │ ├── memcache/ │ │ │ └── property/ │ │ │ ├── instance_memcache_nodes.rb │ │ │ ├── instance_memcache_parameters.rb │ │ │ ├── instance_node_config.rb │ │ │ └── instance_parameters.rb │ │ ├── mlengine/ │ │ │ └── property/ │ │ │ └── model_default_version.rb │ │ ├── monitoring/ │ │ │ └── property/ │ │ │ ├── alertpolicy_conditions.rb │ │ │ ├── alertpolicy_conditions_condition_absent.rb │ │ │ ├── alertpolicy_conditions_condition_absent_aggregations.rb │ │ │ ├── alertpolicy_conditions_condition_absent_trigger.rb │ │ │ ├── alertpolicy_conditions_condition_monitoring_query_language.rb │ │ │ ├── alertpolicy_conditions_condition_monitoring_query_language_trigger.rb │ │ │ ├── alertpolicy_conditions_condition_threshold.rb │ │ │ ├── alertpolicy_conditions_condition_threshold_aggregations.rb │ │ │ ├── alertpolicy_conditions_condition_threshold_denominator_aggregations.rb │ │ │ ├── alertpolicy_conditions_condition_threshold_trigger.rb │ │ │ ├── alertpolicy_creation_record.rb │ │ │ └── alertpolicy_documentation.rb │ │ ├── orgpolicy/ │ │ │ └── property/ │ │ │ ├── constraints.rb │ │ │ ├── google_managed_constraint.rb │ │ │ ├── list_constraint.rb │ │ │ ├── policy_alternate.rb │ │ │ ├── policy_alternate_spec.rb │ │ │ ├── policy_alternate_spec_rules.rb │ │ │ ├── policy_alternate_spec_rules_condition.rb │ │ │ ├── policy_alternate_spec_rules_values.rb │ │ │ ├── policy_dry_run_spec.rb │ │ │ ├── policy_dry_run_spec_rules.rb │ │ │ ├── policy_dry_run_spec_rules_condition.rb │ │ │ ├── policy_dry_run_spec_rules_values.rb │ │ │ ├── policy_spec.rb │ │ │ ├── policy_spec_rules.rb │ │ │ ├── policy_spec_rules_condition.rb │ │ │ └── policy_spec_rules_values.rb │ │ ├── pubsub/ │ │ │ └── property/ │ │ │ ├── subscription_dead_letter_policy.rb │ │ │ ├── subscription_expiration_policy.rb │ │ │ ├── subscription_push_config.rb │ │ │ ├── subscription_push_config_oidc_token.rb │ │ │ ├── subscription_retry_policy.rb │ │ │ └── topic_message_storage_policy.rb │ │ ├── redis/ │ │ │ └── property/ │ │ │ └── instance_server_ca_certs.rb │ │ ├── resourcemanager/ │ │ │ └── property/ │ │ │ ├── organization_owner.rb │ │ │ └── project_parent.rb │ │ ├── run/ │ │ │ └── property/ │ │ │ ├── job_annotations.rb │ │ │ ├── job_binary_authorization.rb │ │ │ ├── job_conditions.rb │ │ │ ├── job_labels.rb │ │ │ ├── job_latest_created_execution.rb │ │ │ ├── job_template.rb │ │ │ ├── job_template_annotations.rb │ │ │ ├── job_template_labels.rb │ │ │ ├── job_template_template.rb │ │ │ ├── job_template_template_containers.rb │ │ │ ├── job_template_template_containers_env.rb │ │ │ ├── job_template_template_containers_env_value_source.rb │ │ │ ├── job_template_template_containers_env_value_source_secret_key_ref.rb │ │ │ ├── job_template_template_containers_liveness_probe.rb │ │ │ ├── job_template_template_containers_liveness_probe_grpc.rb │ │ │ ├── job_template_template_containers_liveness_probe_http_get.rb │ │ │ ├── job_template_template_containers_liveness_probe_http_get_http_headers.rb │ │ │ ├── job_template_template_containers_liveness_probe_tcp_socket.rb │ │ │ ├── job_template_template_containers_ports.rb │ │ │ ├── job_template_template_containers_resources.rb │ │ │ ├── job_template_template_containers_resources_limits.rb │ │ │ ├── job_template_template_containers_startup_probe.rb │ │ │ ├── job_template_template_containers_startup_probe_grpc.rb │ │ │ ├── job_template_template_containers_startup_probe_http_get.rb │ │ │ ├── job_template_template_containers_startup_probe_http_get_http_headers.rb │ │ │ ├── job_template_template_containers_startup_probe_tcp_socket.rb │ │ │ ├── job_template_template_containers_volume_mounts.rb │ │ │ ├── job_template_template_volumes.rb │ │ │ ├── job_template_template_volumes_cloud_sql_instance.rb │ │ │ ├── job_template_template_volumes_empty_dir.rb │ │ │ ├── job_template_template_volumes_gcs.rb │ │ │ ├── job_template_template_volumes_nfs.rb │ │ │ ├── job_template_template_volumes_secret.rb │ │ │ ├── job_template_template_volumes_secret_items.rb │ │ │ ├── job_template_template_vpc_access.rb │ │ │ ├── job_template_template_vpc_access_network_interfaces.rb │ │ │ ├── job_terminal_condition.rb │ │ │ ├── service_annotations.rb │ │ │ ├── service_binary_authorization.rb │ │ │ ├── service_conditions.rb │ │ │ ├── service_labels.rb │ │ │ ├── service_scaling.rb │ │ │ ├── service_template.rb │ │ │ ├── service_template_annotations.rb │ │ │ ├── service_template_containers.rb │ │ │ ├── service_template_containers_env.rb │ │ │ ├── service_template_containers_env_value_source.rb │ │ │ ├── service_template_containers_env_value_source_secret_key_ref.rb │ │ │ ├── service_template_containers_liveness_probe.rb │ │ │ ├── service_template_containers_liveness_probe_grpc.rb │ │ │ ├── service_template_containers_liveness_probe_http_get.rb │ │ │ ├── service_template_containers_liveness_probe_http_get_http_headers.rb │ │ │ ├── service_template_containers_liveness_probe_tcp_socket.rb │ │ │ ├── service_template_containers_ports.rb │ │ │ ├── service_template_containers_resources.rb │ │ │ ├── service_template_containers_resources_limits.rb │ │ │ ├── service_template_containers_startup_probe.rb │ │ │ ├── service_template_containers_startup_probe_grpc.rb │ │ │ ├── service_template_containers_startup_probe_http_get.rb │ │ │ ├── service_template_containers_startup_probe_http_get_http_headers.rb │ │ │ ├── service_template_containers_startup_probe_tcp_socket.rb │ │ │ ├── service_template_containers_volume_mounts.rb │ │ │ ├── service_template_labels.rb │ │ │ ├── service_template_node_selector.rb │ │ │ ├── service_template_scaling.rb │ │ │ ├── service_template_volumes.rb │ │ │ ├── service_template_volumes_cloud_sql_instance.rb │ │ │ ├── service_template_volumes_empty_dir.rb │ │ │ ├── service_template_volumes_gcs.rb │ │ │ ├── service_template_volumes_nfs.rb │ │ │ ├── service_template_volumes_secret.rb │ │ │ ├── service_template_volumes_secret_items.rb │ │ │ ├── service_template_vpc_access.rb │ │ │ ├── service_template_vpc_access_network_interfaces.rb │ │ │ ├── service_terminal_condition.rb │ │ │ ├── service_traffic.rb │ │ │ └── service_traffic_statuses.rb │ │ ├── secretmanager/ │ │ │ └── property/ │ │ │ ├── secret_replication.rb │ │ │ ├── secret_replication_user_managed.rb │ │ │ ├── secret_replication_user_managed_replicas.rb │ │ │ ├── secret_replication_user_managed_replicas_customer_managed_encryption.rb │ │ │ ├── secret_rotation.rb │ │ │ ├── secret_topics.rb │ │ │ └── secretversion_payload.rb │ │ ├── serviceusage/ │ │ │ └── property/ │ │ │ ├── service_config.rb │ │ │ └── service_config_apis.rb │ │ ├── sourcerepo/ │ │ │ └── property/ │ │ │ └── repository_pubsub_configs.rb │ │ ├── sql/ │ │ │ └── property/ │ │ │ ├── connect_ip_addresses.rb │ │ │ ├── connect_server_ca_cert.rb │ │ │ ├── databaseinstance_disk_encryption_configuration.rb │ │ │ ├── databaseinstance_disk_encryption_status.rb │ │ │ ├── databaseinstance_failover_replica.rb │ │ │ ├── databaseinstance_ip_addresses.rb │ │ │ ├── databaseinstance_replica_configuration.rb │ │ │ ├── databaseinstance_replica_configuration_mysql_replica_configuration.rb │ │ │ ├── databaseinstance_server_ca_cert.rb │ │ │ ├── databaseinstance_settings.rb │ │ │ ├── databaseinstance_settings_backup_configuration.rb │ │ │ ├── databaseinstance_settings_database_flags.rb │ │ │ ├── databaseinstance_settings_ip_configuration.rb │ │ │ └── databaseinstance_settings_ip_configuration_authorized_networks.rb │ │ ├── storage/ │ │ │ └── property/ │ │ │ ├── bucket_acl.rb │ │ │ ├── bucket_acl_project_team.rb │ │ │ ├── bucket_cors.rb │ │ │ ├── bucket_default_object_acl.rb │ │ │ ├── bucket_default_object_acl_project_team.rb │ │ │ ├── bucket_encryption.rb │ │ │ ├── bucket_lifecycle.rb │ │ │ ├── bucket_lifecycle_rule.rb │ │ │ ├── bucket_lifecycle_rule_action.rb │ │ │ ├── bucket_lifecycle_rule_condition.rb │ │ │ ├── bucket_logging.rb │ │ │ ├── bucket_owner.rb │ │ │ ├── bucket_retention_policy.rb │ │ │ ├── bucket_versioning.rb │ │ │ ├── bucket_website.rb │ │ │ ├── bucketacl_project_team.rb │ │ │ ├── defaultobjectacl_project_team.rb │ │ │ └── objectacl_project_team.rb │ │ └── vertexai/ │ │ └── property/ │ │ ├── batchpredictionjob_completion_stats.rb │ │ ├── batchpredictionjob_dedicated_resources.rb │ │ ├── batchpredictionjob_dedicated_resources_machine_spec.rb │ │ ├── batchpredictionjob_encryption_spec.rb │ │ ├── batchpredictionjob_error.rb │ │ ├── batchpredictionjob_espigabb_config.rb │ │ ├── batchpredictionjob_espigasg_config.rb │ │ ├── batchpredictionjob_espigasgcfn_sigma.rb │ │ ├── batchpredictionjob_espigasgcfnsn_sigma.rb │ │ ├── batchpredictionjob_espxasgcfn_sigma.rb │ │ ├── batchpredictionjob_espxasgcfnsn_sigma.rb │ │ ├── batchpredictionjob_explanation_spec.rb │ │ ├── batchpredictionjob_explanation_spec_metadata.rb │ │ ├── batchpredictionjob_explanation_spec_metadata_inputs.rb │ │ ├── batchpredictionjob_explanation_spec_metadata_outputs.rb │ │ ├── batchpredictionjob_explanation_spec_parameters.rb │ │ ├── batchpredictionjob_explanation_spec_parameters_examples.rb │ │ ├── batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source.rb │ │ ├── batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb │ │ ├── batchpredictionjob_explanation_spec_parameters_examples_presets.rb │ │ ├── batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution.rb │ │ ├── batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution.rb │ │ ├── batchpredictionjob_explanation_spec_parameters_xrai_attribution.rb │ │ ├── batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb │ │ ├── batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb │ │ ├── batchpredictionjob_input_config.rb │ │ ├── batchpredictionjob_input_config_bigquery_source.rb │ │ ├── batchpredictionjob_input_config_gcs_source.rb │ │ ├── batchpredictionjob_instance_config.rb │ │ ├── batchpredictionjob_labels.rb │ │ ├── batchpredictionjob_manual_batch_tuning_parameters.rb │ │ ├── batchpredictionjob_output_config.rb │ │ ├── batchpredictionjob_output_config_bigquery_destination.rb │ │ ├── batchpredictionjob_output_config_gcs_destination.rb │ │ ├── batchpredictionjob_output_info.rb │ │ ├── batchpredictionjob_partial_failures.rb │ │ ├── batchpredictionjob_resources_consumed.rb │ │ ├── batchpredictionjob_unmanaged_container_model.rb │ │ ├── batchpredictionjob_unmanaged_container_model_container_spec.rb │ │ ├── batchpredictionjob_unmanaged_container_model_container_spec_env.rb │ │ ├── batchpredictionjob_unmanaged_container_model_container_spec_ports.rb │ │ ├── batchpredictionjob_unmanaged_container_model_predict_schemata.rb │ │ ├── customjob_encryption_spec.rb │ │ ├── customjob_error.rb │ │ ├── customjob_job_spec.rb │ │ ├── customjob_job_spec_base_output_directory.rb │ │ ├── customjob_job_spec_scheduling.rb │ │ ├── customjob_job_spec_worker_pool_specs.rb │ │ ├── customjob_job_spec_worker_pool_specs_container_spec.rb │ │ ├── customjob_job_spec_worker_pool_specs_container_spec_env.rb │ │ ├── customjob_job_spec_worker_pool_specs_disk_spec.rb │ │ ├── customjob_job_spec_worker_pool_specs_machine_spec.rb │ │ ├── customjob_job_spec_worker_pool_specs_nfs_mounts.rb │ │ ├── customjob_job_spec_worker_pool_specs_python_package_spec.rb │ │ ├── customjob_job_spec_worker_pool_specs_python_package_spec_env.rb │ │ ├── customjob_labels.rb │ │ ├── customjob_web_access_uris.rb │ │ ├── dataset_encryption_spec.rb │ │ ├── dataset_labels.rb │ │ ├── dataset_saved_queries.rb │ │ ├── datasetdataitemannotation_labels.rb │ │ ├── datasetsdataitem_labels.rb │ │ ├── endpoint_deployed_models.rb │ │ ├── endpoint_deployed_models_automatic_resources.rb │ │ ├── endpoint_deployed_models_dedicated_resources.rb │ │ ├── endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs.rb │ │ ├── endpoint_deployed_models_dedicated_resources_machine_spec.rb │ │ ├── endpoint_deployed_models_explanation_spec.rb │ │ ├── endpoint_deployed_models_explanation_spec_metadata.rb │ │ ├── endpoint_deployed_models_explanation_spec_metadata_inputs.rb │ │ ├── endpoint_deployed_models_explanation_spec_metadata_outputs.rb │ │ ├── endpoint_deployed_models_explanation_spec_parameters.rb │ │ ├── endpoint_deployed_models_explanation_spec_parameters_examples.rb │ │ ├── endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source.rb │ │ ├── endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb │ │ ├── endpoint_deployed_models_explanation_spec_parameters_examples_presets.rb │ │ ├── endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution.rb │ │ ├── endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution.rb │ │ ├── endpoint_deployed_models_explanation_spec_parameters_xrai_attribution.rb │ │ ├── endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb │ │ ├── endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb │ │ ├── endpoint_deployed_models_private_endpoints.rb │ │ ├── endpoint_dmespigabb_config.rb │ │ ├── endpoint_dmespigasg_config.rb │ │ ├── endpoint_dmespigasgcfn_sigma.rb │ │ ├── endpoint_dmespigasgcfnsn_sigma.rb │ │ ├── endpoint_dmespxasgcfn_sigma.rb │ │ ├── endpoint_dmespxasgcfnsn_sigma.rb │ │ ├── endpoint_encryption_spec.rb │ │ ├── endpoint_labels.rb │ │ ├── endpoint_predict_request_response_logging_config.rb │ │ ├── endpoint_predict_request_response_logging_config_bigquery_destination.rb │ │ ├── endpoint_traffic_split.rb │ │ ├── featurestore_encryption_spec.rb │ │ ├── featurestore_labels.rb │ │ ├── featurestore_online_serving_config.rb │ │ ├── featurestore_online_serving_config_scaling.rb │ │ ├── featurestoreentitytypefeature_labels.rb │ │ ├── featurestoresentitytype_labels.rb │ │ ├── featurestoresentitytype_monitoring_config.rb │ │ ├── featurestoresentitytype_monitoring_config_categorical_threshold_config.rb │ │ ├── featurestoresentitytype_monitoring_config_import_features_analysis.rb │ │ ├── featurestoresentitytype_monitoring_config_numerical_threshold_config.rb │ │ ├── featurestoresentitytype_monitoring_config_snapshot_analysis.rb │ │ ├── hyperparametertuningjob_labels.rb │ │ ├── index_labels.rb │ │ ├── indexendpoint_deployed_indexes.rb │ │ ├── indexendpoint_deployed_indexes_automatic_resources.rb │ │ ├── indexendpoint_deployed_indexes_dedicated_resources.rb │ │ ├── indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs.rb │ │ ├── indexendpoint_deployed_indexes_dedicated_resources_machine_spec.rb │ │ ├── indexendpoint_deployed_indexes_deployed_index_auth_config.rb │ │ ├── indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider.rb │ │ ├── indexendpoint_deployed_indexes_private_endpoints.rb │ │ ├── indexendpoint_labels.rb │ │ ├── indexendpoint_private_service_connect_config.rb │ │ ├── metadatastore_encryption_spec.rb │ │ ├── metadatastore_state.rb │ │ ├── metadatastoresartifact_labels.rb │ │ ├── metadatastoresartifact_metadata.rb │ │ ├── metadatastorescontext_labels.rb │ │ ├── metadatastorescontext_metadata.rb │ │ ├── metadatastoresexecution_labels.rb │ │ ├── metadatastoresexecution_metadata.rb │ │ ├── model_container_spec.rb │ │ ├── model_container_spec_env.rb │ │ ├── model_container_spec_ports.rb │ │ ├── model_deployed_models.rb │ │ ├── model_encryption_spec.rb │ │ ├── model_espigasgcfn_sigma.rb │ │ ├── model_espigasgcfnsn_sigma.rb │ │ ├── model_espxasgcfnsn_sigma.rb │ │ ├── model_explanation_spec.rb │ │ ├── model_explanation_spec_metadata.rb │ │ ├── model_explanation_spec_metadata_inputs.rb │ │ ├── model_explanation_spec_metadata_outputs.rb │ │ ├── model_explanation_spec_parameters.rb │ │ ├── model_explanation_spec_parameters_examples.rb │ │ ├── model_explanation_spec_parameters_examples_example_gcs_source.rb │ │ ├── model_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb │ │ ├── model_explanation_spec_parameters_examples_presets.rb │ │ ├── model_explanation_spec_parameters_integrated_gradients_attribution.rb │ │ ├── model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb │ │ ├── model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb │ │ ├── model_explanation_spec_parameters_sampled_shapley_attribution.rb │ │ ├── model_explanation_spec_parameters_xrai_attribution.rb │ │ ├── model_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb │ │ ├── model_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb │ │ ├── model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb │ │ ├── model_labels.rb │ │ ├── model_model_source_info.rb │ │ ├── model_original_model_info.rb │ │ ├── model_predict_schemata.rb │ │ ├── model_supported_export_formats.rb │ │ ├── modeldeploymentmonitoringjob_bigquery_tables.rb │ │ ├── modeldeploymentmonitoringjob_encryption_spec.rb │ │ ├── modeldeploymentmonitoringjob_error.rb │ │ ├── modeldeploymentmonitoringjob_labels.rb │ │ ├── modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata.rb │ │ ├── modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status.rb │ │ ├── modeldeploymentmonitoringjob_logging_sampling_strategy.rb │ │ ├── modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config.rb │ │ ├── modeldeploymentmonitoringjob_mdmococe_config.rb │ │ ├── modeldeploymentmonitoringjob_mdmococece_baseline.rb │ │ ├── modeldeploymentmonitoringjob_mdmococeceb_bigquery.rb │ │ ├── modeldeploymentmonitoringjob_mdmococeceb_gcs.rb │ │ ├── modeldeploymentmonitoringjob_mdmococpdd_config.rb │ │ ├── modeldeploymentmonitoringjob_mdmococpddcasd_thresholds.rb │ │ ├── modeldeploymentmonitoringjob_mdmococpddcd_thresholds.rb │ │ ├── modeldeploymentmonitoringjob_mdmococpddcdd_threshold.rb │ │ ├── modeldeploymentmonitoringjob_mdmococt_dataset.rb │ │ ├── modeldeploymentmonitoringjob_mdmococtdb_source.rb │ │ ├── modeldeploymentmonitoringjob_mdmococtdg_source.rb │ │ ├── modeldeploymentmonitoringjob_mdmococtdls_strategy.rb │ │ ├── modeldeploymentmonitoringjob_mdmococtdlssrs_config.rb │ │ ├── modeldeploymentmonitoringjob_mdmococtpsd_config.rb │ │ ├── modeldeploymentmonitoringjob_mdmococtpsdcass_thresholds.rb │ │ ├── modeldeploymentmonitoringjob_mdmococtpsdcds_threshold.rb │ │ ├── modeldeploymentmonitoringjob_mdmococtpsdcs_thresholds.rb │ │ ├── modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs.rb │ │ ├── modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config.rb │ │ ├── modeldeploymentmonitoringjob_model_deployment_monitoring_schedule_config.rb │ │ ├── modeldeploymentmonitoringjob_model_monitoring_alert_config.rb │ │ ├── modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config.rb │ │ ├── modeldeploymentmonitoringjob_stats_anomalies_base_directory.rb │ │ ├── modelevaluationslice_model_explanation.rb │ │ ├── modelevaluationslice_model_explanation_mean_attributions.rb │ │ ├── modelevaluationslice_slice.rb │ │ ├── modelevaluationslice_slice_slice_spec.rb │ │ ├── modelevaluationslice_slice_slice_spec_configs.rb │ │ ├── modelsevaluation_esespeegsg_source.rb │ │ ├── modelsevaluation_esespigabb_config.rb │ │ ├── modelsevaluation_esespigasg_config.rb │ │ ├── modelsevaluation_esespigasgcfn_sigma.rb │ │ ├── modelsevaluation_esespigasgcfnsn_sigma.rb │ │ ├── modelsevaluation_esespxabb_config.rb │ │ ├── modelsevaluation_esespxasg_config.rb │ │ ├── modelsevaluation_esespxasgcfn_sigma.rb │ │ ├── modelsevaluation_esespxasgcfnsn_sigma.rb │ │ ├── modelsevaluation_explanation_specs.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec_metadata.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec_metadata_inputs.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec_metadata_outputs.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec_parameters.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec_parameters_examples.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution.rb │ │ ├── modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution.rb │ │ ├── modelsevaluation_model_explanation.rb │ │ ├── modelsevaluation_model_explanation_mean_attributions.rb │ │ ├── nasjob_encryption_spec.rb │ │ ├── nasjob_error.rb │ │ ├── nasjob_labels.rb │ │ ├── nasjob_nas_job_output.rb │ │ ├── nasjob_nas_job_output_multi_trial_job_output.rb │ │ ├── nasjob_nas_job_output_multi_trial_job_output_search_trials.rb │ │ ├── nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement.rb │ │ ├── nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics.rb │ │ ├── nasjob_nas_job_output_multi_trial_job_output_train_trials.rb │ │ ├── nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement.rb │ │ ├── nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics.rb │ │ ├── nasjob_nas_job_spec.rb │ │ ├── nasjob_nas_job_spec_multi_trial_algorithm_spec.rb │ │ ├── nasjob_nas_job_spec_multi_trial_algorithm_spec_metric.rb │ │ ├── nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec.rb │ │ ├── nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec.rb │ │ ├── nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling.rb │ │ ├── nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec.rb │ │ ├── nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec.rb │ │ ├── nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling.rb │ │ ├── nasjob_njsmtasstsstjsbo_directory.rb │ │ ├── nasjob_njsmtasstsstjswp_specs.rb │ │ ├── nasjob_njsmtasstsstjswpsc_spec.rb │ │ ├── nasjob_njsmtasstsstjswpscs_env.rb │ │ ├── nasjob_njsmtasstsstjswpsd_spec.rb │ │ ├── nasjob_njsmtasstsstjswpsm_spec.rb │ │ ├── nasjob_njsmtasstsstjswpsn_mounts.rb │ │ ├── nasjob_njsmtasstsstjswpspp_spec.rb │ │ ├── nasjob_njsmtasstsstjswpspps_env.rb │ │ ├── nasjob_njsmtasttsttjsbo_directory.rb │ │ ├── nasjob_njsmtasttsttjswp_specs.rb │ │ ├── nasjob_njsmtasttsttjswpsc_spec.rb │ │ ├── nasjob_njsmtasttsttjswpscs_env.rb │ │ ├── nasjob_njsmtasttsttjswpsd_spec.rb │ │ ├── nasjob_njsmtasttsttjswpsm_spec.rb │ │ ├── nasjob_njsmtasttsttjswpsn_mounts.rb │ │ ├── nasjob_njsmtasttsttjswpspp_spec.rb │ │ ├── nasjob_njsmtasttsttjswpspps_env.rb │ │ ├── nasjobsnastrialdetail_search_trial.rb │ │ ├── nasjobsnastrialdetail_search_trial_final_measurement.rb │ │ ├── nasjobsnastrialdetail_search_trial_final_measurement_metrics.rb │ │ ├── nasjobsnastrialdetail_train_trial.rb │ │ ├── nasjobsnastrialdetail_train_trial_final_measurement.rb │ │ ├── nasjobsnastrialdetail_train_trial_final_measurement_metrics.rb │ │ ├── pipelinejob_encryption_spec.rb │ │ ├── pipelinejob_error.rb │ │ ├── pipelinejob_job_detail.rb │ │ ├── pipelinejob_job_detail_pipeline_context.rb │ │ ├── pipelinejob_job_detail_pipeline_context_labels.rb │ │ ├── pipelinejob_job_detail_pipeline_context_metadata.rb │ │ ├── pipelinejob_job_detail_pipeline_run_context.rb │ │ ├── pipelinejob_job_detail_pipeline_run_context_labels.rb │ │ ├── pipelinejob_job_detail_pipeline_run_context_metadata.rb │ │ ├── pipelinejob_job_detail_task_details.rb │ │ ├── pipelinejob_job_detail_task_details_error.rb │ │ ├── pipelinejob_job_detail_task_details_execution.rb │ │ ├── pipelinejob_job_detail_task_details_execution_labels.rb │ │ ├── pipelinejob_job_detail_task_details_execution_metadata.rb │ │ ├── pipelinejob_job_detail_task_details_executor_detail.rb │ │ ├── pipelinejob_job_detail_task_details_executor_detail_container_detail.rb │ │ ├── pipelinejob_job_detail_task_details_executor_detail_custom_job_detail.rb │ │ ├── pipelinejob_job_detail_task_details_inputs.rb │ │ ├── pipelinejob_job_detail_task_details_outputs.rb │ │ ├── pipelinejob_job_detail_task_details_pipeline_task_status.rb │ │ ├── pipelinejob_job_detail_task_details_pipeline_task_status_error.rb │ │ ├── pipelinejob_labels.rb │ │ ├── pipelinejob_pipeline_spec.rb │ │ ├── pipelinejob_runtime_config.rb │ │ ├── pipelinejob_runtime_config_input_artifacts.rb │ │ ├── pipelinejob_runtime_config_parameter_values.rb │ │ ├── pipelinejob_runtime_config_parameters.rb │ │ ├── pipelinejob_template_metadata.rb │ │ ├── schedule_cpjrpjjdtdedc_detail.rb │ │ ├── schedule_cpjrpjjdtdedcj_detail.rb │ │ ├── schedule_cpjrpjjdtdpts_error.rb │ │ ├── schedule_create_pipeline_job_request.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_encryption_spec.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_error.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_error.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_inputs.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_outputs.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_labels.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_pipeline_spec.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_runtime_config.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters.rb │ │ ├── schedule_create_pipeline_job_request_pipeline_job_template_metadata.rb │ │ ├── schedule_last_scheduled_run_response.rb │ │ ├── studiestrial_final_measurement.rb │ │ ├── studiestrial_final_measurement_metrics.rb │ │ ├── studiestrial_measurements.rb │ │ ├── studiestrial_measurements_metrics.rb │ │ ├── studiestrial_parameters.rb │ │ ├── studiestrial_web_access_uris.rb │ │ ├── tensorboard_encryption_spec.rb │ │ ├── tensorboard_labels.rb │ │ ├── tensorboardexperimentrun_labels.rb │ │ ├── tensorboardsexperiment_labels.rb │ │ ├── trainingpipeline_encryption_spec.rb │ │ ├── trainingpipeline_error.rb │ │ ├── trainingpipeline_input_data_config.rb │ │ ├── trainingpipeline_input_data_config_bigquery_destination.rb │ │ ├── trainingpipeline_input_data_config_filter_split.rb │ │ ├── trainingpipeline_input_data_config_fraction_split.rb │ │ ├── trainingpipeline_input_data_config_gcs_destination.rb │ │ ├── trainingpipeline_input_data_config_predefined_split.rb │ │ ├── trainingpipeline_input_data_config_stratified_split.rb │ │ ├── trainingpipeline_input_data_config_timestamp_split.rb │ │ ├── trainingpipeline_labels.rb │ │ ├── trainingpipeline_model_to_upload.rb │ │ ├── trainingpipeline_model_to_upload_container_spec.rb │ │ ├── trainingpipeline_model_to_upload_container_spec_env.rb │ │ ├── trainingpipeline_model_to_upload_container_spec_ports.rb │ │ ├── trainingpipeline_model_to_upload_deployed_models.rb │ │ ├── trainingpipeline_model_to_upload_encryption_spec.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_metadata.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_metadata_inputs.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_metadata_outputs.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_parameters.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_parameters_examples.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution.rb │ │ ├── trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb │ │ ├── trainingpipeline_model_to_upload_labels.rb │ │ ├── trainingpipeline_model_to_upload_model_source_info.rb │ │ ├── trainingpipeline_model_to_upload_original_model_info.rb │ │ ├── trainingpipeline_model_to_upload_predict_schemata.rb │ │ ├── trainingpipeline_model_to_upload_supported_export_formats.rb │ │ ├── trainingpipeline_mtuespeegsg_source.rb │ │ ├── trainingpipeline_mtuespigabb_config.rb │ │ ├── trainingpipeline_mtuespigasg_config.rb │ │ ├── trainingpipeline_mtuespigasgcfn_sigma.rb │ │ ├── trainingpipeline_mtuespigasgcfnsn_sigma.rb │ │ ├── trainingpipeline_mtuespxabb_config.rb │ │ ├── trainingpipeline_mtuespxasgcfn_sigma.rb │ │ └── trainingpipeline_mtuespxasgcfnsn_sigma.rb │ ├── google_access_context_manager_access_level.rb │ ├── google_access_context_manager_access_levels.rb │ ├── google_access_context_manager_access_policies.rb │ ├── google_access_context_manager_access_policy.rb │ ├── google_access_context_manager_service_perimeter.rb │ ├── google_access_context_manager_service_perimeters.rb │ ├── google_apigee_endpoint_attachment.rb │ ├── google_apigee_endpoint_attachments.rb │ ├── google_apigee_organization.rb │ ├── google_apigee_organization_api.rb │ ├── google_apigee_organization_apis.rb │ ├── google_apigee_organization_envgroup.rb │ ├── google_apigee_organization_envgroup_attachment.rb │ ├── google_apigee_organization_envgroup_attachments.rb │ ├── google_apigee_organization_envgroups.rb │ ├── google_apigee_organization_instance_attachment.rb │ ├── google_apigee_organization_instance_attachments.rb │ ├── google_apigee_organizations.rb │ ├── google_appengine_standard_app_version.rb │ ├── google_appengine_standard_app_versions.rb │ ├── google_artifactregistry_project_location_repositories.rb │ ├── google_artifactregistry_project_location_repository.rb │ ├── google_bigquery_dataset.rb │ ├── google_bigquery_datasets.rb │ ├── google_bigquery_table.rb │ ├── google_bigquery_tables.rb │ ├── google_bigtableadmin_cluster.rb │ ├── google_bigtableadmin_cluster_backup.rb │ ├── google_bigtableadmin_cluster_backups.rb │ ├── google_bigtableadmin_clusters.rb │ ├── google_bigtableadmin_instance_app_profile.rb │ ├── google_bigtableadmin_instance_app_profiles.rb │ ├── google_billing_project_billing_info.rb │ ├── google_cloud_scheduler_job.rb │ ├── google_cloud_scheduler_jobs.rb │ ├── google_cloudbuild_trigger.rb │ ├── google_cloudbuild_triggers.rb │ ├── google_cloudfunctions_cloud_function.rb │ ├── google_cloudfunctions_cloud_functions.rb │ ├── google_composer_project_location_environment.rb │ ├── google_composer_project_location_environments.rb │ ├── google_composer_project_location_image_versions.rb │ ├── google_compute_accelerator_type.rb │ ├── google_compute_accelerator_types.rb │ ├── google_compute_address.rb │ ├── google_compute_addresses.rb │ ├── google_compute_autoscaler.rb │ ├── google_compute_autoscalers.rb │ ├── google_compute_backend_bucket.rb │ ├── google_compute_backend_buckets.rb │ ├── google_compute_backend_service.rb │ ├── google_compute_backend_services.rb │ ├── google_compute_disk.rb │ ├── google_compute_disk_type.rb │ ├── google_compute_disk_types.rb │ ├── google_compute_disks.rb │ ├── google_compute_external_vpn_gateway.rb │ ├── google_compute_external_vpn_gateways.rb │ ├── google_compute_firewall.rb │ ├── google_compute_firewalls.rb │ ├── google_compute_forwarding_rule.rb │ ├── google_compute_forwarding_rules.rb │ ├── google_compute_global_address.rb │ ├── google_compute_global_addresses.rb │ ├── google_compute_global_forwarding_rule.rb │ ├── google_compute_global_forwarding_rules.rb │ ├── google_compute_global_network_endpoint_group.rb │ ├── google_compute_global_network_endpoint_groups.rb │ ├── google_compute_global_operation.rb │ ├── google_compute_global_operations.rb │ ├── google_compute_health_check.rb │ ├── google_compute_health_check_service.rb │ ├── google_compute_health_check_services.rb │ ├── google_compute_health_checks.rb │ ├── google_compute_http_health_check.rb │ ├── google_compute_http_health_checks.rb │ ├── google_compute_https_health_check.rb │ ├── google_compute_https_health_checks.rb │ ├── google_compute_image.rb │ ├── google_compute_image_family_view.rb │ ├── google_compute_instance.rb │ ├── google_compute_instance_group.rb │ ├── google_compute_instance_group_manager.rb │ ├── google_compute_instance_group_managers.rb │ ├── google_compute_instance_groups.rb │ ├── google_compute_instance_template.rb │ ├── google_compute_instance_templates.rb │ ├── google_compute_instances.rb │ ├── google_compute_interconnect.rb │ ├── google_compute_interconnect_attachment.rb │ ├── google_compute_interconnect_attachments.rb │ ├── google_compute_interconnect_location.rb │ ├── google_compute_interconnect_locations.rb │ ├── google_compute_interconnects.rb │ ├── google_compute_license.rb │ ├── google_compute_license_code.rb │ ├── google_compute_licenses.rb │ ├── google_compute_machine_image.rb │ ├── google_compute_machine_images.rb │ ├── google_compute_machine_type.rb │ ├── google_compute_machine_types.rb │ ├── google_compute_network.rb │ ├── google_compute_network_attachment.rb │ ├── google_compute_network_attachments.rb │ ├── google_compute_network_edge_security_service.rb │ ├── google_compute_network_endpoint_group.rb │ ├── google_compute_network_endpoint_groups.rb │ ├── google_compute_network_firewall_policies.rb │ ├── google_compute_network_firewall_policy.rb │ ├── google_compute_networks.rb │ ├── google_compute_node_group.rb │ ├── google_compute_node_groups.rb │ ├── google_compute_node_template.rb │ ├── google_compute_node_templates.rb │ ├── google_compute_node_type.rb │ ├── google_compute_node_types.rb │ ├── google_compute_packet_mirroring.rb │ ├── google_compute_packet_mirrorings.rb │ ├── google_compute_project_info.rb │ ├── google_compute_public_delegated_prefix.rb │ ├── google_compute_public_delegated_prefixes.rb │ ├── google_compute_region.rb │ ├── google_compute_region_autoscaler.rb │ ├── google_compute_region_autoscalers.rb │ ├── google_compute_region_backend_service.rb │ ├── google_compute_region_backend_services.rb │ ├── google_compute_region_commitment.rb │ ├── google_compute_region_commitments.rb │ ├── google_compute_region_disk_type.rb │ ├── google_compute_region_disk_types.rb │ ├── google_compute_region_health_check.rb │ ├── google_compute_region_health_checks.rb │ ├── google_compute_region_instance_group.rb │ ├── google_compute_region_instance_group_manager.rb │ ├── google_compute_region_instance_group_managers.rb │ ├── google_compute_region_instance_groups.rb │ ├── google_compute_region_network_endpoint_group.rb │ ├── google_compute_region_network_endpoint_groups.rb │ ├── google_compute_region_operation.rb │ ├── google_compute_region_operations.rb │ ├── google_compute_region_security_policies.rb │ ├── google_compute_region_security_policy.rb │ ├── google_compute_region_ssl_policies.rb │ ├── google_compute_region_ssl_policy.rb │ ├── google_compute_region_target_http_proxies.rb │ ├── google_compute_region_target_http_proxy.rb │ ├── google_compute_region_target_https_proxies.rb │ ├── google_compute_region_target_https_proxy.rb │ ├── google_compute_region_url_map.rb │ ├── google_compute_region_url_maps.rb │ ├── google_compute_regional_disk.rb │ ├── google_compute_regional_disks.rb │ ├── google_compute_regions.rb │ ├── google_compute_reservation.rb │ ├── google_compute_reservations.rb │ ├── google_compute_resource_policies.rb │ ├── google_compute_resource_policy.rb │ ├── google_compute_route.rb │ ├── google_compute_router.rb │ ├── google_compute_router_nat.rb │ ├── google_compute_router_nats.rb │ ├── google_compute_routers.rb │ ├── google_compute_routes.rb │ ├── google_compute_security_policies.rb │ ├── google_compute_security_policy.rb │ ├── google_compute_service_attachment.rb │ ├── google_compute_service_attachments.rb │ ├── google_compute_snapshot.rb │ ├── google_compute_snapshots.rb │ ├── google_compute_ssl_certificate.rb │ ├── google_compute_ssl_certificates.rb │ ├── google_compute_ssl_policies.rb │ ├── google_compute_ssl_policy.rb │ ├── google_compute_subnetwork.rb │ ├── google_compute_subnetwork_iam_binding.rb │ ├── google_compute_subnetwork_iam_policy.rb │ ├── google_compute_subnetworks.rb │ ├── google_compute_target_grpc_proxies.rb │ ├── google_compute_target_grpc_proxy.rb │ ├── google_compute_target_http_proxies.rb │ ├── google_compute_target_http_proxy.rb │ ├── google_compute_target_https_proxies.rb │ ├── google_compute_target_https_proxy.rb │ ├── google_compute_target_instance.rb │ ├── google_compute_target_instances.rb │ ├── google_compute_target_pool.rb │ ├── google_compute_target_pools.rb │ ├── google_compute_target_ssl_proxies.rb │ ├── google_compute_target_ssl_proxy.rb │ ├── google_compute_target_tcp_proxies.rb │ ├── google_compute_target_tcp_proxy.rb │ ├── google_compute_target_vpn_gateway.rb │ ├── google_compute_target_vpn_gateways.rb │ ├── google_compute_url_map.rb │ ├── google_compute_url_maps.rb │ ├── google_compute_vpn_gateway.rb │ ├── google_compute_vpn_gateways.rb │ ├── google_compute_vpn_tunnel.rb │ ├── google_compute_vpn_tunnels.rb │ ├── google_compute_xpn_resources.rb │ ├── google_compute_zone.rb │ ├── google_compute_zone_operation.rb │ ├── google_compute_zone_operations.rb │ ├── google_compute_zones.rb │ ├── google_container_cluster.rb │ ├── google_container_clusters.rb │ ├── google_container_node_pool.rb │ ├── google_container_node_pools.rb │ ├── google_container_server_config.rb │ ├── google_data_fusion_instance.rb │ ├── google_data_fusion_instances.rb │ ├── google_dataflow_project_location_job.rb │ ├── google_dataflow_project_location_jobs.rb │ ├── google_dataproc_autoscaling_policies.rb │ ├── google_dataproc_autoscaling_policy.rb │ ├── google_dataproc_batch.rb │ ├── google_dataproc_batches.rb │ ├── google_dataproc_cluster.rb │ ├── google_dataproc_clusters.rb │ ├── google_dataproc_job.rb │ ├── google_dataproc_jobs.rb │ ├── google_dataproc_metastore_federation.rb │ ├── google_dataproc_metastore_federations.rb │ ├── google_dataproc_metastore_service.rb │ ├── google_dataproc_metastore_service_backup.rb │ ├── google_dataproc_metastore_service_backups.rb │ ├── google_dataproc_metastore_services.rb │ ├── google_dataproc_session.rb │ ├── google_dataproc_sessions.rb │ ├── google_dataproc_workflow_template.rb │ ├── google_dataproc_workflow_templates.rb │ ├── google_dlp_dt.rb │ ├── google_dlp_dts.rb │ ├── google_dlp_inspect_template.rb │ ├── google_dlp_inspect_templates.rb │ ├── google_dlp_job.rb │ ├── google_dlp_job_trigger.rb │ ├── google_dlp_job_triggers.rb │ ├── google_dlp_jobs.rb │ ├── google_dlp_stored_info_type.rb │ ├── google_dlp_stored_info_types.rb │ ├── google_dns_managed_zone.rb │ ├── google_dns_managed_zones.rb │ ├── google_dns_resource_record_set.rb │ ├── google_dns_resource_record_sets.rb │ ├── google_filestore_instance.rb │ ├── google_filestore_instances.rb │ ├── google_iam_organization_custom_role.rb │ ├── google_iam_organization_custom_roles.rb │ ├── google_kms_crypto_key.rb │ ├── google_kms_crypto_key_iam_binding.rb │ ├── google_kms_crypto_key_iam_bindings.rb │ ├── google_kms_crypto_key_iam_policy.rb │ ├── google_kms_crypto_key_version.rb │ ├── google_kms_crypto_key_versions.rb │ ├── google_kms_crypto_keys.rb │ ├── google_kms_ekm_connection.rb │ ├── google_kms_ekm_connections.rb │ ├── google_kms_key_ring.rb │ ├── google_kms_key_ring_iam_binding.rb │ ├── google_kms_key_ring_iam_bindings.rb │ ├── google_kms_key_ring_iam_policy.rb │ ├── google_kms_key_ring_import_job.rb │ ├── google_kms_key_ring_import_jobs.rb │ ├── google_kms_key_rings.rb │ ├── google_kms_location.rb │ ├── google_kms_locations.rb │ ├── google_logging_folder_exclusion.rb │ ├── google_logging_folder_exclusions.rb │ ├── google_logging_folder_log_sink.rb │ ├── google_logging_folder_log_sinks.rb │ ├── google_logging_organization_log_sink.rb │ ├── google_logging_organization_log_sinks.rb │ ├── google_logging_project_exclusion.rb │ ├── google_logging_project_exclusions.rb │ ├── google_logging_project_sink.rb │ ├── google_logging_project_sinks.rb │ ├── google_memcache_instance.rb │ ├── google_memcache_instances.rb │ ├── google_ml_engine_model.rb │ ├── google_ml_engine_models.rb │ ├── google_monitoring_group.rb │ ├── google_monitoring_groups.rb │ ├── google_organization.rb │ ├── google_organization_iam_binding.rb │ ├── google_organization_iam_policy.rb │ ├── google_organization_policy.rb │ ├── google_organizations.rb │ ├── google_orgpolicy_folder_constraints.rb │ ├── google_orgpolicy_folder_policies.rb │ ├── google_orgpolicy_folder_policy.rb │ ├── google_orgpolicy_organization_constraints.rb │ ├── google_orgpolicy_organization_policies.rb │ ├── google_orgpolicy_organization_policy.rb │ ├── google_orgpolicy_project_constraints.rb │ ├── google_orgpolicy_project_policies.rb │ ├── google_orgpolicy_project_policy.rb │ ├── google_project.rb │ ├── google_project_alert_policies.rb │ ├── google_project_alert_policy.rb │ ├── google_project_alert_policy_condition.rb │ ├── google_project_iam_binding.rb │ ├── google_project_iam_bindings.rb │ ├── google_project_iam_custom_role.rb │ ├── google_project_iam_custom_roles.rb │ ├── google_project_iam_policy.rb │ ├── google_project_logging_audit_config.rb │ ├── google_project_metric.rb │ ├── google_project_metrics.rb │ ├── google_project_service.rb │ ├── google_project_services.rb │ ├── google_projects.rb │ ├── google_pubsub_subscription.rb │ ├── google_pubsub_subscription_iam_binding.rb │ ├── google_pubsub_subscription_iam_policy.rb │ ├── google_pubsub_subscriptions.rb │ ├── google_pubsub_topic.rb │ ├── google_pubsub_topic_iam_binding.rb │ ├── google_pubsub_topic_iam_policy.rb │ ├── google_pubsub_topics.rb │ ├── google_redis_instance.rb │ ├── google_redis_instances.rb │ ├── google_resourcemanager_folder.rb │ ├── google_resourcemanager_folder_iam_binding.rb │ ├── google_resourcemanager_folder_iam_policy.rb │ ├── google_resourcemanager_folders.rb │ ├── google_run_job.rb │ ├── google_run_jobs.rb │ ├── google_run_service.rb │ ├── google_run_services.rb │ ├── google_runtime_config_config.rb │ ├── google_runtime_config_config_iam_binding.rb │ ├── google_runtime_config_config_iam_policy.rb │ ├── google_runtime_config_configs.rb │ ├── google_runtime_config_variable.rb │ ├── google_runtime_config_variables.rb │ ├── google_secret_manager_secret.rb │ ├── google_secret_manager_secrets.rb │ ├── google_service_account.rb │ ├── google_service_account_key.rb │ ├── google_service_account_keys.rb │ ├── google_service_accounts.rb │ ├── google_service_networking_service_connections.rb │ ├── google_sourcerepo_repositories.rb │ ├── google_sourcerepo_repository.rb │ ├── google_spanner_database.rb │ ├── google_spanner_databases.rb │ ├── google_spanner_instance.rb │ ├── google_spanner_instance_iam_binding.rb │ ├── google_spanner_instance_iam_policy.rb │ ├── google_spanner_instances.rb │ ├── google_sql_connect.rb │ ├── google_sql_database.rb │ ├── google_sql_database_instance.rb │ ├── google_sql_database_instances.rb │ ├── google_sql_databases.rb │ ├── google_sql_flags.rb │ ├── google_sql_operation.rb │ ├── google_sql_operations.rb │ ├── google_sql_ssl_cert.rb │ ├── google_sql_ssl_certs.rb │ ├── google_sql_user.rb │ ├── google_sql_users.rb │ ├── google_storage_bucket.rb │ ├── google_storage_bucket_acl.rb │ ├── google_storage_bucket_iam_binding.rb │ ├── google_storage_bucket_iam_bindings.rb │ ├── google_storage_bucket_iam_policy.rb │ ├── google_storage_bucket_object.rb │ ├── google_storage_bucket_objects.rb │ ├── google_storage_buckets.rb │ ├── google_storage_default_object_acl.rb │ ├── google_storage_object_acl.rb │ ├── google_user.rb │ ├── google_users.rb │ ├── google_vertex_ai_batch_prediction_job.rb │ ├── google_vertex_ai_batch_prediction_jobs.rb │ ├── google_vertex_ai_custom_job.rb │ ├── google_vertex_ai_custom_jobs.rb │ ├── google_vertex_ai_dataset.rb │ ├── google_vertex_ai_dataset_data_item_annotations.rb │ ├── google_vertex_ai_datasets.rb │ ├── google_vertex_ai_datasets_annotation_spec.rb │ ├── google_vertex_ai_datasets_data_items.rb │ ├── google_vertex_ai_datasets_saved_queries.rb │ ├── google_vertex_ai_endpoint.rb │ ├── google_vertex_ai_endpoints.rb │ ├── google_vertex_ai_featurestore.rb │ ├── google_vertex_ai_featurestore_entity_type_feature.rb │ ├── google_vertex_ai_featurestore_entity_type_features.rb │ ├── google_vertex_ai_featurestores.rb │ ├── google_vertex_ai_featurestores_entity_type.rb │ ├── google_vertex_ai_featurestores_entity_types.rb │ ├── google_vertex_ai_hyperparameter_tuning_job.rb │ ├── google_vertex_ai_hyperparameter_tuning_jobs.rb │ ├── google_vertex_ai_index.rb │ ├── google_vertex_ai_index_endpoint.rb │ ├── google_vertex_ai_index_endpoints.rb │ ├── google_vertex_ai_indices.rb │ ├── google_vertex_ai_metadata_store.rb │ ├── google_vertex_ai_metadata_stores.rb │ ├── google_vertex_ai_metadata_stores_artifact.rb │ ├── google_vertex_ai_metadata_stores_artifacts.rb │ ├── google_vertex_ai_metadata_stores_context.rb │ ├── google_vertex_ai_metadata_stores_contexts.rb │ ├── google_vertex_ai_metadata_stores_execution.rb │ ├── google_vertex_ai_metadata_stores_executions.rb │ ├── google_vertex_ai_metadata_stores_metadata_schema.rb │ ├── google_vertex_ai_metadata_stores_metadata_schemas.rb │ ├── google_vertex_ai_model.rb │ ├── google_vertex_ai_model_deployment_monitoring_job.rb │ ├── google_vertex_ai_model_deployment_monitoring_jobs.rb │ ├── google_vertex_ai_model_evaluation_slice.rb │ ├── google_vertex_ai_model_evaluation_slices.rb │ ├── google_vertex_ai_models.rb │ ├── google_vertex_ai_models_evaluation.rb │ ├── google_vertex_ai_models_evaluations.rb │ ├── google_vertex_ai_nas_job.rb │ ├── google_vertex_ai_nas_jobs.rb │ ├── google_vertex_ai_nas_jobs_nas_trial_detail.rb │ ├── google_vertex_ai_nas_jobs_nas_trial_details.rb │ ├── google_vertex_ai_pipeline_job.rb │ ├── google_vertex_ai_pipeline_jobs.rb │ ├── google_vertex_ai_schedule.rb │ ├── google_vertex_ai_schedules.rb │ ├── google_vertex_ai_studies.rb │ ├── google_vertex_ai_studies_trial.rb │ ├── google_vertex_ai_studies_trials.rb │ ├── google_vertex_ai_study.rb │ ├── google_vertex_ai_tensorboard.rb │ ├── google_vertex_ai_tensorboard_experiment_run.rb │ ├── google_vertex_ai_tensorboard_experiment_run_time_series_resource.rb │ ├── google_vertex_ai_tensorboard_experiment_run_time_series_resources.rb │ ├── google_vertex_ai_tensorboard_experiment_runs.rb │ ├── google_vertex_ai_tensorboards.rb │ ├── google_vertex_ai_tensorboards_experiment.rb │ ├── google_vertex_ai_tensorboards_experiments.rb │ ├── google_vertex_ai_training_pipeline.rb │ └── google_vertex_ai_training_pipelines.rb ├── sonar-project.properties └── test/ ├── integration/ │ ├── build/ │ │ ├── gcp-mm.tf │ │ ├── gcp.tf │ │ └── templates/ │ │ ├── gceme.sh.tpl │ │ └── nginx_upstream.sh.tpl │ ├── configuration/ │ │ ├── gcp_inspec_config.rb │ │ └── mm-attributes.yml │ └── verify/ │ ├── controls/ │ │ ├── container_cluster.rb │ │ ├── container_clusters.rb │ │ ├── container_nodepool.rb │ │ ├── container_nodepools.rb │ │ ├── gcp_project.rb │ │ ├── generic_external_vm.rb │ │ ├── generic_external_vm_data_disk.rb │ │ ├── generic_iam_role.rb │ │ ├── generic_image_family.rb │ │ ├── generic_internal_vm.rb │ │ ├── generic_public_ip_address.rb │ │ ├── generic_windows_internal_vm.rb │ │ ├── google_access_context_manager_access_level.rb │ │ ├── google_access_context_manager_access_levels.rb │ │ ├── google_access_context_manager_access_policies.rb │ │ ├── google_access_context_manager_access_policy.rb │ │ ├── google_access_context_manager_service_perimeter.rb │ │ ├── google_access_context_manager_service_perimeters.rb │ │ ├── google_apigee_endpoint_attachment.rb │ │ ├── google_apigee_endpoint_attachments.rb │ │ ├── google_apigee_organization.rb │ │ ├── google_apigee_organization_api.rb │ │ ├── google_apigee_organization_apis.rb │ │ ├── google_apigee_organization_envgroup.rb │ │ ├── google_apigee_organization_envgroup_attachment.rb │ │ ├── google_apigee_organization_envgroup_attachments.rb │ │ ├── google_apigee_organization_envgroups.rb │ │ ├── google_apigee_organization_instance_attachment.rb │ │ ├── google_apigee_organization_instance_attachments.rb │ │ ├── google_apigee_organizations.rb │ │ ├── google_appengine_standard_app_version.rb │ │ ├── google_appengine_standard_app_versions.rb │ │ ├── google_artifactregistry_project_location_repositories.rb │ │ ├── google_artifactregistry_project_location_repository.rb │ │ ├── google_bigquery_dataset.rb │ │ ├── google_bigquery_datasets.rb │ │ ├── google_bigquery_table.rb │ │ ├── google_bigquery_tables.rb │ │ ├── google_bigtableadmin_cluster.rb │ │ ├── google_bigtableadmin_cluster_backup.rb │ │ ├── google_bigtableadmin_cluster_backups.rb │ │ ├── google_bigtableadmin_clusters.rb │ │ ├── google_bigtableadmin_instance_app_profile.rb │ │ ├── google_bigtableadmin_instance_app_profiles.rb │ │ ├── google_billing_project_billing_info.rb │ │ ├── google_cloud_scheduler_job.rb │ │ ├── google_cloud_scheduler_jobs.rb │ │ ├── google_cloudbuild_trigger.rb │ │ ├── google_cloudbuild_triggers.rb │ │ ├── google_cloudfunctions_cloud_function.rb │ │ ├── google_cloudfunctions_cloud_functions.rb │ │ ├── google_composer_project_location_environment.rb │ │ ├── google_composer_project_location_environments.rb │ │ ├── google_composer_project_location_image_versions.rb │ │ ├── google_compute_accelerator_type.rb │ │ ├── google_compute_accelerator_types.rb │ │ ├── google_compute_address.rb │ │ ├── google_compute_addresses.rb │ │ ├── google_compute_autoscaler.rb │ │ ├── google_compute_autoscalers.rb │ │ ├── google_compute_backend_bucket.rb │ │ ├── google_compute_backend_buckets.rb │ │ ├── google_compute_backend_service.rb │ │ ├── google_compute_backend_services.rb │ │ ├── google_compute_disk.rb │ │ ├── google_compute_disk_type.rb │ │ ├── google_compute_disk_types.rb │ │ ├── google_compute_disks.rb │ │ ├── google_compute_external_vpn_gateway.rb │ │ ├── google_compute_external_vpn_gateways.rb │ │ ├── google_compute_firewall.rb │ │ ├── google_compute_firewalls.rb │ │ ├── google_compute_firewalls_handwritten.rb │ │ ├── google_compute_firewalls_loop.rb │ │ ├── google_compute_forwarding_rule.rb │ │ ├── google_compute_forwarding_rules.rb │ │ ├── google_compute_global_address.rb │ │ ├── google_compute_global_addresses.rb │ │ ├── google_compute_global_forwarding_rule.rb │ │ ├── google_compute_global_forwarding_rules.rb │ │ ├── google_compute_global_network_endpoint_group.rb │ │ ├── google_compute_global_network_endpoint_groups.rb │ │ ├── google_compute_global_operation.rb │ │ ├── google_compute_global_operations.rb │ │ ├── google_compute_health_check.rb │ │ ├── google_compute_health_check_service.rb │ │ ├── google_compute_health_check_services.rb │ │ ├── google_compute_health_checks.rb │ │ ├── google_compute_http_health_check.rb │ │ ├── google_compute_http_health_checks.rb │ │ ├── google_compute_https_health_check.rb │ │ ├── google_compute_https_health_checks.rb │ │ ├── google_compute_image.rb │ │ ├── google_compute_image_family_view.rb │ │ ├── google_compute_instance.rb │ │ ├── google_compute_instance_group.rb │ │ ├── google_compute_instance_group_manager.rb │ │ ├── google_compute_instance_group_managers.rb │ │ ├── google_compute_instance_groups.rb │ │ ├── google_compute_instance_groups_loop.rb │ │ ├── google_compute_instance_label_loop.rb │ │ ├── google_compute_instance_template.rb │ │ ├── google_compute_instance_templates.rb │ │ ├── google_compute_instances.rb │ │ ├── google_compute_interconnect.rb │ │ ├── google_compute_interconnect_attachment.rb │ │ ├── google_compute_interconnect_attachments.rb │ │ ├── google_compute_interconnect_location.rb │ │ ├── google_compute_interconnect_locations.rb │ │ ├── google_compute_interconnects.rb │ │ ├── google_compute_license.rb │ │ ├── google_compute_license_code.rb │ │ ├── google_compute_licenses.rb │ │ ├── google_compute_machine_image.rb │ │ ├── google_compute_machine_images.rb │ │ ├── google_compute_machine_type.rb │ │ ├── google_compute_machine_types.rb │ │ ├── google_compute_network.rb │ │ ├── google_compute_network_attachment.rb │ │ ├── google_compute_network_attachments.rb │ │ ├── google_compute_network_edge_security_service.rb │ │ ├── google_compute_network_endpoint_group.rb │ │ ├── google_compute_network_endpoint_groups.rb │ │ ├── google_compute_network_firewall_policies.rb │ │ ├── google_compute_network_firewall_policy.rb │ │ ├── google_compute_networks.rb │ │ ├── google_compute_node_group.rb │ │ ├── google_compute_node_groups.rb │ │ ├── google_compute_node_template.rb │ │ ├── google_compute_node_templates.rb │ │ ├── google_compute_node_type.rb │ │ ├── google_compute_node_types.rb │ │ ├── google_compute_packet_mirroring.rb │ │ ├── google_compute_packet_mirrorings.rb │ │ ├── google_compute_project_info.rb │ │ ├── google_compute_public_delegated_prefix.rb │ │ ├── google_compute_public_delegated_prefixes.rb │ │ ├── google_compute_region.rb │ │ ├── google_compute_region_autoscaler.rb │ │ ├── google_compute_region_autoscalers.rb │ │ ├── google_compute_region_backend_service.rb │ │ ├── google_compute_region_backend_services.rb │ │ ├── google_compute_region_commitment.rb │ │ ├── google_compute_region_commitments.rb │ │ ├── google_compute_region_disk_type.rb │ │ ├── google_compute_region_disk_types.rb │ │ ├── google_compute_region_health_check.rb │ │ ├── google_compute_region_health_checks.rb │ │ ├── google_compute_region_instance_group.rb │ │ ├── google_compute_region_instance_group_manager.rb │ │ ├── google_compute_region_instance_group_managers.rb │ │ ├── google_compute_region_instance_groups.rb │ │ ├── google_compute_region_network_endpoint_group.rb │ │ ├── google_compute_region_network_endpoint_groups.rb │ │ ├── google_compute_region_operation.rb │ │ ├── google_compute_region_operations.rb │ │ ├── google_compute_region_security_policies.rb │ │ ├── google_compute_region_security_policy.rb │ │ ├── google_compute_region_ssl_policies.rb │ │ ├── google_compute_region_ssl_policy.rb │ │ ├── google_compute_region_target_http_proxies.rb │ │ ├── google_compute_region_target_http_proxy.rb │ │ ├── google_compute_region_target_https_proxies.rb │ │ ├── google_compute_region_target_https_proxy.rb │ │ ├── google_compute_region_url_map.rb │ │ ├── google_compute_region_url_maps.rb │ │ ├── google_compute_region_zones_loop.rb │ │ ├── google_compute_regional_disk.rb │ │ ├── google_compute_regions.rb │ │ ├── google_compute_regions_loop.rb │ │ ├── google_compute_reservation.rb │ │ ├── google_compute_reservations.rb │ │ ├── google_compute_resource_policies.rb │ │ ├── google_compute_resource_policy.rb │ │ ├── google_compute_route.rb │ │ ├── google_compute_router.rb │ │ ├── google_compute_router_nat.rb │ │ ├── google_compute_router_nats.rb │ │ ├── google_compute_routers.rb │ │ ├── google_compute_routes.rb │ │ ├── google_compute_security_policies.rb │ │ ├── google_compute_security_policy.rb │ │ ├── google_compute_service_attachment.rb │ │ ├── google_compute_service_attachments.rb │ │ ├── google_compute_snapshot.rb │ │ ├── google_compute_snapshots.rb │ │ ├── google_compute_ssl_certificate.rb │ │ ├── google_compute_ssl_certificates.rb │ │ ├── google_compute_ssl_policies.rb │ │ ├── google_compute_ssl_policy.rb │ │ ├── google_compute_subnetwork.rb │ │ ├── google_compute_subnetworks.rb │ │ ├── google_compute_target_grpc_proxies.rb │ │ ├── google_compute_target_grpc_proxy.rb │ │ ├── google_compute_target_http_proxies.rb │ │ ├── google_compute_target_http_proxy.rb │ │ ├── google_compute_target_https_proxies.rb │ │ ├── google_compute_target_https_proxy.rb │ │ ├── google_compute_target_instance.rb │ │ ├── google_compute_target_instances.rb │ │ ├── google_compute_target_pool.rb │ │ ├── google_compute_target_pools.rb │ │ ├── google_compute_target_ssl_proxies.rb │ │ ├── google_compute_target_ssl_proxy.rb │ │ ├── google_compute_target_tcp_proxies.rb │ │ ├── google_compute_target_tcp_proxy.rb │ │ ├── google_compute_target_vpn_gateway.rb │ │ ├── google_compute_target_vpn_gateways.rb │ │ ├── google_compute_url_map.rb │ │ ├── google_compute_url_maps.rb │ │ ├── google_compute_vms.rb │ │ ├── google_compute_vms_loop.rb │ │ ├── google_compute_vpn_gateway.rb │ │ ├── google_compute_vpn_gateways.rb │ │ ├── google_compute_vpn_tunnel.rb │ │ ├── google_compute_vpn_tunnels.rb │ │ ├── google_compute_xpn_resources.rb │ │ ├── google_compute_zone.rb │ │ ├── google_compute_zone_operation.rb │ │ ├── google_compute_zone_operations.rb │ │ ├── google_compute_zones.rb │ │ ├── google_compute_zones_loop.rb │ │ ├── google_container_cluster.rb │ │ ├── google_container_clusters.rb │ │ ├── google_container_node_pool.rb │ │ ├── google_container_node_pools.rb │ │ ├── google_container_server_config.rb │ │ ├── google_data_fusion_instance.rb │ │ ├── google_data_fusion_instances.rb │ │ ├── google_dataflow_project_location_job.rb │ │ ├── google_dataflow_project_location_jobs.rb │ │ ├── google_dataproc_autoscaling_policies.rb │ │ ├── google_dataproc_autoscaling_policy.rb │ │ ├── google_dataproc_batch.rb │ │ ├── google_dataproc_batches.rb │ │ ├── google_dataproc_cluster.rb │ │ ├── google_dataproc_clusters.rb │ │ ├── google_dataproc_job.rb │ │ ├── google_dataproc_jobs.rb │ │ ├── google_dataproc_metastore_federation.rb │ │ ├── google_dataproc_metastore_federations.rb │ │ ├── google_dataproc_metastore_service.rb │ │ ├── google_dataproc_metastore_service_backup.rb │ │ ├── google_dataproc_metastore_service_backups.rb │ │ ├── google_dataproc_metastore_services.rb │ │ ├── google_dataproc_session.rb │ │ ├── google_dataproc_sessions.rb │ │ ├── google_dataproc_workflow_template.rb │ │ ├── google_dataproc_workflow_templates.rb │ │ ├── google_dlp_dt.rb │ │ ├── google_dlp_dts.rb │ │ ├── google_dlp_inspect_template.rb │ │ ├── google_dlp_inspect_templates.rb │ │ ├── google_dlp_job.rb │ │ ├── google_dlp_job_trigger.rb │ │ ├── google_dlp_job_triggers.rb │ │ ├── google_dlp_jobs.rb │ │ ├── google_dlp_stored_info_type.rb │ │ ├── google_dlp_stored_info_types.rb │ │ ├── google_dns_managed_zone.rb │ │ ├── google_dns_managed_zones.rb │ │ ├── google_dns_resource_record_set.rb │ │ ├── google_dns_resource_record_sets.rb │ │ ├── google_filestore_instance.rb │ │ ├── google_filestore_instances.rb │ │ ├── google_iam_organization_custom_role.rb │ │ ├── google_iam_organization_custom_roles.rb │ │ ├── google_kms_crypto_key.rb │ │ ├── google_kms_crypto_key_handwritten.rb │ │ ├── google_kms_crypto_key_iam_binding.rb │ │ ├── google_kms_crypto_key_iam_policy.rb │ │ ├── google_kms_crypto_key_version.rb │ │ ├── google_kms_crypto_key_versions.rb │ │ ├── google_kms_crypto_keys.rb │ │ ├── google_kms_crypto_keys_handwritten.rb │ │ ├── google_kms_ekm_connection.rb │ │ ├── google_kms_ekm_connections.rb │ │ ├── google_kms_key_ring.rb │ │ ├── google_kms_key_ring_handwritten.rb │ │ ├── google_kms_key_ring_iam_binding.rb │ │ ├── google_kms_key_ring_iam_policy.rb │ │ ├── google_kms_key_ring_import_job.rb │ │ ├── google_kms_key_ring_import_jobs.rb │ │ ├── google_kms_key_rings.rb │ │ ├── google_kms_key_rings_handwritten.rb │ │ ├── google_kms_location.rb │ │ ├── google_kms_locations.rb │ │ ├── google_lb_firewall_ip_ranges.rb │ │ ├── google_lb_firewall_source_target_tags.rb │ │ ├── google_logging_folder_exclusion.rb │ │ ├── google_logging_folder_exclusions.rb │ │ ├── google_logging_folder_log_sink.rb │ │ ├── google_logging_folder_log_sinks.rb │ │ ├── google_logging_organization_log_sink.rb │ │ ├── google_logging_organization_log_sinks.rb │ │ ├── google_logging_project_exclusion.rb │ │ ├── google_logging_project_exclusions.rb │ │ ├── google_logging_project_sink.rb │ │ ├── google_logging_project_sinks.rb │ │ ├── google_memcache_instance.rb │ │ ├── google_memcache_instances.rb │ │ ├── google_ml_engine_model.rb │ │ ├── google_ml_engine_models.rb │ │ ├── google_monitoring_group.rb │ │ ├── google_monitoring_groups.rb │ │ ├── google_organization.rb │ │ ├── google_organizations.rb │ │ ├── google_orgpolicy_folder_constraints.rb │ │ ├── google_orgpolicy_folder_policies.rb │ │ ├── google_orgpolicy_folder_policy.rb │ │ ├── google_orgpolicy_organization_constraints.rb │ │ ├── google_orgpolicy_organization_policies.rb │ │ ├── google_orgpolicy_organization_policy.rb │ │ ├── google_orgpolicy_project_constraints.rb │ │ ├── google_orgpolicy_project_policies.rb │ │ ├── google_orgpolicy_project_policy.rb │ │ ├── google_project.rb │ │ ├── google_project_alert_policies.rb │ │ ├── google_project_alert_policy.rb │ │ ├── google_project_iam_binding.rb │ │ ├── google_project_iam_custom_role.rb │ │ ├── google_project_iam_custom_roles.rb │ │ ├── google_project_logging_audit_config.rb │ │ ├── google_project_metric.rb │ │ ├── google_project_metrics.rb │ │ ├── google_project_service.rb │ │ ├── google_project_services.rb │ │ ├── google_projects.rb │ │ ├── google_projects_firewalls_loop.rb │ │ ├── google_pubsub_subscription.rb │ │ ├── google_pubsub_subscriptions.rb │ │ ├── google_pubsub_topic.rb │ │ ├── google_pubsub_topics.rb │ │ ├── google_redis_instance.rb │ │ ├── google_redis_instances.rb │ │ ├── google_resourcemanager_folder.rb │ │ ├── google_resourcemanager_folders.rb │ │ ├── google_run_job.rb │ │ ├── google_run_jobs.rb │ │ ├── google_run_service.rb │ │ ├── google_run_services.rb │ │ ├── google_runtime_config_config.rb │ │ ├── google_runtime_config_configs.rb │ │ ├── google_runtime_config_variable.rb │ │ ├── google_runtime_config_variables.rb │ │ ├── google_secret_manager_secret.rb │ │ ├── google_secret_manager_secrets.rb │ │ ├── google_service_account.rb │ │ ├── google_service_account_key.rb │ │ ├── google_service_account_keys.rb │ │ ├── google_service_accounts.rb │ │ ├── google_service_networking_service_connections.rb │ │ ├── google_sourcerepo_repositories.rb │ │ ├── google_sourcerepo_repository.rb │ │ ├── google_spanner_database.rb │ │ ├── google_spanner_databases.rb │ │ ├── google_spanner_instance.rb │ │ ├── google_spanner_instance_iam_policy.rb │ │ ├── google_spanner_instances.rb │ │ ├── google_sql_connect.rb │ │ ├── google_sql_database.rb │ │ ├── google_sql_database_instance.rb │ │ ├── google_sql_database_instances.rb │ │ ├── google_sql_databases.rb │ │ ├── google_sql_flags.rb │ │ ├── google_sql_operation.rb │ │ ├── google_sql_operations.rb │ │ ├── google_sql_ssl_cert.rb │ │ ├── google_sql_ssl_certs.rb │ │ ├── google_sql_user.rb │ │ ├── google_sql_users.rb │ │ ├── google_storage_bucket.rb │ │ ├── google_storage_bucket_acl.rb │ │ ├── google_storage_bucket_iam_binding.rb │ │ ├── google_storage_bucket_object.rb │ │ ├── google_storage_bucket_object_handwritten.rb │ │ ├── google_storage_bucket_objects.rb │ │ ├── google_storage_buckets.rb │ │ ├── google_storage_default_object_acl.rb │ │ ├── google_storage_object_acl.rb │ │ ├── google_vertex_ai_batch_prediction_job.rb │ │ ├── google_vertex_ai_batch_prediction_jobs.rb │ │ ├── google_vertex_ai_custom_job.rb │ │ ├── google_vertex_ai_custom_jobs.rb │ │ ├── google_vertex_ai_dataset.rb │ │ ├── google_vertex_ai_dataset_data_item_annotations.rb │ │ ├── google_vertex_ai_datasets.rb │ │ ├── google_vertex_ai_datasets_annotation_spec.rb │ │ ├── google_vertex_ai_datasets_data_items.rb │ │ ├── google_vertex_ai_datasets_saved_queries.rb │ │ ├── google_vertex_ai_endpoint.rb │ │ ├── google_vertex_ai_endpoints.rb │ │ ├── google_vertex_ai_featurestore.rb │ │ ├── google_vertex_ai_featurestore_entity_type_feature.rb │ │ ├── google_vertex_ai_featurestore_entity_type_features.rb │ │ ├── google_vertex_ai_featurestores.rb │ │ ├── google_vertex_ai_featurestores_entity_type.rb │ │ ├── google_vertex_ai_featurestores_entity_types.rb │ │ ├── google_vertex_ai_hyperparameter_tuning_job.rb │ │ ├── google_vertex_ai_hyperparameter_tuning_jobs.rb │ │ ├── google_vertex_ai_index.rb │ │ ├── google_vertex_ai_index_endpoint.rb │ │ ├── google_vertex_ai_index_endpoints.rb │ │ ├── google_vertex_ai_indices.rb │ │ ├── google_vertex_ai_metadata_store.rb │ │ ├── google_vertex_ai_metadata_stores.rb │ │ ├── google_vertex_ai_metadata_stores_artifact.rb │ │ ├── google_vertex_ai_metadata_stores_artifacts.rb │ │ ├── google_vertex_ai_metadata_stores_context.rb │ │ ├── google_vertex_ai_metadata_stores_contexts.rb │ │ ├── google_vertex_ai_metadata_stores_execution.rb │ │ ├── google_vertex_ai_metadata_stores_executions.rb │ │ ├── google_vertex_ai_metadata_stores_metadata_schema.rb │ │ ├── google_vertex_ai_metadata_stores_metadata_schemas.rb │ │ ├── google_vertex_ai_model.rb │ │ ├── google_vertex_ai_model_deployment_monitoring_job.rb │ │ ├── google_vertex_ai_model_deployment_monitoring_jobs.rb │ │ ├── google_vertex_ai_model_evaluation_slice.rb │ │ ├── google_vertex_ai_model_evaluation_slices.rb │ │ ├── google_vertex_ai_models.rb │ │ ├── google_vertex_ai_models_evaluation.rb │ │ ├── google_vertex_ai_models_evaluations.rb │ │ ├── google_vertex_ai_nas_job.rb │ │ ├── google_vertex_ai_nas_jobs.rb │ │ ├── google_vertex_ai_nas_jobs_nas_trial_detail.rb │ │ ├── google_vertex_ai_nas_jobs_nas_trial_details.rb │ │ ├── google_vertex_ai_pipeline_job.rb │ │ ├── google_vertex_ai_pipeline_jobs.rb │ │ ├── google_vertex_ai_schedule.rb │ │ ├── google_vertex_ai_schedules.rb │ │ ├── google_vertex_ai_studies.rb │ │ ├── google_vertex_ai_studies_trial.rb │ │ ├── google_vertex_ai_studies_trials.rb │ │ ├── google_vertex_ai_study.rb │ │ ├── google_vertex_ai_tensorboard.rb │ │ ├── google_vertex_ai_tensorboard_experiment_run.rb │ │ ├── google_vertex_ai_tensorboard_experiment_run_time_series_resource.rb │ │ ├── google_vertex_ai_tensorboard_experiment_run_time_series_resources.rb │ │ ├── google_vertex_ai_tensorboard_experiment_runs.rb │ │ ├── google_vertex_ai_tensorboards.rb │ │ ├── google_vertex_ai_tensorboards_experiment.rb │ │ ├── google_vertex_ai_tensorboards_experiments.rb │ │ ├── google_vertex_ai_training_pipeline.rb │ │ └── google_vertex_ai_training_pipelines.rb │ └── inspec.yml └── mock/ └── mock-gcp.rb ================================================ FILE CONTENTS ================================================ ================================================ FILE: .changelog/3013.txt ================================================ ```release-note:REPLACEME ``` ================================================ FILE: .changelog/3021.txt ================================================ ```release-note:REPLACEME ``` ================================================ FILE: .changelog/3022.txt ================================================ ```release-note:REPLACEME ``` ================================================ FILE: .changelog/3026.txt ================================================ ```release-note:enhancement dns: `google_dns_managed_zone` added support for Non-RFC1918 fields for reverse lookup and fowarding paths. ``` ================================================ FILE: .changelog/3029.txt ================================================ ```release-note:REPLACEME ``` ================================================ FILE: .changelog/3031.txt ================================================ ================================================ FILE: .changelog/3033.txt ================================================ ```release-note:breakingchange compute: Added conditional requirement of `google_compute_**region**_backend_service` `backend.capacity_scaler` to no longer accept the API default if not INTERNAL. Non-INTERNAL backend services must now specify `capacity_scaler` explicitly and have a total capacity greater than 0. In addition, API default of 1.0 must now be explicitly set and will be treated as nil or zero if not set in config. ``` ```release-note:bug compute: Fixed `google_compute_**region**_backend_service` so it no longer has a permadiff if `backend.capacity_scaler` is unset in config by requiring capacity scaler. ``` ```release-note:bug compute: Fixed `backend.capacity_scaler` to actually set zero (0.0) value. ``` ================================================ FILE: .codeclimate.yml ================================================ version: "2" checks: argument-count: enabled: false complex-logic: enabled: false file-lines: enabled: false method-complexity: enabled: false method-count: enabled: false method-lines: enabled: false nested-control-flow: enabled: false return-statements: enabled: false similar-code: enabled: false identical-code: enabled: false ================================================ FILE: .expeditor/buildkite/verify.sh ================================================ #!/bin/bash set -ueo pipefail echo "--- system details" uname -a ruby -v bundle --version echo "--- bundle install" bundle config set --local without tools maintenance deploy bundle install --jobs=7 --retry=3 echo "+++ bundle exec rake $RAKE_TASK" bundle exec rake $RAKE_TASK ================================================ FILE: .expeditor/config.yml ================================================ # Documentation available at https://expeditor.chef.io/docs/getting-started/ --- pipelines: - verify: description: Pull Request validation tests public: true slack: notify_channel: inspec-notify github: delete_branch_on_merge: true minor_bump_labels: - "Version: Bump Minor" major_bump_labels: - "Version: Bump Major" version_tag_format: v{{version}} release_branches: - main changelog: categories: - "Type: New Resource": "New Resources" - "Type: New Feature": "New Features" - "Type: Enhancement": "Enhancements" - "Type: Bug": "Bug Fixes" subscriptions: - workload: pull_request_merged:{{github_repo}}:{{release_branch}}:* actions: - built_in:bump_version: ignore_labels: - "Version: Skip Bump" - "Expeditor: Skip All" - bash:.expeditor/update_version.sh: only_if: built_in:bump_version - built_in:update_changelog: ignore_labels: - "Changelog: Skip Update" - "Expeditor: Skip All" ================================================ FILE: .expeditor/update_version.sh ================================================ #!/bin/bash # # After a PR merge, Chef Expeditor will bump the PATCH version in the VERSION file. # It then executes this file to update any other files/components with that new version. # set -ev sed -i -r "s/^version\: .*/version\: $(cat VERSION)/" inspec.yml ================================================ FILE: .expeditor/verify.pipeline.yml ================================================ expeditor: defaults: buildkite: timeout_in_minutes: 20 steps: - label: lint-ruby-3.1 command: - RAKE_TASK=lint /workdir/.expeditor/buildkite/verify.sh expeditor: executor: docker: image: ruby:3.1-bullseye - label: run-tests-ruby-3.1 command: - RAKE_TASK=default /workdir/.expeditor/buildkite/verify.sh expeditor: executor: docker: image: ruby:3.1-bullseye ================================================ FILE: .github/CODEOWNERS ================================================ # Order is important. The last matching pattern has the most precedence. * @inspec/inspec-cloud-devs ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.MD ================================================ ### Description Please describe what this change achieves. Ensure you have read the [Contributing to InSpec GCP](https://github.com/inspec/inspec-gcp/CONTRIBUTING.md) document before submitting. ### Issues Resolved List any existing issues this PR resolves, or any Discourse or StackOverflow discussion that's relevant. Please ensure commits have been signed-off for the Developer Certificate of Origin. See ================================================ FILE: .github/dependabot.yml ================================================ version: 2 updates: - package-ecosystem: bundler directory: "/" schedule: interval: daily open-pull-requests-limit: 10 ignore: - dependency-name: inspec-bin versions: - 4.26.13 - 4.28.0 - 4.29.3 - 4.31.0 - 4.31.1 - 4.32.0 ================================================ FILE: .github/workflows/ci-main-pull-request-stub.yml ================================================ # stub to call common GitHub Action (GA) as part of Continuous Integration (CI) Pull Request process checks for main branch # inputs are described in the chef/common-github-actions/ with same name as this stub # # secrets are inherited from the calling workflow, typically SONAR_TOKEN, SONAR_HOST_URL, GH_TOKEN, AKEYLESS_JWT_ID, POLARIS_SERVER_URL and POLARIS_ACCESS_TOKEN name: CI Pull Request on Main Branch on: pull_request: branches: [ main, release/** ] push: branches: [ main, release/** ] workflow_dispatch: permissions: contents: read env: STUB_VERSION: "1.0.8" jobs: echo_version: name: 'Echo stub version' runs-on: ubuntu-latest steps: - name: echo version of stub and inputs run: | echo "CI main pull request stub version $STUB_VERSION" detect-custom-metadata: name: 'Detect custom properties' runs-on: ubuntu-latest outputs: primaryApplication: ${{ steps.set-custom-metadata.outputs.primaryApplication }} appBuildLanguage: ${{ steps.set-custom-metadata.outputs.applicationBuildLanguage }} appBuildProfile: ${{ steps.set-custom-metadata.outputs.applicationBuildProfile }} versionFromFile: ${{ steps.set-version-from-file.outputs.versionFromFile }} steps: - name: 'Checkout repository' uses: actions/checkout@v4 - name: 'Detect version from file' id: set-version-from-file shell: bash run: | if [[ -f "VERSION" ]]; then version=$(head -1 VERSION) echo "VERSION_FROM_FILE=${version}" >> $GITHUB_ENV echo "versionFromFile=${version}" >> $GITHUB_OUTPUT elif [[ -f "go.mod" ]]; then version=$(grep -Eo 'v[0-9]+\.[0-9]+\.[0-9]+' go.mod | head -1) echo "VERSION_FROM_FILE=${version}" >> $GITHUB_ENV echo "versionFromFile=${version}" >> $GITHUB_OUTPUT else echo "VERSION_FROM_FILE not found, defaulting to empty" echo "versionFromFile=" >> $GITHUB_OUTPUT fi # do not do echo "::set-output name=versionFromFile::$version" any more per https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ - name: 'Detect app, language, and build profile environment variables from repository custom properties' id: set-custom-metadata # GH API returns something like [{"property_name":"GABuildLanguage","value":"go"},{"property_name":"GABuildProfile","value":"cli"},{"property_name":"primaryApplication","value":"chef-360"}]' run: | response=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${{ github.repository }}/properties/values) primaryApplication=$(echo "$response" | jq -r '.[] | select(.property_name=="primaryApplication") | .value') GABuildLanguage=$(echo "$response" | jq -r '.[] | select(.property_name=="GABuildLanguage") | .value') GABuildProfile=$(echo "$response" | jq -r '.[] | select(.property_name=="GABuildProfile") | .value') echo "PRIMARY_APPLICATION=$primaryApplication" >> $GITHUB_ENV echo "GA_BUILD_LANGUAGE=$GABuildLanguage" >> $GITHUB_ENV echo "GA_BUILD_PROFILE=$GABuildProfile" >> $GITHUB_ENV # If workflow_dispatch, use inputs (left), if other trigger, use default env (right) echo "primaryApplication=${primaryApplication}" >> $GITHUB_OUTPUT echo "applicationBuildLanguage=${GABuildLanguage}" >> $GITHUB_OUTPUT echo "applicationBuildProfile=${GABuildProfile}" >> $GITHUB_OUTPUT continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} call-ci-main-pr-check-pipeline: uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@main # needs: [detect-custom-metadata, detect-version-from-file] needs: [detect-custom-metadata] secrets: inherit permissions: id-token: write contents: read with: application: ${{ needs.detect-custom-metadata.outputs.primaryApplication }} visibility: ${{ github.event.repository.visibility }} # private, public, or internal # go-private-modules: GOPRIVATE for Go private modules, default is 'github.com/progress-platform-services/* # if version specified, it takes precedence; can be a semver like 1.0.2-xyz or a tag like "latest" version: ${{ needs.detect-custom-metadata.outputs.versionFromFile || '1.0.0' }} detect-version-source-type: 'file' # options include "none" (do not detect), "file", "github-tag" or "github-release" detect-version-source-parameter: '' # use for file name language: ${{ needs.detect-custom-metadata.outputs.appBuildLanguage }} # Go, Ruby, Rust, JavaScript, TypeScript, Python, Java, C#, PHP, other - used for build and SonarQube language setting # complexity-checks, linting, trufflehog and trivy perform-complexity-checks: true # scc-output-filename: 'scc-output.txt' perform-language-linting: true # Perform language-specific linting and pre-compilation checks perform-trufflehog-scan: true fail-trufflehog-on-secrets-found: true perform-trivy-scan: true # grype vulnerability scanning perform-grype-scan: true grype-fail-on-high: true grype-fail-on-critical: true # perform application build and unit testing, will use custom repository properties when implemented for chef-primary-application, chef-build-profile, and chef-build-language build: true build-profile: ${{ needs.detect-custom-metadata.outputs.appBuildProfile }} unit-tests: false unit-test-output-path: "path/to/file.out" unit-test-command-override: "" # BlackDuck SAST (Polaris) require a build or binary present in repo to do SAST testing # requires these secrets: POLARIS_SERVER_URL, POLARIS_ACCESS_TOKEN perform-blackduck-polaris: true polaris-application-name: "Chef-Agents" # one of these: Chef-Agents, Chef-Automate, Chef-Chef360, Chef-Habitat, Chef-Infrastructure-Server, Chef-Shared-Services, Chef-Other, Chef-Non-Product polaris-project-name: ${{ github.event.repository.name }} # arch-sample-cli # polaris-working-directory: '.' # Working directory for the scan, defaults to . but usually lang-dependent like ./src # polaris-coverity-build-command: 'go build -o bin/chef-cli.exe' # Coverity build command, typically done in build stage by language or here as param 1-liner like "mvn clean install" # polaris-coverity-clean-command: 'go clean' # Coverity clean command, typically done before build stage by language or here as param 1-liner like "mvn clean" # polaris-detect-search-depth: '5' # Detect search depth, blank but can be set to "3" to search up to 3 levels of subdirectories for code to scan' # polaris-assessment-mode: 'SAST' # Assessment mode (SAST, CI or SOURCE_UPLOAD) # wait-for-scan: true # polaris-detect-args: '' # Additional Detect arguments, can supply extra arguments like "--detect.diagnostic=true" # coverity_build_command: "go build" # coverity_clean_command: "go clean" # polaris-config-path: '' # Path to Detect configuration file, typically a file supplied at root level like ./detect-config.yml # polaris-coverity-config-path: '' # Path to Coverity configuration file, typically a file supplied at root level like ./coverity.yml # polaris-coverity-args: '' # Additional Coverity arguments,can supply extra arguments like "--config-override capture.build.build-command=make # perform SonarQube scan, with or without unit test coverage data # requires secrets SONAR_TOKEN and SONAR_HOST_URL (progress.sonar.com) perform-sonarqube-scan: true # perform-sonar-build: true # build-profile: 'default' # report-unit-test-coverage: true perform-docker-scan: false # scan Dockerfile and built images with Docker Scout or Trivy; see repo custom properties matching "container" # report to central developer dashboard report-to-atlassian-dashboard: false quality-product-name: 'Chef-Agents' # product name for quality reporting, like Chef360, Courier, Inspec # quality-product-name: ${{ github.event.repository.name }} # like 'Chef-360' - the product name for quality reporting, like Chef360, Courier, Inspec # quality-sonar-app-name: 'YourSonarAppName' # quality-testing-type: 'Integration' like Unit, Integration, e2e, api, Performance, Security # quality-service-name: 'YourServiceOrRepoName' # quality-junit-report: 'path/to/junit/report'' # perform Habitat-based and native packaging, publish to package repositories package-binaries: false # Package binaries (e.g., RPM, DEB, MSI, dpkg + signing + SHA) habitat-build: false # Create Habitat packages publish-habitat-packages: false # Publish Habitat packages to Builder publish-habitat-hab_package: false # Chef Habitat package to install (e.g., core/nginx) publish-habitat-hab_version: "1.0.0" # Chef Habitat package version (optional) publish-habitat-hab_release: "20240101010101" # Chef Habitat package release (optional) publish-habitat-hab_channel: "stable" # Chef Habitat package channel (e.g., stable, base, base-2025); default is stable publish-habitat-hab_auth_token: "" # Chef Habitat Builder authentication token (uses secret if not provided) publish-habitat-runner_os: "ubuntu-latest" # OS runner for Habitat package publishing job, can also be windows-latest habitat-grype-scan: false # Scan built Habitat packages with Grype for vulnerabilities publish-packages: false # Publish packages (e.g., container from Dockerfile to ECR, go-releaser binary to releases page, omnibus to artifactory, gems, choco, homebrew, other app stores) # generate and export Software Bill of Materials (SBOM) in various formats generate-sbom: true export-github-sbom: true # SPDX JSON artifact on job instance generate-msft-sbom: false license_scout: false # Run license scout for license compliance (uses .license_scout.yml) # perform Blackduck software composition analysis (SCA) for 3rd party CVEs, licensing, and operational risk perform-blackduck-sca-scan: true # combined with generate sbom & generate github-sbom, also needs version above run-bundle-install: true # generate Gemfile.lock at runtime for SBOM pipeline blackduck-project-group-name: 'Chef-Agents' # typically one of (Chef), Chef-Agents, Chef-Automate, Chef-Chef360, Chef-Habitat, Chef-Infrastructure-Server, Chef-Shared-Services, Chef-Non-Product' blackduck-project-name: ${{ github.event.repository.name }} # BlackDuck project name, typically the repository name blackduck-force-low-accuracy-mode: false # if true, forces BlackDuck Detect to run in low accuracy mode which can reduce scan time for large projects at the cost of potentially missing some vulnerabilities; see https://synopsys.atlassian.net/wiki/spaces/INTDOCS/pages/1138617921/Black+Duck+Detect+Accuracy+Levels for details # udf1: 'default' # user defined flag 1 # udf2: 'default' # user defined flag 2 # udf3: 'default' # user defined flag 3 ================================================ FILE: .gitignore ================================================ .envrc .ruby-version .direnv Gemfile.lock inspec.lock .kitchen *.plan *.tfstate* local .vscode .terraform *.idea* *.env *inspec-gcp.tfvars.json *gcp-inspec-attributes.yaml inspec-cassettes *terraform.tfvars *inspec.json ================================================ FILE: .rspec ================================================ --color --require spec_helper ================================================ FILE: .rubocop.yml ================================================ AllCops: TargetRubyVersion: 2.6 Exclude: - Gemfile - generate/Gemfile - Rakefile - 'test/**/*' - 'examples/**/*' - 'vendor/**/*' - 'lib/bundles/inspec-init/templates/**/*' Documentation: Enabled: false Encoding: Enabled: true HashSyntax: Enabled: true ClassLength: Max: 200 Exclude: - 'libraries/google_compute_firewall.rb' LineLength: Enabled: false EmptyLinesAroundBlockBody: Enabled: false MethodLength: Max: 45 NumericLiterals: MinDigits: 10 Metrics/AbcSize: Enabled: false Metrics/CyclomaticComplexity: Enabled: false Metrics/PerceivedComplexity: Enabled: false Style/PercentLiteralDelimiters: PreferredDelimiters: '%': '{}' '%i': () '%q': '{}' '%Q': () '%r': '{}' '%s': () '%w': '{}' '%W': () '%x': () Layout/HashAlignment: Enabled: false Layout/EmptyLineAfterGuardClause: Enabled: false Layout/ParameterAlignment: Enabled: false Naming/PredicateName: Enabled: false Style/ClassAndModuleChildren: Enabled: false Style/ConditionalAssignment: Enabled: false Style/AndOr: Enabled: false Style/Not: Enabled: false Naming/FileName: Enabled: true Regex: !ruby/regexp '/^.{3,99}$/' Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: comma Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: comma Style/TrailingCommaInArguments: EnforcedStyleForMultiline: comma Style/NegatedIf: Enabled: false Style/UnlessElse: Enabled: false BlockDelimiters: Enabled: false Layout/SpaceAroundOperators: Enabled: false Style/IfUnlessModifier: Enabled: false Style/RescueStandardError: Enabled: false Style/OptionalBooleanParameter: Enabled: false Lint/MissingSuper: Enabled: false Metrics/MethodLength: Enabled: false Style/AccessorGrouping: Enabled: false Style/GlobalStdStream: Enabled: false ================================================ FILE: .travis.yml ================================================ sudo: false language: ruby cache: bundler rvm: - 2.4.3 script: - bundle config set --local without integration - bundle exec rake ================================================ FILE: CHANGELOG.md ================================================ # Change Log ## [v1.11.136](https://github.com/inspec/inspec-gcp/tree/v1.11.136) (2025-10-06) #### Merged Pull Requests - Reorganize InSpec resource docs [#661](https://github.com/inspec/inspec-gcp/pull/661) ([IanMadd](https://github.com/IanMadd)) ## [v1.11.135](https://github.com/inspec/inspec-gcp/tree/v1.11.135) (2024-10-18) #### Merged Pull Requests - CHEF-12238-V2-MAGIC-MODULE-monitoring_v3-Projects__group - Resource Implementation [#656](https://github.com/inspec/inspec-gcp/pull/656) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.134](https://github.com/inspec/inspec-gcp/tree/v1.11.134) (2024-10-16) #### Merged Pull Requests - CHEF-12247-V0-MAGIC-MODULE-dataproc_v1-Batch - Resource Implementation [#655](https://github.com/inspec/inspec-gcp/pull/655) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.133](https://github.com/inspec/inspec-gcp/tree/v1.11.133) (2024-10-10) #### Merged Pull Requests - CHEF-12479 Automatically generated by magic modules for service: run_v2 and reso… [#651](https://github.com/inspec/inspec-gcp/pull/651) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.132](https://github.com/inspec/inspec-gcp/tree/v1.11.132) (2024-10-10) #### Merged Pull Requests - CHEF-12253-v4-MAGIC-MODULE-datafusion_v1-Instance - Resource Implementation [#654](https://github.com/inspec/inspec-gcp/pull/654) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.131](https://github.com/inspec/inspec-gcp/tree/v1.11.131) (2024-10-08) #### Merged Pull Requests - CHEF-12251-v2-MAGIC-MODULE-apigee_v1-Organizations__instances__attachment - Resource Implementation [#653](https://github.com/inspec/inspec-gcp/pull/653) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.130](https://github.com/inspec/inspec-gcp/tree/v1.11.130) (2024-09-24) #### Merged Pull Requests - CHEF-12476-MAGIC-MODULE-bigtableadmin_v2-Projects__instances__clusters__backup - Resource Implementation [#652](https://github.com/inspec/inspec-gcp/pull/652) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.129](https://github.com/inspec/inspec-gcp/tree/v1.11.129) (2024-08-29) #### Merged Pull Requests - CHEF-12252 Automatically generated by magic modules for service: apigee_v1 and r… [#650](https://github.com/inspec/inspec-gcp/pull/650) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.128](https://github.com/inspec/inspec-gcp/tree/v1.11.128) (2024-08-20) #### Merged Pull Requests - CHEF-12257-MAGIC-MODULE-metastore_v1-services-backup - Resource Implementation [#644](https://github.com/inspec/inspec-gcp/pull/644) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.127](https://github.com/inspec/inspec-gcp/tree/v1.11.127) (2024-08-19) #### Merged Pull Requests - CHEF-12248-MAGIC-MODULE-Dataproc_v1_session - Resource Implementation [#642](https://github.com/inspec/inspec-gcp/pull/642) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.126](https://github.com/inspec/inspec-gcp/tree/v1.11.126) (2024-08-12) #### Merged Pull Requests - CHEF-12482-v1.4-MAGIC-MODULE-run_v2-Service - Resource Implementation [#648](https://github.com/inspec/inspec-gcp/pull/648) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.125](https://github.com/inspec/inspec-gcp/tree/v1.11.125) (2024-08-05) #### Merged Pull Requests - CHEF-12474-v3-MAGIC-MODULE-bigtableadmin_v2-Projects__instances__appProfile - Resource Implementation [#643](https://github.com/inspec/inspec-gcp/pull/643) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.124](https://github.com/inspec/inspec-gcp/tree/v1.11.124) (2024-07-23) #### Merged Pull Requests - CHEF-12255 Manual DataProc Metastore fedration resource created [#638](https://github.com/inspec/inspec-gcp/pull/638) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.123](https://github.com/inspec/inspec-gcp/tree/v1.11.123) (2024-07-11) #### Merged Pull Requests - CHEF-12256-MAGIC-MODULE-Dataproc-metastore-service - Resource Implementation [#639](https://github.com/inspec/inspec-gcp/pull/639) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.122](https://github.com/inspec/inspec-gcp/tree/v1.11.122) (2024-07-03) #### Merged Pull Requests - CHEF-12475-v2-MAGIC-MODULE-bigtableadmin_v2-Projects__instances__cluster - Resource Implementation [#636](https://github.com/inspec/inspec-gcp/pull/636) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.121](https://github.com/inspec/inspec-gcp/tree/v1.11.121) (2024-07-01) #### Merged Pull Requests - CHEF-7186-MAGIC-MODULE-compute_v1-RegionSecurityPolicy - Resource Implementation [#634](https://github.com/inspec/inspec-gcp/pull/634) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.120](https://github.com/inspec/inspec-gcp/tree/v1.11.120) (2024-06-27) #### Merged Pull Requests - CHEF-12243-MAGIC-MODULE-Dataproc-Jobs-Resource Implementation [#633](https://github.com/inspec/inspec-gcp/pull/633) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.119](https://github.com/inspec/inspec-gcp/tree/v1.11.119) (2024-06-24) #### Merged Pull Requests - CHEF-7205-v1-MAGIC-MODULE-compute_v1-Reservation - Resource Implementation [#630](https://github.com/inspec/inspec-gcp/pull/630) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.118](https://github.com/inspec/inspec-gcp/tree/v1.11.118) (2024-06-20) #### Merged Pull Requests - CHEF-12245-MAGIC-MODULE-dataproc_v1-Projects__regions__autoscalingPolicy - Resource Implementation [#632](https://github.com/inspec/inspec-gcp/pull/632) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.117](https://github.com/inspec/inspec-gcp/tree/v1.11.117) (2024-06-20) #### Merged Pull Requests - CHEF-12244-MAGIC-MODULE-Dataproc Workflow Template - Resource Implementation [#631](https://github.com/inspec/inspec-gcp/pull/631) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.116](https://github.com/inspec/inspec-gcp/tree/v1.11.116) (2024-06-17) #### Merged Pull Requests - CHEF-7348-ORG-MAGIC-MODULE-orgpolicy-Folders__policy - Resource Implementation [#556](https://github.com/inspec/inspec-gcp/pull/556) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.115](https://github.com/inspec/inspec-gcp/tree/v1.11.115) (2024-06-11) #### Merged Pull Requests - CHEF-7347-V3-MAGIC-MODULE-orgpolicy_v2-Folders__constraint - Resource Implementation [#626](https://github.com/inspec/inspec-gcp/pull/626) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.114](https://github.com/inspec/inspec-gcp/tree/v1.11.114) (2024-06-05) #### Merged Pull Requests - CHEF-7352-MAGIC-MODULE-orgpolicy-Projects__policy - Resource Implementation [#554](https://github.com/inspec/inspec-gcp/pull/554) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.113](https://github.com/inspec/inspec-gcp/tree/v1.11.113) (2024-05-30) #### Merged Pull Requests - Rename orgpolicy properties [#629](https://github.com/inspec/inspec-gcp/pull/629) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.112](https://github.com/inspec/inspec-gcp/tree/v1.11.112) (2024-05-28) #### Merged Pull Requests - CHEF-7351_1-MAGIC-MODULE-orgpolicy_v2-Projects__constraint - Resource Implementation [#620](https://github.com/inspec/inspec-gcp/pull/620) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.111](https://github.com/inspec/inspec-gcp/tree/v1.11.111) (2024-05-28) #### Merged Pull Requests - CHEF-7349-MAGIC-MODULE-Orgpolicy_v2-Organizations_constraint - Resource Implementation [#622](https://github.com/inspec/inspec-gcp/pull/622) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.110](https://github.com/inspec/inspec-gcp/tree/v1.11.110) (2024-05-20) #### Merged Pull Requests - Deprecate active support blank method [#627](https://github.com/inspec/inspec-gcp/pull/627) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.109](https://github.com/inspec/inspec-gcp/tree/v1.11.109) (2024-05-09) #### Merged Pull Requests - CHEF-7206_1-MAGIC-MODULE-compute_v1-ResourcePolicy - Resource Implementation [#617](https://github.com/inspec/inspec-gcp/pull/617) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.108](https://github.com/inspec/inspec-gcp/tree/v1.11.108) (2024-05-06) #### Merged Pull Requests - CHEF-7210-MAGIC-MODULE-compute_v1-TargetSslProxy - Resource Implementation [#618](https://github.com/inspec/inspec-gcp/pull/618) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.107](https://github.com/inspec/inspec-gcp/tree/v1.11.107) (2024-05-06) #### Merged Pull Requests - CHEF-7216_2-MAGIC-MODULE-compute_v1-RegionTargetHttpsProxy - Resource Implementation [#605](https://github.com/inspec/inspec-gcp/pull/605) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.106](https://github.com/inspec/inspec-gcp/tree/v1.11.106) (2024-05-03) #### Merged Pull Requests - CHEF-7215__-MAGIC-MODULE-compute_v1-RegionTargetHttpProxy - Resource Implementation [#604](https://github.com/inspec/inspec-gcp/pull/604) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.105](https://github.com/inspec/inspec-gcp/tree/v1.11.105) (2024-05-03) #### Merged Pull Requests - Fix uninitialized constant Parser::AST::Processor::Mixin [#623](https://github.com/inspec/inspec-gcp/pull/623) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.104](https://github.com/inspec/inspec-gcp/tree/v1.11.104) (2024-04-25) #### Merged Pull Requests - CHEF-7208-MAGIC-MODULE-compute_v1-TargetGrpcProxy - Resource Implementation [#616](https://github.com/inspec/inspec-gcp/pull/616) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.103](https://github.com/inspec/inspec-gcp/tree/v1.11.103) (2024-04-25) #### Merged Pull Requests - CHEF-7201-MAGIC-MODULE-compute_v1-RegionCommitment - Resource Implementation [#613](https://github.com/inspec/inspec-gcp/pull/613) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.102](https://github.com/inspec/inspec-gcp/tree/v1.11.102) (2024-04-24) #### Merged Pull Requests - CHEF-7200_1-MAGIC-MODULE-compute_v1-RegionAutoscaler - Resource Implementation [#615](https://github.com/inspec/inspec-gcp/pull/615) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.101](https://github.com/inspec/inspec-gcp/tree/v1.11.101) (2024-04-03) #### Merged Pull Requests - CHEF-7211-MAGIC-MODULE-compute_v1-TargetVpnGateway - Resource Implementation [#612](https://github.com/inspec/inspec-gcp/pull/612) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.100](https://github.com/inspec/inspec-gcp/tree/v1.11.100) (2024-04-02) #### Merged Pull Requests - CHEF-7214-MAGIC-MODULE-compute_v1-RegionSslPolicy - Resource Implementation [#614](https://github.com/inspec/inspec-gcp/pull/614) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.99](https://github.com/inspec/inspec-gcp/tree/v1.11.99) (2024-04-01) #### Merged Pull Requests - CHEF-7217_1-MAGIC-MODULE-compute_v1-RegionUrlMap - Resource Implementation [#609](https://github.com/inspec/inspec-gcp/pull/609) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.98](https://github.com/inspec/inspec-gcp/tree/v1.11.98) (2024-03-28) #### Merged Pull Requests - CHEF-7209-MAGIC-MODULE-compute_v1-TargetInstance - Resource Implementation [#610](https://github.com/inspec/inspec-gcp/pull/610) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.97](https://github.com/inspec/inspec-gcp/tree/v1.11.97) (2024-03-28) #### Merged Pull Requests - CHEF-7218_1-MAGIC-MODULE-compute_v1-InterconnectAttachment - Resource Implementation [#603](https://github.com/inspec/inspec-gcp/pull/603) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.96](https://github.com/inspec/inspec-gcp/tree/v1.11.96) (2024-03-28) #### Merged Pull Requests - CHEF-7198-MAGIC-MODULE-compute_v1-PacketMirroring - Resource Implementation [#601](https://github.com/inspec/inspec-gcp/pull/601) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.95](https://github.com/inspec/inspec-gcp/tree/v1.11.95) (2024-03-28) #### Merged Pull Requests - CHEF-11234: Fix broken CI issue `can't create Thread: Operation not permitted (ThreadError)` [#611](https://github.com/inspec/inspec-gcp/pull/611) ([ahasunos](https://github.com/ahasunos)) ## [v1.11.94](https://github.com/inspec/inspec-gcp/tree/v1.11.94) (2024-03-14) #### Merged Pull Requests - CHEF-7202_4-MAGIC-MODULE-compute_v1-RegionDiskType - Resource Implementation [#598](https://github.com/inspec/inspec-gcp/pull/598) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.93](https://github.com/inspec/inspec-gcp/tree/v1.11.93) (2024-02-07) #### Merged Pull Requests - CHEF-7367-MAGIC-MODULE-Dataflow-v1b3-Projects-Locations-Jobs - Resource Implementation [#595](https://github.com/inspec/inspec-gcp/pull/595) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.92](https://github.com/inspec/inspec-gcp/tree/v1.11.92) (2024-02-06) #### Merged Pull Requests - CHEF-7196_2-MAGIC-MODULE-compute_v1-NetworkFirewallPolicy - Resource Implementation [#593](https://github.com/inspec/inspec-gcp/pull/593) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.91](https://github.com/inspec/inspec-gcp/tree/v1.11.91) (2024-02-06) #### Merged Pull Requests - CHEF-7342-MAGIC-MODULE-compute_v1-GlobalNetworkEndpointGroup - Resource Implementation [#594](https://github.com/inspec/inspec-gcp/pull/594) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.90](https://github.com/inspec/inspec-gcp/tree/v1.11.90) (2024-02-06) #### Merged Pull Requests - CHEF-7350-MAGIC-MODULE-orgpolicy-Organizations__policy - Resource Implementation [#555](https://github.com/inspec/inspec-gcp/pull/555) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.89](https://github.com/inspec/inspec-gcp/tree/v1.11.89) (2024-02-06) #### Merged Pull Requests - CHEF-7195-MAGIC-MODULE-compute_v1-NetworkEdgeSecurityService - Resource Implementation [#580](https://github.com/inspec/inspec-gcp/pull/580) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.88](https://github.com/inspec/inspec-gcp/tree/v1.11.88) (2024-02-05) #### Merged Pull Requests - CHEF-7197-MAGIC-MODULE-compute_v1-NodeType - Resource Implementation [#582](https://github.com/inspec/inspec-gcp/pull/582) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.87](https://github.com/inspec/inspec-gcp/tree/v1.11.87) (2024-02-05) #### Merged Pull Requests - CHEF-7193-MAGIC-MODULE-compute_v1-MachineType - Resource Implementation [#592](https://github.com/inspec/inspec-gcp/pull/592) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.86](https://github.com/inspec/inspec-gcp/tree/v1.11.86) (2024-02-05) #### Merged Pull Requests - CHEF-7191-MAGIC-MODULE-compute_v1-License - Resource Implementation [#588](https://github.com/inspec/inspec-gcp/pull/588) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.85](https://github.com/inspec/inspec-gcp/tree/v1.11.85) (2024-02-01) #### Merged Pull Requests - CHEF-7194-MAGIC-MODULE-compute_v1-NetworkAttachment - Resource Implementation [#578](https://github.com/inspec/inspec-gcp/pull/578) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.84](https://github.com/inspec/inspec-gcp/tree/v1.11.84) (2024-02-01) #### Merged Pull Requests - CHEF-7377-ServiceNetworking-ServiceConnections [#570](https://github.com/inspec/inspec-gcp/pull/570) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.83](https://github.com/inspec/inspec-gcp/tree/v1.11.83) (2024-02-01) #### Merged Pull Requests - CHEF-7192_1-MAGIC-MODULE-compute_v1-MachineImage - Resource Implementation [#584](https://github.com/inspec/inspec-gcp/pull/584) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.82](https://github.com/inspec/inspec-gcp/tree/v1.11.82) (2024-01-31) #### Merged Pull Requests - Fix Verify Pipeline timeout issue [#586](https://github.com/inspec/inspec-gcp/pull/586) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.81](https://github.com/inspec/inspec-gcp/tree/v1.11.81) (2024-01-31) #### Merged Pull Requests - Revert "CHEF-7191-MAGIC-MODULE-compute_v1-License - Resource Implementation" [#585](https://github.com/inspec/inspec-gcp/pull/585) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.80](https://github.com/inspec/inspec-gcp/tree/v1.11.80) (2024-01-31) #### Merged Pull Requests - CHEF-7191-MAGIC-MODULE-compute_v1-License - Resource Implementation [#579](https://github.com/inspec/inspec-gcp/pull/579) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.79](https://github.com/inspec/inspec-gcp/tree/v1.11.79) (2024-01-25) #### Merged Pull Requests - Handle array responses [#575](https://github.com/inspec/inspec-gcp/pull/575) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.78](https://github.com/inspec/inspec-gcp/tree/v1.11.78) (2024-01-25) #### Merged Pull Requests - CHEF-7374: Add missing properties to google_service_account_key resource [#576](https://github.com/inspec/inspec-gcp/pull/576) ([ahasunos](https://github.com/ahasunos)) ## [v1.11.77](https://github.com/inspec/inspec-gcp/tree/v1.11.77) (2024-01-23) #### Merged Pull Requests - CHEF-7353 Kubernetes Engine response attribute update [#571](https://github.com/inspec/inspec-gcp/pull/571) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.76](https://github.com/inspec/inspec-gcp/tree/v1.11.76) (2024-01-23) #### Merged Pull Requests - CHEF-7383-ComputeXPN Resource [#574](https://github.com/inspec/inspec-gcp/pull/574) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.75](https://github.com/inspec/inspec-gcp/tree/v1.11.75) (2024-01-22) #### Merged Pull Requests - Fix Http Error logics [#572](https://github.com/inspec/inspec-gcp/pull/572) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.74](https://github.com/inspec/inspec-gcp/tree/v1.11.74) (2024-01-22) #### Merged Pull Requests - CHEF-7362-Inspec-gcp-cloud-kms-key-rings-crypto-keys-crypto-key-versions [#428](https://github.com/inspec/inspec-gcp/pull/428) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.73](https://github.com/inspec/inspec-gcp/tree/v1.11.73) (2024-01-19) #### Merged Pull Requests - CHEF-7375: SecretManager - Project Secrets [#569](https://github.com/inspec/inspec-gcp/pull/569) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.72](https://github.com/inspec/inspec-gcp/tree/v1.11.72) (2024-01-18) #### Merged Pull Requests - CHEF-7386-compute-RegionNetworkEndpointGroup - Resource Implementation [#537](https://github.com/inspec/inspec-gcp/pull/537) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.71](https://github.com/inspec/inspec-gcp/tree/v1.11.71) (2024-01-18) #### Merged Pull Requests - CHEF-8912- MAGIC-MODULE-apigee-Organizations__api - Resource Implementation [#542](https://github.com/inspec/inspec-gcp/pull/542) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.70](https://github.com/inspec/inspec-gcp/tree/v1.11.70) (2024-01-18) #### Merged Pull Requests - CHEF-3309-InSpec GCP Http error fixes [#568](https://github.com/inspec/inspec-gcp/pull/568) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.69](https://github.com/inspec/inspec-gcp/tree/v1.11.69) (2024-01-11) #### Merged Pull Requests - Refactor Long to Short Name Conversion [#565](https://github.com/inspec/inspec-gcp/pull/565) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.68](https://github.com/inspec/inspec-gcp/tree/v1.11.68) (2024-01-08) #### Merged Pull Requests - Reverted version pinning [#567](https://github.com/inspec/inspec-gcp/pull/567) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.67](https://github.com/inspec/inspec-gcp/tree/v1.11.67) (2023-12-21) #### Merged Pull Requests - Update inspec version pinning in Gemfile [#563](https://github.com/inspec/inspec-gcp/pull/563) ([ahasunos](https://github.com/ahasunos)) ## [v1.11.66](https://github.com/inspec/inspec-gcp/tree/v1.11.66) (2023-12-15) #### Merged Pull Requests - CHEF - Removed the wrong dir from inspec-gcp. [#561](https://github.com/inspec/inspec-gcp/pull/561) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.65](https://github.com/inspec/inspec-gcp/tree/v1.11.65) (2023-12-13) #### Merged Pull Requests - CHEF-7382-MAGIC-MODULE-compute-VpnGateway - Resource Implementation [#534](https://github.com/inspec/inspec-gcp/pull/534) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.64](https://github.com/inspec/inspec-gcp/tree/v1.11.64) (2023-12-12) #### Merged Pull Requests - chore: correct typo in README for resource reference [#558](https://github.com/inspec/inspec-gcp/pull/558) ([ahasunos](https://github.com/ahasunos)) ## [v1.11.63](https://github.com/inspec/inspec-gcp/tree/v1.11.63) (2023-12-12) #### Merged Pull Requests - CHEF-7384: MAGIC-MODULE-compute-ServiceAttachment - Resource Implementation [#535](https://github.com/inspec/inspec-gcp/pull/535) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.62](https://github.com/inspec/inspec-gcp/tree/v1.11.62) (2023-12-08) #### Merged Pull Requests - CHEF-7357-MAGIC-MODULE-apigee-Organizations__envgroups__attachment - Resource Implementation [#540](https://github.com/inspec/inspec-gcp/pull/540) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.61](https://github.com/inspec/inspec-gcp/tree/v1.11.61) (2023-12-08) #### Merged Pull Requests - CHEF-7356-MAGIC-MODULE-apigee-Organizations__envgroup - Resource Implementation [#539](https://github.com/inspec/inspec-gcp/pull/539) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.60](https://github.com/inspec/inspec-gcp/tree/v1.11.60) (2023-12-08) #### Merged Pull Requests - CHEF-7354-MAGIC-MODULE-artifactregistry-Projects__locations__repository - Resource Implementation [#544](https://github.com/inspec/inspec-gcp/pull/544) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.59](https://github.com/inspec/inspec-gcp/tree/v1.11.59) (2023-12-08) #### Merged Pull Requests - Removed worng dir [#551](https://github.com/inspec/inspec-gcp/pull/551) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.58](https://github.com/inspec/inspec-gcp/tree/v1.11.58) (2023-12-08) #### Merged Pull Requests - CHEF-7364-MAGIC-MODULE-composer-Projects__locations__environment - Resource Implementation [#546](https://github.com/inspec/inspec-gcp/pull/546) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.57](https://github.com/inspec/inspec-gcp/tree/v1.11.57) (2023-12-06) #### Merged Pull Requests - chore: uncomment terraform scripts [#549](https://github.com/inspec/inspec-gcp/pull/549) ([ahasunos](https://github.com/ahasunos)) ## [v1.11.56](https://github.com/inspec/inspec-gcp/tree/v1.11.56) (2023-12-06) #### Merged Pull Requests - CHEF-7369 Updated dataproc_cluster resource [#545](https://github.com/inspec/inspec-gcp/pull/545) ([Nik08](https://github.com/Nik08)) ## [v1.11.55](https://github.com/inspec/inspec-gcp/tree/v1.11.55) (2023-12-05) #### Merged Pull Requests - Chore: Remove redundant `return` statement to fix rubocop 1.58.0 lint offense [#548](https://github.com/inspec/inspec-gcp/pull/548) ([ahasunos](https://github.com/ahasunos)) ## [v1.11.54](https://github.com/inspec/inspec-gcp/tree/v1.11.54) (2023-12-01) #### Merged Pull Requests - CHEF-7355-MAGIC-MODULE-apigee-Organization - Resource Implementation [#541](https://github.com/inspec/inspec-gcp/pull/541) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.53](https://github.com/inspec/inspec-gcp/tree/v1.11.53) (2023-11-29) #### Merged Pull Requests - CHEF-7365-MAGIC-MODULE-composer-Projects__locations__imageVersion - Resource Implementation [#527](https://github.com/inspec/inspec-gcp/pull/527) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.52](https://github.com/inspec/inspec-gcp/tree/v1.11.52) (2023-10-16) #### Merged Pull Requests - CHEF-5584-MAGIC-MODULE-vertex_ai-Tensorboards__experiments__runs__timeSeries_resource - Resource Implementation [#524](https://github.com/inspec/inspec-gcp/pull/524) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.51](https://github.com/inspec/inspec-gcp/tree/v1.11.51) (2023-10-13) #### Merged Pull Requests - CHEF-5554-MAGIC-MODULE-vertex_ai-Datasets__dataItem - Resource Implementation [#494](https://github.com/inspec/inspec-gcp/pull/494) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.50](https://github.com/inspec/inspec-gcp/tree/v1.11.50) (2023-10-13) #### Merged Pull Requests - CHEF-5579-MAGIC-MODULE-vertex_ai-Study - Resource Implementation [#522](https://github.com/inspec/inspec-gcp/pull/522) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.49](https://github.com/inspec/inspec-gcp/tree/v1.11.49) (2023-10-12) #### Merged Pull Requests - CHEF-5563-MAGIC-MODULE-vertex_ai-Index - Resource Implementation [#521](https://github.com/inspec/inspec-gcp/pull/521) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.48](https://github.com/inspec/inspec-gcp/tree/v1.11.48) (2023-10-12) #### Merged Pull Requests - CHEF-5572-MAGIC-MODULE-vertex_ai-Models__evaluations__slice - Resource Implementation [#508](https://github.com/inspec/inspec-gcp/pull/508) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.47](https://github.com/inspec/inspec-gcp/tree/v1.11.47) (2023-10-10) #### Merged Pull Requests - CHEF-5556-MAGIC-MODULE-vertex_ai-Datasets__savedQuery - Resource Implementation [#495](https://github.com/inspec/inspec-gcp/pull/495) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.46](https://github.com/inspec/inspec-gcp/tree/v1.11.46) (2023-10-10) #### Merged Pull Requests - CHEF-5565-MAGIC-MODULE-vertex_ai-MetadataStores__artifact - Resource Implementation [#501](https://github.com/inspec/inspec-gcp/pull/501) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.45](https://github.com/inspec/inspec-gcp/tree/v1.11.45) (2023-10-10) #### Merged Pull Requests - CHEF-5566-MAGIC-MODULE-vertex_ai-MetadataStores__context - Resource Implementation [#502](https://github.com/inspec/inspec-gcp/pull/502) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.44](https://github.com/inspec/inspec-gcp/tree/v1.11.44) (2023-10-10) #### Merged Pull Requests - CHEF-5567-MAGIC-MODULE-vertex_ai-MetadataStores__execution - Resource Implementation [#503](https://github.com/inspec/inspec-gcp/pull/503) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.43](https://github.com/inspec/inspec-gcp/tree/v1.11.43) (2023-10-10) #### Merged Pull Requests - CHEF-5553-MAGIC-MODULE-vertex_ai-Datasets__annotationSpec - Resource Implementation [#492](https://github.com/inspec/inspec-gcp/pull/492) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.42](https://github.com/inspec/inspec-gcp/tree/v1.11.42) (2023-10-10) #### Merged Pull Requests - CHEF-5569-MAGIC-MODULE-vertex_ai-ModelDeploymentMonitoringJob - Resource Implementation [#505](https://github.com/inspec/inspec-gcp/pull/505) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.41](https://github.com/inspec/inspec-gcp/tree/v1.11.41) (2023-10-09) #### Merged Pull Requests - CHEF-5568-MAGIC-MODULE-vertex_ai-MetadataStores__metadataSchema - Resource Implementation [#504](https://github.com/inspec/inspec-gcp/pull/504) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.40](https://github.com/inspec/inspec-gcp/tree/v1.11.40) (2023-10-09) #### Merged Pull Requests - CHEF-5570-MAGIC-MODULE-vertex_ai-Model - Resource Implementation [#485](https://github.com/inspec/inspec-gcp/pull/485) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.39](https://github.com/inspec/inspec-gcp/tree/v1.11.39) (2023-10-09) #### Merged Pull Requests - CHEF-5574-MAGIC-MODULE-vertex_ai-NasJobs__nasTrialDetail - Resource Implementation [#491](https://github.com/inspec/inspec-gcp/pull/491) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.38](https://github.com/inspec/inspec-gcp/tree/v1.11.38) (2023-10-09) #### Merged Pull Requests - CHEF-5564-MAGIC-MODULE-vertex_ai-MetadataStore - Resource Implementation [#490](https://github.com/inspec/inspec-gcp/pull/490) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.37](https://github.com/inspec/inspec-gcp/tree/v1.11.37) (2023-09-27) #### Merged Pull Requests - CHEF-5555-MAGIC-MODULE-vertex_ai-Datasets__dataItems__annotation - Resource Implementation [#516](https://github.com/inspec/inspec-gcp/pull/516) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.36](https://github.com/inspec/inspec-gcp/tree/v1.11.36) (2023-09-25) #### Merged Pull Requests - CHEF-5571-MAGIC-MODULE-vertex_ai-Models__evaluation - Resource Implementation [#506](https://github.com/inspec/inspec-gcp/pull/506) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.35](https://github.com/inspec/inspec-gcp/tree/v1.11.35) (2023-09-25) #### Merged Pull Requests - CHEF-5562-MAGIC-MODULE-vertex_ai-IndexEndpoint - Resource Implementation [#497](https://github.com/inspec/inspec-gcp/pull/497) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.34](https://github.com/inspec/inspec-gcp/tree/v1.11.34) (2023-09-22) #### Merged Pull Requests - CHEF-5582-MAGIC-MODULE-vertex_ai-Tensorboards__experiment - Resource Implementation [#499](https://github.com/inspec/inspec-gcp/pull/499) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.33](https://github.com/inspec/inspec-gcp/tree/v1.11.33) (2023-09-22) #### Merged Pull Requests - CHEF-5583-MAGIC-MODULE-vertex_ai-Tensorboards__experiments__run - Resource Implementation [#513](https://github.com/inspec/inspec-gcp/pull/513) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.32](https://github.com/inspec/inspec-gcp/tree/v1.11.32) (2023-09-22) #### Merged Pull Requests - CHEF-5560-MAGIC-MODULE-vertex_ai-Featurestores__entityTypes__feature - Resource Implementation [#517](https://github.com/inspec/inspec-gcp/pull/517) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.31](https://github.com/inspec/inspec-gcp/tree/v1.11.31) (2023-09-22) #### Merged Pull Requests - CHEF-5561-MAGIC-MODULE-vertex_ai-HyperparameterTuningJob - Resource Implementation [#515](https://github.com/inspec/inspec-gcp/pull/515) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.30](https://github.com/inspec/inspec-gcp/tree/v1.11.30) (2023-09-22) #### Merged Pull Requests - CHEF-5560-MAGIC-MODULE-vertex_ai-Featurestores__entityType - Resource Implementation [#500](https://github.com/inspec/inspec-gcp/pull/500) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.29](https://github.com/inspec/inspec-gcp/tree/v1.11.29) (2023-09-22) #### Merged Pull Requests - CHEF-5559-MAGIC-MODULE-vertex_ai-Featurestores__entityType - Resource Implementation [#496](https://github.com/inspec/inspec-gcp/pull/496) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.28](https://github.com/inspec/inspec-gcp/tree/v1.11.28) (2023-09-22) #### Merged Pull Requests - CHEF-5580-MAGIC-MODULE-vertex_ai-Studies__trial - Resource Implementation [#507](https://github.com/inspec/inspec-gcp/pull/507) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.27](https://github.com/inspec/inspec-gcp/tree/v1.11.27) (2023-09-20) #### Merged Pull Requests - CHEF-5558-MAGIC-MODULE-vertex_ai-Featurestore - Resource Implementation [#483](https://github.com/inspec/inspec-gcp/pull/483) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.26](https://github.com/inspec/inspec-gcp/tree/v1.11.26) (2023-09-20) #### Merged Pull Requests - CHEF-5575-MAGIC-MODULE-vertex_ai-PipelineJob - Resource Implementation [#484](https://github.com/inspec/inspec-gcp/pull/484) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.25](https://github.com/inspec/inspec-gcp/tree/v1.11.25) (2023-09-19) #### Merged Pull Requests - CHEF-5577-MAGIC-MODULE-vertex_ai-Schedule - Resource Implementation [#487](https://github.com/inspec/inspec-gcp/pull/487) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.24](https://github.com/inspec/inspec-gcp/tree/v1.11.24) (2023-09-19) #### Merged Pull Requests - CHEF-5581-MAGIC-MODULE-vertex_ai-Tensorboard - Resource Implementation [#489](https://github.com/inspec/inspec-gcp/pull/489) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.23](https://github.com/inspec/inspec-gcp/tree/v1.11.23) (2023-09-18) #### Merged Pull Requests - CHEF-5557-MAGIC-MODULE-vertex_ai-Endpoint - Resource Implementation [#482](https://github.com/inspec/inspec-gcp/pull/482) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.22](https://github.com/inspec/inspec-gcp/tree/v1.11.22) (2023-09-18) #### Merged Pull Requests - CHEF-5573-MAGIC-MODULE-vertex_ai-NasJob - Resource Implementation [#488](https://github.com/inspec/inspec-gcp/pull/488) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.21](https://github.com/inspec/inspec-gcp/tree/v1.11.21) (2023-09-15) #### Merged Pull Requests - CHEF-5549-MAGIC-MODULE-vertex_ai-BatchPredictionJob - Resource Implementation [#477](https://github.com/inspec/inspec-gcp/pull/477) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.20](https://github.com/inspec/inspec-gcp/tree/v1.11.20) (2023-09-15) #### Merged Pull Requests - CHEF-5550-MAGIC-MODULE-vertex_ai-CustomJob - Resource Implementation [#476](https://github.com/inspec/inspec-gcp/pull/476) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.19](https://github.com/inspec/inspec-gcp/tree/v1.11.19) (2023-09-14) #### Merged Pull Requests - CHEF-5585-MAGIC-MODULE-vertex_ai-TrainingPipeline - Resource Implementation [#479](https://github.com/inspec/inspec-gcp/pull/479) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.18](https://github.com/inspec/inspec-gcp/tree/v1.11.18) (2023-09-11) #### Merged Pull Requests - CHEF-5552-MAGIC-MODULE-vertex_ai-Dataset - Resource Implementation [#467](https://github.com/inspec/inspec-gcp/pull/467) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.17](https://github.com/inspec/inspec-gcp/tree/v1.11.17) (2023-09-08) #### Merged Pull Requests - CHEF-6191-Fixed Linting Naming Issues [#473](https://github.com/inspec/inspec-gcp/pull/473) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.16](https://github.com/inspec/inspec-gcp/tree/v1.11.16) (2023-09-07) #### Merged Pull Requests - CHEF-5991-GlobalNetworkEndpointGroup Resource [#462](https://github.com/inspec/inspec-gcp/pull/462) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.15](https://github.com/inspec/inspec-gcp/tree/v1.11.15) (2023-09-07) #### Merged Pull Requests - Fixed vertex ai uri handleing-current version had no support for base… [#466](https://github.com/inspec/inspec-gcp/pull/466) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.14](https://github.com/inspec/inspec-gcp/tree/v1.11.14) (2023-08-29) #### Merged Pull Requests - CHEF-5883-ImageFamilyView Resource-GCP Compute [#449](https://github.com/inspec/inspec-gcp/pull/449) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.13](https://github.com/inspec/inspec-gcp/tree/v1.11.13) (2023-08-29) #### Merged Pull Requests - CHEF-4076-DeidentifyTemplate [#461](https://github.com/inspec/inspec-gcp/pull/461) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.12](https://github.com/inspec/inspec-gcp/tree/v1.11.12) (2023-08-29) #### Merged Pull Requests - CHEF-4076 Resource added for DeIdentify Template [#447](https://github.com/inspec/inspec-gcp/pull/447) ([balasubramanian-s](https://github.com/balasubramanian-s)) ## [v1.11.11](https://github.com/inspec/inspec-gcp/tree/v1.11.11) (2023-08-29) #### Merged Pull Requests - Removed unused files [#460](https://github.com/inspec/inspec-gcp/pull/460) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.10](https://github.com/inspec/inspec-gcp/tree/v1.11.10) (2023-08-29) #### Merged Pull Requests - Removed the support for expeditor changes for ruby run time 2.7 [#459](https://github.com/inspec/inspec-gcp/pull/459) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.9](https://github.com/inspec/inspec-gcp/tree/v1.11.9) (2023-08-28) #### Merged Pull Requests - No Change [#454](https://github.com/inspec/inspec-gcp/pull/454) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.8](https://github.com/inspec/inspec-gcp/tree/v1.11.8) (2023-08-24) #### Merged Pull Requests - Naming linting fix [#448](https://github.com/inspec/inspec-gcp/pull/448) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.7](https://github.com/inspec/inspec-gcp/tree/v1.11.7) (2023-08-17) #### Merged Pull Requests - CHEF-4075 Resource added for Dlp stored info types [#446](https://github.com/inspec/inspec-gcp/pull/446) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.6](https://github.com/inspec/inspec-gcp/tree/v1.11.6) (2023-08-16) #### Merged Pull Requests - CHEF-4074 dlp inspect template resource [#445](https://github.com/inspec/inspec-gcp/pull/445) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.5](https://github.com/inspec/inspec-gcp/tree/v1.11.5) (2023-08-16) #### Merged Pull Requests - CHEF-4073 DLP-job-trigger-resource [#443](https://github.com/inspec/inspec-gcp/pull/443) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.4](https://github.com/inspec/inspec-gcp/tree/v1.11.4) (2023-07-27) #### Merged Pull Requests - CHEF-4077 DLP job resources [#441](https://github.com/inspec/inspec-gcp/pull/441) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.3](https://github.com/inspec/inspec-gcp/tree/v1.11.3) (2023-07-27) #### Merged Pull Requests - CHEF-1604 api updated from beta4 to v1 [#440](https://github.com/inspec/inspec-gcp/pull/440) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.2](https://github.com/inspec/inspec-gcp/tree/v1.11.2) (2023-07-27) #### Merged Pull Requests - CHEF-4288 wrong atrribute workloadMetadataConfig fixed [#442](https://github.com/inspec/inspec-gcp/pull/442) ([sa-progress](https://github.com/sa-progress)) ## [v1.11.1](https://github.com/inspec/inspec-gcp/tree/v1.11.1) (2023-06-12) #### Merged Pull Requests - Fix blog post link [#436](https://github.com/inspec/inspec-gcp/pull/436) ([futtetennista](https://github.com/futtetennista)) ## [v1.11.0](https://github.com/inspec/inspec-gcp/tree/v1.11.0) (2023-05-03) #### Merged Pull Requests - RESOURCE-599 State added in Cloud Scheduler files generated from MM [#439](https://github.com/inspec/inspec-gcp/pull/439) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.39](https://github.com/inspec/inspec-gcp/tree/v1.10.39) (2023-01-31) #### Merged Pull Requests - RESOURCE-564 Update the Readme.md file in inspec-gcp [#434](https://github.com/inspec/inspec-gcp/pull/434) ([soumyo13](https://github.com/soumyo13)) ## [v1.10.38](https://github.com/inspec/inspec-gcp/tree/v1.10.38) (2023-01-31) #### Merged Pull Requests - RESOURCE-586 Fix the build lint issue in inspec-gcp [#435](https://github.com/inspec/inspec-gcp/pull/435) ([soumyo13](https://github.com/soumyo13)) ## [v1.10.37](https://github.com/inspec/inspec-gcp/tree/v1.10.37) (2022-07-29) #### Merged Pull Requests - RESOURCE-466-magic-moment-gcp-cloud-kms-key-rings-import-jobs [#426](https://github.com/inspec/inspec-gcp/pull/426) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.36](https://github.com/inspec/inspec-gcp/tree/v1.10.36) (2022-07-27) #### Merged Pull Requests - RESOURCE-458-gcp-cloud-kms-ekm-connections [#425](https://github.com/inspec/inspec-gcp/pull/425) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.35](https://github.com/inspec/inspec-gcp/tree/v1.10.35) (2022-07-13) #### Merged Pull Requests - RESOURCE 456-gcp-cloud-kms-projects-locations [#422](https://github.com/inspec/inspec-gcp/pull/422) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.34](https://github.com/inspec/inspec-gcp/tree/v1.10.34) (2022-07-04) #### Merged Pull Requests - google_project_iam_binding.rb file added [#424](https://github.com/inspec/inspec-gcp/pull/424) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.33](https://github.com/inspec/inspec-gcp/tree/v1.10.33) (2022-07-04) #### Merged Pull Requests - 420 undefined method google project iam binding [#423](https://github.com/inspec/inspec-gcp/pull/423) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.32](https://github.com/inspec/inspec-gcp/tree/v1.10.32) (2022-07-04) #### Merged Pull Requests - Allow more flexibility to GOOGLE_APPLICATION_CREDENTIALS parsing [#415](https://github.com/inspec/inspec-gcp/pull/415) ([rbclark](https://github.com/rbclark)) ## [v1.10.31](https://github.com/inspec/inspec-gcp/tree/v1.10.31) (2022-06-30) #### Merged Pull Requests - support reading profile from creds [#417](https://github.com/inspec/inspec-gcp/pull/417) ([sathish-progress](https://github.com/sathish-progress)) ## [v1.10.30](https://github.com/inspec/inspec-gcp/tree/v1.10.30) (2022-06-19) #### Merged Pull Requests - RESOURCE-409-magic-module-template-for-health-region-check [#419](https://github.com/inspec/inspec-gcp/pull/419) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.29](https://github.com/inspec/inspec-gcp/tree/v1.10.29) (2022-06-16) #### Merged Pull Requests - input and value updated from controls [#407](https://github.com/inspec/inspec-gcp/pull/407) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.28](https://github.com/inspec/inspec-gcp/tree/v1.10.28) (2022-06-15) #### Merged Pull Requests - RESOURCE-325-soc2-section-cc6-6-gcp [#411](https://github.com/inspec/inspec-gcp/pull/411) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.27](https://github.com/inspec/inspec-gcp/tree/v1.10.27) (2022-05-19) #### Merged Pull Requests - Do not raise an error when calling resource_id if @connection is nil [#416](https://github.com/inspec/inspec-gcp/pull/416) ([rbclark](https://github.com/rbclark)) ## [v1.10.26](https://github.com/inspec/inspec-gcp/tree/v1.10.26) (2022-05-10) #### Merged Pull Requests - RESOURCE-356 add-superclass-resource-id-method-for-gcp [#414](https://github.com/inspec/inspec-gcp/pull/414) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.25](https://github.com/inspec/inspec-gcp/tree/v1.10.25) (2022-05-06) #### Merged Pull Requests - RESOURCE-37-sql added for sql operations [#412](https://github.com/inspec/inspec-gcp/pull/412) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.24](https://github.com/inspec/inspec-gcp/tree/v1.10.24) (2022-04-22) #### Merged Pull Requests - RESOURCE-68 compute-global-public-delegated-prefixes [#413](https://github.com/inspec/inspec-gcp/pull/413) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.23](https://github.com/inspec/inspec-gcp/tree/v1.10.23) (2022-03-14) #### Merged Pull Requests - RESOURCE-55 region health check services [#401](https://github.com/inspec/inspec-gcp/pull/401) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.21](https://github.com/inspec/inspec-gcp/tree/v1.10.21) (2022-03-14) #### Merged Pull Requests - RESOURCE-54 F/region instance group [#377](https://github.com/inspec/inspec-gcp/pull/377) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.20](https://github.com/inspec/inspec-gcp/tree/v1.10.20) (2022-03-14) #### Merged Pull Requests - RESOURCE-65 added resource interconnects [#368](https://github.com/inspec/inspec-gcp/pull/368) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.19](https://github.com/inspec/inspec-gcp/tree/v1.10.19) (2022-02-25) #### Merged Pull Requests - RESOURCE-51 Bump version to 1.10.0 by Chef Expeditor Zone Operation [#389](https://github.com/inspec/inspec-gcp/pull/389) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.17](https://github.com/inspec/inspec-gcp/tree/v1.10.17) (2022-02-25) #### Merged Pull Requests - fix doc: inspec-gcp google_container_node_pool resource [#355](https://github.com/inspec/inspec-gcp/pull/355) ([pradeepbhadani](https://github.com/pradeepbhadani)) ## [v1.10.16](https://github.com/inspec/inspec-gcp/tree/v1.10.16) (2022-02-24) #### Merged Pull Requests - RESOURCE-34 Sql Connect Bump version to 1.10.0 by Chef Expeditor [#391](https://github.com/inspec/inspec-gcp/pull/391) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.15](https://github.com/inspec/inspec-gcp/tree/v1.10.15) (2022-02-23) #### Merged Pull Requests - Replace deprecated --without flag with bundle config [#330](https://github.com/inspec/inspec-gcp/pull/330) ([jayashrig158](https://github.com/jayashrig158)) ## [v1.10.14](https://github.com/inspec/inspec-gcp/tree/v1.10.14) (2022-02-23) #### Merged Pull Requests - RESOURCE-53 Region Operations Bump version to 1.10.0 by Chef Expeditor [#381](https://github.com/inspec/inspec-gcp/pull/381) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.13](https://github.com/inspec/inspec-gcp/tree/v1.10.13) (2022-02-23) #### Merged Pull Requests - Update inspec-bin requirement from 4.16.0 to 4.37.8 [#323](https://github.com/inspec/inspec-gcp/pull/323) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) ## [v1.10.12](https://github.com/inspec/inspec-gcp/tree/v1.10.12) (2022-02-23) #### Merged Pull Requests - Upgrade to GitHub-native Dependabot [#319](https://github.com/inspec/inspec-gcp/pull/319) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) ## [v1.10.11](https://github.com/inspec/inspec-gcp/tree/v1.10.11) (2022-02-23) #### Merged Pull Requests - F/sql database3 [#395](https://github.com/inspec/inspec-gcp/pull/395) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.10](https://github.com/inspec/inspec-gcp/tree/v1.10.10) (2022-02-23) #### Merged Pull Requests - RESOURCE-36 sql flags [#396](https://github.com/inspec/inspec-gcp/pull/396) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.9](https://github.com/inspec/inspec-gcp/tree/v1.10.9) (2022-02-22) #### Merged Pull Requests - RESOURCE-67 imageFamilyViews [#373](https://github.com/inspec/inspec-gcp/pull/373) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.8](https://github.com/inspec/inspec-gcp/tree/v1.10.8) (2022-02-22) #### Merged Pull Requests - soumyo/updated_readme_file [#333](https://github.com/inspec/inspec-gcp/pull/333) ([soumyo13](https://github.com/soumyo13)) ## [v1.10.7](https://github.com/inspec/inspec-gcp/tree/v1.10.7) (2022-02-22) #### Merged Pull Requests - RESOURCE-70 F/global operations [#362](https://github.com/inspec/inspec-gcp/pull/362) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.6](https://github.com/inspec/inspec-gcp/tree/v1.10.6) (2022-02-22) #### Merged Pull Requests - Firewall rules [#361](https://github.com/inspec/inspec-gcp/pull/361) ([ben-watt-es](https://github.com/ben-watt-es)) ## [v1.10.5](https://github.com/inspec/inspec-gcp/tree/v1.10.5) (2022-02-22) #### Merged Pull Requests - RESOURCE-64 F/license codes [#371](https://github.com/inspec/inspec-gcp/pull/371) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.4](https://github.com/inspec/inspec-gcp/tree/v1.10.4) (2022-02-22) #### Merged Pull Requests - RESOURCE-66 f/interconnect_location [#363](https://github.com/inspec/inspec-gcp/pull/363) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.3](https://github.com/inspec/inspec-gcp/tree/v1.10.3) (2022-02-22) #### Merged Pull Requests - RESOURCE-72 New resource disk types [#358](https://github.com/inspec/inspec-gcp/pull/358) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.2](https://github.com/inspec/inspec-gcp/tree/v1.10.2) (2022-02-21) #### Merged Pull Requests - RESOURCE-73 F/accelerator types [#357](https://github.com/inspec/inspec-gcp/pull/357) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.1](https://github.com/inspec/inspec-gcp/tree/v1.10.1) (2022-02-21) #### Merged Pull Requests - RESOURCE-200 2.5 , 2.6 ruby version removed [#397](https://github.com/inspec/inspec-gcp/pull/397) ([sa-progress](https://github.com/sa-progress)) ## [v1.10.0](https://github.com/inspec/inspec-gcp/tree/v1.10.0) (2021-12-06) #### Merged Pull Requests - Added Support for GKE ServerConfig resource pack [#370](https://github.com/inspec/inspec-gcp/pull/370) ([varunsharma5](https://github.com/varunsharma5)) ## [v1.9.0](https://github.com/inspec/inspec-gcp/tree/v1.9.0) (2021-11-23) #### Merged Pull Requests - Fix for #366 to add error handling for missing primary_state attribute [#367](https://github.com/inspec/inspec-gcp/pull/367) ([jonlives](https://github.com/jonlives)) ## [v1.8.10](https://github.com/inspec/inspec-gcp/tree/v1.8.10) (2021-10-18) #### Merged Pull Requests - Add support for regional disks (plural) [#331](https://github.com/inspec/inspec-gcp/pull/331) ([frits-v](https://github.com/frits-v)) ## [v1.8.9](https://github.com/inspec/inspec-gcp/tree/v1.8.9) (2021-10-18) #### Merged Pull Requests - Issue/gce persistent disk csi driver config 350 v2 [#356](https://github.com/inspec/inspec-gcp/pull/356) ([sa-progress](https://github.com/sa-progress)) ## [v1.8.8](https://github.com/inspec/inspec-gcp/tree/v1.8.8) (2021-03-05) #### Merged Pull Requests - Conditionally pin chef-utils on ruby 2.5 [#310](https://github.com/inspec/inspec-gcp/pull/310) ([clintoncwolfe](https://github.com/clintoncwolfe)) ## [v1.8.7](https://github.com/inspec/inspec-gcp/tree/v1.8.7) (2021-03-05) #### Merged Pull Requests - Add 4 new features from Magic Modules (modular magician master branch) [#308](https://github.com/inspec/inspec-gcp/pull/308) ([trickyearlobe](https://github.com/trickyearlobe)) ## [v1.8.6](https://github.com/inspec/inspec-gcp/tree/v1.8.6) (2021-02-02) #### Merged Pull Requests - Adjusting examples to use updated lib name [#277](https://github.com/inspec/inspec-gcp/pull/277) ([lowwalker](https://github.com/lowwalker)) ## [v1.8.5](https://github.com/inspec/inspec-gcp/tree/v1.8.5) (2021-02-02) #### Merged Pull Requests - MM updates [#303](https://github.com/inspec/inspec-gcp/pull/303) ([slevenick](https://github.com/slevenick)) ## [v1.8.4](https://github.com/inspec/inspec-gcp/tree/v1.8.4) (2021-02-02) #### Merged Pull Requests - Several updates to CI testing [#306](https://github.com/inspec/inspec-gcp/pull/306) ([clintoncwolfe](https://github.com/clintoncwolfe)) ## [v1.8.3](https://github.com/inspec/inspec-gcp/tree/v1.8.3) (2021-02-02) #### Merged Pull Requests - Update inspec-bin requirement from 4.16.0 to 4.26.4 [#304](https://github.com/inspec/inspec-gcp/pull/304) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) ## [v1.8.2](https://github.com/inspec/inspec-gcp/tree/v1.8.2) (2020-11-16) #### Merged Pull Requests - Add AccessLevels, MM updates [#285](https://github.com/inspec/inspec-gcp/pull/285) ([slevenick](https://github.com/slevenick)) ## [v1.8.1](https://github.com/inspec/inspec-gcp/tree/v1.8.1) (2020-11-05) #### Merged Pull Requests - MM updates, container cluster additions [#284](https://github.com/inspec/inspec-gcp/pull/284) ([slevenick](https://github.com/slevenick)) ## [v1.8.0](https://github.com/inspec/inspec-gcp/tree/v1.8.0) (2020-09-29) #### Merged Pull Requests - MM updates [#280](https://github.com/inspec/inspec-gcp/pull/280) ([slevenick](https://github.com/slevenick)) ## [v1.7.0](https://github.com/inspec/inspec-gcp/tree/v1.7.0) (2020-06-24) #### Merged Pull Requests - Memcache updates [#269](https://github.com/inspec/inspec-gcp/pull/269) ([slevenick](https://github.com/slevenick)) ## [v1.6.0](https://github.com/inspec/inspec-gcp/tree/v1.6.0) (2020-05-19) #### Merged Pull Requests - Fix instance helpers, managed zone helpers [#259](https://github.com/inspec/inspec-gcp/pull/259) ([slevenick](https://github.com/slevenick)) ## [v1.5.0](https://github.com/inspec/inspec-gcp/tree/v1.5.0) (2020-05-07) #### Merged Pull Requests - Fix Service account keys, MM-updates [#256](https://github.com/inspec/inspec-gcp/pull/256) ([slevenick](https://github.com/slevenick)) ## [v1.4.0](https://github.com/inspec/inspec-gcp/tree/v1.4.0) (2020-04-28) #### Merged Pull Requests - SQL labels, MM updates [#254](https://github.com/inspec/inspec-gcp/pull/254) ([slevenick](https://github.com/slevenick)) ## [v1.3.0](https://github.com/inspec/inspec-gcp/tree/v1.3.0) (2020-04-17) #### Merged Pull Requests - Add encryption, retention policy to buckets (#3384) (#382) [#250](https://github.com/inspec/inspec-gcp/pull/250) ([slevenick](https://github.com/slevenick)) ## [v1.2.0](https://github.com/inspec/inspec-gcp/tree/v1.2.0) (2020-04-16) #### Merged Pull Requests - Add security policies [#246](https://github.com/inspec/inspec-gcp/pull/246) ([slevenick](https://github.com/slevenick)) ## [v1.1.0](https://github.com/inspec/inspec-gcp/tree/v1.1.0) (2020-04-14) #### Merged Pull Requests - Catch up to mm master, bucket labels [#244](https://github.com/inspec/inspec-gcp/pull/244) ([slevenick](https://github.com/slevenick)) ## [v1.0.0](https://github.com/inspec/inspec-gcp/tree/v1.0.0) (2020-04-06) #### Merged Pull Requests - inspec-gcp 1.0 [#226](https://github.com/inspec/inspec-gcp/pull/226) ([slevenick](https://github.com/slevenick)) ## [v0.23.4](https://github.com/inspec/inspec-gcp/tree/v0.23.4) (2020-01-21) #### Merged Pull Requests - service_account_scopes nilclass [#227](https://github.com/inspec/inspec-gcp/pull/227) ([bgeesaman](https://github.com/bgeesaman)) ## [v0.23.3](https://github.com/inspec/inspec-gcp/tree/v0.23.3) (2020-01-14) #### Merged Pull Requests - updated README.md [#225](https://github.com/inspec/inspec-gcp/pull/225) ([mattbowes](https://github.com/mattbowes)) ## [v0.23.2](https://github.com/inspec/inspec-gcp/tree/v0.23.2) (2019-12-13) #### Merged Pull Requests - This resource is a singleton and is only driven off one unique key, "… [#220](https://github.com/inspec/inspec-gcp/pull/220) ([lhasadreams](https://github.com/lhasadreams)) ## [v0.23.1](https://github.com/inspec/inspec-gcp/tree/v0.23.1) (2019-12-11) #### Merged Pull Requests - Delete more UrlMap route rules [#219](https://github.com/inspec/inspec-gcp/pull/219) ([slevenick](https://github.com/slevenick)) ## [v0.23.0](https://github.com/inspec/inspec-gcp/tree/v0.23.0) (2019-12-11) #### Merged Pull Requests - Add ACM resources, fix file name bug [#218](https://github.com/inspec/inspec-gcp/pull/218) ([slevenick](https://github.com/slevenick)) ## [v0.22.0](https://github.com/inspec/inspec-gcp/tree/v0.22.0) (2019-12-10) #### Merged Pull Requests - Add spanner instance IAM policy support [#214](https://github.com/inspec/inspec-gcp/pull/214) ([slevenick](https://github.com/slevenick)) ## [v0.21.4](https://github.com/inspec/inspec-gcp/tree/v0.21.4) (2019-12-04) #### Merged Pull Requests - Update cloud billing info test [#207](https://github.com/inspec/inspec-gcp/pull/207) ([slevenick](https://github.com/slevenick)) ## [v0.21.3](https://github.com/inspec/inspec-gcp/tree/v0.21.3) (2019-12-04) #### Merged Pull Requests - Update rubocop deprecated settings. [#213](https://github.com/inspec/inspec-gcp/pull/213) ([skpaterson](https://github.com/skpaterson)) ## [v0.21.2](https://github.com/inspec/inspec-gcp/tree/v0.21.2) (2019-11-26) #### Merged Pull Requests - Update google_sql_users.md [#208](https://github.com/inspec/inspec-gcp/pull/208) ([mattbowes](https://github.com/mattbowes)) ## [v0.21.1](https://github.com/inspec/inspec-gcp/tree/v0.21.1) (2019-11-21) #### Merged Pull Requests - Add support for bigquery subnetworks and networks to generate [#206](https://github.com/inspec/inspec-gcp/pull/206) ([slevenick](https://github.com/slevenick)) ## [v0.21.0](https://github.com/inspec/inspec-gcp/tree/v0.21.0) (2019-11-18) #### Merged Pull Requests - Add support for project billing info [#205](https://github.com/inspec/inspec-gcp/pull/205) ([slevenick](https://github.com/slevenick)) ## [v0.20.0](https://github.com/inspec/inspec-gcp/tree/v0.20.0) (2019-11-06) #### Merged Pull Requests - Add Cloud Scheduler Job [#203](https://github.com/inspec/inspec-gcp/pull/203) ([slevenick](https://github.com/slevenick)) ## [v0.19.1](https://github.com/inspec/inspec-gcp/tree/v0.19.1) (2019-11-04) #### Merged Pull Requests - Add a test example in google_service_account.md and fix for #200 [#199](https://github.com/inspec/inspec-gcp/pull/199) ([pradeepbhadani](https://github.com/pradeepbhadani)) ## [v0.19.0](https://github.com/inspec/inspec-gcp/tree/v0.19.0) (2019-10-30) #### Merged Pull Requests - Add Spanner resources, IAM member to bigquery dataset [#198](https://github.com/inspec/inspec-gcp/pull/198) ([slevenick](https://github.com/slevenick)) ## [v0.18.1](https://github.com/inspec/inspec-gcp/tree/v0.18.1) (2019-10-30) #### Merged Pull Requests - Fix typo in docs/resources/google_service_account.md. [#197](https://github.com/inspec/inspec-gcp/pull/197) ([pradeepbhadani](https://github.com/pradeepbhadani)) ## [v0.18.0](https://github.com/inspec/inspec-gcp/tree/v0.18.0) (2019-10-30) #### Merged Pull Requests - Add google_project_service [#196](https://github.com/inspec/inspec-gcp/pull/196) ([slevenick](https://github.com/slevenick)) ## [v0.17.1](https://github.com/inspec/inspec-gcp/tree/v0.17.1) (2019-10-28) #### Merged Pull Requests - Rubocop update [#195](https://github.com/inspec/inspec-gcp/pull/195) ([slevenick](https://github.com/slevenick)) ## [v0.17.0](https://github.com/inspec/inspec-gcp/tree/v0.17.0) (2019-10-23) #### Merged Pull Requests - Add google_compute_router_nat [#190](https://github.com/inspec/inspec-gcp/pull/190) ([slevenick](https://github.com/slevenick)) ## [v0.16.2](https://github.com/inspec/inspec-gcp/tree/v0.16.2) (2019-10-23) #### Merged Pull Requests - Update check on DNSSEC to be case independent after API update from '… [#188](https://github.com/inspec/inspec-gcp/pull/188) ([skpaterson](https://github.com/skpaterson)) ## [v0.16.1](https://github.com/inspec/inspec-gcp/tree/v0.16.1) (2019-10-14) #### Merged Pull Requests - Add project ID to new MM terraform resources. Inject random name for… [#187](https://github.com/inspec/inspec-gcp/pull/187) ([skpaterson](https://github.com/skpaterson)) ## [v0.16.0](https://github.com/inspec/inspec-gcp/tree/v0.16.0) (2019-10-14) #### Merged Pull Requests - Add generate functionality [#186](https://github.com/inspec/inspec-gcp/pull/186) ([slevenick](https://github.com/slevenick)) ## [v0.15.3](https://github.com/inspec/inspec-gcp/tree/v0.15.3) (2019-10-10) #### Merged Pull Requests - Fix dataproc test, add node groups, node templates, network endpoints [#185](https://github.com/inspec/inspec-gcp/pull/185) ([slevenick](https://github.com/slevenick)) ## [v0.15.2](https://github.com/inspec/inspec-gcp/tree/v0.15.2) (2019-10-07) #### Merged Pull Requests - Add dataproc_cluster resource, doc fixes [#181](https://github.com/inspec/inspec-gcp/pull/181) ([slevenick](https://github.com/slevenick)) ## [v0.15.1](https://github.com/inspec/inspec-gcp/tree/v0.15.1) (2019-09-19) #### Merged Pull Requests - docs: typo/fix broken URL link [#180](https://github.com/inspec/inspec-gcp/pull/180) ([pomverte](https://github.com/pomverte)) ## [v0.15.0](https://github.com/inspec/inspec-gcp/tree/v0.15.0) (2019-09-16) #### Merged Pull Requests - Appengine, ML engine, project IAM resources [#178](https://github.com/inspec/inspec-gcp/pull/178) ([slevenick](https://github.com/slevenick)) ## [v0.14.0](https://github.com/inspec/inspec-gcp/tree/v0.14.0) (2019-09-16) #### Merged Pull Requests - Project iam policy [#177](https://github.com/inspec/inspec-gcp/pull/177) ([slevenick](https://github.com/slevenick)) ## [v0.13.2](https://github.com/inspec/inspec-gcp/tree/v0.13.2) (2019-08-29) #### Merged Pull Requests - Propagate default empty string for org id. [#176](https://github.com/inspec/inspec-gcp/pull/176) ([skpaterson](https://github.com/skpaterson)) ## [v0.13.1](https://github.com/inspec/inspec-gcp/tree/v0.13.1) (2019-08-29) #### Merged Pull Requests - Ensure an agreeable default value for gcp_organization_id for skipping affected tests. [#175](https://github.com/inspec/inspec-gcp/pull/175) ([skpaterson](https://github.com/skpaterson)) ## [v0.13.0](https://github.com/inspec/inspec-gcp/tree/v0.13.0) (2019-08-27) #### Merged Pull Requests - Add organization log sink resource [#173](https://github.com/inspec/inspec-gcp/pull/173) ([slevenick](https://github.com/slevenick)) ## [v0.12.4](https://github.com/inspec/inspec-gcp/tree/v0.12.4) (2019-08-23) #### Merged Pull Requests - Fix for regional compute disk creation and testing. [#171](https://github.com/inspec/inspec-gcp/pull/171) ([skpaterson](https://github.com/skpaterson)) ## [v0.12.3](https://github.com/inspec/inspec-gcp/tree/v0.12.3) (2019-08-23) #### Merged Pull Requests - Updates to resources from MM [#167](https://github.com/inspec/inspec-gcp/pull/167) ([slevenick](https://github.com/slevenick)) ## [v0.12.2](https://github.com/inspec/inspec-gcp/tree/v0.12.2) (2019-08-23) #### Merged Pull Requests - Upgrade tf [#166](https://github.com/inspec/inspec-gcp/pull/166) ([slevenick](https://github.com/slevenick)) ## [v0.12.1](https://github.com/inspec/inspec-gcp/tree/v0.12.1) (2019-08-23) #### Merged Pull Requests - Add support for regional Google compute disk [#164](https://github.com/inspec/inspec-gcp/pull/164) ([walterdolce](https://github.com/walterdolce)) ## [v0.12.0](https://github.com/inspec/inspec-gcp/tree/v0.12.0) (2019-08-23) #### Merged Pull Requests - Update to InSpec 4 [#155](https://github.com/inspec/inspec-gcp/pull/155) ([skpaterson](https://github.com/skpaterson)) ## [v0.11.0](https://github.com/inspec/inspec-gcp/tree/v0.11.0) (2019-07-18) #### Merged Pull Requests - Add expeditor and buildkite verify pipeline [#159](https://github.com/inspec/inspec-gcp/pull/159) ([miah](https://github.com/miah)) ## [v0.11.0](https://github.com/inspec/inspec-gcp/tree/v0.11.0) (2019-04-30) [Full Changelog](https://github.com/inspec/inspec-gcp/compare/v0.10.0...v0.11.0) **Closed issues:** - google\_container\_cluster method has\_logging\_enabled? reporting wrong [\#136](https://github.com/inspec/inspec-gcp/issues/136) - Add support for google\_subnetwork\_iam\_bindings [\#122](https://github.com/inspec/inspec-gcp/issues/122) - Add support for google\_folders and related resources [\#111](https://github.com/inspec/inspec-gcp/issues/111) **Merged pull requests:** - Subnet iam policy [\#142](https://github.com/inspec/inspec-gcp/pull/142) ([slevenick](https://github.com/slevenick)) - Regional node pools [\#139](https://github.com/inspec/inspec-gcp/pull/139) ([slevenick](https://github.com/slevenick)) - Add exists? method to google\_compute\_address [\#138](https://github.com/inspec/inspec-gcp/pull/138) ([ivantsepp](https://github.com/ivantsepp)) - Logging enabled regex [\#137](https://github.com/inspec/inspec-gcp/pull/137) ([slevenick](https://github.com/slevenick)) - Version bump 0100 [\#133](https://github.com/inspec/inspec-gcp/pull/133) ([skpaterson](https://github.com/skpaterson)) - Correct names for nested object properties. [\#132](https://github.com/inspec/inspec-gcp/pull/132) ([slevenick](https://github.com/slevenick)) - Add support for backend buckets, cloud functions [\#130](https://github.com/inspec/inspec-gcp/pull/130) ([slevenick](https://github.com/slevenick)) ## [v0.10.0](https://github.com/inspec/inspec-gcp/tree/v0.10.0) (2019-03-20) [Full Changelog](https://github.com/inspec/inspec-gcp/compare/v0.9.0...v0.10.0) **Closed issues:** - google\_compute\_router: iterating bgp.advertised\_ip\_ranges? [\#128](https://github.com/inspec/inspec-gcp/issues/128) - Fix dataset test display [\#125](https://github.com/inspec/inspec-gcp/issues/125) - test setup fails when specifying a region other than europe-west2 [\#114](https://github.com/inspec/inspec-gcp/issues/114) - Filter projects by ACTIVE status [\#108](https://github.com/inspec/inspec-gcp/issues/108) - JUnit, JSON Reporters not working [\#89](https://github.com/inspec/inspec-gcp/issues/89) - google\_project\_alert\_policy doc use "name" when code ask "policy" [\#86](https://github.com/inspec/inspec-gcp/issues/86) - google\_compute\_firewall: can't use allow\_ssh? when the the rule is a DENY rule [\#73](https://github.com/inspec/inspec-gcp/issues/73) - Support DNS record sets [\#66](https://github.com/inspec/inspec-gcp/issues/66) - Support regional clusters [\#65](https://github.com/inspec/inspec-gcp/issues/65) - Avoid dynamic property definition, or warn about it [\#25](https://github.com/inspec/inspec-gcp/issues/25) **Merged pull requests:** - Move region to MM generated [\#129](https://github.com/inspec/inspec-gcp/pull/129) ([slevenick](https://github.com/slevenick)) - to\_s updates [\#127](https://github.com/inspec/inspec-gcp/pull/127) ([slevenick](https://github.com/slevenick)) - Add folder resource [\#120](https://github.com/inspec/inspec-gcp/pull/120) ([slevenick](https://github.com/slevenick)) - Update for google\_container\_regional\_clusters control. [\#118](https://github.com/inspec/inspec-gcp/pull/118) ([skpaterson](https://github.com/skpaterson)) - Update google\_container\_regional\_cluster control to use correct region. [\#117](https://github.com/inspec/inspec-gcp/pull/117) ([skpaterson](https://github.com/skpaterson)) - Ensure region selection works as expected. [\#116](https://github.com/inspec/inspec-gcp/pull/116) ([skpaterson](https://github.com/skpaterson)) - improve test info in README [\#115](https://github.com/inspec/inspec-gcp/pull/115) ([bleything](https://github.com/bleything)) - Add BigQuery, Source Repositories [\#113](https://github.com/inspec/inspec-gcp/pull/113) ([slevenick](https://github.com/slevenick)) - Update google\_organization\(s\) controls only\_if condition to include o… [\#112](https://github.com/inspec/inspec-gcp/pull/112) ([skpaterson](https://github.com/skpaterson)) - Add ability to test individual as well as multiple organisations [\#110](https://github.com/inspec/inspec-gcp/pull/110) ([walterdolce](https://github.com/walterdolce)) - Implement ability to filter GCP projects by lifecycle state [\#109](https://github.com/inspec/inspec-gcp/pull/109) ([walterdolce](https://github.com/walterdolce)) - Master updated [\#107](https://github.com/inspec/inspec-gcp/pull/107) ([slevenick](https://github.com/slevenick)) - Merge most recent Magic Modules generated master [\#105](https://github.com/inspec/inspec-gcp/pull/105) ([slevenick](https://github.com/slevenick)) - Http hc backend [\#104](https://github.com/inspec/inspec-gcp/pull/104) ([slevenick](https://github.com/slevenick)) - Trigger healthcheck additions [\#103](https://github.com/inspec/inspec-gcp/pull/103) ([slevenick](https://github.com/slevenick)) - Target pools autoscalers [\#102](https://github.com/inspec/inspec-gcp/pull/102) ([slevenick](https://github.com/slevenick)) - Version bump 090 [\#101](https://github.com/inspec/inspec-gcp/pull/101) ([skpaterson](https://github.com/skpaterson)) ## [v0.9.0](https://github.com/inspec/inspec-gcp/tree/v0.9.0) (2019-01-21) [Full Changelog](https://github.com/inspec/inspec-gcp/compare/v0.8.0...v0.9.0) **Merged pull requests:** - Add instance group manager and resource record set resources [\#100](https://github.com/inspec/inspec-gcp/pull/100) ([slevenick](https://github.com/slevenick)) - Pubsub subscription + topic [\#99](https://github.com/inspec/inspec-gcp/pull/99) ([slevenick](https://github.com/slevenick)) - Adding pagination for key rings and crypto keys resources. [\#97](https://github.com/inspec/inspec-gcp/pull/97) ([skpaterson](https://github.com/skpaterson)) - Add compute disk resource [\#96](https://github.com/inspec/inspec-gcp/pull/96) ([slevenick](https://github.com/slevenick)) - Feat/pubsub magicmodule [\#95](https://github.com/inspec/inspec-gcp/pull/95) ([jnahelou](https://github.com/jnahelou)) - Fix for forwarding rules with nil network and update README. [\#93](https://github.com/inspec/inspec-gcp/pull/93) ([skpaterson](https://github.com/skpaterson)) - Tweaks to MM SSL policies resources and update README. [\#92](https://github.com/inspec/inspec-gcp/pull/92) ([skpaterson](https://github.com/skpaterson)) - Add support for google\_compute\_forwarding\_rules and google\_compute\_forwarding\_rule [\#91](https://github.com/inspec/inspec-gcp/pull/91) ([jnahelou](https://github.com/jnahelou)) - Add Magic Modules generated resource for SSL Policy [\#90](https://github.com/inspec/inspec-gcp/pull/90) ([slevenick](https://github.com/slevenick)) - Update README for new resources [\#85](https://github.com/inspec/inspec-gcp/pull/85) ([skpaterson](https://github.com/skpaterson)) - Added support for google\_compute\_region\_instance\_group\_manager [\#84](https://github.com/inspec/inspec-gcp/pull/84) ([jnahelou](https://github.com/jnahelou)) - Updating README with new resources and adding CHANGELOG for v0.8.0. [\#83](https://github.com/inspec/inspec-gcp/pull/83) ([skpaterson](https://github.com/skpaterson)) ## [v0.8.0](https://github.com/inspec/inspec-gcp/tree/v0.8.0) (2018-11-23) [Full Changelog](https://github.com/inspec/inspec-gcp/compare/v0.7.0...v0.8.0) **Closed issues:** - google\_storage\_bucket\_acl fails with "Not Found" when the ACL doesn't exist [\#80](https://github.com/inspec/inspec-gcp/issues/80) - How to Install? [\#77](https://github.com/inspec/inspec-gcp/issues/77) - Magic Modules [\#74](https://github.com/inspec/inspec-gcp/issues/74) - verifying via kitchen-terraform verifier [\#71](https://github.com/inspec/inspec-gcp/issues/71) - Using InSpec with the GCP transport crashes when used with `file\(\)` resources [\#61](https://github.com/inspec/inspec-gcp/issues/61) **Merged pull requests:** - Update the DNS key and zone signing methods to the new key names. [\#82](https://github.com/inspec/inspec-gcp/pull/82) ([skpaterson](https://github.com/skpaterson)) - Fix an error when the bucket ACL doesn't exist [\#81](https://github.com/inspec/inspec-gcp/pull/81) ([iangelov](https://github.com/iangelov)) - Add support for google\_compute\_vpn\_tunnels and google\_compute\_vpn\_tunnel [\#79](https://github.com/inspec/inspec-gcp/pull/79) ([jnahelou](https://github.com/jnahelou)) - Improve some of the infrastructure tests that were failing under 'nor… [\#78](https://github.com/inspec/inspec-gcp/pull/78) ([skpaterson](https://github.com/skpaterson)) - Improve fw resources to handle 'all' cases. [\#76](https://github.com/inspec/inspec-gcp/pull/76) ([skpaterson](https://github.com/skpaterson)) - Version bump v0.7.0. [\#75](https://github.com/inspec/inspec-gcp/pull/75) ([skpaterson](https://github.com/skpaterson)) - Updated README for new GCP profile initialization, pending https://gi… [\#70](https://github.com/inspec/inspec-gcp/pull/70) ([skpaterson](https://github.com/skpaterson)) ## [v0.7.0](https://github.com/inspec/inspec-gcp/tree/v0.7.0) (2018-10-25) [Full Changelog](https://github.com/inspec/inspec-gcp/compare/v0.6.0...v0.7.0) **Merged pull requests:** - Extra nil checks, some error values changed [\#69](https://github.com/inspec/inspec-gcp/pull/69) ([alexpop](https://github.com/alexpop)) - Fix nil checks in google\_project\_logging\_audit\_config resource [\#68](https://github.com/inspec/inspec-gcp/pull/68) ([alexpop](https://github.com/alexpop)) - Fix nil exception when no zones are returned for a region [\#67](https://github.com/inspec/inspec-gcp/pull/67) ([alexpop](https://github.com/alexpop)) - Bump version to v0.6.0 [\#64](https://github.com/inspec/inspec-gcp/pull/64) ([skpaterson](https://github.com/skpaterson)) ## [v0.6.0](https://github.com/inspec/inspec-gcp/tree/v0.6.0) (2018-10-18) [Full Changelog](https://github.com/inspec/inspec-gcp/compare/v0.5.0...v0.6.0) **Closed issues:** - google\_project resource works with project ID/number instead of name as seen in the docs [\#39](https://github.com/inspec/inspec-gcp/issues/39) - Improved firewall rule handling [\#27](https://github.com/inspec/inspec-gcp/issues/27) - Enhancement: Support Fuzzy Match with Instance Group Name [\#23](https://github.com/inspec/inspec-gcp/issues/23) - google\_compute\_instance\_group doesn't respond to exists? or exist? [\#22](https://github.com/inspec/inspec-gcp/issues/22) - google\_compute\_instance\_group: location symbol doesn't exist [\#21](https://github.com/inspec/inspec-gcp/issues/21) - Node Pool fails requiring cluster\_id [\#20](https://github.com/inspec/inspec-gcp/issues/20) - google\_container\_node\_pool.rb example bug [\#19](https://github.com/inspec/inspec-gcp/issues/19) - found the documentation [\#17](https://github.com/inspec/inspec-gcp/issues/17) **Merged pull requests:** - Improve google\_project\#to\_s output [\#62](https://github.com/inspec/inspec-gcp/pull/62) ([adrienthebo](https://github.com/adrienthebo)) - Add service account auth instructions and example [\#60](https://github.com/inspec/inspec-gcp/pull/60) ([alexpop](https://github.com/alexpop)) - Adding google\_user\(s\) and project alert policy resources [\#59](https://github.com/inspec/inspec-gcp/pull/59) ([skpaterson](https://github.com/skpaterson)) - Added support for metadata and label content based compliance [\#58](https://github.com/inspec/inspec-gcp/pull/58) ([pleonovitch](https://github.com/pleonovitch)) - Updated Dockerfile with more layers and terraform [\#57](https://github.com/inspec/inspec-gcp/pull/57) ([jjasghar](https://github.com/jjasghar)) - Updates to controls affected by service account name change. [\#56](https://github.com/inspec/inspec-gcp/pull/56) ([skpaterson](https://github.com/skpaterson)) - Added resource doc links from recent PRs. [\#55](https://github.com/inspec/inspec-gcp/pull/55) ([skpaterson](https://github.com/skpaterson)) - Kubernetes resource updates [\#54](https://github.com/inspec/inspec-gcp/pull/54) ([skpaterson](https://github.com/skpaterson)) - Cloud SQL resources [\#53](https://github.com/inspec/inspec-gcp/pull/53) ([skpaterson](https://github.com/skpaterson)) - Storage updates [\#52](https://github.com/inspec/inspec-gcp/pull/52) ([skpaterson](https://github.com/skpaterson)) - VM Updates [\#51](https://github.com/inspec/inspec-gcp/pull/51) ([skpaterson](https://github.com/skpaterson)) - Networking related updates [\#50](https://github.com/inspec/inspec-gcp/pull/50) ([skpaterson](https://github.com/skpaterson)) - Project audit logging [\#49](https://github.com/inspec/inspec-gcp/pull/49) ([skpaterson](https://github.com/skpaterson)) - Minor fix for region instead of zone in first google\_compute\_region e… [\#48](https://github.com/inspec/inspec-gcp/pull/48) ([skpaterson](https://github.com/skpaterson)) - Updates for service account and related resources [\#47](https://github.com/inspec/inspec-gcp/pull/47) ([skpaterson](https://github.com/skpaterson)) - Add google\_compute\_region\(s\) resources, tests etc. and updated README. [\#46](https://github.com/inspec/inspec-gcp/pull/46) ([skpaterson](https://github.com/skpaterson)) - Added google\_compute\_network\(s\) and google\_compute\_subnetwork\(s\) resources. [\#45](https://github.com/inspec/inspec-gcp/pull/45) ([skpaterson](https://github.com/skpaterson)) - Bump version to v0.5.0 [\#44](https://github.com/inspec/inspec-gcp/pull/44) ([skpaterson](https://github.com/skpaterson)) ## [v0.5.0](https://github.com/inspec/inspec-gcp/tree/v0.5.0) (2018-08-21) [Full Changelog](https://github.com/inspec/inspec-gcp/compare/v0.4.0...v0.5.0) **Closed issues:** - Unable to use resources provided by this library when invoked via test kitchen and kitchen-terraform [\#37](https://github.com/inspec/inspec-gcp/issues/37) **Merged pull requests:** - Resolve Debian 8 EOL issue, now pin all tf module versions explicitly. [\#43](https://github.com/inspec/inspec-gcp/pull/43) ([skpaterson](https://github.com/skpaterson)) - Added project logging resources [\#42](https://github.com/inspec/inspec-gcp/pull/42) ([skpaterson](https://github.com/skpaterson)) - Add storage bucket IAM resources [\#41](https://github.com/inspec/inspec-gcp/pull/41) ([skpaterson](https://github.com/skpaterson)) - Update the google\_project version as per \#39. Also udpate the associ… [\#40](https://github.com/inspec/inspec-gcp/pull/40) ([skpaterson](https://github.com/skpaterson)) - Add kms resources [\#36](https://github.com/inspec/inspec-gcp/pull/36) ([skpaterson](https://github.com/skpaterson)) - Bump version to 0.4.0 [\#34](https://github.com/inspec/inspec-gcp/pull/34) ([skpaterson](https://github.com/skpaterson)) - Add iam resources [\#33](https://github.com/inspec/inspec-gcp/pull/33) ([skpaterson](https://github.com/skpaterson)) ## [v0.4.0](https://github.com/inspec/inspec-gcp/tree/v0.4.0) (2018-06-25) [Full Changelog](https://github.com/inspec/inspec-gcp/compare/v0.3.0...v0.4.0) **Merged pull requests:** - Add more resources [\#32](https://github.com/inspec/inspec-gcp/pull/32) ([skpaterson](https://github.com/skpaterson)) - Fw small fix [\#31](https://github.com/inspec/inspec-gcp/pull/31) ([skpaterson](https://github.com/skpaterson)) - Improved firewall resource [\#30](https://github.com/inspec/inspec-gcp/pull/30) ([skpaterson](https://github.com/skpaterson)) - README improvements and update resource docs to make more accessible. [\#29](https://github.com/inspec/inspec-gcp/pull/29) ([skpaterson](https://github.com/skpaterson)) ## [v0.3.0](https://github.com/inspec/inspec-gcp/tree/v0.3.0) (2018-06-14) **Closed issues:** - update google\_project inline documentation [\#12](https://github.com/inspec/inspec-gcp/issues/12) - add missing documentation [\#11](https://github.com/inspec/inspec-gcp/issues/11) - google\_compute\_instance does not return the right value for machine\_type [\#10](https://github.com/inspec/inspec-gcp/issues/10) **Merged pull requests:** - Bump version and corrected minimum inspec version in root config file. [\#28](https://github.com/inspec/inspec-gcp/pull/28) ([skpaterson](https://github.com/skpaterson)) - Fixes according to issues: \#19, \#20, \#21 and \#22. [\#24](https://github.com/inspec/inspec-gcp/pull/24) ([skpaterson](https://github.com/skpaterson)) - Add plural resources [\#18](https://github.com/inspec/inspec-gcp/pull/18) ([skpaterson](https://github.com/skpaterson)) - Added missing documentation following InSpec standards, resolves \#11. [\#16](https://github.com/inspec/inspec-gcp/pull/16) ([skpaterson](https://github.com/skpaterson)) - Add FAQ for inspec exec errors when gcp transport is not specified. … [\#15](https://github.com/inspec/inspec-gcp/pull/15) ([skpaterson](https://github.com/skpaterson)) - Update google\_project inline documentation and make other resource do… [\#14](https://github.com/inspec/inspec-gcp/pull/14) ([skpaterson](https://github.com/skpaterson)) - Adding machine\_size helper function to tidy up API response for machi… [\#13](https://github.com/inspec/inspec-gcp/pull/13) ([skpaterson](https://github.com/skpaterson)) - add kudos for @martezr [\#9](https://github.com/inspec/inspec-gcp/pull/9) ([chris-rock](https://github.com/chris-rock)) - Added minimum supported inspec version to inspec.yml [\#8](https://github.com/inspec/inspec-gcp/pull/8) ([skpaterson](https://github.com/skpaterson)) - Updating Gemfile to use latest inspec release. Fix for only\_if test … [\#7](https://github.com/inspec/inspec-gcp/pull/7) ([skpaterson](https://github.com/skpaterson)) - update readme with api and quota settings [\#6](https://github.com/inspec/inspec-gcp/pull/6) ([chris-rock](https://github.com/chris-rock)) - add travis checks [\#5](https://github.com/inspec/inspec-gcp/pull/5) ([chris-rock](https://github.com/chris-rock)) - pass when terraform destory may fail [\#4](https://github.com/inspec/inspec-gcp/pull/4) ([chris-rock](https://github.com/chris-rock)) - Added configuration flag to separate resources requiring elevated pri… [\#3](https://github.com/inspec/inspec-gcp/pull/3) ([skpaterson](https://github.com/skpaterson)) - Inspec train gcp [\#2](https://github.com/inspec/inspec-gcp/pull/2) ([skpaterson](https://github.com/skpaterson)) - update readme [\#1](https://github.com/inspec/inspec-gcp/pull/1) ([chris-rock](https://github.com/chris-rock)) \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Chef Code of Conduct Participants in this project must adhere to the [Chef Code of Conduct](https://chef.github.io/chef-oss-practices/policies/code-of-conduct/). ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to the InSpec GCP Resource Pack We are glad you want to contribute to InSpec GCP! This document will help answer common questions you may have during your first contribution. All participants are expected to follow the [InSpec Code of Conduct](https://github.com/inspec/inspec/blob/master/CODE_OF_CONDUCT.md). ## Submitting Issues We utilize **Github Issues** for issue tracking and contributions. You can contribute in two ways: 1. Reporting an issue or making a feature request [here](https://github.com/chef/inspec-gcp/issues/new). 2. Adding features or fixing bugs yourself and contributing your code to InSpec. We ask you not to submit security concerns via Github. For details on submitting potential security issues please see ## Contribution Process We have a 3 step process for contributions: 1. Commit changes to a git branch, making sure to sign-off those changes for the [Developer Certificate of Origin](#developer-certification-of-origin-dco). 2. Create a Github Pull Request for your change, following the instructions in the pull request template. 3. Perform a [Code Review](#code-review-process) with the project maintainers on the pull request. ### Pull Request Requirements Chef Projects are built to last. We strive to ensure high quality throughout the experience. In order to ensure this, we require that all pull requests to Chef projects meet these specifications: 1. **Tests:** To ensure high quality code and protect against future regressions, we require InSpec GCP to have integration test coverage. See [test/integration/verify/controls](https://github.com/inspec/inspec-gcp/tree/master/test/integration/verify/controls). 2. **Green CI Tests:** We use [Travis CI](https://travis-ci.org/) to test all pull requests. We require these test runs to succeed on every pull request before being merged. 3. **Up-to-date Documentation:** Every code change should be reflected in an update for our [documentation](https://github.com/inspec/inspec-gcp/tree/master/docs). We expect PRs to update the documentation with the code change. In addition to this it would be nice to include the description of the problem you are solving with your change. You can use [Issue Template](https://github.com/inspec/inspec-gcp/tree/master/ISSUE_TEMPLATE.md) in the description section of the pull request. ### Code Review Process Code review takes place in Github pull requests. See [this article](https://help.github.com/articles/about-pull-requests/) if you're not familiar with Github Pull Requests. Once you open a pull request, project maintainers will review your code and respond to your pull request with any feedback they might have. The process at this point is as follows: 1. One thumbs-up (:+1:) are required from [inspec/inspec-cloud-devs](https://github.com/orgs/inspec/teams/inspec-cloud-devs) 2. When ready, your pull request will be merged into `master`, we may require you to rebase your PR to the latest `master`. 3. Once the PR is merged, you will be included in `CHANGELOG.md` in a subsequent release. If you would like to learn about when your code will be available in a release of Chef, read more about [Chef Release Cycles](#release-cycles). ### Developer Certification of Origin (DCO) Licensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired. Chef uses [the Apache 2.0 license](https://github.com/chef/chef/blob/master/LICENSE) to strike a balance between open contribution and allowing you to use the software however you would like to. The license tells you what rights you have that are provided by the copyright holder. It is important that the contributor fully understands what rights they are licensing and agrees to them. Sometimes the copyright holder isn't the contributor, such as when the contributor is doing work on behalf of a company. To make a good faith effort to ensure these criteria are met, Chef requires the Developer Certificate of Origin (DCO) process to be followed. The DCO is an attestation attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a Signed-off-by statement and thereby agrees to the DCO, which you can find below or at . ``` Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ``` For more information on the change see the Chef Blog post [Introducing Developer Certificate of Origin](https://blog.chef.io/2016/09/19/introducing-developer-certificate-of-origin/) #### DCO Sign-Off Methods The DCO requires a sign-off message in the following format appear on each commit in the pull request: ``` Signed-off-by: Julia Child ``` The DCO text can either be manually added to your commit body, or you can add either **-s** or **--signoff** to your usual git commit commands. If you forget to add the sign-off you can also amend a previous commit with the sign-off by running **git commit --amend -s**. If you've pushed your changes to Github already you'll need to force push your branch after this with **git push -f**. ### Obvious Fix Policy Small contributions, such as fixing spelling errors, where the content is small enough to not be considered intellectual property, can be submitted without signing the contribution for the DCO. As a rule of thumb, changes are obvious fixes if they do not introduce any new functionality or creative thinking. Assuming the change does not affect functionality, some common obvious fix examples include the following: - Spelling / grammar fixes - Typo correction, white space and formatting changes - Comment clean up - Bug fixes that change default return values or error codes stored in constants - Adding logging messages or debugging output - Changes to 'metadata' files like Gemfile, .gitignore, build scripts, etc. - Moving source files from one directory or package to another **Whenever you invoke the "obvious fix" rule, please say so in your commit message:** ``` ------------------------------------------------------------------------ commit 370adb3f82d55d912b0cf9c1d1e99b132a8ed3b5 Author: Julia Child Date: Wed Sep 18 11:44:40 2015 -0700 Fix typo in the README. Obvious fix. ------------------------------------------------------------------------ ``` ## InSpec Community InSpec is made possible by a strong community of developers, system administrators, auditor and security experts. If you have any questions or if you would like to get involved in the InSpec community you can check out: - [InSpec Mailing List](https://discourse.chef.io/c/inspec) - [Chef Community Slack](https://community-slack.chef.io/) Also here are some additional pointers to some awesome Chef content: - [InSpec Docs](https://www.inspec.io/docs/) - [Learn Chef](https://learn.chef.io/) - [Chef Website](https://www.chef.io/) ================================================ FILE: Dockerfile ================================================ FROM ruby:2.5 MAINTAINER Chef Software, Inc. ARG TF_VERSION=0.11.8 COPY Gemfile . RUN bundle install RUN gem list && apt-get update RUN apt-get install unzip ADD https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip . RUN unzip terraform_${TF_VERSION}_linux_amd64.zip && mv terraform /usr/local/bin/ && mkdir /inspec RUN rm terraform_${TF_VERSION}_linux_amd64.zip RUN apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* WORKDIR /inspec ================================================ FILE: Gemfile ================================================ source 'https://rubygems.org' gem 'bundle' gem 'faraday', '>= 0.16.2' gem 'google-api-client' gem 'google-cloud' gem 'googleauth' # we are pinning to inspec-core-bin below 6.0 to avoid bringing licensing change in the CI gem 'inspec-core-bin', '>= 5.22.36', '< 6.0' gem 'rubocop', '>= 0.77.0' gem 'parser', '< 3.3.1.0' group :development do gem 'github_changelog_generator' gem 'pry-coolline' gem 'rake' gem 'vcr' gem 'webmock' end ================================================ FILE: ISSUE_TEMPLATE.md ================================================ ### 🎛 Description **Choose one:** is this a 🐛 bug report or 🙋 feature request? Briefly describe the issue and the expected behavior. ### 🌍 InSpec and Platform Version Tell us which version of InSpec (`inspec version` or SHA of a commit). ### 🤔 Replication Case Tell us what steps to take to replicate your problem. See [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) for information on how to create a good replication case. ### 💁 Possible Solutions If you have already ideas how to solve the issue, add them here. ### 💻 Stacktrace Please include the stacktrace output or link to a gist of it, if there is one. ================================================ FILE: LICENSE ================================================ Copyright (c) 2017 Chef Software Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: README.md ================================================ # InSpec GCP (Google Cloud Platform) Resource Pack * **Project State-: Maintained** For more information on project states and SLAs, see [this documentation](https://github.com/chef/chef-oss-practices/blob/master/repo-management/repo-states.md). This InSpec resource pack uses the native Google Cloud Platform (GCP) support in InSpec and provides the required resources to write tests for GCP. This implementation was inspired on the ideas by [Martez Reed](https://github.com/martezr/inspec-gcp). ## Prerequisites ### Install and configure the Google cloud SDK* Download the [SDK](https://cloud.google.com/sdk/docs/) and run the installation: ``` ./google-cloud-sdk/install.sh ``` ### Create credentials file via: ```bash gcloud auth application-default login ``` If successful, this should be similar to: ```bash $ cat ~/.config/gcloud/application_default_credentials.json { "client_id": "764086051850-6qr4p6gpi6hn50asdr.apps.googleusercontent.com", "client_secret": "d-fasdfasdfasdfaweroi23jknrmfs;f8sh", "refresh_token": "1/asdfjlklwna;ldkna'dfmk-lCkju3-yQmjr20xVZonrfkE48L", "type": "authorized_user" } ``` While InSpec can use user accounts for authentication, [Google Cloud documentation](https://cloud.google.com/docs/authentication/) recommends using service accounts. ### Create Service Accounts 1. Go to `Console` in the Google Cloud. 2. Click on `Service Accounts`. 3. Click on `Create Service Accounts` and give the required details. 4. Click on `Done`. 5. Now Click on `Keys` Tab. 6. Click on `Add Key`. 7. Click on `Create New Key`. 8. Select the Key type as `JSON`. 9. Click on `Create`. 10. The Service Account Key will be downloaded. For example: `myproject-1-feb7993e8660.jsonmyproject-1-feb7993e8660.json` 11. Move the key to the `~/.config/gcloud` folder. If the file gets downloaded in the `Downloads` folder, use the below command. ```bash mv ~/Downloads/myproject-1-feb7993e8660.json ~/.config/gcloud/ ``` 12. The json credential file for a service account looks like this: ```bash $ cat ~/.config/gcloud/myproject-1-feb7993e8660.json { "type": "service_account", "project_id": "myproject-1", "private_key_id": "eb45b2fc0c33ea9b6fa212aaa08b1ed814bf8660", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADAN3662...fke9n6LAf268E/4EWhIzg==\n-----END PRIVATE KEY-----\n", "client_email": "auto-testing@myproject-1.iam.gserviceaccount.com", "client_id": "112144174133171863632", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/auto-testing%40myproject-1.iam.gserviceaccount.com" } ``` 13. Now Setup the environmental variable for the 'GOOGLE_APPLICATION_CREDENTIALS'. And InSpec can be instructed to use it by setting this ENV variable prior to running `inspec exec`: ```bash $ export GOOGLE_APPLICATION_CREDENTIALS='~/.config/gcloud/myproject-1-feb7993e8660.json' ``` #### NOTE: If still error comes, please check your IAM roles and permissions. ### Enable the appropriate APIs that you want to use: - [Enable Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) - [Enable Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com) ## Use the resources Since this is an InSpec resource pack, it only defines InSpec resources. It includes example tests only. To easily use the GCP resources in your tests do the following: ### Create a new profile for GCP ```bash $ inspec init profile --platform gcp my-gcp-profile Create new profile at /Users/spaterson/my-gcp-profile * Create directory libraries * Create file README.md * Create directory controls * Create file controls/example.rb * Create file inspec.yml * Create file attributes.yml * Create file libraries/.gitkeep ``` ### Update `inputs.yml` to point to your project ```yml gcp_project_id: 'my-gcp-project' ``` The generated `inspec.yml` file automatically points to the InSpec GCP resource pack: ```yaml name: my-gcp-profile title: My GCP InSpec Profile version: 0.1.0 inspec_version: '>= 4' inputs: - name: gcp_project_id required: true description: 'The GCP project identifier.' depends: - name: inspec-gcp url: https://github.com/inspec/inspec-gcp/archive/x.tar.gz supports: - platform: gcp ``` (For available inspec-gcp versions, see this list of [inspec-gcp versions](https://github.com/inspec/inspec-gcp/releases).) ## Run the tests ```bash $ cd my-gcp-profile/ $ inspec exec . -t gcp:// --input-file inputs.yml Profile: GCP InSpec Profile (my-profile) Version: 0.1.0 Target: gcp://local-service-account@my-gcp-project.iam.gserviceaccount.com Target ID: 8123456-12a3-1234-123a-a12s5c5abcx1 ✔ gcp-single-region-1.0: Ensure single region has the correct properties. ✔ Region europe-west2 zone_names should include "europe-west2-a" ✔ gcp-regions-loop-1.0: Ensure regions have the correct properties in bulk. ✔ Region asia-east1 is expected to be up ✔ Region asia-east2 is expected to be up ✔ Region asia-northeast1 is expected to be up ✔ Region asia-northeast2 is expected to be up ✔ Region asia-northeast3 is expected to be up ✔ Region asia-south1 is expected to be up ✔ Region asia-south2 is expected to be up ✔ Region asia-southeast1 is expected to be up ✔ Region asia-southeast2 is expected to be up ✔ Region australia-southeast1 is expected to be up ✔ Region australia-southeast2 is expected to be up ✔ Region europe-central2 is expected to be up ✔ Region europe-north1 is expected to be up ✔ Region europe-southwest1 is expected to be up ✔ Region europe-west1 is expected to be up ✔ Region europe-west2 is expected to be up ✔ Region europe-west3 is expected to be up ✔ Region europe-west4 is expected to be up ✔ Region europe-west6 is expected to be up ✔ Region europe-west8 is expected to be up ✔ Region europe-west9 is expected to be up ✔ Region me-west1 is expected to be up ✔ Region northamerica-northeast1 is expected to be up ✔ Region northamerica-northeast2 is expected to be up ✔ Region southamerica-east1 is expected to be up ✔ Region southamerica-west1 is expected to be up ✔ Region us-central1 is expected to be up ✔ Region us-east1 is expected to be up ✔ Region us-east4 is expected to be up ✔ Region us-east5 is expected to be up ✔ Region us-south1 is expected to be up ✔ Region us-west1 is expected to be up ✔ Region us-west2 is expected to be up ✔ Region us-west3 is expected to be up ✔ Region us-west4 is expected to be up Profile: Google Cloud Platform Resource Pack (inspec-gcp) Version: 1.10.37 Target: gcp://local-service-account@my-gcp-project.iam.gserviceaccount.com Target ID: 8123456-12a3-1234-123a-a12s5c5abcx1 No tests executed. Profile Summary: 2 successful controls, 0 control failures, 0 controls skipped Test Summary: 36 successful, 0 failures, 0 skipped ``` ## Resource documentation The following resources are available in the InSpec GCP Profile | InSpec GCP Supported Resources | [https://www.inspec.io/docs/reference/resources/#gcp-resources](https://www.inspec.io/docs/reference/resources/#gcp-resources) | |:---------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------| | Singular Resource | Plural Resource | | [google_access_context_manager_access_level](docs/resources/google_access_context_manager_access_level.md) | [google_access_context_manager_access_levels](docs/resources/google_access_context_manager_access_levels.md) | | [google_access_context_manager_access_policy](docs/resources/google_access_context_manager_access_policy.md) | [google_access_context_manager_access_policies](docs/resources/google_access_context_manager_access_policies.md) | | [google_access_context_manager_service_perimeter](docs/resources/google_access_context_manager_service_perimeter.md) | [google_access_context_manager_service_perimeters](docs/resources/google_access_context_manager_service_perimeters.md) | | [google_apigee_endpoint_attachment](docs/resources/google_apigee_endpoint_attachment.md) | [google_apigee_endpoint_attachments](docs/resources/google_apigee_endpoint_attachments.md) | | [google_apigee_organization_envgroup](docs/resources/google_apigee_organization_envgroup.md) | [google_apigee_organization_envgroups](docs/resources/google_apigee_organization_envgroups.md) | | [google_apigee_organization_instance_attachment](docs/resources/google_apigee_organization_instance_attachment.md) | [google_apigee_organization_instance_attachments](docs/resources/google_apigee_organization_instance_attachments.md) | | [google_apigee_organization_envgroup_attachment](docs/resources/google_apigee_organization_envgroup_attachment.md) | [google_apigee_organization_envgroup_attachments](docs/resources/google_apigee_organization_envgroup_attachments.md) | | [google_appengine_standard_app_version](docs/resources/google_appengine_standard_app_version.md) | [google_appengine_standard_app_versions](docs/resources/google_appengine_standard_app_versions.md) | | [google_bigquery_dataset](docs/resources/google_bigquery_dataset.md) | [google_bigquery_datasets](docs/resources/google_bigquery_datasets.md) | | [google_bigquery_table](docs/resources/google_bigquery_table.md) | [google_bigquery_tables](docs/resources/google_bigquery_tables.md) | | [google_bigtableadmin_cluster](docs/resources/google_bigtableadmin_cluster.md) | [google_bigtableadmin_clusters](docs/resources/google_bigtableadmin_clusters.md) | | [google_bigtableadmin_instance_app_profile](docs/resources/google_bigtableadmin_instance_app_profile.md) | [google_bigtableadmin_instance_app_profiles](docs/resources/google_bigtableadmin_instance_app_profiles.md) | | [google_billing_project_billing_info](docs/resources/google_billing_project_billing_info.md) | No Plural Resource | | [google_cloud_scheduler_job](docs/resources/google_cloud_scheduler_job.md) | [google_cloud_scheduler_jobs](docs/resources/google_cloud_scheduler_jobs.md) | | [google_cloudbuild_trigger](docs/resources/google_cloudbuild_trigger.md) | [google_cloudbuild_triggers](docs/resources/google_cloudbuild_triggers.md) | | [google_cloudfunctions_cloud_function](docs/resources/google_cloudfunctions_cloud_function.md) | [google_cloudfunctions_cloud_functions](docs/resources/google_cloudfunctions_cloud_functions.md) | | [google_composer_project_location_environment](docs/resources/google_composer_project_location_environment.md) | [google_composer_project_location_environments](docs/resources/google_composer_project_location_environments.md) | | [google_compute_address](docs/resources/google_compute_address.md) | [google_compute_addresses](docs/resources/google_compute_addresses.md) | | [google_compute_autoscaler](docs/resources/google_compute_autoscaler.md) | [google_compute_autoscalers](docs/resources/google_compute_autoscalergoogle_compute_autoscaler.md) | | [google_compute_backend_bucket](docs/resources/google_compute_backend_bucket.md) | No Plural Resource | | [google_compute_backend_service](docs/resources/google_compute_backend_service.md) | [google_compute_backend_services](docs/resources/google_compute_backend_services.md) | | [google_compute_disk](docs/resources/google_compute_disk.md) | [google_compute_disks](docs/resources/google_compute_disks.md) | | [google_compute_disk_type](docs/resources/google_compute_disk_type.md) | [google_compute_disk_types](docs/resources/google_compute_disk_types.md) | | [google_data_loss_prevention_inspect_template](docs/resources/google_data_loss_prevention_inspect_template.md) | [google_data_loss_prevention_inspect_templates](docs/resources/google_data_loss_prevention_inspect_templates.md) | | [google_compute_external_vpn_gateway](docs/resources/google_compute_external_vpn_gateway.md) | [google_compute_external_vpn_gateways](docs/resources/google_compute_external_vpn_gateways.md) | | [google_compute_firewall](docs/resources/google_compute_firewall.md) | [google_compute_firewalls](docs/resources/google_compute_firewalls.md) | | [google_compute_forwarding_rule](docs/resources/google_compute_forwarding_rule.md) | [google_compute_forwarding_rules](docs/resources/google_compute_forwarding_rules.md) | | [google_compute_global_address](docs/resources/google_compute_global_address.md) | [google_compute_global_addresses](docs/resources/google_compute_global_addresses.md) | | [google_compute_global_forwarding_rule](docs/resources/google_compute_global_forwarding_rule.md) | [google_compute_global_forwarding_rules](docs/resources/google_compute_global_forwarding_rules.md) | | [google_compute_global_network_endpoint_group](docs/resources/google_compute_global_network_endpoint_group.md) | [google_compute_global_network_endpoint_groups](docs/resources/google_compute_global_network_endpoint_groups.md) | [google_compute_global_operation](docs/resources/google_compute_global_operation.md) | [google_compute_global_operations](docs/resources/google_compute_global_operations.md) | | [google_compute_health_check](docs/resources/google_compute_health_check.md) | [google_compute_health_checks](docs/resources/google_compute_health_checks.md) | | [google_compute_health_check_service](docs/resources/google_compute_health_check_service.md) | [google_compute_health_check_services](docs/resources/google_compute_health_check_services.md) | | [google_compute_http_health_check](docs/resources/google_compute_http_health_check.md) | [google_compute_http_health_checks](docs/resources/google_compute_http_health_checks.md) | | [google_compute_https_health_check](docs/resources/google_compute_https_health_check.md) | [google_compute_https_health_checks](docs/resources/google_compute_https_health_checks.md) | | [google_compute_image_family_view](docs/resources/google_compute_image_family_view.md) | No Plural Resource | | [google_compute_image](docs/resources/google_compute_image.md) | No Plural Resource | | [google_compute_instance](docs/resources/google_compute_instance.md) | [google_compute_instances](docs/resources/google_compute_instances.md) | | [google_compute_instance](docs/resources/google_compute_interconnect_attachment.md) | [google_compute_instances](docs/resources/google_compute_interconnect_attachments.md) | | [google_compute_instance_group](docs/resources/google_compute_instance_group.md) | [google_compute_instance_groups](docs/resources/google_compute_instance_groups.md) | | [google_compute_instance_group_manager](docs/resources/google_compute_instance_group_manager.md) | [google_compute_instance_group_managers](docs/resources/google_compute_instance_group_managers.md) | | [google_compute_instance_template](docs/resources/google_compute_instance_template.md) | [google_compute_instance_templates](docs/resources/google_compute_instance_templates.md) | | [google_compute_interconnect](docs/resources/google_compute_interconnect.md) | [google_compute_interconnects](docs/resources/google_compute_interconnects.md) | | [google_compute_interconnect_location](docs/resources/google_compute_interconnect_location.md) | [google_compute_interconnect_locations](docs/resources/google_compute_interconnect_locations.md) | | [google_compute_license_code](docs/resources/google_compute_license_code.md) | No Plural Resource | | [google_compute_license](docs/resources/google_compute_license.md) | [google_compute_licenses](docs/resources/google_compute_licenses.md) | | [google_compute_machine_image](docs/resources/google_compute_machine_image.md) | [google_compute_machine_images](docs/resources/google_compute_machine_images.md) | | [google_compute_machine_type](docs/resources/google_compute_machine_type.md) | [google_compute_machine_types](docs/resources/google_compute_machine_types.md) | | [google_compute_network_attachment](docs/resources/google_compute_network_attachment.md) | [google_compute_network_attachments](docs/resources/google_compute_network_attachments.md) | | [google_compute_network_edge_security_service](docs/resources/google_compute_network_edge_security_service.md) | No Plural Resource | | [google_compute_network](docs/resources/google_compute_network.md) | [google_compute_networks](docs/resources/google_compute_networks.md) | | [google_compute_network_endpoint_group](docs/resources/google_compute_network_endpoint_group.md) | [google_compute_network_endpoint_groups](docs/resources/google_compute_network_endpoint_groups.md) | | [google_compute_network_firewall_policy](docs/resources/google_compute_network_firewall_policy.md) | [google_compute_network_firewall_policies](docs/resources/google_compute_network_firewall_policies.md) | | [google_compute_node_group](docs/resources/google_compute_node_group.md) | [google_compute_node_groups](docs/resources/google_compute_node_groups.md) | | [google_compute_node_template](docs/resources/google_compute_node_template.md) | [google_compute_node_templates](docs/resources/google_compute_node_templates.md) | | [google_compute_node_type](docs/resources/google_compute_node_type.md) | [google_compute_node_types](docs/resources/google_compute_node_types.md) | | [google_compute_packet_mirroring](docs/resources/google_compute_packet_mirroring.md) | [google_compute_packet_mirrorings](docs/resources/google_compute_packet_mirrorings.md) | | [google_compute_project_info](docs/resources/google_compute_project_info.md) | No Plural Resource | | [google_compute_public_delegated_prefix](docs/resources/google_compute_public_delegated_prefix.md) | [google_compute_public_delegated_prefixes](docs/resources/google_compute_public_delegated_prefixes.md) | | [google_compute_region](docs/resources/google_compute_region.md) | [google_compute_regions](docs/resources/google_compute_regions.md) | | [google_compute_region_backend_service](docs/resources/google_compute_region_backend_service.md) | [google_compute_region_backend_services](docs/resources/google_compute_region_backend_services.md) | | [google_compute_region_commitment](docs/resources/google_compute_region_commitment.md) | [google_compute_region_commitments](docs/resources/google_compute_region_commitments.md) | | [google_compute_region_disk_type](docs/resources/google_compute_region_disk_type.md) | [google_compute_region_disk_types](docs/resources/google_compute_region_disk_types.md) | | [google_compute_region_health_check](docs/resources/google_compute_region_health_check.md) | [google_compute_region_health_checks](docs/resources/google_compute_region_health_checks.md) | | [google_compute_region_instance_group](docs/resources/google_compute_region_instance_group.md) | [google_compute_region_instance_groups](docs/resources/google_compute_region_instance_groups.md) | | [google_compute_region_instance_group_manager](docs/resources/google_compute_region_instance_group_manager.md) | [google_compute_region_instance_group_managers](docs/resources/google_compute_region_instance_group_managers.md) | | [google_compute_region_operation](docs/resources/google_compute_region_operation.md) | [google_compute_region_operations](docs/resources/google_compute_region_operations.md) | | [google_compute_region_operation](docs/resources/google_compute_region_url_map.md) | [google_compute_region_operations](docs/resources/google_compute_region_url_maps.md) | | [google_compute_regional_disk](docs/resources/google_compute_regional_disk.md) | [google_compute_regional_disks](docs/resources/google_compute_regional_disks.md) | | [google_compute_reservation](docs/resources/google_compute_reservation.md) | [google_compute_reservations](docs/resources/google_compute_reservations.md) | | [google_compute_resource_policy](docs/resources/google_compute_resource_policy.md) | [google_compute_resource_policies](docs/resources/google_compute_resource_policies.md) | | [google_compute_route](docs/resources/google_compute_route.md) | [google_compute_routes](docs/resources/google_compute_routes.md) | | [google_compute_router](docs/resources/google_compute_router.md) | [google_compute_routers](docs/resources/google_compute_routers.md) | | [google_compute_router_nat](docs/resources/google_compute_router_nat.md) | [google_compute_router_nats](docs/resources/google_compute_router_nats.md) | | [google_compute_security_policy](docs/resources/google_compute_security_policy.md) | [google_compute_security_policies](docs/resources/google_compute_security_policies.md) | | [google_compute_snapshot](docs/resources/google_compute_snapshot.md) | [google_compute_snapshots](docs/resources/google_compute_snapshots.md) | | [google_compute_ssl_certificate](docs/resources/google_compute_ssl_certificate.md) | [google_compute_ssl_certificates](docs/resources/google_compute_ssl_certificates.md) | | [google_compute_ssl_policy](docs/resources/google_compute_ssl_policy.md) | [google_compute_ssl_policies](docs/resources/google_compute_ssl_policies.md) | | [google_compute_service_attachment](docs/resources/google_compute_service_attachment.md) | [google_compute_service_attachments](docs/resources/google_compute_service_attachments.md) | | [google_compute_subnetwork](docs/resources/google_compute_subnetwork.md) | [google_compute_subnetworks](docs/resources/google_compute_subnetworks.md) | | [google_compute_target_grpc_proxy](docs/resources/google_compute_target_grpc_proxy.md) | [google_compute_target_grpc_proxies](docs/resources/google_compute_target_grpc_proxies.md) | | [google_compute_subnetwork_iam_binding](docs/resources/google_compute_subnetwork_iam_binding.md) | No Plural Resource | | [google_compute_subnetwork_iam_policy](docs/resources/google_compute_subnetwork_iam_policy.md) | No Plural Resource | | [google_compute_target_http_proxy](docs/resources/google_compute_target_http_proxy.md) | [google_compute_target_http_proxies](docs/resources/google_compute_target_http_proxies.md) | | [google_compute_target_https_proxy](docs/resources/google_compute_target_https_proxy.md) | [google_compute_target_https_proxies](docs/resources/google_compute_target_https_proxies.md) | | [google_compute_target_https_proxy](docs/resources/google_compute_target_instance.md) | [google_compute_target_https_proxies](docs/resources/google_compute_target_instances.md) | | [google_compute_target_pool](docs/resources/google_compute_target_pool.md) | [google_compute_target_pools](docs/resources/google_compute_target_pools.md) | | [google_compute_target_ssl_proxy](docs/resources/google_compute_target_ssl_proxy.md) | [google_compute_target_ssl_proxies](docs/resources/google_compute_target_ssl_proxies.md) | | [google_compute_target_tcp_proxy](docs/resources/google_compute_target_tcp_proxy.md) | [google_compute_target_tcp_proxies](docs/resources/google_compute_target_tcp_proxies.md) | | [google_compute_url_map](docs/resources/google_compute_url_map.md) | [google_compute_url_maps](docs/resources/google_compute_url_maps.md) | | [google_compute_vpn_tunnel](docs/resources/google_compute_vpn_tunnel.md) | [google_compute_vpn_tunnels](docs/resources/google_compute_vpn_tunnels.md) | | No Singular Resource | [google_compute_xpn_resources](docs/resources/google_compute_xpn_resources.md) | | [google_compute_zone](docs/resources/google_compute_zone.md) | [google_compute_zones](docs/resources/google_compute_zones.md) | | [google_compute_zone_operation](docs/resources/google_compute_zone_operation.md) | [google_compute_zone_operations](docs/resources/google_compute_zone_operations.md) | | [google_compute_region_target_http_proxy](docs/resources/google_compute_region_target_http_proxy.md) | [google_compute_region_target_http_proxies](docs/resources/google_compute_region_target_http_proxies.md) | | [google_container_cluster](docs/resources/google_container_cluster.md) | [google_container_clusters](docs/resources/google_container_clusters.md) | | [google_container_node_pool](docs/resources/google_container_node_pool.md) | [google_container_node_pools](docs/resources/google_container_node_pools.md) | | [google_container_server_config](docs/resources/google_container_server_config.md) | No Plural Resource | | [google_data_fusion_instance](docs/resources/google_data_fusion_instance.md) | [google_data_fusion_instances](docs/resources/google_data_fusion_instances.md) | | [google_dataflow_project_location_job](docs/resources/google_dataflow_project_location_job.md) | [google_dataflow_project_location_jobs](docs/resources/google_dataflow_project_location_jobs.md) | | [google_dataproc_autoscaling_policy](docs/resources/google_dataproc_autoscaling_policy.md) | [google_dataproc_autoscaling_policies](docs/resources/google_dataproc_autoscaling_policies.md) | | [google_dataproc_batch](docs/resources/google_dataproc_batch.md) | [google_dataproc_batches](docs/resources/google_dataproc_batches.md) | | [google_dataproc_cluster](docs/resources/google_dataproc_cluster.md) | [google_dataproc_clusters](docs/resources/google_dataproc_clusters.md) | | [google_dataproc_job](docs/resources/google_dataproc_job.md) | [google_dataproc_jobs](docs/resources/google_dataproc_jobs.md) | | [google_dataproc_metastore_federation](docs/resources/google_dataproc_metastore_federation.md) | [google_dataproc_metastore_federations](docs/resources/google_dataproc_metastore_federations.md) | | [google_dataproc_metastore_service_backup](docs/resources/google_dataproc_metastore_service_backup.md) | [google_dataproc_metastore_service_backups](docs/resources/google_dataproc_metastore_service_backups.md) | | [google_dataproc_metastore_service](docs/resources/google_dataproc_metastore_service.md) | [google_dataproc_metastore_services](docs/resources/google_dataproc_metastore_services.md) | | [google_dataproc_session](docs/resources/google_dataproc_session.md) | [google_dataproc_sessions](docs/resources/google_dataproc_sessions.md) | | [google_dataproc_workflow_template](docs/resources/google_dataproc_workflow_template.md) | [google_dataproc_workflow_templates](docs/resources/google_dataproc_workflow_templates.md) | | [google_dns_managed_zone](docs/resources/google_dns_managed_zone.md) | [google_dns_managed_zones](docs/resources/google_dns_managed_zones.md) | | [google_dns_resource_record_set](docs/resources/google_dns_resource_record_set.md) | [google_dns_resource_record_sets](docs/resources/google_dns_resource_record_sets.md) | | [google_dlp_dt](docs/resources/google_dlp_dt.md) | [google_dlp_dts](docs/resources/google_dlp_dts.md) | [google_dlp_inspect_template](docs/resources/google_dlp_inspect_template.md) | [google_dlp_inspect_templates](docs/resources/google_dlp_inspect_templates.md) | | [google_dlp_job_trigger](docs/resources/google_dlp_job_trigger.md) | [google_dlp_job_triggers](docs/resources/google_dlp_job_triggers.md) | | [google_dlp_job](docs/resources/google_dlp_job.md) | [google_dlp_jobs](docs/resources/google_dlp_jobs.md) | | [google_dlp_stored_info_type](docs/resources/google_dlp_stored_info_types.md) | [google_dlp_stored_info_types](docs/resources/google_dlp_stored_info_types.md) | | [google_filestore_instance](docs/resources/google_filestore_instance.md) | [google_filestore_instances](docs/resources/google_filestore_instances.md) | | [google_iam_organization_custom_role](docs/resources/google_iam_organization_custom_role.md) | [google_iam_organization_custom_roles](docs/resources/google_iam_organization_custom_roles.md) | | [google_kms_crypto_key](docs/resources/google_kms_crypto_key.md) | [google_kms_crypto_keys](docs/resources/google_kms_crypto_keys.md) | | [google_kms_crypto_key_iam_binding](docs/resources/google_kms_crypto_key_iam_binding.md) | [google_kms_crypto_key_iam_bindings](docs/resources/google_kms_crypto_key_iam_bindings.md) | | [google_kms_crypto_key_iam_policy](docs/resources/google_kms_crypto_key_iam_policy.md) | No Plural Resource | | [google_kms_crypto_key_version](docs/resources/google_kms_crypto_key_version.md) | [google_kms_crypto_key_versions](docs/resources/google_kms_crypto_key_versions.md) | | [google_kms_ekm_connection](docs/resources/google_kms_ekm_connection.md) | [google_kms_ekm_connections](docs/resources/google_kms_ekm_connections.md) | | [google_kms_key_ring](docs/resources/google_kms_key_ring.md) | [google_kms_key_rings](docs/resources/google_kms_key_rings.md) | | [google_kms_key_ring_iam_binding](docs/resources/google_kms_key_ring_iam_binding.md) | [google_kms_key_ring_iam_bindings](docs/resources/google_kms_key_ring_iam_bindings.md) | | [google_kms_key_ring_iam_policy](docs/resources/google_kms_key_ring_iam_policy.md) | No Plural Resource | | [google_kms_key_ring_import_job](docs/resources/google_kms_key_ring_import_job.md) | [google_kms_key_ring_import_jobs](docs/resources/google_kms_key_ring_import_jobs.md) | | [google_kms_location](docs/resources/google_kms_location.md) | [google_kms_locations](docs/resources/google_kms_locations.md) | | [google_logging_folder_exclusion](docs/resources/google_logging_folder_exclusion.md) | [google_logging_folder_exclusions](docs/resources/google_logging_folder_exclusions.md) | | [google_logging_folder_log_sink](docs/resources/google_logging_folder_log_sink.md) | [google_logging_folder_log_sinks](docs/resources/google_logging_folder_log_sinks.md) | | [google_logging_organization_log_sink](docs/resources/google_logging_organization_log_sink.md) | [google_logging_organization_log_sinks](docs/resources/google_logging_organization_log_sinks.md) | | [google_logging_project_exclusion](docs/resources/google_logging_project_exclusion.md) | [google_logging_project_exclusions](docs/resources/google_logging_project_exclusions.md) | | [google_logging_project_sink](docs/resources/google_logging_project_sink.md) | [google_logging_project_sinks](docs/resources/google_logging_project_sinks.md) | | [google_memcache_instance](docs/resources/google_memcache_instance.md) | [google_memcache_instances](docs/resources/google_memcache_instances.md) | | [google_ml_engine_model](docs/resources/google_ml_engine_model.md) | [google_ml_engine_models](docs/resources/google_ml_engine_models.md) | | [google_monitoring_group](docs/resources/google_monitoring_group.md) | [google_monitoring_groups](docs/resources/google_monitoring_groups.md) | | [google_organization](docs/resources/google_organization.md) | [google_organizations](docs/resources/google_organizations.md) | | No Singular Resource | [google_orgpolicy_folder_constraints](docs/resources/google_orgpolicy_folder_constraints.md) | | No Singular Resource | [google_orgpolicy_organization_constraints](docs/resources/google_orgpolicy_project_constraints.md) | | No Singular Resource | [google_orgpolicy_project_constraints](docs/resources/google_orgpolicy_project_constraints.md) | | [google_orgpolicy_folder_policy](docs/resources/google_orgpolicy_folder_policy.md) | [google_orgpolicy_folder_policies](docs/resources/google_orgpolicy_folder_policies.md) | | [google_orgpolicy_organization_policy](docs/resources/google_orgpolicy_organization_policy.md) | [google_orgpolicy_organization_policies](docs/resources/google_orgpolicy_organization_policies.md) | | [google_orgpolicy_project_policy](docs/resources/google_orgpolicy_project_policy.md) | [google_orgpolicy_project_policies](docs/resources/google_orgpolicy_project_policies.md) | | [google_organization_iam_binding](docs/resources/google_organization_iam_binding.md) | No Plural Resource | | [google_organization_iam_policy](docs/resources/google_organization_iam_policy.md) | No Plural Resource | | [google_organization_policy](docs/resources/google_organization_policy.md) | No Plural Resource | | [google_project](docs/resources/google_project.md) | [google_projects](docs/resources/google_projects.md) | | [google_project_alert_policy](docs/resources/google_project_alert_policy.md) | [google_project_alert_policies](docs/resources/google_project_alert_policies.md) | | [google_project_alert_policy_condition](docs/resources/google_project_alert_policy_condition.md) | No Plural Resource | | [google_project_iam_binding](docs/resources/google_project_iam_binding.md) | [google_project_iam_bindings](docs/resources/google_project_iam_bindings.md) | | [google_project_iam_custom_role](docs/resources/google_project_iam_custom_role.md) | [google_project_iam_custom_roles](docs/resources/google_project_iam_custom_roles.md) | | [google_project_iam_policy](docs/resources/google_project_iam_policy.md) | No Plural Resource | | [google_project_logging_audit_config](docs/resources/google_project_logging_audit_config.md) | No Plural Resource | | [google_project_metric](docs/resources/google_project_metric.md) | [google_project_metrics](docs/resources/google_project_metrics.md) | | [google_project_service](docs/resources/google_project_service.md) | [google_project_services](docs/resources/google_project_services.md) | | [google_pubsub_subscription](docs/resources/google_pubsub_subscription.md) | [google_pubsub_subscriptions](docs/resources/google_pubsub_subscriptions.md) | | [google_pubsub_subscription_iam_binding](docs/resources/google_pubsub_subscription_iam_binding.md) | No Plural Resource | | [google_pubsub_subscription_iam_policy](docs/resources/google_pubsub_subscription_iam_policy.md) | No Plural Resource | | [google_pubsub_topic](docs/resources/google_pubsub_topic.md) | [google_pubsub_topics](docs/resources/google_pubsub_topics.md) | | [google_pubsub_topic_iam_binding](docs/resources/google_pubsub_topic_iam_binding.md) | No Plural Resource | | [google_pubsub_topic_iam_policy](docs/resources/google_pubsub_topic_iam_policy.md) | No Plural Resource | | [google_redis_instance](docs/resources/google_redis_instance.md) | [google_redis_instances](docs/resources/google_redis_instances.md) | | [google_compute_region_security_policy](docs/resources/google_compute_region_security_policy.md) | [google_compute_region_security_policies](docs/resources/google_compute_region_security_policies.md) | | [google_resourcemanager_folder](docs/resources/google_resourcemanager_folder.md) | [google_resourcemanager_folders](docs/resources/google_resourcemanager_folders.md) | | [google_resourcemanager_folder_iam_binding](docs/resources/google_resourcemanager_folder_iam_binding.md) | No Plural Resource | | [google_resourcemanager_folder_iam_policy](docs/resources/google_resourcemanager_folder_iam_policy.md) | No Plural Resource | | [google_run_job](docs/resources/google_run_job.md) | [google_run_jobs](docs/resources/google_run_jobs.md) | | [google_run_service](docs/resources/google_run_service.md) | [google_run_services](docs/resources/google_run_services.md) | | [google_runtime_config_config](docs/resources/google_runtime_config_config.md) | [google_runtime_config_configs](docs/resources/google_runtime_config_configs.md) | | [google_runtime_config_config_iam_binding](docs/resources/google_runtime_config_config_iam_binding.md) | No Plural Resource | | [google_runtime_config_config_iam_policy](docs/resources/google_runtime_config_config_iam_policy.md) | No Plural Resource | | [google_runtime_config_variable](docs/resources/google_runtime_config_variable.md) | [google_runtime_config_variables](docs/resources/google_runtime_config_variables.md) | | [google_secret_manager_secret](docs/resources/google_secret_manager_secret.md) | [google_secret_manager_secrets](docs/resources/google_secret_manager_secrets.md) | | [google_service_account](docs/resources/google_service_account.md) | [google_service_accounts](docs/resources/google_service_accounts.md) | | No Singular Resource | [google_service_networking_service_connections](docs/resources/google_service_networking_service_connections.md) | | [google_service_account_key](docs/resources/google_service_account_key.md) | [google_service_account_keys](docs/resources/google_service_account_keys.md) | | [google_sourcerepo_repository](docs/resources/google_sourcerepo_repository.md) | [google_sourcerepo_repositories](docs/resources/google_sourcerepo_repositories.md) | | [google_spanner_database](docs/resources/google_spanner_database.md) | [google_spanner_databases](docs/resources/google_spanner_databases.md) | | [google_spanner_instance](docs/resources/google_spanner_instance.md) | [google_spanner_instances](docs/resources/google_spanner_instances.md) | | [google_spanner_instance_iam_binding](docs/resources/google_spanner_instance_iam_binding.md) | No Plural Resource | | [google_spanner_instance_iam_policy](docs/resources/google_spanner_instance_iam_policy.md) | No Plural Resource | | [google_sql_connect](docs/resources/google_sql_connect.md) | No Plural Resource | | [google_sql_database](docs/resources/google_sql_database.md) | [google_sql_databases](docs/resources/google_sql_databases.md) | | [google_sql_database_instance](docs/resources/google_sql_database_instance.md) | [google_sql_database_instances](docs/resources/google_sql_database_instances.md) | | No Singular Resource | [google_sql_flags](docs/resources/google_sql_flags.md) | | [google_sql_operation](docs/resources/google_sql_operation.md) | [google_sql_operations](docs/resources/google_sql_operations.md) | | [google_sql_ssl_cert](docs/resources/google_sql_ssl_cert.md) | [google_sql_ssl_certs](docs/resources/google_sql_ssl_certs.md) | | [google_sql_user](docs/resources/google_sql_user.md) | [google_sql_users](docs/resources/google_sql_users.md) | | [google_storage_bucket](docs/resources/google_storage_bucket.md) | [google_storage_buckets](docs/resources/google_storage_buckets.md) | | [google_storage_bucket_acl](docs/resources/google_storage_bucket_acl.md) | No Plural Resource | | [google_storage_bucket_iam_binding](docs/resources/google_storage_bucket_iam_binding.md) | [google_storage_bucket_iam_bindings](docs/resources/google_storage_bucket_iam_bindings.md) | | [google_storage_bucket_iam_policy](docs/resources/google_storage_bucket_iam_policy.md) | No Plural Resource | | [google_storage_bucket_object](docs/resources/google_storage_bucket_object.md) | [google_storage_bucket_objects](docs/resources/google_storage_bucket_objects.md) | | [google_storage_default_object_acl](docs/resources/google_storage_default_object_acl.md) | No Plural Resource | | [google_storage_object_acl](docs/resources/google_storage_object_acl.md) | No Plural Resource | | [google_user](docs/resources/google_user.md) | [google_users](docs/resources/google_users.md) | | [google_vertex_ai_batch_prediction_job](docs/resources/google_vertex_ai_batch_prediction_job.md) | [google_vertex_ai_batch_prediction_jobs](docs/resources/google_vertex_ai_batch_prediction_jobs.md) | | [google_vertex_ai_custom_job](docs/resources/google_vertex_ai_custom_job.md) | [google_vertex_ai_custom_jobs](docs/resources/google_vertex_ai_custom_jobs.md) | | [google_vertex_ai_dataset](docs/resources/google_vertex_ai_dataset.md) | [google_vertex_ai_datasets](docs/resources/google_vertex_ai_datasets.md) | | [google_vertex_ai_datasets_annotation_spec](docs/resources/google_vertex_ai_datasets_annotation_spec.md) | No Plural Resource | | No Singular Resource | [google_vertex_ai_datasets_data_items](docs/resources/google_vertex_ai_datasets_data_items.md) | | No Singular Resource | [google_vertex_ai_datasets_saved_queries](docs/resources/google_vertex_ai_datasets_saved_queries.md) | | [google_vertex_ai_endpoint](docs/resources/google_vertex_ai_endpoint.md) | [google_vertex_ai_endpoints](docs/resources/google_vertex_ai_endpoints.md) | | [google_vertex_ai_featurestore](docs/resources/google_vertex_ai_featurestore.md) | [google_vertex_ai_featurestores](docs/resources/google_vertex_ai_featurestores.md) | | [google_vertex_ai_featurestores_entity_type](docs/resources/google_vertex_ai_featurestores_entity_type.md) | [google_vertex_ai_featurestores_entity_types](docs/resources/google_vertex_ai_featurestores_entity_types.md) | | [google_vertex_ai_featurestore_entity_type_feature](docs/resources/google_vertex_ai_featurestore_entity_type_feature.md) | [google_vertex_ai_featurestore_entity_type_features](docs/resources/google_vertex_ai_featurestore_entity_type_features.md) | | [google_vertex_ai_hyperparameter_tuning_job](docs/resources/google_vertex_ai_hyperparameter_tuning_job.md) | [google_vertex_ai_hyperparameter_tuning_jobs](docs/resources/google_vertex_ai_hyperparameter_tuning_jobs.md) | | [google_vertex_ai_index_endpoint](docs/resources/google_vertex_ai_index_endpoint.md) | [google_vertex_ai_index_endpoints](docs/resources/google_vertex_ai_index_endpoints.md) | | [google_vertex_ai_index](docs/resources/google_vertex_ai_index.md) | [google_vertex_ai_indices](docs/resources/google_vertex_ai_indices.md) | | [google_vertex_ai_metadata_store](docs/resources/google_vertex_ai_metadata_store.md) | [google_vertex_ai_metadata_stores](docs/resources/google_vertex_ai_metadata_stores.md) | | [google_vertex_ai_metadata_stores_artifact](docs/resources/google_vertex_ai_metadata_stores_artifact.md) | [google_vertex_ai_metadata_stores_artifacts](docs/resources/google_vertex_ai_metadata_stores_artifacts.md) | | [google_vertex_ai_metadata_stores_context](docs/resources/google_vertex_ai_metadata_stores_context.md) | [google_vertex_ai_metadata_stores_contexts](docs/resources/google_vertex_ai_metadata_stores_contexts.md) | | [google_vertex_ai_metadata_stores_execution](docs/resources/google_vertex_ai_metadata_stores_execution.md) | [google_vertex_ai_metadata_stores_executions](docs/resources/google_vertex_ai_metadata_stores_executions.md) | | [google_vertex_ai_metadata_stores_metadata_schema](docs/resources/google_vertex_ai_metadata_stores_metadata_schema.md) | [google_vertex_ai_metadata_stores_metadata_schemas](docs/resources/google_vertex_ai_metadata_stores_metadata_schemas.md) | | [google_vertex_ai_model_deployment_monitoring_job](docs/resources/google_vertex_ai_model_deployment_monitoring_job.md) | [google_vertex_ai_model_deployment_monitoring_jobs](docs/resources/google_vertex_ai_model_deployment_monitoring_jobs.md) | | [google_vertex_ai_model](docs/resources/google_vertex_ai_model.md) | [google_vertex_ai_models](docs/resources/google_vertex_ai_models.md) | | [google_vertex_ai_models_evaluation](docs/resources/google_vertex_ai_models_evaluation.md) | [google_vertex_ai_models_evaluations](docs/resources/google_vertex_ai_models_evaluations.md) | | [google_vertex_ai_models_evaluation_slice](docs/resources/google_vertex_ai_model_evaluation_slice.md) | [google_vertex_ai_models_evaluation_slices](docs/resources/google_vertex_ai_model_evaluation_slices.md) | | [google_vertex_ai_nas_job](docs/resources/google_vertex_ai_nas_job.md) | [google_vertex_ai_nas_jobs](docs/resources/google_vertex_ai_nas_jobs.md) | | [google_vertex_ai_nas_jobs_nas_trial_detail](docs/resources/google_vertex_ai_nas_jobs_nas_trial_detail.md) | [google_vertex_ai_nas_jobs_nas_trial_details](docs/resources/google_vertex_ai_nas_jobs_nas_trial_details.md) | | [google_vertex_ai_pipeline_job](docs/resources/google_vertex_ai_pipeline_job.md) | [google_vertex_ai_pipeline_jobs](docs/resources/google_vertex_ai_pipeline_jobs.md) | | [google_vertex_ai_schedule](docs/resources/google_vertex_ai_schedule.md) | [google_vertex_ai_schedules](docs/resources/google_vertex_ai_schedules.md) | | [google_vertex_ai_study](docs/resources/google_vertex_ai_study.md) | [google_vertex_ai_studies](docs/resources/google_vertex_ai_studies.md) | | [google_vertex_ai_studies_trial](docs/resources/google_vertex_ai_studies_trial.md) | [google_vertex_ai_studies_trials](docs/resources/google_vertex_ai_studies_trials.md) | | [google_vertex_ai_tensorboard](docs/resources/google_vertex_ai_tensorboard.md) | [google_vertex_ai_tensorboards](docs/resources/google_vertex_ai_tensorboards.md) | | [google_vertex_ai_tensorboards_experiment](docs/resources/google_vertex_ai_tensorboards_experiment.md) | [google_vertex_ai_tensorboards_experiments](docs/resources/google_vertex_ai_tensorboards_experiments.md) | | [google_vertex_ai_tensorboard_experiment_run](docs/resources/google_vertex_ai_tensorboard_experiment_run.md) | [google_vertex_ai_tensorboard_experiment_runs](docs/resources/google_vertex_ai_tensorboard_experiment_runs.md) | | [google_vertex_ai_tensorboard_experiment_run_time_series_resource](docs/resources/google_vertex_ai_tensorboard_experiment_run_time_series_resource.md) | [google_vertex_ai_tensorboard_experiment_run_time_series_resources](docs/resources/google_vertex_ai_tensorboard_experiment_run_time_series_resources.md) | | [google_vertex_ai_training_pipeline](docs/resources/google_vertex_ai_training_pipeline.md) | [google_vertex_ai_training_pipelines](docs/resources/google_vertex_ai_training_pipelines.md) | ## Examples ### Check SSH is Disabled for INGRESS across all GCP Projects We use several plural resources for this example that loops across all projects and firewall rules. Making use of a plural resource property, we filter firewall rules for direction 'INGRESS' : ``` title 'Loop over all GCP projects and look at firewalls in INGRESS direction' control 'gcp-projects-firewalls-loop-1.0' do impact 1.0 title 'Ensure INGRESS firewalls in all projects have the correct properties using google_compute_firewall for detail.' google_projects.project_names.each do |project_name| google_compute_firewalls(project: project_name).where(firewall_direction: 'INGRESS').firewall_names.each do |firewall_name| describe google_compute_firewall(project: project_name, name: firewall_name) do its('allowed_ssh?') { should be false } end end end end ``` This example assumes there are sufficient privileges to list all GCP projects. ### Check that a particular label exists on all VMs across all projects and zones This check ensures that VMs have label `must_be_there` for each project: ``` title 'Loop over all GCP projects and ensure all VMs have a particular label' control 'gcp-projects-zones-vm-label-loop-1.0' do impact 1.0 title 'Ensure all VMs have must_be_there label key set' google_projects.project_names.each do |project_name| google_compute_zones(project: project_name).zone_names.each do |zone_name| google_compute_instances(project: project_name, zone: zone_name).instance_names.each do |instance_name| describe google_compute_instance(project: project_name, zone: zone_name, name: instance_name) do its('labels_keys') { should include 'must_be_there' } end end end end end ``` This example verifies there are sufficient privileges to list all regions. ``` next unless google_compute_regions(project: gcp_project_id).resource_failed? google_compute_regions(project: gcp_project_id).region_names.each do |region_name| describe google_compute_region(project: gcp_project_id, region: region_name) do it { should be_up } end end if google_compute_regions(project: gcp_project_id).resource_failed? puts google_compute_regions(project: gcp_project_id).resource_exception_message puts google_compute_regions(project: gcp_project_id,name: region_name).pretty_inspect end ``` This example assumes there are sufficient privileges to list all GCP projects. ## Test inspec-gcp resources 1. Create a new GCP project 2. Ensure this is currently set following: https://cloud.google.com/shell/docs/examples ```bash $ gcloud config set project $ gcloud config list project ``` 3. Enable billing for your new project 4. Enable various services necessary to run the tests: ```bash $ gcloud services enable compute.googleapis.com \ sourcerepo.googleapis.com \ dns.googleapis.com \ container.googleapis.com \ cloudkms.googleapis.com \ cloudbuild.googleapis.com ``` 5. Environment variables can be used to specify project details e.g. ```bash export GCP_PROJECT_NAME= export GCP_PROJECT_NUMBER= export GCP_PROJECT_ID= ``` Some resources require elevated privileges to create in GCP. These are disabled by default but can be activated via: ```bash export GCP_ENABLE_PRIVILEGED_RESOURCES=1 ``` This takes effect during the "plan" task as described in the next section. Affected terraform resources are included/excluded and associated inspec tests enabled/disabled accordingly. The resource pack defaults to region `europe-west2`. If a different region is desired e.g. `us-central1`, the following variables should be set: ```bash export GCP_LOCATION="us-central1" export GCP_ZONE="us-central1-a" export GCP_LB_REGION="us-central1" export GCP_LB_ZONE="us-central1-a" export GCP_LB_ZONE_MIG2="us-central1-b" export GCP_LB_ZONE_MIG3="us-central1-c" export GCP_KUBE_CLUSTER_ZONE="us-central1-a" export GCP_KUBE_CLUSTER_ZONE_EXTRA1="us-central1-b" export GCP_KUBE_CLUSTER_ZONE_EXTRA2="us-central1-c" export GCP_CLOUD_FUNCTION_REGION="us-central1" ``` Other regions can be targeted by updating the above. For example, see [https://cloud.google.com/compute/docs/regions-zones/](https://cloud.google.com/compute/docs/regions-zones/) for suitable values. 6. Ensure the `In-use IP addresses` [quota](https://console.cloud.google.com/iam-admin/quotas) is set to 20 or above for chosen region 7. Run the integration tests via: ```bash bundle install && bundle exec rake test:integration ``` Alternatively, finer grained rake tasks are also available. Executing these in order is the same as the above command: * Initialize local workspace (terraform init) ``` bash bundle exec rake test:init_workspace ``` * Plan integration tests - ensures variables are set for Inspec and Terraform, runs "terraform plan" ``` bash bundle exec rake test:plan_integration_tests ``` * Set up integration tests - actually creates the resources in GCP (terraform apply) ``` bash bundle exec rake test:setup_integration_tests ``` * Run integration tests - runs the tests (inspec exec) ``` bash bundle exec rake test:run_integration_tests ``` * Clean up integration tests - removes GCP resources (terraform destroy) ``` bash bundle exec rake test:cleanup_integration_tests ``` ## Further Reading * [Introduction to InSpec GCP](https://lollyrock.com/articles/inspec-cloud-gcp-setup/) * [InSpec GCP Deep Dive](https://www.chef.io/blog/inspec-gcp-deep-dive) ## FAQ ### Failure running "inspec exec" on my GCP profile If an error such as the below occurs when running "inspec exec" on a newly created GCP profile: ``` libraries/google_compute_instance.rb:26:in `block in initialize': undefined method `gcp_compute_client' for # (NoMethodError) ``` Check that the GCP transport is being specified as below: ``` $ inspec exec . -t gcp:// ``` This tells the underlying transport layer (train) to use GCP. ### `access not configured` error InSpec relies on the GCP API's to verify the settings. Therefore, it requires access to the API. If you try to access an API via an InSpec resource that is not enabled in your account, then you see an error like: ``` googleapi: Error 403: Access Not Configured. Compute Engine API has not been used in project 41111111111 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/compute.googleapis.com/overview then retry. ``` ### Quota increase The terraform templates generate sufficient resources to require an increase to default in_use IP addresses. Normally new projects have 10, increasing this to 20 or higher should be sufficient. To find this setting, log in to the GCP web interface and go to **IAM and admin->Quotas** and look for "Compute Engine API In-use IP addresses". From here you can "Edit quotas" to request more. ``` Changed Quota: +----------------------+------------------+ | Region: europe-west2 | IN_USE_ADDRESSES | +----------------------+------------------+ | Changes | 8 -> 64 | +----------------------+------------------+ ``` ### Errors on terraform destroy Sometimes there can be occasional errors when performing the cleanup rake task. This happens when resources are already deleted and can be ignored. ## Upgrading to version 1.0 A guide on upgrading to version 1.0 can be found [here](docs/version_1_upgrade.md) ## Support The InSpec GCP resources are community supported. For bugs and features, please open a github issue and label it appropriately. ## Kudos This implementation is inspired by [inspec-azure](https://github.com/chef/inspec-azure) and [inspec-gcp](https://github.com/martezr/inspec-gcp) ================================================ FILE: Rakefile ================================================ #!/usr/bin/env rake require 'rake/testtask' require 'rubocop/rake_task' #require 'inifile' require_relative 'test/integration/configuration/gcp_inspec_config' # Rubocop desc 'Run Rubocop lint checks' task :rubocop do RuboCop::RakeTask.new end # lint the project desc 'Run robocop linter' task lint: [:rubocop] # run tests task default: ['test:check'] namespace :test do # Specify the directory for the integration tests integration_dir = "test/integration" # Specify the terraform plan name plan_name = "inspec-gcp.plan" # Specify the file_name for terraform variables to be stored variable_file_name = "inspec-gcp.tfvars.json" # The below file allows to inject parameters as profile attributes to inspec profile_attributes = "gcp-inspec-attributes.yaml" # run inspec check to verify that the profile is properly configured task :check do dir = File.join(File.dirname(__FILE__)) sh("bundle exec inspec check #{dir} --chef-license=accept-silent") # run inspec check on the sample profile to ensure all resources are loaded okay # Disabling inspec check on profile with path dependency due to https://github.com/inspec/inspec/issues/3571 #sh("cd #{integration_dir}/verify && bundle exec inspec check .") end task :init_workspace do # Initialize terraform workspace cmd = format("cd %s/build/ && terraform init -upgrade", integration_dir) sh(cmd) end task :plan_integration_tests, [:seed] do |t, args| puts "----> Generating terraform and inspec variable files" puts "Seeding random suffixes with: #{args.seed}" unless args.seed.nil? config = GCPInspecConfig::Config.new(args.seed) config.store_json(variable_file_name) config.store_yaml(profile_attributes) puts "----> Setup" # Create the plan that can be applied to GCP cmd = format("cd %s/build/ && terraform plan -var-file=%s -out %s", integration_dir, variable_file_name, plan_name) # puts cmd sh(cmd) end task :setup_integration_tests do # Apply the plan on GCP cmd = format("cd %s/build/ && terraform apply %s", integration_dir, plan_name) sh(cmd) end task :run_integration_tests do puts "----> Run" # Since the default behaviour is to skip tests, the below absorbs an inspec "101 run okay + skipped only" exit code as successful cmd = format("bundle exec inspec exec %s/verify --attrs %s/build/%s -t gcp:// --chef-license=accept-silent; rc=$?; if [ $rc -eq 0 ] || [ $rc -eq 101 ]; then exit 0; else exit 1; fi", integration_dir, integration_dir, profile_attributes) sh(cmd) end task :cleanup_integration_tests do puts "----> Cleanup" cmd = format("cd %s/build/ && terraform destroy -force -var-file=%s || true", integration_dir, variable_file_name) sh(cmd) end desc "Perform Integration Tests" task :integration do Rake::Task["test:init_workspace"].execute if File.exists?(File.join(integration_dir,"build",variable_file_name)) Rake::Task["test:cleanup_integration_tests"].execute end Rake::Task["test:plan_integration_tests"].execute Rake::Task["test:setup_integration_tests"].execute Rake::Task["test:run_integration_tests"].execute Rake::Task["test:cleanup_integration_tests"].execute end end # Automatically generate a changelog for this project. Only loaded if # the necessary gem is installed. # use `rake changelog to=1.2.0` begin v = ENV['to'] require 'github_changelog_generator/task' GitHubChangelogGenerator::RakeTask.new :changelog do |config| config.future_release = v end rescue LoadError puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks' end ================================================ FILE: SECURITY.md ================================================ # Security Policy ## Reporting a Vulnerability See https://chef.io/security for our security policy and how to report a vulnerability. ================================================ FILE: VERSION ================================================ 1.11.136 ================================================ FILE: docs/version_1_upgrade.md ================================================ ## Upgrading from 0.x to 1.0 This guide is meant to help upgrade InSpec controls for the 1.0 version. There were several breaking changes that happened during this upgrade in the pursuit of a more unified experience across the inspec-gcp resources. ## Changes to undefined methods Many resources in 0.x had methods dynamically defined based on the API response retrieved by that resource. This resulted in methods being undefined if the response did not contain that field, particularly in the case of optional fields on resources. Undefined method errors are tricky to handle from within an InSpec control, causing difficulty in writing tests against optional fields. By migrating resources to be generated via [Magic Modules](https://github.com/GoogleCloudPlatform/magic-modules) they now have the schema of the underlying object, making it unnecessary to dynamically define methods. What this means for you: * If you depended on checking if methods were defined in inspec-gcp 0.x, you will need to rewrite controls. Checks for `.nil?` in 1.0 should function similarly to how checking if a method was defined in 0.x * You can now safely check if an optional field is `nil` on resources * Better documentation of the fields supported by a resource * Much improved nested object traversal using the safe navigation operator (`&.`) ## IAM resource changes ### IAM bindings resources removed All `*_iam_bindings` resources have been replaced with `*_iam_policy` resources that function in a similar fashion. `iam_policy` resources have the `bindings` field on them which functions in the same way as `iam_bindings` resources did in the past. A control using the 0.x `storage_bucket_iam_bindings` resource similar to this: ``` describe google_storage_bucket_iam_bindings(bucket: 'bucket-name') do it { should exist } its('iam_binding_roles') { should include "roles/storage.objectViewer" } end ``` Could be converted to a `storage_bucket_iam_policy` resource similar to: ``` describe google_storage_bucket_iam_policy(bucket: 'bucket-name') do it { should exist } its('iam_binding_roles') { should include "roles/storage.objectViewer" } end ``` ## Resource identifiers changes ### Long names -> individual identifiers Several resources in 0.x were identified by a single string that combined multiple different identifiers into a single URL-like format. An example of this is in the `google_kms_crypto_key_iam_binding` resource that would take a single string as the identifier: ``` google_kms_crypto_key_iam_binding(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name', role: 'roles/owner') do ``` This creates a difficult situation where the user is required to know the format of the string and create it based on several different variables. In 1.0+ many of the constructor parameters have changed to simplify the use of these resources. For example, `google_kms_crypto_key_iam_binding` will take the following parameters in the future: ``` google_kms_crypto_key_iam_binding(project: "project", location: "location", key_ring_name: "key_ring_name", crypto_key_name: "name", role: "roles/editor") do ``` ## Time field changes Several resources (`google_storage_*` resources in particular) had methods ending in `_date` that would return the field parsed as a Ruby Time object. These have been simplified to always return as a Time object and renamed to remove the `_date` suffix to better match the API. Example: `google_storage_bucket_object.time_storage_class_updated_date` Renamed to `google_storage_bucket_object.time_storage_class_updated` ## Removed fields * `google_container_cluster.zone`, a replacement can be found as `google_container_cluster.location` ## Container resources * `google_container_regional_cluster` is removed, use `google_container_cluster` * `google_container_regional_node_pool` is removed, use `google_container_node_pool` * `google_container_cluster` and `google_container_node_pool` now use the the `location` field as an identifier rather than `zone`. They accept zones or regions as the `location` ================================================ FILE: docs-chef-io/content/_index.md ================================================ +++ title = "About the Chef InSpec Google Cloud Platform resource pack" draft = false linkTitle = "GCP resource pack" summary = "Chef InSpec resources for auditing Google Cloud Platform." [cascade] [cascade.params] platform = "gcp" [menu.gcp] title = "About GCP resources" identifier = "inspec/resources/gcp/about" parent = "inspec/resources/gcp" weight = 10 +++ Chef InSpec has resources for auditing Google Cloud Platform (GCP). ## Prerequisites To use Chef InSpec GCP resources: - [Install and configure the Google Cloud SDK](https://cloud.google.com/sdk/docs/). ## Initialize an InSpec profile for auditing GCP To use the GCP resources, follow these steps: 1. Create a [service account](https://cloud.google.com/docs/authentication/getting-started) with the scopes appropriate for your needs. 1. Download the credential JSON file, for example `project-credentials.json`, to your workspace and activate your service account: ```bash gcloud auth activate-service-account --key-file project-credentials.json ``` 1. Create an InSpec profile for testing GCP resources: ```bash inspec init profile --platform gcp ``` 1. Create controls using the resources listed below. 1. Assuming the `inputs.yml` file contains your GCP project ID, you execute the profile can then be executed using the following command: ```bash inspec exec --input-file=/inputs.yml -t gcp:// ``` ## Google Cloud Platform resources The following InSpec Google Cloud resources are available in this resource pack. {{< inspec_resources_filter >}} {{< inspec_resources section="gcp" platform="gcp" >}} ================================================ FILE: docs-chef-io/content/google_access_context_manager_access_level.md ================================================ +++ title = "google_access_context_manager_access_level resource" draft = false [menu.gcp] title = "google_access_context_manager_access_level" identifier = "inspec/resources/gcp/google_access_context_manager_access_level resource" parent = "inspec/resources/gcp" +++ Use the `google_access_context_manager_access_level` InSpec audit resource to to test a Google Cloud AccessLevel resource. ## Examples ```ruby policy_name = google_access_context_manager_access_policies(org_id: '190694428152').names.first describe google_access_context_manager_access_level(parent: policy_name, name: "ip_subnet") do it { should exist } its('title') { should cmp "ip_subnet" } its('basic.conditions.size') { should cmp 1 } its('basic.conditions.first.ip_subnetworks') { should include "192.0.2.0/24" } end describe google_access_context_manager_access_level(parent: policy_name, name: "none") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_access_context_manager_access_level` resource: * `title`: Human readable title. Must be unique within the Policy. * `description`: Description of the AccessLevel and its use. Does not affect behavior. * `basic`: A set of predefined conditions for the access level and a combining function. * `combining_function`: How the conditions list should be combined to determine if a request is granted this AccessLevel. If AND is used, each Condition in conditions must be satisfied for the AccessLevel to be applied. If OR is used, at least one Condition in conditions must be satisfied for the AccessLevel to be applied. Possible values: * AND * OR * `conditions`: A set of requirements for the AccessLevel to be granted. * `ip_subnetworks`: A list of CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed. * `required_access_levels`: A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Format: accessPolicies/{policy_id}/accessLevels/{short_name} * `members`: An allowed list of members (users, service accounts). Using groups is not supported yet. The signed-in user originating the request must be a part of one of the provided members. If not specified, a request may come from any user (logged in/not logged in, not present in any groups, etc.). Formats: `user:{emailid}`, `serviceAccount:{emailid}` * `negate`: Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to false. * `device_policy`: Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. * `require_screen_lock`: Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false. * `allowed_encryption_statuses`: A list of allowed encryptions statuses. An empty list allows all statuses. * `allowed_device_management_levels`: A list of allowed device management levels. An empty list allows all management levels. * `os_constraints`: A list of allowed OS versions. An empty list allows all types and all versions. * `minimum_version`: The minimum allowed OS version. If not set, any version of this OS satisfies the constraint. Format: "major.minor.patch" such as "10.5.301", "9.2.1". * `os_type`: The operating system type of the device. Possible values: * OS_UNSPECIFIED * DESKTOP_MAC * DESKTOP_WINDOWS * DESKTOP_LINUX * DESKTOP_CHROME_OS * `require_admin_approval`: Whether the device needs to be approved by the customer admin. * `require_corp_owned`: Whether the device needs to be corp owned. * `regions`: The request must originate from one of the provided countries/regions. Format: A valid ISO 3166-1 alpha-2 code. * `custom`: Custom access level conditions are set using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request. See CEL spec at: https://github.com/google/cel-spec. * `expr`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. This page details the objects and attributes that are used to the build the CEL expressions for custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `title`: Title for the expression, i.e. a short string describing its purpose. * `description`: Description of the expression * `location`: String indicating the location of the expression for error reporting, e.g. a file name and a position in the file * `parent`: Name of the parent access policy * `name`: Name of the access level ## GCP permissions ================================================ FILE: docs-chef-io/content/google_access_context_manager_access_levels.md ================================================ +++ title = "google_access_context_manager_access_levels resource" draft = false [menu.gcp] title = "google_access_context_manager_access_levels" identifier = "inspec/resources/gcp/google_access_context_manager_access_levels resource" parent = "inspec/resources/gcp" +++ Use the `google_access_context_manager_access_levels` InSpec audit resource to to test a Google Cloud AccessLevel resource. ## Examples ```ruby policy_name = google_access_context_manager_access_policies(org_id: '190694428152').names.first describe google_access_context_manager_access_levels(parent: policy_name) do its('names') { should include "ip_subnet" } end ``` ## Properties Properties that can be accessed from the `google_access_context_manager_access_levels` resource: See [google_access_context_manager_access_level](google_access_context_manager_access_level) for more detailed information. * `titles`: an array of `google_access_context_manager_access_level` title * `descriptions`: an array of `google_access_context_manager_access_level` description * `basics`: an array of `google_access_context_manager_access_level` basic * `customs`: an array of `google_access_context_manager_access_level` custom * `parents`: an array of `google_access_context_manager_access_level` parent * `names`: an array of `google_access_context_manager_access_level` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_access_context_manager_access_policies.md ================================================ +++ title = "google_access_context_manager_access_policies resource" draft = false [menu.gcp] title = "google_access_context_manager_access_policies" identifier = "inspec/resources/gcp/google_access_context_manager_access_policies resource" parent = "inspec/resources/gcp" +++ Use the `google_access_context_manager_access_policies` InSpec audit resource to test a Google Cloud AccessPolicy resource. ## Examples ```ruby describe google_access_context_manager_access_policies(org_id: '190694428152') do its('count') { should be >= 1 } its('titles') { should include 'policytitle' } end ``` ## Properties Properties that can be accessed from the `google_access_context_manager_access_policies` resource: See [google_access_context_manager_access_policy](google_access_context_manager_access_policy) for more detailed information. * `names`: an array of `google_access_context_manager_access_policy` name * `create_times`: an array of `google_access_context_manager_access_policy` create_time * `update_times`: an array of `google_access_context_manager_access_policy` update_time * `parents`: an array of `google_access_context_manager_access_policy` parent * `titles`: an array of `google_access_context_manager_access_policy` title ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_access_context_manager_access_policy.md ================================================ +++ title = "google_access_context_manager_access_policy resource" draft = false [menu.gcp] title = "google_access_context_manager_access_policy" identifier = "inspec/resources/gcp/google_access_context_manager_access_policy resource" parent = "inspec/resources/gcp" +++ Use the `google_access_context_manager_access_policy` InSpec audit resource to to test a Google Cloud AccessPolicy resource. ## Examples ```ruby describe.one do google_access_context_manager_access_policies(org_id: '190694428152').names.each do |policy_name| describe google_access_context_manager_access_policy(name: policy_name) do it { should exist } its('title') { should cmp 'policytitle' } its('parent') { should match '190694428152' } end end end ``` ## Properties Properties that can be accessed from the `google_access_context_manager_access_policy` resource: * `name`: Resource name of the AccessPolicy. Format: accessPolicies/{policy_id} * `create_time`: Time the AccessPolicy was created in UTC. * `update_time`: Time the AccessPolicy was updated in UTC. * `parent`: The parent of this AccessPolicy in the Cloud Resource Hierarchy. Format: organizations/{organization_id} * `title`: Human readable title. Does not affect behavior. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_access_context_manager_service_perimeter.md ================================================ +++ title = "google_access_context_manager_service_perimeter resource" draft = false [menu.gcp] title = "google_access_context_manager_service_perimeter" identifier = "inspec/resources/gcp/google_access_context_manager_service_perimeter resource" parent = "inspec/resources/gcp" +++ Use the `google_access_context_manager_service_perimeter` InSpec audit resource to to test a Google Cloud ServicePerimeter resource. ## Examples ```ruby describe.one do google_access_context_manager_access_policies(org_id: '190694428152').names.each do |policy_name| describe google_access_context_manager_service_perimeter(policy_name: policy_name, name: 'restrict_all') do it { should exist } its('title') { should cmp 'restrict_all' } its('status.restricted_services') { should include 'storage.googleapis.com' } end end end ``` ## Properties Properties that can be accessed from the `google_access_context_manager_service_perimeter` resource: * `title`: Human readable title. Must be unique within the Policy. * `description`: Description of the ServicePerimeter and its use. Does not affect behavior. * `create_time`: Time the AccessPolicy was created in UTC. * `update_time`: Time the AccessPolicy was updated in UTC. * `perimeter_type`: Specifies the type of the Perimeter. There are two types: regular and bridge. Regular Service Perimeter contains resources, access levels, and restricted services. Every resource can be in at most ONE regular Service Perimeter. In addition to being in a regular service perimeter, a resource can also be in zero or more perimeter bridges. A perimeter bridge only contains resources. Cross project operations are permitted if all effected resources share some perimeter (whether bridge or regular). Perimeter Bridge does not contain access levels or services: those are governed entirely by the regular perimeter that resource is in. Perimeter Bridges are typically useful when building more complex topologies with many independent perimeters that need to share some data with a common perimeter, but should not be able to share data among themselves. Possible values: * PERIMETER_TYPE_REGULAR * PERIMETER_TYPE_BRIDGE * `status`: ServicePerimeter configuration. Specifies sets of resources, restricted services and access levels that determine perimeter content and boundaries. * `resources`: A list of GCP resources that are inside of the service perimeter. Currently only projects are allowed. Format: projects/{project_number} * `access_levels`: A list of AccessLevel resource names that allow resources within the ServicePerimeter to be accessed from the internet. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel is a syntax error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via GCP calls with request origins within the perimeter. For Service Perimeter Bridge, must be empty. Format: accessPolicies/{policy_id}/accessLevels/{access_level_name} * `restricted_services`: GCP services that are subject to the Service Perimeter restrictions. Must contain a list of services. For example, if `storage.googleapis.com` is specified, access to the storage buckets inside the perimeter must meet the perimeter's access restrictions. * `vpc_accessible_services`: Specifies how APIs are allowed to communicate within the Service Perimeter. * `enable_restriction`: Whether to restrict API calls within the Service Perimeter to the list of APIs specified in 'allowedServices'. * `allowed_services`: The list of APIs usable within the Service Perimeter. Must be empty unless `enableRestriction` is True. * `spec`: Proposed (or dry run) ServicePerimeter configuration. This configuration allows to specify and test ServicePerimeter configuration without enforcing actual access restrictions. Only allowed to be set when the `useExplicitDryRunSpec` flag is set. * `resources`: A list of GCP resources that are inside of the service perimeter. Currently only projects are allowed. Format: projects/{project_number} * `access_levels`: A list of AccessLevel resource names that allow resources within the ServicePerimeter to be accessed from the internet. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel is a syntax error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via GCP calls with request origins within the perimeter. For Service Perimeter Bridge, must be empty. Format: accessPolicies/{policy_id}/accessLevels/{access_level_name} * `restricted_services`: GCP services that are subject to the Service Perimeter restrictions. Must contain a list of services. For example, if `storage.googleapis.com` is specified, access to the storage buckets inside the perimeter must meet the perimeter's access restrictions. * `vpc_accessible_services`: Specifies how APIs are allowed to communicate within the Service Perimeter. * `enable_restriction`: Whether to restrict API calls within the Service Perimeter to the list of APIs specified in 'allowedServices'. * `allowed_services`: The list of APIs usable within the Service Perimeter. Must be empty unless `enableRestriction` is True. * `use_explicit_dry_run_spec`: Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists for all Service Perimeters, and that spec is identical to the status for those Service Perimeters. When this flag is set, it inhibits the generation of the implicit spec, thereby allowing the user to explicitly provide a configuration ("spec") to use in a dry-run version of the Service Perimeter. This allows the user to test changes to the enforced config ("status") without actually enforcing them. This testing is done through analyzing the differences between currently enforced and suggested restrictions. useExplicitDryRunSpec must bet set to True if any of the fields in the spec are set to non-default values. * `parent`: The AccessPolicy this ServicePerimeter lives in. Format: accessPolicies/{policy_id} * `name`: Resource name for the ServicePerimeter. The short_name component must begin with a letter and only include alphanumeric and '_'. Format: accessPolicies/{policy_id}/servicePerimeters/{short_name} ## GCP permissions ================================================ FILE: docs-chef-io/content/google_access_context_manager_service_perimeters.md ================================================ +++ title = "google_access_context_manager_service_perimeters resource" draft = false [menu.gcp] title = "google_access_context_manager_service_perimeters" identifier = "inspec/resources/gcp/google_access_context_manager_service_perimeters resource" parent = "inspec/resources/gcp" +++ Use the `google_access_context_manager_service_perimeters` InSpec audit resource to to test a Google Cloud ServicePerimeter resource. ## Examples ```ruby describe.one do google_access_context_manager_access_policies(org_id: '190694428152').names.each do |policy_name| describe google_access_context_manager_service_perimeters(policy_name: policy_name) do its('names') { should include 'restrict_all' } its('titles') { should include 'restrict_all' } end end end ``` ## Properties Properties that can be accessed from the `google_access_context_manager_service_perimeters` resource: See [google_access_context_manager_service_perimeter](google_access_context_manager_service_perimeter) for more detailed information. * `titles`: an array of `google_access_context_manager_service_perimeter` title * `descriptions`: an array of `google_access_context_manager_service_perimeter` description * `create_times`: an array of `google_access_context_manager_service_perimeter` create_time * `update_times`: an array of `google_access_context_manager_service_perimeter` update_time * `perimeter_types`: an array of `google_access_context_manager_service_perimeter` perimeter_type * `statuses`: an array of `google_access_context_manager_service_perimeter` status * `specs`: an array of `google_access_context_manager_service_perimeter` spec * `use_explicit_dry_run_specs`: an array of `google_access_context_manager_service_perimeter` use_explicit_dry_run_spec * `parents`: an array of `google_access_context_manager_service_perimeter` parent * `names`: an array of `google_access_context_manager_service_perimeter` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_apigee_endpoint_attachment.md ================================================ +++ title = "google_apigee_endpoint_attachment resource" draft = false [menu.gcp] title = "google_apigee_endpoint_attachment" identifier = "inspec/resources/gcp/google_apigee_endpoint_attachment resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_endpoint_attachment` InSpec audit resource to test the properties of a Google Cloud EndpointAttachment resource. ## Examples ```ruby describe google_apigee_endpoint_attachment(name: ' value_name') do it { should exist } its('host') { should cmp 'value_host' } its('connection_state') { should cmp 'value_connectionstate' } its('service_attachment') { should cmp 'value_serviceattachment' } its('location') { should cmp 'value_location' } its('name') { should cmp 'value_name' } its('state') { should cmp 'value_state' } end describe google_apigee_endpoint_attachment(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_apigee_endpoint_attachment` resource: ## Properties Properties that can be accessed from the `google_apigee_endpoint_attachment` resource: * `host`: Output only. Host that can be used in either the HTTP target endpoint directly or as the host in target server. * `connection_state`: Output only. State of the endpoint attachment connection to the service attachment. Possible values: * CONNECTION_STATE_UNSPECIFIED * UNAVAILABLE * PENDING * ACCEPTED * REJECTED * CLOSED * FROZEN * NEEDS_ATTENTION * `service_attachment`: Format: projects/*/regions/*/serviceAttachments/* * `location`: Required. Location of the endpoint attachment. * `name`: Name of the endpoint attachment. Use the following structure in your request: `organizations/{org}/endpointAttachments/{endpoint_attachment}` * `state`: Output only. State of the endpoint attachment. Values other than `ACTIVE` mean the resource is not ready to use. Possible values: * STATE_UNSPECIFIED * CREATING * ACTIVE * DELETING * UPDATING ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_endpoint_attachments.md ================================================ +++ title = "google_apigee_endpoint_attachments resource" draft = false [menu.gcp] title = "google_apigee_endpoint_attachments" identifier = "inspec/resources/gcp/google_apigee_endpoint_attachments resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_endpoint_attachments` InSpec audit resource to test the properties of a Google Cloud EndpointAttachment resource. ## Examples ```ruby describe google_apigee_endpoint_attachments() do it { should exist } its('hosts') { should include 'value_host' } its('connection_states') { should include 'value_connectionstate' } its('service_attachments') { should include 'value_serviceattachment' } its('locations') { should include 'value_location' } its('names') { should include 'value_name' } its('states') { should include 'value_state' } end ``` ## Parameters Parameters that can be accessed from the `google_apigee_endpoint_attachments` resource: See [google_apigee_endpoint_attachment](google_apigee_endpoint_attachment) for more detailed information. * `hosts`: an array of `google_apigee_endpoint_attachment` host * `connection_states`: an array of `google_apigee_endpoint_attachment` connection_state * `service_attachments`: an array of `google_apigee_endpoint_attachment` service_attachment * `locations`: an array of `google_apigee_endpoint_attachment` location * `names`: an array of `google_apigee_endpoint_attachment` name * `states`: an array of `google_apigee_endpoint_attachment` state ## Properties Properties that can be accessed from the `google_apigee_endpoint_attachments` resource: See [google_apigee_endpoint_attachment](google_apigee_endpoint_attachment) for more detailed information. * `hosts`: an array of `google_apigee_endpoint_attachment` host * `connection_states`: an array of `google_apigee_endpoint_attachment` connection_state * `service_attachments`: an array of `google_apigee_endpoint_attachment` service_attachment * `locations`: an array of `google_apigee_endpoint_attachment` location * `names`: an array of `google_apigee_endpoint_attachment` name * `states`: an array of `google_apigee_endpoint_attachment` state ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_organization.md ================================================ +++ title = "google_apigee_organization resource" draft = false [menu.gcp] title = "google_apigee_organization" identifier = "inspec/resources/gcp/google_apigee_organization resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_organization` InSpec audit resource to to test a Google Cloud Organization resource. ## Examples ```ruby describe google_apigee_organization(name: ' value_name') do it { should exist } its('api_consumer_data_encryption_key_name') { should cmp 'value_apiconsumerdataencryptionkeyname' } its('runtime_database_encryption_key_name') { should cmp 'value_runtimedatabaseencryptionkeyname' } its('runtime_type') { should cmp 'value_runtimetype' } its('type') { should cmp 'value_type' } its('authorized_network') { should cmp 'value_authorizednetwork' } its('project_id') { should cmp 'value_projectid' } its('description') { should cmp 'value_description' } its('ca_certificate') { should cmp 'value_cacertificate' } its('subscription_type') { should cmp 'value_subscriptiontype' } its('customer_name') { should cmp 'value_customername' } its('created_at') { should cmp 'value_createdat' } its('last_modified_at') { should cmp 'value_lastmodifiedat' } its('subscription_plan') { should cmp 'value_subscriptionplan' } its('state') { should cmp 'value_state' } its('name') { should cmp 'value_name' } its('control_plane_encryption_key_name') { should cmp 'value_controlplaneencryptionkeyname' } its('analytics_region') { should cmp 'value_analyticsregion' } its('api_consumer_data_location') { should cmp 'value_apiconsumerdatalocation' } its('display_name') { should cmp 'value_displayname' } its('apigee_project_id') { should cmp 'value_apigeeprojectid' } its('expires_at') { should cmp 'value_expiresat' } its('billing_type') { should cmp 'value_billingtype' } end describe google_apigee_organization(name: "does_not_exit") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_apigee_organization` resource: * `api_consumer_data_encryption_key_name`: Cloud KMS key name used for encrypting API consumer data. Required for US/EU regions when [BillingType](#BillingType) is `SUBSCRIPTION`. When [BillingType](#BillingType) is `EVALUATION` or the region is not US/EU, a Google-Managed encryption key will be used. Format: `projects/*/locations/*/keyRings/*/cryptoKeys/*` * `runtime_database_encryption_key_name`: Cloud KMS key name used for encrypting the data that is stored and replicated across runtime instances. Update is not allowed after the organization is created. Required when [RuntimeType](#RuntimeType) is `CLOUD`. If not specified when [RuntimeType](#RuntimeType) is `TRIAL`, a Google-Managed encryption key will be used. For example: "projects/foo/locations/us/keyRings/bar/cryptoKeys/baz". **Note:** Not supported for Apigee hybrid. * `environments`: Output only. List of environments in the Apigee organization. * `runtime_type`: Required. Runtime type of the Apigee organization based on the Apigee subscription purchased. Possible values: * RUNTIME_TYPE_UNSPECIFIED * CLOUD * HYBRID * `type`: Not used by Apigee. Possible values: * TYPE_UNSPECIFIED * TYPE_TRIAL * TYPE_PAID * TYPE_INTERNAL * `portal_disabled`: Configuration for the Portals settings. * `authorized_network`: Compute Engine network used for Service Networking to be peered with Apigee runtime instances. See [Getting started with the Service Networking API](https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started). Valid only when [RuntimeType](#RuntimeType) is set to `CLOUD`. The value must be set before the creation of a runtime instance and can be updated only when there are no runtime instances. For example: `default`. Apigee also supports shared VPC (that is, the host network project is not the same as the one that is peering with Apigee). See [Shared VPC overview](https://cloud.google.com/vpc/docs/shared-vpc). To use a shared VPC network, use the following format: `projects/{host-project-id}/{region}/networks/{network-name}`. For example: `projects/my-sharedvpc-host/global/networks/mynetwork` **Note:** Not supported for Apigee hybrid. * `project_id`: Output only. Project ID associated with the Apigee organization. * `description`: Description of the Apigee organization. * `ca_certificate`: Output only. Base64-encoded public certificate for the root CA of the Apigee organization. Valid only when [RuntimeType](#RuntimeType) is `CLOUD`. * `subscription_type`: Output only. DEPRECATED: This will eventually be replaced by BillingType. Subscription type of the Apigee organization. Valid values include trial (free, limited, and for evaluation purposes only) or paid (full subscription has been purchased). See [Apigee pricing](https://cloud.google.com/apigee/pricing/). Possible values: * SUBSCRIPTION_TYPE_UNSPECIFIED * PAID * TRIAL * `addons_config`: Add-on configurations for the Apigee organization. * `integration_config`: Configuration for the Integration add-on. * `enabled`: Flag that specifies whether the Integration add-on is enabled. * `api_security_config`: Configurations of the API Security add-on. * `enabled`: Flag that specifies whether the API security add-on is enabled. * `expires_at`: Output only. Time at which the API Security add-on expires in in milliseconds since epoch. If unspecified, the add-on will never expire. * `monetization_config`: Configuration for the Monetization add-on. * `enabled`: Flag that specifies whether the Monetization add-on is enabled. * `connectors_platform_config`: Configuration for the Connectors Platform add-on. * `expires_at`: Output only. Time at which the Connectors Platform add-on expires in milliseconds since epoch. If unspecified, the add-on will never expire. * `enabled`: Flag that specifies whether the Connectors Platform add-on is enabled. * `analytics_config`: Configuration for the Analytics add-on. * `expire_time_millis`: Output only. Time at which the Analytics add-on expires in milliseconds since epoch. If unspecified, the add-on will never expire. * `state`: Output only. The state of the Analytics add-on. Possible values: * ADDON_STATE_UNSPECIFIED * ENABLING * ENABLED * DISABLING * DISABLED * `enabled`: Whether the Analytics add-on is enabled. * `update_time`: Output only. The latest update time. * `advanced_api_ops_config`: Configuration for the Advanced API Ops add-on. * `enabled`: Flag that specifies whether the Advanced API Ops add-on is enabled. * `customer_name`: Not used by Apigee. * `created_at`: Output only. Time that the Apigee organization was created in milliseconds since epoch. * `last_modified_at`: Output only. Time that the Apigee organization was last modified in milliseconds since epoch. * `subscription_plan`: Output only. Subscription plan that the customer has purchased. Output only. Possible values: * SUBSCRIPTION_PLAN_UNSPECIFIED * SUBSCRIPTION_2021 * SUBSCRIPTION_2024 * `properties`: Message for compatibility with legacy Edge specification for Java Properties object in JSON. * `property`: List of all properties in the object * `value`: The property value * `name`: The property key * `state`: Output only. State of the organization. Values other than ACTIVE means the resource is not ready to use. Possible values: * STATE_UNSPECIFIED * CREATING * ACTIVE * DELETING * UPDATING * `name`: Output only. Name of the Apigee organization. * `disable_vpc_peering`: Optional. Flag that specifies whether the VPC Peering through Private Google Access should be disabled between the consumer network and Apigee. Valid only when RuntimeType is set to CLOUD. Required if an authorizedNetwork on the consumer project is not provided, in which case the flag should be set to true. The value must be set before the creation of any Apigee runtime instance and can be updated only when there are no runtime instances. **Note:** Apigee will be deprecating the vpc peering model that requires you to provide 'authorizedNetwork', by making the non-peering model as the default way of provisioning Apigee organization in future. So, this will be a temporary flag to enable the transition. Not supported for Apigee hybrid. * `control_plane_encryption_key_name`: Cloud KMS key name used for encrypting control plane data that is stored in a multi region. Required when [BillingType](#BillingType) is `SUBSCRIPTION`. When [BillingType](#BillingType) is `EVALUATION`, a Google-Managed encryption key will be used. Format: `projects/*/locations/*/keyRings/*/cryptoKeys/*` * `analytics_region`: Required. DEPRECATED: This field will eventually be deprecated and replaced with a differently-named field. Primary Google Cloud region for analytics data storage. For valid values, see [Create an Apigee organization](https://cloud.google.com/apigee/docs/api-platform/get-started/create-org). * `api_consumer_data_location`: This field is needed only for customers with control plane in US or EU. Apigee stores some control plane data only in single region. This field determines which single region Apigee should use. For example: "us-west1" when control plane is in US or "europe-west2" when control plane is in EU. * `display_name`: Display name for the Apigee organization. Unused, but reserved for future use. * `apigee_project_id`: Output only. Apigee Project ID associated with the organization. Use this project to allowlist Apigee in the Service Attachment when using private service connect with Apigee. * `expires_at`: Output only. Time that the Apigee organization is scheduled for deletion. * `attributes`: Not used by Apigee. * `billing_type`: Billing type of the Apigee organization. See [Apigee pricing](https://cloud.google.com/apigee/pricing). Possible values: * BILLING_TYPE_UNSPECIFIED * SUBSCRIPTION * EVALUATION * PAYG ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_organization_api.md ================================================ +++ title = "google_apigee_organization_api resource" draft = false [menu.gcp] title = "google_apigee_organization_api" identifier = "inspec/resources/gcp/google_apigee_organization_api resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_organization_api` InSpec audit resource to to test a Google Cloud OrganizationApi resource. ## Examples ```ruby describe google_apigee_organization_api(parent: ' value_parent', name: ' value_name') do it { should exist } its('latest_revision_id') { should cmp 'value_latestrevisionid' } its('api_proxy_type') { should cmp 'value_apiproxytype' } its('name') { should cmp 'value_name' } end describe google_apigee_organization_api(parent: ' value_parent', name: "does_not_exit") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_apigee_organization_api` resource: * `revision`: Output only. List of revisions defined for the API proxy. * `latest_revision_id`: Output only. The id of the most recently created revision for this api proxy. * `meta_data`: Metadata common to many entities in this API. * `last_modified_at`: Time at which the API proxy was most recently modified, in milliseconds since epoch. * `created_at`: Time at which the API proxy was created, in milliseconds since epoch. * `sub_type`: The type of entity described * `api_proxy_type`: Output only. The type of the API proxy. Possible values: * API_PROXY_TYPE_UNSPECIFIED * PROGRAMMABLE * CONFIGURABLE * `read_only`: Output only. Whether this proxy is read-only. A read-only proxy cannot have new revisions created through calls to CreateApiProxyRevision. A proxy is read-only if it was generated by an archive. * `labels`: User labels applied to this API Proxy. * `additional_properties`: * `name`: Output only. Name of the API proxy. ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_organization_apis.md ================================================ +++ title = "google_apigee_organization_apis resource" draft = false [menu.gcp] title = "google_apigee_organization_apis" identifier = "inspec/resources/gcp/google_apigee_organization_apis resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_organization_apis` InSpec audit resource to to test a Google Cloud OrganizationApi resource. ## Examples ```ruby describe google_apigee_organization_apis(parent: ' value_parent') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_apigee_organization_apis` resource: See [google_apigee_organization_api](google_apigee_organization_api) for more detailed information. * `revisions`: an array of `google_apigee_organization_api` revision * `latest_revision_ids`: an array of `google_apigee_organization_api` latest_revision_id * `meta_data`: an array of `google_apigee_organization_api` meta_data * `api_proxy_types`: an array of `google_apigee_organization_api` api_proxy_type * `read_onlies`: an array of `google_apigee_organization_api` read_only * `labels`: an array of `google_apigee_organization_api` labels * `names`: an array of `google_apigee_organization_api` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_organization_envgroup.md ================================================ +++ title = "google_apigee_organization_envgroup resource" draft = false [menu.gcp] title = "google_apigee_organization_envgroup" identifier = "inspec/resources/gcp/google_apigee_organization_envgroup resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_organization_envgroup` InSpec audit resource to to test a Google Cloud OrganizationEnvgroup resource. ## Examples ``` describe google_apigee_organization_envgroup(name: ' value_name') do it { should exist } its('name') { should cmp 'value_name' } its('hostnames') { should include 'value_hostname' } its('last_modified_at') { should cmp 'value_lastmodifiedat' } its('state') { should cmp 'value_state' } its('created_at') { should cmp 'value_createdat' } end describe google_apigee_organization_envgroup(name: "does_not_exit") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_apigee_organization_envgroup` resource: * `name`: ID of the environment group. * `last_modified_at`: The time at which the environment group was last updated as milliseconds since epoch. * `hostnames`: Host names for this environment group. * `state`: State of the environment group. Values other than ACTIVE means the resource is not ready to use. Possible values: * STATE_UNSPECIFIED * CREATING * ACTIVE * DELETING * UPDATING * `created_at`: The time at which the environment group was created as milliseconds since epoch. ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_organization_envgroup_attachment.md ================================================ +++ title = "google_apigee_organization_envgroup_attachment resource" draft = false [menu.gcp] title = "google_apigee_organization_envgroup_attachment" identifier = "inspec/resources/gcp/google_apigee_organization_envgroup_attachment resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_organization_envgroup_attachment` InSpec audit resource to to test a Google Cloud OrganizationEnvgroupAttachment resource. ## Examples ``` describe google_apigee_organization_envgroup_attachment(name: ' value_name') do it { should exist } its('created_at') { should cmp 'value_createdat' } its('environment') { should cmp 'value_environment' } its('environment_group_id') { should cmp 'value_environmentgroupid' } its('name') { should cmp 'value_name' } end describe google_apigee_organization_envgroup_attachment(name: "does_not_exit") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_apigee_organization_envgroup_attachment` resource: * `created_at`: The time at which the environment group attachment was created as milliseconds since epoch. * `environment`: ID of the attached environment. * `environment_group_id`: ID of the environment group. * `name`: ID of the environment group attachment. ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_organization_envgroup_attachments.md ================================================ +++ title = "google_apigee_organization_envgroup_attachments resource" draft = false [menu.gcp] title = "google_apigee_organization_envgroup_attachments" identifier = "inspec/resources/gcp/google_apigee_organization_envgroup_attachments resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_organization_envgroup_attachments` InSpec audit resource to to test a Google Cloud OrganizationEnvgroupAttachment resource. ## Examples ``` describe google_apigee_organization_envgroup_attachments(parent: ' value_parent') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_apigee_organization_envgroup_attachments` resource: See [google_apigee_organization_envgroup_attachment](google_apigee_organization_envgroup_attachment) for more detailed information. * `created_ats`: an array of `google_apigee_organization_envgroup_attachment` created_at * `environments`: an array of `google_apigee_organization_envgroup_attachment` environment * `environment_group_ids`: an array of `google_apigee_organization_envgroup_attachment` environment_group_id * `names`: an array of `google_apigee_organization_envgroup_attachment` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_organization_envgroups.md ================================================ +++ title = "google_apigee_organization_envgroups resource" draft = false [menu.gcp] title = "google_apigee_organization_envgroups" identifier = "inspec/resources/gcp/google_apigee_organization_envgroups resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_organization_envgroups` InSpec audit resource to to test a Google Cloud OrganizationEnvgroup resource. ## Examples ``` describe google_apigee_organization_envgroups(parent: 'value_parent') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_apigee_organization_envgroups` resource: See [google_apigee_organization_envgroup](google_apigee_organization_envgroup) for more detailed information. * `names`: an array of `google_apigee_organization_envgroup` name * `last_modified_ats`: an array of `google_apigee_organization_envgroup` last_modified_at * `hostnames`: an array of `google_apigee_organization_envgroup` hostnames * `states`: an array of `google_apigee_organization_envgroup` state * `created_ats`: an array of `google_apigee_organization_envgroup` created_at ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_organization_instance_attachment.md ================================================ +++ title = "google_apigee_organization_instance_attachment resource" draft = false [menu.gcp] title = "google_apigee_organization_instance_attachment" identifier = "inspec/resources/gcp/google_apigee_organization_instance_attachment resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_organization_instance_attachment` InSpec audit resource to test the properties of a Google Cloud OrganizationInstanceAttachment resource. ## Examples ```ruby describe google_apigee_organization_instance_attachment(parent:'value_parent', name:'value_name') do it { should exist } its('name') { should cmp 'value_name' } its('environment') { should cmp 'value_environment' } its('created_at') { should cmp 'value_createdat' } end describe google_apigee_organization_instance_attachment(parent:'value_parent',name: "does-not-exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_apigee_organization_instance_attachment` resource: ## Properties Properties that can be accessed from the `google_apigee_organization_instance_attachment` resource: * `name`: Output only. ID of the attachment. * `environment`: ID of the attached environment. * `created_at`: Output only. Time the attachment was created in milliseconds since epoch. ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_organization_instance_attachments.md ================================================ +++ title = "google_apigee_organization_instance_attachments resource" draft = false [menu.gcp] title = "google_apigee_organization_instance_attachments" identifier = "inspec/resources/gcp/google_apigee_organization_instance_attachments resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_organization_instance_attachments` InSpec audit resource to test the properties of a Google Cloud OrganizationInstanceAttachment resource. ## Examples ```ruby describe google_apigee_organization_instance_attachments(parent: 'value_parent') do it { should exist } its('names') { should include 'value_name' } its('environments') { should include 'value_environment' } its('created_ats') { should include 'value_createdat' } end ``` ## Parameters Parameters that can be accessed from the `google_apigee_organization_instance_attachments` resource: See [google_apigee_organization_instance_attachment](google_apigee_organization_instance_attachment) for more detailed information. * `names`: an array of `google_apigee_organization_instance_attachment` name * `environments`: an array of `google_apigee_organization_instance_attachment` environment * `created_ats`: an array of `google_apigee_organization_instance_attachment` created_at ## Properties Properties that can be accessed from the `google_apigee_organization_instance_attachments` resource: See [google_apigee_organization_instance_attachment](google_apigee_organization_instance_attachment) for more detailed information. * `names`: an array of `google_apigee_organization_instance_attachment` name * `environments`: an array of `google_apigee_organization_instance_attachment` environment * `created_ats`: an array of `google_apigee_organization_instance_attachment` created_at ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_apigee_organizations.md ================================================ +++ title = "google_apigee_organizations resource" draft = false [menu.gcp] title = "google_apigee_organizations" identifier = "inspec/resources/gcp/google_apigee_organizations resource" parent = "inspec/resources/gcp" +++ Use the `google_apigee_organizations` InSpec audit resource to to test a Google Cloud Organization resource. ## Examples ```ruby describe google_apigee_organizations(parent: ' value_parent') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_apigee_organizations` resource: See [google_apigee_organization](google_apigee_organization) for more detailed information. * `api_consumer_data_encryption_key_names`: an array of `google_apigee_organization` api_consumer_data_encryption_key_name * `runtime_database_encryption_key_names`: an array of `google_apigee_organization` runtime_database_encryption_key_name * `environments`: an array of `google_apigee_organization` environments * `runtime_types`: an array of `google_apigee_organization` runtime_type * `types`: an array of `google_apigee_organization` type * `portal_disableds`: an array of `google_apigee_organization` portal_disabled * `authorized_networks`: an array of `google_apigee_organization` authorized_network * `project_ids`: an array of `google_apigee_organization` project_id * `descriptions`: an array of `google_apigee_organization` description * `ca_certificates`: an array of `google_apigee_organization` ca_certificate * `subscription_types`: an array of `google_apigee_organization` subscription_type * `addons_configs`: an array of `google_apigee_organization` addons_config * `customer_names`: an array of `google_apigee_organization` customer_name * `created_ats`: an array of `google_apigee_organization` created_at * `last_modified_ats`: an array of `google_apigee_organization` last_modified_at * `subscription_plans`: an array of `google_apigee_organization` subscription_plan * `properties`: an array of `google_apigee_organization` properties * `states`: an array of `google_apigee_organization` state * `names`: an array of `google_apigee_organization` name * `disable_vpc_peerings`: an array of `google_apigee_organization` disable_vpc_peering * `control_plane_encryption_key_names`: an array of `google_apigee_organization` control_plane_encryption_key_name * `analytics_regions`: an array of `google_apigee_organization` analytics_region * `api_consumer_data_locations`: an array of `google_apigee_organization` api_consumer_data_location * `display_names`: an array of `google_apigee_organization` display_name * `apigee_project_ids`: an array of `google_apigee_organization` apigee_project_id * `expires_ats`: an array of `google_apigee_organization` expires_at * `attributes`: an array of `google_apigee_organization` attributes * `billing_types`: an array of `google_apigee_organization` billing_type ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_appengine_standard_app_version.md ================================================ +++ title = "google_appengine_standard_app_version resource" draft = false [menu.gcp] title = "google_appengine_standard_app_version" identifier = "inspec/resources/gcp/google_appengine_standard_app_version resource" parent = "inspec/resources/gcp" +++ Use the `google_appengine_standard_app_version` InSpec audit resource to to test a Google Cloud StandardAppVersion resource. ## Examples ```ruby describe google_appengine_standard_app_version(project: 'chef-gcp-inspec', location: 'europe-west2', version_id: 'v2', service: 'default') do it { should exist } its('version_id') { should eq 'v2' } its('runtime') { should eq 'nodejs10' } end ``` ## Properties Properties that can be accessed from the `google_appengine_standard_app_version` resource: * `name`: Full path to the Version resource in the API. Example, "v1". * `version_id`: Relative name of the version within the service. For example, `v1`. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names,"default", "latest", and any name with the prefix "ah-". * `runtime`: Desired runtime. Example python27. * `threadsafe`: Whether multiple requests can be dispatched to this version at once. * `vpc_access_connector`: Enables VPC connectivity for standard apps. * `name`: Full Serverless VPC Access Connector name e.g. /projects/my-project/locations/us-central1/connectors/c1. * `inbound_services`: A list of the types of messages that this application is able to receive. * `instance_class`: Instance class that is used to run this version. Valid values are AutomaticScaling: F1, F2, F4, F4_1G BasicScaling or ManualScaling: B1, B2, B4, B4_1G, B8 Defaults to F1 for AutomaticScaling and B2 for ManualScaling and BasicScaling. If no scaling is specified, AutomaticScaling is chosen. * `automatic_scaling`: Automatic scaling is based on request rate, response latencies, and other application metrics. * `max_concurrent_requests`: Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance. Defaults to a runtime-specific value. * `max_idle_instances`: Maximum number of idle instances that should be maintained for this version. * `max_pending_latency`: Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". * `min_idle_instances`: Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service. * `min_pending_latency`: Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". * `standard_scheduler_settings`: Scheduler settings for standard environment. * `target_cpu_utilization`: Target CPU utilization ratio to maintain when scaling. Should be a value in the range [0.50, 0.95], zero, or a negative value. * `target_throughput_utilization`: Target throughput utilization ratio to maintain when scaling. Should be a value in the range [0.50, 0.95], zero, or a negative value. * `min_instances`: Minimum number of instances to run for this version. Set to zero to disable minInstances configuration. * `max_instances`: Maximum number of instances to run for this version. Set to zero to disable maxInstances configuration. * `basic_scaling`: Basic scaling creates instances when your application receives requests. Each instance will be shut down when the application becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity. * `idle_timeout`: Duration of time after the last request that an instance must wait before the instance is shut down. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Defaults to 900s. * `max_instances`: Maximum number of instances to create for this version. Must be in the range [1.0, 200.0]. * `manual_scaling`: A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. * `instances`: Number of instances to assign to the service at the start. **Note:** When managing the number of instances at runtime through the App Engine Admin API or the (now deprecated) Python 2 Modules API set_num_instances() you must use `lifecycle.ignore_changes = ["manual_scaling"[0].instances]` to prevent drift detection. ## GCP permissions Ensure the [App Engine Admin API](https://console.cloud.google.com/apis/library/appengine.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_appengine_standard_app_versions.md ================================================ +++ title = "google_appengine_standard_app_versions resource" draft = false [menu.gcp] title = "google_appengine_standard_app_versions" identifier = "inspec/resources/gcp/google_appengine_standard_app_versions resource" parent = "inspec/resources/gcp" +++ Use the `google_appengine_standard_app_versions` InSpec audit resource to to test a Google Cloud StandardAppVersion resource. ## Examples ```ruby describe google_appengine_standard_app_versions(project: 'chef-gcp-inspec', location: 'europe-west2',service: 'default') do its('runtimes') { should include 'nodejs10' } end ``` ## Properties Properties that can be accessed from the `google_appengine_standard_app_versions` resource: See [google_appengine_standard_app_version](google_appengine_standard_app_version) for more detailed information. * `names`: an array of `google_appengine_standard_app_version` name * `version_ids`: an array of `google_appengine_standard_app_version` version_id * `runtimes`: an array of `google_appengine_standard_app_version` runtime * `threadsaves`: an array of `google_appengine_standard_app_version` threadsafe * `vpc_access_connectors`: an array of `google_appengine_standard_app_version` vpc_access_connector * `inbound_services`: an array of `google_appengine_standard_app_version` inbound_services * `instance_classes`: an array of `google_appengine_standard_app_version` instance_class * `automatic_scalings`: an array of `google_appengine_standard_app_version` automatic_scaling * `basic_scalings`: an array of `google_appengine_standard_app_version` basic_scaling * `manual_scalings`: an array of `google_appengine_standard_app_version` manual_scaling ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [App Engine Admin API](https://console.cloud.google.com/apis/library/appengine.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_artifactregistry_project_location_repositories.md ================================================ +++ title = "google_artifactregistry_project_location_repositories resource" draft = false [menu.gcp] title = "google_artifactregistry_project_location_repositories" identifier = "inspec/resources/gcp/google_artifactregistry_project_location_repositories resource" parent = "inspec/resources/gcp" +++ Use the `google_artifactregistry_project_location_repositories` InSpec audit resource to to test a Google Cloud ProjectLocationRepository resource. ## Examples ```ruby describe google_artifactregistry_project_location_repositories(parent: ' value_parent') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_artifactregistry_project_location_repositories` resource: See [google_artifactregistry_project_location_repository](google_artifactregistry_project_location_repository) for more detailed information. * `maven_configs`: an array of `google_artifactregistry_project_location_repository` maven_config * `docker_configs`: an array of `google_artifactregistry_project_location_repository` docker_config * `virtual_repository_configs`: an array of `google_artifactregistry_project_location_repository` virtual_repository_config * `remote_repository_configs`: an array of `google_artifactregistry_project_location_repository` remote_repository_config * `names`: an array of `google_artifactregistry_project_location_repository` name * `formats`: an array of `google_artifactregistry_project_location_repository` format * `descriptions`: an array of `google_artifactregistry_project_location_repository` description * `labels`: an array of `google_artifactregistry_project_location_repository` labels * `create_times`: an array of `google_artifactregistry_project_location_repository` create_time * `update_times`: an array of `google_artifactregistry_project_location_repository` update_time * `kms_key_names`: an array of `google_artifactregistry_project_location_repository` kms_key_name * `modes`: an array of `google_artifactregistry_project_location_repository` mode * `cleanup_policies`: an array of `google_artifactregistry_project_location_repository` cleanup_policies * `size_bytes`: an array of `google_artifactregistry_project_location_repository` size_bytes * `satisfies_pzs`: an array of `google_artifactregistry_project_location_repository` satisfies_pzs * `cleanup_policy_dry_runs`: an array of `google_artifactregistry_project_location_repository` cleanup_policy_dry_run ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Artifact Registry API](https://console.cloud.google.com/apis/library/artifactregistry.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_artifactregistry_project_location_repository.md ================================================ +++ title = "google_artifactregistry_project_location_repository resource" draft = false [menu.gcp] title = "google_artifactregistry_project_location_repository" identifier = "inspec/resources/gcp/google_artifactregistry_project_location_repository resource" parent = "inspec/resources/gcp" +++ Use the `google_artifactregistry_project_location_repository` InSpec audit resource to to test a Google Cloud ProjectLocationRepository resource. ## Examples ```ruby describe google_artifactregistry_project_location_repository(name: ' value_name') do it { should exist } end describe google_artifactregistry_project_location_repository(name: "does_not_exit") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_artifactregistry_project_location_repository` resource: * `maven_config`: MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. * `allow_snapshot_overwrites`: The repository with this flag will allow publishing the same snapshot versions. * `version_policy`: Version policy defines the versions that the registry will accept. Possible values: * VERSION_POLICY_UNSPECIFIED * RELEASE * SNAPSHOT * `docker_config`: DockerRepositoryConfig is docker related repository details. Provides additional configuration details for repositories of the docker format type. * `immutable_tags`: The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created. * `virtual_repository_config`: Virtual repository configuration. * `upstream_policies`: Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository. * `id`: The user-provided ID of the upstream policy. * `repository`: A reference to the repository resource, for example: `projects/p1/locations/us-central1/repositories/repo1`. * `priority`: Entries with a greater priority value take precedence in the pull order. * `remote_repository_config`: Remote repository configuration. * `docker_repository`: Configuration for a Docker remote repository. * `public_repository`: One of the publicly available Docker repositories supported by Artifact Registry. Possible values: * PUBLIC_REPOSITORY_UNSPECIFIED * DOCKER_HUB * `maven_repository`: Configuration for a Maven remote repository. * `public_repository`: One of the publicly available Maven repositories supported by Artifact Registry. Possible values: * PUBLIC_REPOSITORY_UNSPECIFIED * MAVEN_CENTRAL * `npm_repository`: Configuration for a Npm remote repository. * `public_repository`: One of the publicly available Npm repositories supported by Artifact Registry. Possible values: * PUBLIC_REPOSITORY_UNSPECIFIED * NPMJS * `python_repository`: Configuration for a Python remote repository. * `public_repository`: One of the publicly available Python repositories supported by Artifact Registry. Possible values: * PUBLIC_REPOSITORY_UNSPECIFIED * PYPI * `apt_repository`: Configuration for an Apt remote repository. * `public_repository`: Publicly available Apt repositories constructed from a common repository base and a custom repository path. * `repository_base`: A common public repository base for Apt. Possible values: * REPOSITORY_BASE_UNSPECIFIED * DEBIAN * UBUNTU * DEBIAN_SNAPSHOT * `repository_path`: A custom field to define a path to a specific repository from the base. * `yum_repository`: Configuration for a Yum remote repository. * `public_repository`: Publicly available Yum repositories constructed from a common repository base and a custom repository path. * `repository_base`: A common public repository base for Yum. Possible values: * REPOSITORY_BASE_UNSPECIFIED * CENTOS * CENTOS_DEBUG * CENTOS_VAULT * CENTOS_STREAM * ROCKY * EPEL * `repository_path`: A custom field to define a path to a specific repository from the base. * `description`: The description of the remote source. * `upstream_credentials`: The credentials to access the remote repository. * `username_password_credentials`: Username and password credentials. * `username`: The username to access the remote repository. * `password_secret_version`: The Secret Manager key version that holds the password to access the remote repository. Must be in the format of `projects/{project}/secrets/{secret}/versions/{version}`. * `name`: The name of the repository, for example: `projects/p1/locations/us-central1/repositories/repo1`. * `format`: Optional. The format of packages that are stored in the repository. Possible values: * FORMAT_UNSPECIFIED * DOCKER * MAVEN * NPM * APT * YUM * GOOGET * PYTHON * KFP * GO * `description`: The user-provided description of the repository. * `labels`: Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes. * `additional_properties`: * `create_time`: Output only. The time when the repository was created. * `update_time`: Output only. The time when the repository was last updated. * `kms_key_name`: The Cloud KMS resource name of the customer managed encryption key that's used to encrypt the contents of the Repository. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. This value may not be changed after the Repository has been created. * `mode`: Optional. The mode of the repository. Possible values: * MODE_UNSPECIFIED * STANDARD_REPOSITORY * VIRTUAL_REPOSITORY * REMOTE_REPOSITORY * `cleanup_policies`: Optional. Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. * `additional_properties`: Artifact policy configuration for repository cleanup policies. * `size_bytes`: Output only. The size, in bytes, of all artifact storage in this repository. Repositories that are generally available or in public preview use this to calculate storage costs. * `satisfies_pzs`: Output only. If set, the repository satisfies physical zone separation. * `cleanup_policy_dry_run`: Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository. ## GCP permissions Ensure the [Artifact Registry API](https://console.cloud.google.com/apis/library/artifactregistry.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_bigquery_dataset.md ================================================ +++ title = "google_bigquery_dataset resource" draft = false [menu.gcp] title = "google_bigquery_dataset" identifier = "inspec/resources/gcp/google_bigquery_dataset resource" parent = "inspec/resources/gcp" +++ Use the `google_bigquery_dataset` InSpec audit resource to to test a Google Cloud Dataset resource. ## Examples ```ruby describe google_bigquery_dataset(project: 'chef-gcp-inspec', name: 'inspec_gcp_dataset') do it { should exist } its('friendly_name') { should eq 'A BigQuery dataset test' } its('location') { should eq 'EU' } its('description') { should eq 'Test BigQuery dataset description' } its('name') { should eq 'inspec_gcp_dataset' } its('default_table_expiration_ms') { should cmp '3600000' } end describe.one do google_bigquery_dataset(project: 'chef-gcp-inspec', name: 'inspec_gcp_dataset').access.each do |dataset_access| describe dataset_access do its('role') { should eq 'WRITER' } its('special_group') { should eq 'projectWriters' } end end end describe google_bigquery_dataset(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_bigquery_dataset` resource: * `access`: An array of objects that define dataset access for one or more entities. * `domain`: A domain to grant access to. Any users signed in with the domain specified will be granted the specified access * `group_by_email`: An email address of a Google Group to grant access to. * `role`: Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts. See [official docs](https://cloud.google.com/bigquery/docs/access-control). * `special_group`: A special group to grant access to. Possible values include: * `projectOwners`: Owners of the enclosing project. * `projectReaders`: Readers of the enclosing project. * `projectWriters`: Writers of the enclosing project. * `allAuthenticatedUsers`: All authenticated BigQuery users. * `user_by_email`: An email address of a user to grant access to. For example: fred@example.com * `iam_member`: Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: `allUsers` * `view`: A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. * `dataset_id`: The ID of the dataset containing this table. * `project_id`: The ID of the project containing this table. * `table_id`: The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. * `creation_time`: The time when this dataset was created, in milliseconds since the epoch. * `dataset_reference`: A reference that identifies the dataset. * `dataset_id`: A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. * `project_id`: The ID of the project containing this dataset. * `default_table_expiration_ms`: The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an `expirationTime` property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the `expirationTime` for a given table is reached, that table will be deleted automatically. If a table's `expirationTime` is modified or removed before the table expires, or if you provide an explicit `expirationTime` when creating a table, that value takes precedence over the default expiration time indicated by this property. * `default_partition_expiration_ms`: The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an `expirationMs` property in the `timePartitioning` settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of `defaultTableExpirationMs` for partitioned tables: only one of `defaultTableExpirationMs` and `defaultPartitionExpirationMs` will be used for any new partitioned table. If you provide an explicit `timePartitioning.expirationMs` when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property. * `description`: A user-friendly description of the dataset * `etag`: A hash of the resource. * `friendly_name`: A descriptive name for the dataset * `id`: The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field * `labels`: The labels associated with this dataset. You can use these to organize and group your datasets * `last_modified_time`: The date when this dataset or any of its tables was last modified, in milliseconds since the epoch. * `location`: The geographic location where the dataset should reside. See [official docs](https://cloud.google.com/bigquery/docs/dataset-locations). There are two types of locations, regional or multi-regional. A regional location is a specific geographic place, such as Tokyo, and a multi-regional location is a large geographic area, such as the United States, that contains at least two geographic places. The default value is multi-regional location `US`. Changing this forces a new resource to be created. * `default_encryption_configuration`: The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. * `kms_key_name`: Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. ## GCP permissions Ensure the [BigQuery API](https://console.cloud.google.com/apis/library/bigquery-json.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_bigquery_datasets.md ================================================ +++ title = "google_bigquery_datasets resource" draft = false [menu.gcp] title = "google_bigquery_datasets" identifier = "inspec/resources/gcp/google_bigquery_datasets resource" parent = "inspec/resources/gcp" +++ Use the `google_bigquery_datasets` InSpec audit resource to to test a Google Cloud Dataset resource. ## Examples ```ruby describe google_bigquery_datasets(project: 'chef-gcp-inspec') do its('count') { should be >= 1 } its('friendly_names') { should include 'A BigQuery dataset test' } its('locations') { should include 'EU' } end google_bigquery_datasets(project: 'chef-gcp-inspec').ids.each do |name| google_bigquery_dataset(project: 'chef-gcp-inspec', name: name.split(':').last).access.each do |access| describe access do # No bigquery dataset should allow access to allUsers its('iam_member') { should_not cmp 'allUsers' } end end end ``` ## Properties Properties that can be accessed from the `google_bigquery_datasets` resource: See [google_bigquery_dataset](google_bigquery_dataset) for more detailed information. * `dataset_references`: an array of `google_bigquery_dataset` dataset_reference * `default_partition_expiration_ms`: an array of `google_bigquery_dataset` default_partition_expiration_ms * `etags`: an array of `google_bigquery_dataset` etag * `friendly_names`: an array of `google_bigquery_dataset` friendly_name * `ids`: an array of `google_bigquery_dataset` id * `labels`: an array of `google_bigquery_dataset` labels * `locations`: an array of `google_bigquery_dataset` location * `default_encryption_configurations`: an array of `google_bigquery_dataset` default_encryption_configuration ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [BigQuery API](https://console.cloud.google.com/apis/library/bigquery-json.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_bigquery_table.md ================================================ +++ title = "google_bigquery_table resource" draft = false [menu.gcp] title = "google_bigquery_table" identifier = "inspec/resources/gcp/google_bigquery_table resource" parent = "inspec/resources/gcp" +++ Use the `google_bigquery_table` InSpec audit resource to to test a Google Cloud Table resource. ## Examples ```ruby describe google_bigquery_table(project: 'chef-gcp-inspec', dataset: 'inspec_gcp_dataset', name: 'inspec_gcp_bigquery_table') do it { should exist } its('expiration_time') { should cmp '1738882264000' } its('time_partitioning.type') { should eq 'DAY' } its('description') { should eq 'A BigQuery table' } end describe google_bigquery_table(project: 'chef-gcp-inspec', dataset: 'inspec_gcp_dataset', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_bigquery_table` resource: * `table_reference`: Reference describing the ID of this table * `dataset_id`: The ID of the dataset containing this table * `project_id`: The ID of the project containing this table * `table_id`: The ID of the the table * `clustering`: One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. * `creation_time`: The time when this dataset was created, in milliseconds since the epoch. * `description`: A user-friendly description of the dataset * `friendly_name`: A descriptive name for this table * `id`: An opaque ID uniquely identifying the table. * `labels`: The labels associated with this dataset. You can use these to organize and group your datasets * `last_modified_time`: The time when this table was last modified, in milliseconds since the epoch. * `location`: The geographic location where the table resides. This value is inherited from the dataset. * `name`: Name of the table * `num_bytes`: The size of this table in bytes, excluding any data in the streaming buffer. * `num_long_term_bytes`: The number of bytes in the table that are considered "long-term storage". * `num_rows`: The number of rows of data in this table, excluding any data in the streaming buffer. * `require_partition_filter`: If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. * `type`: Describes the table type Possible values: * TABLE * VIEW * EXTERNAL * `view`: The view definition. * `use_legacy_sql`: Specifies whether to use BigQuery's legacy SQL for this view * `user_defined_function_resources`: Describes user-defined function resources used in the query. * `inline_code`: An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. * `resource_uri`: A code resource to load from a Google Cloud Storage URI (gs://bucket/path). * `time_partitioning`: If specified, configures time-based partitioning for this table. * `expiration_ms`: Number of milliseconds for which to keep the storage for a partition. * `field`: If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. * `type`: The only type supported is DAY, which will generate one partition per day. Possible values: * DAY * `streaming_buffer`: Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer. * `estimated_bytes`: A lower-bound estimate of the number of bytes currently in the streaming buffer. * `estimated_rows`: A lower-bound estimate of the number of rows currently in the streaming buffer. * `oldest_entry_time`: Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available. * `schema`: Describes the schema of this table * `fields`: Describes the fields in a table. * `description`: The field description. The maximum length is 1,024 characters. * `fields`: Describes the nested schema fields if the type property is set to RECORD. * `mode`: The field mode Possible values: * NULLABLE * REQUIRED * REPEATED * `name`: The field name * `type`: The field data type Possible values: * STRING * BYTES * INTEGER * FLOAT * TIMESTAMP * DATE * TIME * DATETIME * RECORD * `encryption_configuration`: Custom encryption configuration * `kms_key_name`: Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. * `expiration_time`: The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. * `external_data_configuration`: Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table. * `autodetect`: Try to detect schema and format options automatically. Any option specified explicitly will be honored. * `compression`: The compression type of the data source Possible values: * GZIP * NONE * `ignore_unknown_values`: Indicates if BigQuery should allow extra values that are not represented in the table schema * `max_bad_records`: The maximum number of bad records that BigQuery can ignore when reading data * `source_format`: The data format Possible values: * CSV * GOOGLE_SHEETS * NEWLINE_DELIMITED_JSON * AVRO * DATASTORE_BACKUP * BIGTABLE * ORC * `source_uris`: The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed. * `schema`: The schema for the data. Schema is required for CSV and JSON formats * `fields`: Describes the fields in a table. * `description`: The field description * `fields`: Describes the nested schema fields if the type property is set to RECORD * `mode`: Field mode. Possible values: * NULLABLE * REQUIRED * REPEATED * `name`: Field name * `type`: Field data type Possible values: * STRING * BYTES * INTEGER * FLOAT * TIMESTAMP * DATE * TIME * DATETIME * RECORD * `google_sheets_options`: Additional options if sourceFormat is set to GOOGLE_SHEETS. * `skip_leading_rows`: The number of rows at the top of a Google Sheet that BigQuery will skip when reading the data. * `csv_options`: Additional properties to set if sourceFormat is set to CSV. * `allow_jagged_rows`: Indicates if BigQuery should accept rows that are missing trailing optional columns * `allow_quoted_newlines`: Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file * `encoding`: The character encoding of the data Possible values: * UTF-8 * ISO-8859-1 * `field_delimiter`: The separator for fields in a CSV file * `quote`: The value that is used to quote data sections in a CSV file * `skip_leading_rows`: The number of rows at the top of a CSV file that BigQuery will skip when reading the data. * `bigtable_options`: Additional options if sourceFormat is set to BIGTABLE. * `ignore_unspecified_column_families`: If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema * `read_rowkey_as_string`: If field is true, then the rowkey column families will be read and converted to string. * `column_families`: List of column families to expose in the table schema along with their types. * `columns`: Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. * `encoding`: The encoding of the values when the type is not STRING Possible values: * TEXT * BINARY * `field_name`: If the qualifier is not a valid BigQuery field identifier, a valid identifier must be provided as the column field name and is used as field name in queries. * `only_read_latest`: If this is set, only the latest version of value in this column are exposed * `qualifier_string`: Qualifier of the column * `type`: The type to convert the value in cells of this column Possible values: * BYTES * STRING * INTEGER * FLOAT * BOOLEAN * `encoding`: The encoding of the values when the type is not STRING Possible values: * TEXT * BINARY * `family_id`: Identifier of the column family. * `only_read_latest`: If this is set only the latest version of value are exposed for all columns in this column family * `type`: The type to convert the value in cells of this column family Possible values: * BYTES * STRING * INTEGER * FLOAT * BOOLEAN * `dataset`: Name of the dataset ## GCP permissions Ensure the [BigQuery API](https://console.cloud.google.com/apis/library/bigquery-json.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_bigquery_tables.md ================================================ +++ title = "google_bigquery_tables resource" draft = false [menu.gcp] title = "google_bigquery_tables" identifier = "inspec/resources/gcp/google_bigquery_tables resource" parent = "inspec/resources/gcp" +++ Use the `google_bigquery_tables` InSpec audit resource to to test a Google Cloud Table resource. ## Examples ```ruby describe.one do google_bigquery_tables(project: 'chef-gcp-inspec', dataset: 'inspec_gcp_dataset').table_references.each do |table_reference| describe google_bigquery_table(project: 'chef-gcp-inspec', dataset: 'inspec_gcp_dataset', name: table_reference.table_id) do its('expiration_time') { should cmp '1738882264000' } its('description') { should eq 'A BigQuery table' } end end end ``` ## Properties Properties that can be accessed from the `google_bigquery_tables` resource: See [google_bigquery_table](google_bigquery_table) for more detailed information. * `table_references`: an array of `google_bigquery_table` table_reference * `clusterings`: an array of `google_bigquery_table` clustering * `creation_times`: an array of `google_bigquery_table` creation_time * `friendly_names`: an array of `google_bigquery_table` friendly_name * `ids`: an array of `google_bigquery_table` id * `labels`: an array of `google_bigquery_table` labels * `last_modified_times`: an array of `google_bigquery_table` last_modified_time * `locations`: an array of `google_bigquery_table` location * `num_bytes`: an array of `google_bigquery_table` num_bytes * `num_long_term_bytes`: an array of `google_bigquery_table` num_long_term_bytes * `num_rows`: an array of `google_bigquery_table` num_rows * `require_partition_filters`: an array of `google_bigquery_table` require_partition_filter * `types`: an array of `google_bigquery_table` type * `views`: an array of `google_bigquery_table` view * `time_partitionings`: an array of `google_bigquery_table` time_partitioning * `streaming_buffers`: an array of `google_bigquery_table` streaming_buffer * `schemas`: an array of `google_bigquery_table` schema * `encryption_configurations`: an array of `google_bigquery_table` encryption_configuration * `expiration_times`: an array of `google_bigquery_table` expiration_time * `external_data_configurations`: an array of `google_bigquery_table` external_data_configuration * `datasets`: an array of `google_bigquery_table` dataset ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [BigQuery API](https://console.cloud.google.com/apis/library/bigquery-json.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_bigtableadmin_cluster.md ================================================ +++ title = "google_bigtableadmin_cluster resource" draft = false [menu.gcp] title = "google_bigtableadmin_cluster" identifier = "inspec/resources/gcp/google_bigtableadmin_cluster resource" parent = "inspec/resources/gcp" +++ Use the `google_bigtableadmin_cluster` InSpec audit resource to test the properties of a Google Cloud Cluster resource. ## Examples ```ruby describe google_bigtableadmin_cluster(name: 'value_name') do it { should exist } its('name') { should cmp 'value_name' } its('location') { should cmp 'value_location' } its('state') { should cmp 'value_state' } its('default_storage_type') { should cmp 'value_defaultstoragetype' } end describe google_bigtableadmin_cluster(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_bigtableadmin_cluster` resource: ## Properties Properties that can be accessed from the `google_bigtableadmin_cluster` resource: * `name`: The unique name of the cluster. Values are of the form `projects/{project}/instances/{instance}/clusters/a-z*`. * `location`: Immutable. The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/{project}/locations/{zone}`. * `state`: Output only. The current state of the cluster. Possible values: * STATE_NOT_KNOWN * READY * CREATING * RESIZING * DISABLED * `serve_nodes`: The number of nodes in the cluster. If no value is set, Cloud Bigtable automatically allocates nodes based on your data footprint and optimized for 50% storage utilization. * `cluster_config`: Configuration for a cluster. * `cluster_autoscaling_config`: Autoscaling config for a cluster. * `autoscaling_limits`: Limits for the number of nodes a Cluster can autoscale up/down to. * `min_serve_nodes`: Required. Minimum number of nodes to scale down to. * `max_serve_nodes`: Required. Maximum number of nodes to scale up to. * `autoscaling_targets`: The Autoscaling targets for a Cluster. These determine the recommended nodes. * `cpu_utilization_percent`: The cpu utilization that the Autoscaler should be trying to achieve. This number is on a scale from 0 (no utilization) to 100 (total utilization), and is limited between 10 and 80, otherwise it will return INVALID_ARGUMENT error. * `storage_utilization_gib_per_node`: The storage utilization that the Autoscaler should be trying to achieve. This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, it will be treated as if it were set to the default value: 2560 for SSD, 8192 for HDD. * `default_storage_type`: Immutable. The type of storage used by this cluster to serve its parent instance's tables, unless explicitly overridden. Possible values: * STORAGE_TYPE_UNSPECIFIED * SSD * HDD * `encryption_config`: Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected cluster. * `kms_key_name`: Describes the Cloud KMS encryption key that will be used to protect the destination Bigtable cluster. The requirements for this key are: 1) The Cloud Bigtable service account associated with the project that contains this cluster must be granted the `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. 2) Only regional keys can be used and the region of the CMEK key must match the region of the cluster. Values are of the form `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` ## GCP permissions Ensure the [https://bigtableadmin.googleapis.com/](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_bigtableadmin_cluster_backup.md ================================================ +++ title = "google_bigtableadmin_cluster_backup resource" draft = false [menu.gcp] title = "google_bigtableadmin_cluster_backup" identifier = "inspec/resources/gcp/google_bigtableadmin_cluster_backup resource" parent = "inspec/resources/gcp" +++ Use the `google_bigtableadmin_cluster_backup` InSpec audit resource to test the properties of a Google Cloud ClusterBackup resource. ## Examples ```ruby describe google_bigtableadmin_cluster_backup(name: ' value_name') do it { should exist } its('name') { should cmp 'value_name' } its('source_table') { should cmp 'value_sourcetable' } its('source_backup') { should cmp 'value_sourcebackup' } its('expire_time') { should cmp 'value_expiretime' } its('start_time') { should cmp 'value_starttime' } its('end_time') { should cmp 'value_endtime' } its('size_bytes') { should cmp 'value_sizebytes' } its('state') { should cmp 'value_state' } end describe google_bigtableadmin_cluster_backup(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_bigtableadmin_cluster_backup` resource: ## Properties Properties that can be accessed from the `google_bigtableadmin_cluster_backup` resource: * `name`: A globally unique identifier for the backup which cannot be changed. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}/ backups/_a-zA-Z0-9*` The final segment of the name must be between 1 and 50 characters in length. The backup is stored in the cluster identified by the prefix of the backup name of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. * `source_table`: Required. Immutable. Name of the table from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects/{project}/instances/{instance}/tables/{source_table}`. * `source_backup`: Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//clusters//backups/ * `expire_time`: Required. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 90 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup. * `start_time`: Output only. `start_time` is the time that the backup was started (i.e. approximately the time the CreateBackup request is received). The row data in this backup will be no older than this timestamp. * `end_time`: Output only. `end_time` is the time that the backup was finished. The row data in the backup will be no newer than this timestamp. * `size_bytes`: Output only. Size of the backup in bytes. * `state`: Output only. The current state of the backup. Possible values: * STATE_UNSPECIFIED * CREATING * READY * `encryption_info`: Encryption information for a given resource. If this resource is protected with customer managed encryption, the in-use Cloud Key Management Service (Cloud KMS) key version is specified along with its status. * `encryption_type`: Output only. The type of encryption used to protect this resource. Possible values: * ENCRYPTION_TYPE_UNSPECIFIED * GOOGLE_DEFAULT_ENCRYPTION * CUSTOMER_MANAGED_ENCRYPTION * `encryption_status`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `kms_key_version`: Output only. The version of the Cloud KMS key specified in the parent cluster that is in use for the data underlying this table. ## GCP permissions Ensure the [https://bigtableadmin.googleapis.com/](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_bigtableadmin_cluster_backups.md ================================================ +++ title = "google_bigtableadmin_cluster_backups resource" draft = false [menu.gcp] title = "google_bigtableadmin_cluster_backups" identifier = "inspec/resources/gcp/google_bigtableadmin_cluster_backups resource" parent = "inspec/resources/gcp" +++ Use the `google_bigtableadmin_cluster_backups` InSpec audit resource to test the properties of a Google Cloud ClusterBackup resource. ## Examples ```ruby describe google_bigtableadmin_cluster_backups(parent: 'value_parent') do it { should exist } its('name') { should include 'value_name' } its('source_table') { should include 'value_sourcetable' } its('source_backup') { should include 'value_sourcebackup' } its('expire_time') { should include 'value_expiretime' } its('start_time') { should include 'value_starttime' } its('end_time') { should include 'value_endtime' } its('size_bytes') { should include 'value_sizebytes' } its('state') { should include 'value_state' } end ``` ## Parameters Parameters that can be accessed from the `google_bigtableadmin_cluster_backups` resource: See [google_bigtableadmin_cluster_backup](google_bigtableadmin_cluster_backup) for more detailed information. * `names`: an array of `google_bigtableadmin_cluster_backup` name * `source_tables`: an array of `google_bigtableadmin_cluster_backup` source_table * `source_backups`: an array of `google_bigtableadmin_cluster_backup` source_backup * `expire_times`: an array of `google_bigtableadmin_cluster_backup` expire_time * `start_times`: an array of `google_bigtableadmin_cluster_backup` start_time * `end_times`: an array of `google_bigtableadmin_cluster_backup` end_time * `size_bytes`: an array of `google_bigtableadmin_cluster_backup` size_bytes * `states`: an array of `google_bigtableadmin_cluster_backup` state * `encryption_infos`: an array of `google_bigtableadmin_cluster_backup` encryption_info ## Properties Properties that can be accessed from the `google_bigtableadmin_cluster_backups` resource: See [google_bigtableadmin_cluster_backup](google_bigtableadmin_cluster_backup) for more detailed information. * `names`: an array of `google_bigtableadmin_cluster_backup` name * `source_tables`: an array of `google_bigtableadmin_cluster_backup` source_table * `source_backups`: an array of `google_bigtableadmin_cluster_backup` source_backup * `expire_times`: an array of `google_bigtableadmin_cluster_backup` expire_time * `start_times`: an array of `google_bigtableadmin_cluster_backup` start_time * `end_times`: an array of `google_bigtableadmin_cluster_backup` end_time * `size_bytes`: an array of `google_bigtableadmin_cluster_backup` size_bytes * `states`: an array of `google_bigtableadmin_cluster_backup` state * `encryption_infos`: an array of `google_bigtableadmin_cluster_backup` encryption_info ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://bigtableadmin.googleapis.com/](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_bigtableadmin_clusters.md ================================================ +++ title = "google_bigtableadmin_clusters resource" draft = false [menu.gcp] title = "google_bigtableadmin_clusters" identifier = "inspec/resources/gcp/google_bigtableadmin_clusters resource" parent = "inspec/resources/gcp" +++ Use the `google_bigtableadmin_clusters` InSpec audit resource to test the properties of a Google Cloud Cluster resource. ## Examples ```ruby describe google_bigtableadmin_clusters(parent: ' value_parent') do it { should exist } its('names') { should include 'value_name' } its('locations') { should include 'value_location' } its('states') { should include 'value_state' } its('default_storage_types') { should include 'value_defaultstoragetype' } end ``` ## Parameters Parameters that can be accessed from the `google_bigtableadmin_clusters` resource: See [google_bigtableadmin_cluster](google_bigtableadmin_cluster) for more detailed information. * `names`: an array of `google_bigtableadmin_cluster` name * `locations`: an array of `google_bigtableadmin_cluster` location * `states`: an array of `google_bigtableadmin_cluster` state * `serve_nodes`: an array of `google_bigtableadmin_cluster` serve_nodes * `cluster_configs`: an array of `google_bigtableadmin_cluster` cluster_config * `default_storage_types`: an array of `google_bigtableadmin_cluster` default_storage_type * `encryption_configs`: an array of `google_bigtableadmin_cluster` encryption_config ## Properties Properties that can be accessed from the `google_bigtableadmin_clusters` resource: See [google_bigtableadmin_cluster](google_bigtableadmin_cluster) for more detailed information. * `names`: an array of `google_bigtableadmin_cluster` name * `locations`: an array of `google_bigtableadmin_cluster` location * `states`: an array of `google_bigtableadmin_cluster` state * `serve_nodes`: an array of `google_bigtableadmin_cluster` serve_nodes * `cluster_configs`: an array of `google_bigtableadmin_cluster` cluster_config * `default_storage_types`: an array of `google_bigtableadmin_cluster` default_storage_type * `encryption_configs`: an array of `google_bigtableadmin_cluster` encryption_config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://bigtableadmin.googleapis.com/](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_bigtableadmin_instance_app_profile.md ================================================ +++ title = "google_bigtableadmin_instance_app_profile resource" draft = false [menu.gcp] title = "google_bigtableadmin_instance_app_profile" identifier = "inspec/resources/gcp/google_bigtableadmin_instance_app_profile resource" parent = "inspec/resources/gcp" +++ Use the `google_bigtableadmin_instance_app_profile` InSpec audit resource to test the properties of a Google Cloud InstanceAppProfile resource. ## Examples ```ruby describe google_bigtableadmin_instance_app_profile(name: 'value_name') do it { should exist } its('name') { should cmp 'value_name' } its('etag') { should cmp 'value_etag' } its('description') { should cmp 'value_description' } its('priority') { should cmp 'value_priority' } end describe google_bigtableadmin_instance_app_profile(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_bigtableadmin_instance_app_profile` resource: ## Properties Properties that can be accessed from the `google_bigtableadmin_instance_app_profile` resource: * `name`: The unique name of the app profile. Values are of the form `projects/{project}/instances/{instance}/appProfiles/_a-zA-Z0-9*`. * `etag`: Strongly validated etag for optimistic concurrency control. Preserve the value returned from `GetAppProfile` when calling `UpdateAppProfile` to fail the request if there has been a modification in the mean time. The `update_mask` of the request need not include `etag` for this protection to apply. See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more details. * `description`: Long form description of the use case for this AppProfile. * `multi_cluster_routing_use_any`: Read/write requests are routed to the nearest cluster in the instance, and will fail over to the nearest cluster that is available in the event of transient errors or delays. Clusters in a region are considered equidistant. Choosing this option sacrifices read-your-writes consistency to improve availability. * `cluster_ids`: The set of clusters to route to. The order is ignored; clusters will be tried in order of distance. If left empty, all clusters are eligible. * `single_cluster_routing`: Unconditionally routes all read/write requests to a specific cluster. This option preserves read-your-writes consistency but does not improve availability. * `cluster_id`: The cluster to which read/write requests should be routed. * `allow_transactional_writes`: Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are allowed by this app profile. It is unsafe to send these requests to the same table/row/column in multiple clusters. * `priority`: This field has been deprecated in favor of `standard_isolation.priority`. If you set this field, `standard_isolation.priority` will be set instead. The priority of requests sent using this app profile. Possible values: * PRIORITY_UNSPECIFIED * PRIORITY_LOW * PRIORITY_MEDIUM * PRIORITY_HIGH * `standard_isolation`: Standard options for isolating this app profile's traffic from other use cases. * `priority`: The priority of requests sent using this app profile. Possible values: * PRIORITY_UNSPECIFIED * PRIORITY_LOW * PRIORITY_MEDIUM * PRIORITY_HIGH * `data_boost_isolation_read_only`: Data Boost is a serverless compute capability that lets you run high-throughput read jobs and queries on your Bigtable data, without impacting the performance of the clusters that handle your application traffic. Data Boost supports read-only use cases with single-cluster routing. * `compute_billing_owner`: The Compute Billing Owner for this Data Boost App Profile. Possible values: * COMPUTE_BILLING_OWNER_UNSPECIFIED * HOST_PAYS ## GCP permissions Ensure the [https://bigtableadmin.googleapis.com/](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_bigtableadmin_instance_app_profiles.md ================================================ +++ title = "google_bigtableadmin_instance_app_profiles resource" draft = false [menu.gcp] title = "google_bigtableadmin_instance_app_profiles" identifier = "inspec/resources/gcp/google_bigtableadmin_instance_app_profiles resource" parent = "inspec/resources/gcp" +++ Use the `google_bigtableadmin_instance_app_profiles` InSpec audit resource to test the properties of a Google Cloud InstanceAppProfile resource. ## Examples ```ruby describe google_bigtableadmin_instance_app_profiles(parent: ' value_parent') do it { should exist } its('names') { should include 'value_name' } end ``` ## Parameters Parameters that can be accessed from the `google_bigtableadmin_instance_app_profiles` resource: See [google_bigtableadmin_instance_app_profile](google_bigtableadmin_instance_app_profile) for more detailed information. * `names`: an array of `google_bigtableadmin_instance_app_profile` name * `etags`: an array of `google_bigtableadmin_instance_app_profile` etag * `descriptions`: an array of `google_bigtableadmin_instance_app_profile` description * `multi_cluster_routing_use_anies`: an array of `google_bigtableadmin_instance_app_profile` multi_cluster_routing_use_any * `single_cluster_routings`: an array of `google_bigtableadmin_instance_app_profile` single_cluster_routing * `priorities`: an array of `google_bigtableadmin_instance_app_profile` priority * `standard_isolations`: an array of `google_bigtableadmin_instance_app_profile` standard_isolation * `data_boost_isolation_read_onlies`: an array of `google_bigtableadmin_instance_app_profile` data_boost_isolation_read_only ## Properties Properties that can be accessed from the `google_bigtableadmin_instance_app_profiles` resource: See [google_bigtableadmin_instance_app_profile](google_bigtableadmin_instance_app_profile) for more detailed information. * `names`: an array of `google_bigtableadmin_instance_app_profile` name * `etags`: an array of `google_bigtableadmin_instance_app_profile` etag * `descriptions`: an array of `google_bigtableadmin_instance_app_profile` description * `multi_cluster_routing_use_anies`: an array of `google_bigtableadmin_instance_app_profile` multi_cluster_routing_use_any * `single_cluster_routings`: an array of `google_bigtableadmin_instance_app_profile` single_cluster_routing * `priorities`: an array of `google_bigtableadmin_instance_app_profile` priority * `standard_isolations`: an array of `google_bigtableadmin_instance_app_profile` standard_isolation * `data_boost_isolation_read_onlies`: an array of `google_bigtableadmin_instance_app_profile` data_boost_isolation_read_only ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://bigtableadmin.googleapis.com/](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_billing_project_billing_info.md ================================================ +++ title = "google_billing_project_billing_info resource" draft = false [menu.gcp] title = "google_billing_project_billing_info" identifier = "inspec/resources/gcp/google_billing_project_billing_info resource" parent = "inspec/resources/gcp" +++ Use the `google_billing_project_billing_info` InSpec audit resource to to test a Google Cloud ProjectBillingInfo resource. ## Examples ```ruby describe google_billing_project_billing_info(project_id: 'chef-gcp-inspec') do it { should exist } its('billing_account_name') { should eq 'billingAccounts/012345-567890-ABCDEF' } its('billing_enabled') { should eq true } end ``` ## Properties Properties that can be accessed from the `google_billing_project_billing_info` resource: * `project_id`: The project id to retrieve billing info for. * `billing_account_name`: The resource name of the billing account associated with the project, if any. For example, `billingAccounts/012345-567890-ABCDEF`. * `billing_enabled`: True if the project is associated with an open billing account, to which usage on the project is charged. False if the project is associated with a closed billing account, or no billing account at all, and therefore cannot use paid services. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_cloud_scheduler_job.md ================================================ +++ title = "google_cloud_scheduler_job resource" draft = false [menu.gcp] title = "google_cloud_scheduler_job" identifier = "inspec/resources/gcp/google_cloud_scheduler_job resource" parent = "inspec/resources/gcp" +++ Use the `google_cloud_scheduler_job` InSpec audit resource to to test a Google Cloud Job resource. ## Examples ```ruby describe google_cloud_scheduler_job(project: 'chef-gcp-inspec', region: us-central1, name: 'job-name') do it { should exist } its('description') { should cmp 'A description' } its('schedule') { should cmp '*/8 * * * *' } its('time_zone') { should cmp 'America/New_York' } its('http_target.http_method') { should cmp 'POST' } its('http_target.uri') { should cmp 'https://example.com/ping' } end ``` ## Properties Properties that can be accessed from the `google_cloud_scheduler_job` resource: * `name`: The name of the job. * `description`: A human-readable description for the job. This string must not contain more than 500 characters. * `schedule`: Describes the schedule on which the job will be executed. * `time_zone`: Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the tz database. * `state`: State of the job. Possible values: * ENABLED * PAUSED * `attempt_deadline`: The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a DEADLINE_EXCEEDED failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The allowed duration for this deadline is: * For HTTP targets, between 15 seconds and 30 minutes. * For App Engine HTTP targets, between 15 seconds and 24 hours. * **Note**: For PubSub targets, this field is ignored - setting it will introduce an unresolvable diff. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s" * `retry_config`: By default, if a job does not complete successfully, meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings * `retry_count`: The number of attempts that the system will make to run a job using the exponential backoff procedure described by maxDoublings. Values greater than 5 and negative values are not allowed. * `max_retry_duration`: The time limit for retrying a failed job, measured from time when an execution was first attempted. If specified with retryCount, the job will be retried until both limits are reached. A duration in seconds with up to nine fractional digits, terminated by 's'. * `min_backoff_duration`: The minimum amount of time to wait before retrying a job after it fails. A duration in seconds with up to nine fractional digits, terminated by 's'. * `max_backoff_duration`: The maximum amount of time to wait before retrying a job after it fails. A duration in seconds with up to nine fractional digits, terminated by 's'. * `max_doublings`: The time between retries will double maxDoublings times. A job's retry interval starts at minBackoffDuration, then doubles maxDoublings times, then increases linearly, and finally retries retries at intervals of maxBackoffDuration up to retryCount times. * `pubsub_target`: Pub/Sub target If the job providers a Pub/Sub target the cron will publish a message to the provided topic * `topic_name`: The full resource name for the Cloud Pub/Sub topic to which messages will be published when a job is delivered. ~>**NOTE:** The topic name must be in the same format as required by PubSub's PublishRequest.name, e.g. `projects/my-project/topics/my-topic`. * `data`: The message payload for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. A base64-encoded string. * `attributes`: Attributes for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. * `app_engine_http_target`: App Engine HTTP target. If the job providers a App Engine HTTP target the cron will send a request to the service instance * `http_method`: Which HTTP method to use for the request. * `app_engine_routing`: App Engine Routing setting for the job. * `service`: App service. By default, the job is sent to the service which is the default service when the job is attempted. * `version`: App version. By default, the job is sent to the version which is the default version when the job is attempted. * `instance`: App instance. By default, the job is sent to an instance which is available when the job is attempted. * `relative_uri`: The relative URI. The relative URL must begin with "/" and must be a valid HTTP relative URL. It can contain a path, query string arguments, and \# fragments. If the relative URL is empty, then the root path "/" will be used. No spaces are allowed, and the maximum length allowed is 2083 characters * `body`: HTTP request body. A request body is allowed only if the HTTP method is POST or PUT. It will result in invalid argument error to set a body on a job with an incompatible HttpMethod. A base64-encoded string. * `headers`: HTTP request headers. This map contains the header field names and values. Headers can be set when the job is created. * `http_target`: HTTP target. If the job providers a http_target the cron will send a request to the targeted url * `uri`: The full URI path that the request will be sent to. * `http_method`: Which HTTP method to use for the request. * `body`: HTTP request body. A request body is allowed only if the HTTP method is POST, PUT, or PATCH. It is an error to set body on a job with an incompatible HttpMethod. A base64-encoded string. * `headers`: This map contains the header field names and values. Repeated headers are not supported, but a header value can contain commas. * `oauth_token`: Contains information needed for generating an OAuth token. This type of authorization should be used when sending requests to a GCP endpoint. * `service_account_email`: Service account email to be used for generating OAuth token. The service account must be within the same project as the job. * `scope`: OAuth scope to be used for generating OAuth access token. If not specified, "https://www.googleapis.com/auth/cloud-platform" will be used. * `oidc_token`: Contains information needed for generating an OpenID Connect token. This type of authorization should be used when sending requests to third party endpoints or Cloud Run. * `service_account_email`: Service account email to be used for generating OAuth token. The service account must be within the same project as the job. * `audience`: Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used. * `region`: Region where the scheduler job resides ## GCP permissions Ensure the [Cloud Scheduler](https://console.cloud.google.com/apis/library/cloudscheduler.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_cloud_scheduler_jobs.md ================================================ +++ title = "google_cloud_scheduler_jobs resource" draft = false [menu.gcp] title = "google_cloud_scheduler_jobs" identifier = "inspec/resources/gcp/google_cloud_scheduler_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_cloud_scheduler_jobs` InSpec audit resource to to test a Google Cloud Job resource. ## Examples ```ruby google_cloud_scheduler_jobs(project: 'chef-gcp-inspec', region: ).names.each do |name| describe google_cloud_scheduler_job(project: 'chef-gcp-inspec', region: us-central1, name: name) do it { should exist } its('description') { should cmp 'A description' } its('schedule') { should cmp '*/8 * * * *' } its('time_zone') { should cmp 'America/New_York' } its('http_target.http_method') { should cmp 'POST' } its('http_target.uri') { should cmp 'https://example.com/ping' } end end ``` ## Properties Properties that can be accessed from the `google_cloud_scheduler_jobs` resource: See [google_cloud_scheduler_job](google_cloud_scheduler_job) for more detailed information. * `names`: an array of `google_cloud_scheduler_job` name * `descriptions`: an array of `google_cloud_scheduler_job` description * `schedules`: an array of `google_cloud_scheduler_job` schedule * `time_zones`: an array of `google_cloud_scheduler_job` time_zone * `states`: an array of `google_cloud_scheduler_job` state * `attempt_deadlines`: an array of `google_cloud_scheduler_job` attempt_deadline * `retry_configs`: an array of `google_cloud_scheduler_job` retry_config * `pubsub_targets`: an array of `google_cloud_scheduler_job` pubsub_target * `app_engine_http_targets`: an array of `google_cloud_scheduler_job` app_engine_http_target * `http_targets`: an array of `google_cloud_scheduler_job` http_target * `regions`: an array of `google_cloud_scheduler_job` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Scheduler](https://console.cloud.google.com/apis/library/cloudscheduler.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_cloudbuild_trigger.md ================================================ +++ title = "google_cloudbuild_trigger resource" draft = false [menu.gcp] title = "google_cloudbuild_trigger" identifier = "inspec/resources/gcp/google_cloudbuild_trigger resource" parent = "inspec/resources/gcp" +++ Use the `google_cloudbuild_trigger` InSpec audit resource to to test a Google Cloud Trigger resource. ## Examples ```ruby describe google_cloudbuild_triggers(project: 'chef-gcp-inspec') do its('count') { should eq 1 } end google_cloudbuild_triggers(project: 'chef-gcp-inspec').ids.each do |id| describe google_cloudbuild_trigger(project: 'chef-gcp-inspec', id: id) do its('filename') { should eq 'cloudbuild.yaml' } its('trigger_template.branch_name') { should eq 'trigger-branch' } its('trigger_template.repo_name') { should eq 'trigger-repo' } its('trigger_template.project_id') { should eq 'trigger-project' } end end ``` ## Properties Properties that can be accessed from the `google_cloudbuild_trigger` resource: * `id`: The unique identifier for the trigger. * `name`: Name of the trigger. Must be unique within the project. * `description`: Human-readable description of the trigger. * `tags`: Tags for annotation of a BuildTrigger * `disabled`: Whether the trigger is disabled or not. If true, the trigger will never result in a build. * `create_time`: Time when the trigger was created. * `substitutions`: Substitutions data for Build resource. * `filename`: Path, from the source root, to a file whose contents is used for the template. Either a filename or build template must be provided. * `ignored_files`: ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for `**`. If ignoredFiles and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignoredFiles is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. * `included_files`: ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for `**`. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is not empty, then we make sure that at least one of those files matches a includedFiles glob. If not, then we do not trigger a build. * `trigger_template`: Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. * `project_id`: ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. * `repo_name`: Name of the Cloud Source Repository. If omitted, the name "default" is assumed. * `dir`: Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution. * `invert_regex`: Only trigger a build if the revision regex does NOT match the revision regex. * `branch_name`: Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. This field is a regular expression. * `tag_name`: Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. This field is a regular expression. * `commit_sha`: Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided. * `github`: Describes the configuration of a trigger that creates a build whenever a GitHub event is received. * `owner`: Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform". * `name`: Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". * `pull_request`: filter to match changes in pull requests. Specify only one of pullRequest or push. * `branch`: Regex of branches to match. * `comment_control`: Whether to block builds on a "/gcbrun" comment from a repository owner or collaborator. Possible values: * COMMENTS_DISABLED * COMMENTS_ENABLED * COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY * `invert_regex`: If true, branches that do NOT match the git_ref will trigger a build. * `push`: filter to match changes in refs, like branches or tags. Specify only one of pullRequest or push. * `invert_regex`: When true, only trigger a build if the revision regex does NOT match the git_ref regex. * `branch`: Regex of branches to match. Specify only one of branch or tag. * `tag`: Regex of tags to match. Specify only one of branch or tag. * `build`: Contents of the build template. Either a filename or build template must be provided. * `source`: The location of the source files to build. * `storage_source`: Location of the source in an archive file in Google Cloud Storage. * `bucket`: Google Cloud Storage bucket containing the source. * `object`: Google Cloud Storage object containing the source. This object must be a gzipped archive file (.tar.gz) containing source to build. * `generation`: Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used * `repo_source`: Location of the source in a Google Cloud Source Repository. * `project_id`: ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. * `repo_name`: Name of the Cloud Source Repository. * `dir`: Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution. * `invert_regex`: Only trigger a build if the revision regex does NOT match the revision regex. * `substitutions`: Substitutions to use in a triggered build. Should only be used with triggers.run * `branch_name`: Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax * `tag_name`: Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax * `commit_sha`: Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided. * `tags`: Tags for annotation of a Build. These are not docker tags. * `images`: A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE. * `substitutions`: Substitutions data for Build resource. * `queue_ttl`: TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from createTime. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". * `logs_bucket`: Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build_id}.txt. * `timeout`: Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. This timeout must be equal to or greater than the sum of the timeouts for build steps within the build. The expected format is the number of seconds followed by s. Default time is ten minutes (600s). * `secrets`: Secrets to decrypt using Cloud Key Management Service. * `kms_key_name`: Cloud KMS key name to use to decrypt these envs. * `secret_env`: Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets. * `steps`: The operations to be performed on the workspace. * `name`: The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (see https://github.com/GoogleCloudPlatform/cloud-builders for images and examples). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step. * `args`: A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. * `env`: A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". * `id`: Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency. * `entrypoint`: Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used * `dir`: Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. * `secret_env`: A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. * `timeout`: Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out. * `timing`: Output only. Stores timing information for executing this build step. * `volumes`: List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. * `name`: Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. * `path`: Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. * `wait_for`: The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully. * `artifacts`: Artifacts produced by the build that should be uploaded upon successful completion of all build steps. * `images`: A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE. * `objects`: A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. * `location`: Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix. * `paths`: Path globs used to match files in the build's workspace. * `timing`: Output only. Stores timing information for pushing all artifact objects. * `start_time`: Start of time span. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `end_time`: End of time span. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `options`: Special options for this build. * `source_provenance_hash`: Requested hash for SourceProvenance. * `requested_verify_option`: Requested verifiability options. Possible values: * NOT_VERIFIED * VERIFIED * `machine_type`: Compute Engine machine type on which to run the build. Possible values: * UNSPECIFIED * N1_HIGHCPU_8 * N1_HIGHCPU_32 * `disk_size_gb`: Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error. * `substitution_option`: Option to specify behavior when there is an error in the substitution checks. NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file. Possible values: * MUST_MATCH * ALLOW_LOOSE * `dynamic_substitutions`: Option to specify whether or not to apply bash style string operations to the substitutions. NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file. * `log_streaming_option`: Option to define build log streaming behavior to Google Cloud Storage. Possible values: * STREAM_DEFAULT * STREAM_ON * STREAM_OFF * `worker_pool`: Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool} This field is experimental. * `logging`: Option to specify the logging mode, which determines if and where build logs are stored. Possible values: * LOGGING_UNSPECIFIED * LEGACY * GCS_ONLY * STACKDRIVER_ONLY * NONE * `env`: A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". * `secret_env`: A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build. * `volumes`: Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. * `name`: Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. * `path`: Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. ## GCP permissions Ensure the [Cloud Build API](https://console.cloud.google.com/apis/library/cloudbuild.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_cloudbuild_triggers.md ================================================ +++ title = "google_cloudbuild_triggers resource" draft = false [menu.gcp] title = "google_cloudbuild_triggers" identifier = "inspec/resources/gcp/google_cloudbuild_triggers resource" parent = "inspec/resources/gcp" +++ Use the `google_cloudbuild_triggers` InSpec audit resource to to test a Google Cloud Trigger resource. ## Examples ```ruby describe google_cloudbuild_triggers(project: 'chef-gcp-inspec') do its('count') { should eq 1 } end google_cloudbuild_triggers(project: 'chef-gcp-inspec').ids.each do |id| describe google_cloudbuild_trigger(project: 'chef-gcp-inspec', id: id) do its('filename') { should eq 'cloudbuild.yaml' } its('trigger_template.branch_name') { should eq 'trigger-branch' } its('trigger_template.repo_name') { should eq 'trigger-repo' } its('trigger_template.project_id') { should eq 'trigger-project' } end end ``` ## Properties Properties that can be accessed from the `google_cloudbuild_triggers` resource: See [google_cloudbuild_trigger](google_cloudbuild_trigger) for more detailed information. * `ids`: an array of `google_cloudbuild_trigger` id * `names`: an array of `google_cloudbuild_trigger` name * `descriptions`: an array of `google_cloudbuild_trigger` description * `tags`: an array of `google_cloudbuild_trigger` tags * `disableds`: an array of `google_cloudbuild_trigger` disabled * `create_times`: an array of `google_cloudbuild_trigger` create_time * `substitutions`: an array of `google_cloudbuild_trigger` substitutions * `filenames`: an array of `google_cloudbuild_trigger` filename * `ignored_files`: an array of `google_cloudbuild_trigger` ignored_files * `included_files`: an array of `google_cloudbuild_trigger` included_files * `trigger_templates`: an array of `google_cloudbuild_trigger` trigger_template * `githubs`: an array of `google_cloudbuild_trigger` github * `builds`: an array of `google_cloudbuild_trigger` build ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Build API](https://console.cloud.google.com/apis/library/cloudbuild.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_cloudfunctions_cloud_function.md ================================================ +++ title = "google_cloudfunctions_cloud_function resource" draft = false [menu.gcp] title = "google_cloudfunctions_cloud_function" identifier = "inspec/resources/gcp/google_cloudfunctions_cloud_function resource" parent = "inspec/resources/gcp" +++ Use the `google_cloudfunctions_cloud_function` InSpec audit resource to to test a Google Cloud CloudFunction resource. ## Examples ```ruby describe google_cloudfunctions_cloud_function(project: 'chef-gcp-inspec', location: 'europe-west1', name: 'inspec-gcp-function') do it { should exist } its('description') { should eq 'A description of the function' } its('available_memory_mb') { should eq '128' } its('https_trigger.url') { should match /\/inspec-gcp-function$/ } its('entry_point') { should eq 'hello' } its('environment_variables') { should include('MY_ENV_VAR' => 'val1') } end describe google_cloudfunctions_cloud_function(project: 'chef-gcp-inspec', location: 'europe-west1', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_cloudfunctions_cloud_function` resource: * `name`: A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`. * `description`: User-provided description of a function. * `status`: Status of the function deployment. Possible values: * CLOUD_FUNCTION_STATUS_UNSPECIFIED * ACTOVE * OFFLINE * DEPLOY_IN_PROGRESS * DELETE_IN_PROGRESS * UNKNOWN * `entry_point`: The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". For Node.js this is name of a function exported by the module specified in source_location. * `runtime`: The runtime in which the function is going to run. If empty, defaults to Node.js 6. * `timeout`: The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds. * `available_memory_mb`: The amount of memory in MB available for a function. * `service_account_email`: The email of the service account for this function. * `update_time`: The last update timestamp of a Cloud Function * `version_id`: The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created. * `labels`: A set of key/value label pairs associated with this Cloud Function. * `environment_variables`: Environment variables that shall be available during function execution. * `source_archive_url`: The Google Cloud Storage URL, starting with gs://, pointing to the zip archive which contains the function. * `source_upload_url`: The Google Cloud Storage signed URL used for source uploading. * `source_repository`: The source repository where a function is hosted. * `url`: The URL pointing to the hosted repository where the function is defined * `deployed_url`: The URL pointing to the hosted repository where the function were defined at the time of deployment. * `https_trigger`: An HTTPS endpoint type of source that can be triggered via URL. * `url`: The deployed url for the function. * `event_trigger`: An HTTPS endpoint type of source that can be triggered via URL. * `event_type`: The type of event to observe. For example: `providers/cloud.storage/eventTypes/object.change` and `providers/cloud.pubsub/eventTypes/topic.publish`. * `resource`: The resource(s) from which to observe events, for example, `projects/_/buckets/myBucket.` * `service`: The hostname of the service that should be observed. * `location`: The location of this cloud function. ## GCP permissions Ensure the [Cloud Functions API](https://console.cloud.google.com/apis/library/cloudfunctions.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_cloudfunctions_cloud_functions.md ================================================ +++ title = "google_cloudfunctions_cloud_functions resource" draft = false [menu.gcp] title = "google_cloudfunctions_cloud_functions" identifier = "inspec/resources/gcp/google_cloudfunctions_cloud_functions resource" parent = "inspec/resources/gcp" +++ Use the `google_cloudfunctions_cloud_functions` InSpec audit resource to to test a Google Cloud CloudFunction resource. ## Examples ```ruby describe google_cloudfunctions_cloud_functions(project: 'chef-gcp-inspec', location: 'europe-west1') do its('descriptions') { should include 'A description of the function' } its('entry_points') { should include 'hello' } end ``` ## Properties Properties that can be accessed from the `google_cloudfunctions_cloud_functions` resource: See [google_cloudfunctions_cloud_function](google_cloudfunctions_cloud_function) for more detailed information. * `names`: an array of `google_cloudfunctions_cloud_function` name * `descriptions`: an array of `google_cloudfunctions_cloud_function` description * `statuses`: an array of `google_cloudfunctions_cloud_function` status * `entry_points`: an array of `google_cloudfunctions_cloud_function` entry_point * `runtimes`: an array of `google_cloudfunctions_cloud_function` runtime * `timeouts`: an array of `google_cloudfunctions_cloud_function` timeout * `available_memory_mbs`: an array of `google_cloudfunctions_cloud_function` available_memory_mb * `service_account_emails`: an array of `google_cloudfunctions_cloud_function` service_account_email * `update_times`: an array of `google_cloudfunctions_cloud_function` update_time * `version_ids`: an array of `google_cloudfunctions_cloud_function` version_id * `labels`: an array of `google_cloudfunctions_cloud_function` labels * `environment_variables`: an array of `google_cloudfunctions_cloud_function` environment_variables * `source_archive_urls`: an array of `google_cloudfunctions_cloud_function` source_archive_url * `source_upload_urls`: an array of `google_cloudfunctions_cloud_function` source_upload_url * `source_repositories`: an array of `google_cloudfunctions_cloud_function` source_repository * `https_triggers`: an array of `google_cloudfunctions_cloud_function` https_trigger * `event_triggers`: an array of `google_cloudfunctions_cloud_function` event_trigger * `locations`: an array of `google_cloudfunctions_cloud_function` location ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Functions API](https://console.cloud.google.com/apis/library/cloudfunctions.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_composer_project_location_environment.md ================================================ +++ title = "google_composer_project_location_environment resource" draft = false [menu.gcp] title = "google_composer_project_location_environment" identifier = "inspec/resources/gcp/google_composer_project_location_environment resource" parent = "inspec/resources/gcp" +++ Use the `google_composer_project_location_environment` InSpec audit resource to to test a Google Cloud ProjectLocationEnvironment resource. ## Examples ```ruby describe google_composer_project_location_environment(name: ' value_name') do it { should exist } its('name') { should cmp 'value_name' } its('uuid') { should cmp 'value_uuid' } its('state') { should cmp 'value_state' } its('create_time') { should cmp 'value_createtime' } its('update_time') { should cmp 'value_updatetime' } its('satisfies_pzs') { should cmp 'value_satisfies_pzs' } its('config.gke_cluster') { should cmp 'value_gke_cluster' } its('labels.additional_properties') { should cmp label_hash } its('storage_config.bucket') { should cmp 'value_bucket_id' } end describe google_composer_project_location_environment(name: "does_not_exit") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_composer_project_location_environment` resource: * `name`: The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" EnvironmentId must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. * `config`: Configuration information for an environment. * `gke_cluster`: Output only. The Kubernetes Engine cluster used to run this environment. * `dag_gcs_prefix`: Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud Storage objects reside in a flat namespace, a hierarchical file tree can be simulated using "/"-delimited object name prefixes. DAG objects for this environment reside in a simulated directory with the given prefix. * `node_count`: The number of nodes in the Kubernetes Engine cluster that will be used to run this environment. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `software_config`: Specifies the selection and configuration of software inside the environment. * `image_version`: The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major or major.minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview). * `airflow_config_overrides`: Optional. Apache Airflow configuration properties to override. Property keys contain the section and property names, separated by a hyphen, for example "core-dags_are_paused_at_creation". Section names must not contain hyphens ("-"), opening square brackets ("["), or closing square brackets ("]"). The property name must not be empty and must not contain an equals sign ("=") or semicolon (";"). Section and property names must not contain a period ("."). Apache Airflow configuration property names must be written in [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can contain any character, and can be written in any lower/upper case format. Certain Apache Airflow configuration property values are [blocked](/composer/docs/concepts/airflow-configurations), and cannot be overridden. * `additional_properties`: * `pypi_packages`: Optional. Custom Python Package Index (PyPI) packages to be installed in the environment. Keys refer to the lowercase package name such as "numpy" and values are the lowercase extras and version specifier such as "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a package without pinning it to a version specifier, use the empty string as the value. * `additional_properties`: * `env_variables`: Optional. Additional environment variables to provide to the Apache Airflow scheduler, worker, and webserver processes. Environment variable names must match the regular expression `a-zA-Z_*`. They cannot specify Apache Airflow software configuration overrides (they cannot match the regular expression `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the following reserved names: * `AIRFLOW_HOME` * `C_FORCE_ROOT` * `CONTAINER_NAME` * `DAGS_FOLDER` * `GCP_PROJECT` * `GCS_BUCKET` * `GKE_CLUSTER_NAME` * `SQL_DATABASE` * `SQL_INSTANCE` * `SQL_PASSWORD` * `SQL_PROJECT` * `SQL_REGION` * `SQL_USER` * `additional_properties`: * `python_version`: Optional. The major version of Python used to run the Apache Airflow scheduler, worker, and webserver processes. Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be updated. This field is only supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. Environments in newer versions always use Python major version 3. * `scheduler_count`: Optional. The number of schedulers for Airflow. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `node_config`: The configuration information for the Kubernetes Engine nodes running the Apache Airflow software. * `location`: Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which to deploy the VMs used to run the Apache Airflow software, specified as a [relative resource name](/apis/design/resource_names#relative_resource_name). For example: "projects/{projectId}/zones/{zoneId}". This `location` must belong to the enclosing environment's project and location. If both this field and `nodeConfig.machineType` are specified, `nodeConfig.machineType` must belong to this `location`; if both are unspecified, the service will pick a zone in the Compute Engine region corresponding to the Cloud Composer location, and propagate that choice to both fields. If only one field (`location` or `nodeConfig.machineType`) is specified, the location information from the specified field will be propagated to the unspecified field. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `machine_type`: Optional. The Compute Engine [machine type](/compute/docs/machine-types) used for cluster instances, specified as a [relative resource name](/apis/design/resource_names#relative_resource_name). For example: "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". The `machineType` must belong to the enclosing environment's project and location. If both this field and `nodeConfig.location` are specified, this `machineType` must belong to the `nodeConfig.location`; if both are unspecified, the service will pick a zone in the Compute Engine region corresponding to the Cloud Composer location, and propagate that choice to both fields. If exactly one of this field and `nodeConfig.location` is specified, the location information from the specified field will be propagated to the unspecified field. The `machineTypeId` must not be a [shared-core machine type](/compute/docs/machine-types#sharedcore). If this field is unspecified, the `machineTypeId` defaults to "n1-standard-1". This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `network`: Optional. The Compute Engine network to be used for machine communications, specified as a [relative resource name](/apis/design/resource_names#relative_resource_name). For example: "projects/{projectId}/global/networks/{networkId}". If unspecified, the "default" network ID in the environment's project is used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) is provided, `nodeConfig.subnetwork` must also be provided. For [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see `nodeConfig.subnetwork`. * `subnetwork`: Optional. The Compute Engine subnetwork to be used for machine communications, specified as a [relative resource name](/apis/design/resource_names#relative_resource_name). For example: "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" If a subnetwork is provided, `nodeConfig.network` must also be provided, and the subnetwork must belong to the enclosing environment's project and location. * `disk_size_gb`: Optional. The disk size in GB used for node VMs. Minimum size is 30GB. If unspecified, defaults to 100GB. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `oauth_scopes`: Optional. The set of Google API scopes to be made available on all node VMs. If `oauth_scopes` is empty, defaults to ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `service_account`: Optional. The Google Cloud Platform Service Account to be used by the node VMs. If a service account is not specified, the "default" Compute Engine service account is used. Cannot be updated. * `tags`: Optional. The list of instance tags applied to all node VMs. Tags are used to identify valid sources or targets for network firewalls. Each tag within the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Cannot be updated. * `ip_allocation_policy`: Configuration for controlling how IPs are allocated in the GKE cluster running the Apache Airflow software. * `use_ip_aliases`: Optional. Whether or not to enable Alias IPs in the GKE cluster. If `true`, a VPC-native cluster is created. This field is only supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. Environments in newer versions always use VPC-native GKE clusters. * `cluster_secondary_range_name`: Optional. The name of the GKE cluster's secondary range used to allocate IP addresses to pods. For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, this field is applicable only when `use_ip_aliases` is true. * `cluster_ipv4_cidr_block`: Optional. The IP address range used to allocate IP addresses to pods in the GKE cluster. For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, this field is applicable only when `use_ip_aliases` is true. Set to blank to have GKE choose a range with the default size. Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific netmask. Set to a [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. * `services_secondary_range_name`: Optional. The name of the services' secondary range used to allocate IP addresses to the GKE cluster. For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, this field is applicable only when `use_ip_aliases` is true. * `services_ipv4_cidr_block`: Optional. The IP address range of the services IP addresses in this GKE cluster. For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, this field is applicable only when `use_ip_aliases` is true. Set to blank to have GKE choose a range with the default size. Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific netmask. Set to a [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. * `enable_ip_masq_agent`: Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for all destination addresses, except between pods traffic. See: https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent * `private_environment_config`: The configuration information for configuring a Private IP Cloud Composer environment. * `enable_private_environment`: Optional. If `true`, a Private IP Cloud Composer environment is created. If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be set to true for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `private_cluster_config`: Configuration options for the private GKE cluster in a Cloud Composer environment. * `enable_private_endpoint`: Optional. If `true`, access to the public endpoint of the GKE cluster is denied. * `master_ipv4_cidr_block`: Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If left blank, the default value of '172.16.0.0/23' is used. * `master_ipv4_reserved_range`: Output only. The IP range in CIDR notation to use for the hosted master network. This range is used for assigning internal IP addresses to the GKE cluster master or set of masters and to the internal load balancer virtual IP. This range must not overlap with any other ranges in use within the cluster's network. * `web_server_ipv4_cidr_block`: Optional. The CIDR block from which IP range for web server will be reserved. Needs to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and `cloud_sql_ipv4_cidr_block`. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `cloud_sql_ipv4_cidr_block`: Optional. The CIDR block from which IP range in tenant project will be reserved for Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`. * `web_server_ipv4_reserved_range`: Output only. The IP range reserved for the tenant project's App Engine VMs. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `cloud_composer_network_ipv4_cidr_block`: Optional. The CIDR block from which IP range for Cloud Composer Network in tenant project will be reserved. Needs to be disjoint from private_cluster_config.master_ipv4_cidr_block and cloud_sql_ipv4_cidr_block. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `cloud_composer_network_ipv4_reserved_range`: Output only. The IP range reserved for the tenant project's Cloud Composer network. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `enable_privately_used_public_ips`: Optional. When enabled, IPs from public (non-RFC1918) ranges can be used for `IPAllocationPolicy.cluster_ipv4_cidr_block` and `IPAllocationPolicy.service_ipv4_cidr_block`. * `cloud_composer_connection_subnetwork`: Optional. When specified, the environment will use Private Service Connect instead of VPC peerings to connect to Cloud SQL in the Tenant Project, and the PSC endpoint in the Customer Project will use an IP address from this subnetwork. * `networking_config`: Configuration options for networking connections in the Composer 2 environment. * `connection_type`: Optional. Indicates the user requested specifc connection type between Tenant and Customer projects. You cannot set networking connection type in public IP environment. Possible values: * CONNECTION_TYPE_UNSPECIFIED * VPC_PEERING * PRIVATE_SERVICE_CONNECT * `web_server_network_access_control`: Network-level access control policy for the Airflow web server. * `allowed_ip_ranges`: A collection of allowed IP ranges with descriptions. * `value`: IP address or range, defined using CIDR notation, of requests that this rule applies to. Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. IP range prefixes should be properly truncated. For example, `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` should be truncated to `2001:db8::/32`. * `description`: Optional. User-provided description. It must contain at most 300 characters. * `database_config`: The configuration of Cloud SQL instance that is used by the Apache Airflow software. * `machine_type`: Optional. Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `zone`: Optional. The Compute Engine zone where the Airflow database is created. If zone is provided, it must be in the region selected for the environment. If zone is not provided, a zone is automatically selected. The zone can only be set during environment creation. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.*. * `web_server_config`: The configuration settings for the Airflow web server App Engine instance. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.* * `machine_type`: Optional. Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. If not specified, composer-n1-webserver-2 will be used. Value custom is returned only in response, if Airflow web server parameters were manually changed to a non-standard values. * `encryption_config`: The encryption options for the Cloud Composer environment and its dependencies.Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `kms_key_name`: Optional. Customer-managed Encryption Key available through Google's Key Management Service. Cannot be updated. If not specified, Google-managed key will be used. * `maintenance_window`: The configuration settings for Cloud Composer maintenance window. The following example: ``` { "startTime":"2019-08-01T01:00:00Z" "endTime":"2019-08-01T07:00:00Z" "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE" } ``` would define a maintenance window between 01 and 07 hours UTC during each Tuesday and Wednesday. * `start_time`: Required. Start time of the first recurrence of the maintenance window. * `end_time`: Required. Maintenance window end time. It is used only to calculate the duration of the maintenance window. The value for end-time must be in the future, relative to `start_time`. * `recurrence`: Required. Maintenance window recurrence. Format is a subset of [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. * `workloads_config`: The Kubernetes workloads configuration for GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `scheduler`: Configuration for resources used by Airflow schedulers. * `cpu`: Optional. CPU request and limit for a single Airflow scheduler replica. * `memory_gb`: Optional. Memory (GB) request and limit for a single Airflow scheduler replica. * `storage_gb`: Optional. Storage (GB) request and limit for a single Airflow scheduler replica. * `count`: Optional. The number of schedulers. * `web_server`: Configuration for resources used by Airflow web server. * `cpu`: Optional. CPU request and limit for Airflow web server. * `memory_gb`: Optional. Memory (GB) request and limit for Airflow web server. * `storage_gb`: Optional. Storage (GB) request and limit for Airflow web server. * `worker`: Configuration for resources used by Airflow workers. * `cpu`: Optional. CPU request and limit for a single Airflow worker replica. * `memory_gb`: Optional. Memory (GB) request and limit for a single Airflow worker replica. * `storage_gb`: Optional. Storage (GB) request and limit for a single Airflow worker replica. * `min_count`: Optional. Minimum number of workers for autoscaling. * `max_count`: Optional. Maximum number of workers for autoscaling. * `triggerer`: Configuration for resources used by Airflow triggerers. * `count`: Optional. The number of triggerers. * `cpu`: Optional. CPU request and limit for a single Airflow triggerer replica. * `memory_gb`: Optional. Memory (GB) request and limit for a single Airflow triggerer replica. * `environment_size`: Optional. The size of the Cloud Composer environment. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. Possible values: * ENVIRONMENT_SIZE_UNSPECIFIED * ENVIRONMENT_SIZE_SMALL * ENVIRONMENT_SIZE_MEDIUM * ENVIRONMENT_SIZE_LARGE * `airflow_uri`: Output only. The URI of the Apache Airflow Web UI hosted within this environment (see [Airflow web interface](/composer/docs/how-to/accessing/airflow-web-interface)). * `airflow_byoid_uri`: Output only. The 'bring your own identity' variant of the URI of the Apache Airflow Web UI hosted within this environment, to be accessed with external identities using workforce identity federation (see [Access environments with workforce identity federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). * `master_authorized_networks_config`: Configuration options for the master authorized networks feature. Enabled master authorized networks will disallow all external traffic to access Kubernetes master through HTTPS except traffic from the given CIDR blocks, Google Compute Engine Public IPs and Google Prod IPs. * `enabled`: Whether or not master authorized networks feature is enabled. * `cidr_blocks`: Up to 50 external networks that could access Kubernetes master through HTTPS. * `display_name`: User-defined name that identifies the CIDR block. * `cidr_block`: CIDR block that must be specified in CIDR notation. * `recovery_config`: The Recovery settings of an environment. * `scheduled_snapshots_config`: The configuration for scheduled snapshot creation mechanism. * `enabled`: Optional. Whether scheduled snapshots creation is enabled. * `snapshot_location`: Optional. The Cloud Storage location for storing automatically created snapshots. * `snapshot_creation_schedule`: Optional. The cron expression representing the time when snapshots creation mechanism runs. This field is subject to additional validation around frequency of execution. * `time_zone`: Optional. Time zone that sets the context to interpret snapshot_creation_schedule. * `resilience_mode`: Optional. Resilience mode of the Cloud Composer Environment. This field is supported for Cloud Composer environments in versions composer-2.2.0-airflow-*.*.* and newer. Possible values: * RESILIENCE_MODE_UNSPECIFIED * HIGH_RESILIENCE * `uuid`: Output only. The UUID (Universally Unique IDentifier) associated with this environment. This value is generated when the environment is created. * `state`: The current state of the environment. Possible values: * STATE_UNSPECIFIED * CREATING * RUNNING * UPDATING * DELETING * ERROR * `create_time`: Output only. The time at which this environment was created. * `update_time`: Output only. The time at which this environment was last modified. * `labels`: Optional. User-defined labels for this environment. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. * `additional_properties`: * `satisfies_pzs`: Output only. Reserved for future use. * `storage_config`: The configuration for data storage in the environment. * `bucket`: Optional. The name of the Cloud Storage bucket used by the environment. No `gs://` prefix. ## GCP permissions Ensure the [https://composer.googleapis.com/](https://console.cloud.google.com/apis/library/composer.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_composer_project_location_environments.md ================================================ +++ title = "google_composer_project_location_environments resource" draft = false [menu.gcp] title = "google_composer_project_location_environments" identifier = "inspec/resources/gcp/google_composer_project_location_environments resource" parent = "inspec/resources/gcp" +++ Use the `google_composer_project_location_environments` InSpec audit resource to to test a Google Cloud ProjectLocationEnvironment resource. ## Examples ```ruby describe google_composer_project_location_environments(parent: ' value_parent') do it { should exist } its('name') { should include('value_name') } its('uuid') { should include('value_uuid') } its('state') { should include('value_state') } its('create_time') { should include('value_createtime') } its('update_time') { should include('value_updatetime') } its('satisfies_pzs') { should include('value_satisfies_pzs') } end ``` ## Properties Properties that can be accessed from the `google_composer_project_location_environments` resource: See [google_composer_project_location_environment](google_composer_project_location_environment) for more detailed information. * `names`: an array of `google_composer_project_location_environment` name * `configs`: an array of `google_composer_project_location_environment` config * `uuids`: an array of `google_composer_project_location_environment` uuid * `states`: an array of `google_composer_project_location_environment` state * `create_times`: an array of `google_composer_project_location_environment` create_time * `update_times`: an array of `google_composer_project_location_environment` update_time * `labels`: an array of `google_composer_project_location_environment` labels * `satisfies_pzs`: an array of `google_composer_project_location_environment` satisfies_pzs * `storage_configs`: an array of `google_composer_project_location_environment` storage_config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://composer.googleapis.com/](https://console.cloud.google.com/apis/library/composer.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_composer_project_location_image_versions.md ================================================ +++ title = "google_composer_project_location_image_versions resource" draft = false [menu.gcp] title = "google_composer_project_location_image_versions" identifier = "inspec/resources/gcp/google_composer_project_location_image_versions resource" parent = "inspec/resources/gcp" +++ Use the `google_composer_project_location_image_versions` InSpec audit resource to to test a Google Cloud ProjectLocationImageVersion resource. ## Examples ```ruby describe google_composer_project_location_image_versions(parent: ' value_parent') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_composer_project_location_image_versions` resource: See [google_composer_project_location_image_version](google_composer_project_location_image_version) for more detailed information. * `image_versions`: an array of `google_composer_project_location_image_version` image_versions * `next_page_tokens`: an array of `google_composer_project_location_image_version` next_page_token ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://composer.googleapis.com/](https://console.cloud.google.com/apis/library/composer.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_accelerator_type.md ================================================ +++ title = "google_compute_accelerator_type resource" draft = false [menu.gcp] title = "google_compute_accelerator_type" identifier = "inspec/resources/gcp/google_compute_accelerator_type resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_accelerator_type` InSpec audit resource to to test a Google Cloud AcceleratorType resource. ## Examples ```ruby describe google_compute_accelerator_type(project: 'chef-gcp-inspec', zone: 'us-east1-b', name: 'accelerator_id') do it { should exist } it { should be_up } end ``` ## Properties Properties that can be accessed from the `google_compute_accelerator_type` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `deprecated`: The deprecation status associated with this accelerator type. * `state`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it. * `deprecated`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it. * `obsolete`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it. * `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. * `state`: The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. Possible values: * DEPRECATED * OBSOLETE * DELETED * `description`: An optional textual description of the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. * `zone`: The name of the zone where the accelerator type resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_accelerator_types.md ================================================ +++ title = "google_compute_accelerator_types resource" draft = false [menu.gcp] title = "google_compute_accelerator_types" identifier = "inspec/resources/gcp/google_compute_accelerator_types resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_accelerator_types` InSpec audit resource to to test a Google Cloud AcceleratorType resource. ## Examples ```ruby describe google_compute_accelerator_types(project: 'chef-gcp-inspec', zone: 'us-east1-b') do it { should exist } it { should be_up } end ``` ## Properties Properties that can be accessed from the `google_compute_accelerator_types` resource: See [google_compute_accelerator_type](google_compute_accelerator_type) for more detailed information. * `creation_timestamps`: an array of `google_compute_accelerator_type` creation_timestamp * `deprecateds`: an array of `google_compute_accelerator_type` deprecated * `descriptions`: an array of `google_compute_accelerator_type` description * `ids`: an array of `google_compute_accelerator_type` id * `names`: an array of `google_compute_accelerator_type` name * `zones`: an array of `google_compute_accelerator_type` zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_address.md ================================================ +++ title = "google_compute_address resource" draft = false [menu.gcp] title = "google_compute_address" identifier = "inspec/resources/gcp/google_compute_address resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_address` is used to test a Google Address resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_address(project: 'chef-gcp-inspec', location: 'europe-west2', name: 'inspec-gcp-global-address') do it { should exist } its('address') { should eq '10.2.0.3' } its('address_type') { should eq 'INTERNAL' } its('user_count') { should eq 0 } end describe google_compute_address(project: 'chef-gcp-inspec', location: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP compute address IP exists describe google_compute_address(project: 'chef-inspec-gcp', location: 'europe-west2', name: 'compute-address') do its('address_ip_exists') { should be true } end ### Test that a GCP compute address is in a particular status describe google_compute_address(project: 'chef-inspec-gcp', location: 'europe-west2', name: 'compute-address') do its('status') { should eq "IN_USE" } end ### Test that a GCP compute address IP has the expected number of users describe google_compute_address(project: 'chef-inspec-gcp', location: 'europe-west2', name: 'compute-address') do its('user_count') { should eq 1 } end ### Test that the first user of a GCP compute address has the expected resource name describe google_compute_address(project: 'chef-inspec-gcp', location: 'europe-west2', name: 'compute-address') do its('user_resource_name') { should eq "gcp_ext_vm_name" } end ## Properties Properties that can be accessed from the `google_compute_address` resource: * `address`: The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. * `address_type`: The type of address to reserve. Possible values: * INTERNAL * EXTERNAL * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `purpose`: The purpose of this resource, which can be one of the following values: * GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. * SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers. * VPC_PEERING for addresses that are reserved for VPC peer networks. This should only be set when using an Internal address. Possible values: * GCE_ENDPOINT * VPC_PEERING * SHARED_LOADBALANCER_VIP * `network_tier`: The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. Possible values: * PREMIUM * STANDARD * `subnetwork`: The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes. * `users`: The URLs of the resources that are using this address. * `labels`: (Beta only) Labels to apply to this address. A list of key->value pairs. * `label_fingerprint`: (Beta only) The fingerprint used for optimistic locking of this resource. Used internally during updates. * `status`: The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available. Possible values: * RESERVING * RESERVED * IN_USE * `region`: URL of the region where the regional address resides. This field is not applicable to global addresses. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_addresses.md ================================================ +++ title = "google_compute_addresses resource" draft = false [menu.gcp] title = "google_compute_addresses" identifier = "inspec/resources/gcp/google_compute_addresses resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_addresses` is used to test a Google Address resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_addresses(project: 'chef-gcp-inspec', location: 'europe-west2') do its('addresses') { should include '10.2.0.3' } its('names') { should include 'inspec-gcp-global-address' } end ``` ## Properties Properties that can be accessed from the `google_compute_addresses` resource: See [google_compute_address](google_compute_address) for more detailed information. * `addresses`: an array of `google_compute_address` address * `address_types`: an array of `google_compute_address` address_type * `creation_timestamps`: an array of `google_compute_address` creation_timestamp * `descriptions`: an array of `google_compute_address` description * `ids`: an array of `google_compute_address` id * `names`: an array of `google_compute_address` name * `purposes`: an array of `google_compute_address` purpose * `network_tiers`: an array of `google_compute_address` network_tier * `subnetworks`: an array of `google_compute_address` subnetwork * `users`: an array of `google_compute_address` users * `labels`: (Beta only) an array of `google_compute_address` labels * `label_fingerprints`: (Beta only) an array of `google_compute_address` label_fingerprint * `statuses`: an array of `google_compute_address` status * `regions`: an array of `google_compute_address` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_autoscaler.md ================================================ +++ title = "google_compute_autoscaler resource" draft = false [menu.gcp] title = "google_compute_autoscaler" identifier = "inspec/resources/gcp/google_compute_autoscaler resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_autoscaler` is used to test a Google Autoscaler resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_autoscaler(project: 'chef-gcp-inspec', zone: 'zone', name: 'inspec-gcp-autoscaler') do it { should exist } its('target') { should match /\/inspec-gcp-igm$/ } its('autoscaling_policy.max_num_replicas') { should eq '5' } its('autoscaling_policy.min_num_replicas') { should eq '1' } its('autoscaling_policy.cool_down_period_sec') { should eq '60' } its('autoscaling_policy.cpu_utilization.utilization_target') { should eq '0.5' } end describe google_compute_autoscaler(project: 'chef-gcp-inspec', zone: 'zone', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_autoscaler` resource: * `id`: Unique identifier for the resource. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `name`: Name of the resource. The name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. * `autoscaling_policy`: The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. * `min_num_replicas`: The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed. * `max_num_replicas`: The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas. * `cool_down_period_sec`: The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process. * `mode`: Defines operating mode for this policy. Possible values: * OFF * ONLY_UP * ON * `scale_down_control`: (Beta only) Defines scale down controls to reduce the risk of response latency and outages due to abrupt scale-in events * `max_scaled_down_replicas`: A nested object resource * `fixed`: Specifies a fixed number of VM instances. This must be a positive integer. * `percent`: Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. * `time_window_sec`: How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above. * `scale_in_control`: Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events * `max_scaled_in_replicas`: A nested object resource * `fixed`: Specifies a fixed number of VM instances. This must be a positive integer. * `percent`: Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. * `time_window_sec`: How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above. * `cpu_utilization`: Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. * `utilization_target`: The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6. If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization. If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization. * `predictive_method`: (Beta only) Indicates whether predictive autoscaling based on CPU metric is enabled. Valid values are: - NONE (default). No predictive method is used. The autoscaler scales the group to meet current demand based on real-time metrics. - OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by monitoring daily and weekly load patterns and scaling out ahead of anticipated demand. * `custom_metric_utilizations`: Configuration parameters of autoscaling based on a custom metric. * `metric`: The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE. * `single_instance_assignment`: (Beta only) If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target is `pubsub.googleapis.com/subscription/num_undelivered_messages` or a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can't include a chunk assignable to a single instance, it could be better used with utilization_target instead. * `utilization_target`: The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric. For example, a good metric to use as a utilizationTarget is www.googleapis.com/compute/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances. * `utilization_target_type`: Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Possible values: * GAUGE * DELTA_PER_SECOND * DELTA_PER_MINUTE * `filter`: (Beta only) A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value. * `load_balancing_utilization`: Configuration parameters of autoscaling based on a load balancer. * `utilization_target`: Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. * `scaling_schedules`: (Beta only) Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler and they can overlap. * `target`: URL of the managed instance group that this autoscaler will scale. * `zone`: URL of the zone where the instance group resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_autoscalers.md ================================================ +++ title = "google_compute_autoscalers resource" draft = false [menu.gcp] title = "google_compute_autoscalers" identifier = "inspec/resources/gcp/google_compute_autoscalers resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_autoscalers` is used to test a Google Autoscaler resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby autoscalers = google_compute_autoscalers(project: 'chef-gcp-inspec', zone: 'zone') describe.one do autoscalers.autoscaling_policies.each do |autoscaling_policy| describe autoscaling_policy do its('max_num_replicas') { should eq '5' } its('min_num_replicas') { should eq '1' } its('cool_down_period_sec') { should eq '60' } its('cpu_utilization.utilization_target') { should eq '0.5' } end end end ``` ## Properties Properties that can be accessed from the `google_compute_autoscalers` resource: See [google_compute_autoscaler](google_compute_autoscaler) for more detailed information. * `ids`: an array of `google_compute_autoscaler` id * `creation_timestamps`: an array of `google_compute_autoscaler` creation_timestamp * `names`: an array of `google_compute_autoscaler` name * `descriptions`: an array of `google_compute_autoscaler` description * `autoscaling_policies`: an array of `google_compute_autoscaler` autoscaling_policy * `targets`: an array of `google_compute_autoscaler` target * `zones`: an array of `google_compute_autoscaler` zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_backend_bucket.md ================================================ +++ title = "google_compute_backend_bucket resource" draft = false [menu.gcp] title = "google_compute_backend_bucket" identifier = "inspec/resources/gcp/google_compute_backend_bucket resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_backend_bucket` is used to test a Google BackendBucket resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_backend_bucket(project: 'chef-gcp-inspec', name: 'inspec-gcp-backend-bucket') do it { should exist } its('description') { should eq 'Backend bucket example' } its('enable_cdn') { should be 'true' } its('bucket_name') { should eq 'gcp-inspec-storage-bucket' } end describe google_compute_backend_bucket(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_backend_bucket` resource: * `bucket_name`: Cloud Storage bucket name. * `cdn_policy`: Cloud CDN configuration for this Backend Bucket. * `signed_url_cache_max_age_sec`: Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. * `default_ttl`: (Beta only) Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). * `max_ttl`: (Beta only) Specifies the maximum allowed TTL for cached content served by this origin. * `client_ttl`: (Beta only) Specifies the maximum allowed TTL for cached content served by this origin. * `negative_caching`: (Beta only) Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. * `negative_caching_policy`: (Beta only) Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy. Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs. * `code`: (Beta only) The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once. * `ttl`: (Beta only) The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. * `cache_mode`: (Beta only) Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values: * USE_ORIGIN_HEADERS * FORCE_CACHE_ALL * CACHE_ALL_STATIC * `serve_while_stale`: (Beta only) Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. * `custom_response_headers`: (Beta only) Headers that the HTTP/S load balancer should add to proxied responses. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional textual description of the resource; provided by the client when the resource is created. * `enable_cdn`: If true, enable Cloud CDN for this BackendBucket. * `id`: Unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_backend_buckets.md ================================================ +++ title = "google_compute_backend_buckets resource" draft = false [menu.gcp] title = "google_compute_backend_buckets" identifier = "inspec/resources/gcp/google_compute_backend_buckets resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_backend_buckets` is used to test a Google BackendBucket resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_backend_buckets(project: 'chef-gcp-inspec', name: 'inspec-gcp-backend-bucket') do its('descriptions') { should include 'Backend bucket example' } its('bucket_names') { should include 'gcp-inspec-storage-bucket' } end ``` ## Properties Properties that can be accessed from the `google_compute_backend_buckets` resource: See [google_compute_backend_bucket](google_compute_backend_bucket) for more detailed information. * `bucket_names`: an array of `google_compute_backend_bucket` bucket_name * `cdn_policies`: an array of `google_compute_backend_bucket` cdn_policy * `custom_response_headers`: (Beta only) an array of `google_compute_backend_bucket` custom_response_headers * `creation_timestamps`: an array of `google_compute_backend_bucket` creation_timestamp * `descriptions`: an array of `google_compute_backend_bucket` description * `enable_cdns`: an array of `google_compute_backend_bucket` enable_cdn * `ids`: an array of `google_compute_backend_bucket` id * `names`: an array of `google_compute_backend_bucket` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_backend_service.md ================================================ +++ title = "google_compute_backend_service resource" draft = false [menu.gcp] title = "google_compute_backend_service" identifier = "inspec/resources/gcp/google_compute_backend_service resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_backend_service` is used to test a Google BackendService resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_backend_service(project: 'chef-gcp-inspec', name: 'inspec-gcp-backend-service') do it { should exist } its('description') { should eq 'A description' } its('port_name') { should eq 'http' } its('protocol') { should eq 'HTTP' } its('timeout_sec') { should eq '10' } its('enable_cdn') { should eq 'true' } end describe google_compute_backend_service(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_backend_service` resource: * `affinity_cookie_ttl_sec`: Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used. * `backends`: The set of backends that serve this BackendService. * `balancing_mode`: Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL). Possible values: * UTILIZATION * RATE * CONNECTION * `capacity_scaler`: A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0]. * `description`: An optional description of this resource. Provide this property when you create the resource. * `group`: The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL. * `max_connections`: The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance or maxConnectionsPerEndpoint, as appropriate for group type, must be set. * `max_connections_per_instance`: The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. * `max_connections_per_endpoint`: The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set. * `max_rate`: The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set. * `max_rate_per_instance`: The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. * `max_rate_per_endpoint`: The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. * `max_utilization`: Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0]. * `circuit_breakers`: Settings controlling the volume of connections to a backend service. This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. * `connect_timeout`: (Beta only) The timeout for new network connections to hosts. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. * `max_requests_per_connection`: Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. * `max_connections`: The maximum number of connections to the backend cluster. Defaults to 1024. * `max_pending_requests`: The maximum number of pending requests to the backend cluster. Defaults to 1024. * `max_requests`: The maximum number of parallel requests to the backend cluster. Defaults to 1024. * `max_retries`: The maximum number of parallel retries to the backend cluster. Defaults to 3. * `consistent_hash`: Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies if the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. This field is only applicable when locality_lb_policy is set to MAGLEV or RING_HASH. * `http_cookie`: Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. * `ttl`: Lifetime of the cookie. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. * `name`: Name of the cookie. * `path`: Path to set for the cookie. * `http_header_name`: The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD. * `minimum_ring_size`: The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024. * `cdn_policy`: Cloud CDN configuration for this BackendService. * `cache_key_policy`: The CacheKeyPolicy for this CdnPolicy. * `include_host`: If true requests to different hosts will be cached separately. * `include_protocol`: If true, http and https requests will be cached separately. * `include_query_string`: If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. * `query_string_blacklist`: Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. * `query_string_whitelist`: Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. * `signed_url_cache_max_age_sec`: Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. * `default_ttl`: (Beta only) Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). * `max_ttl`: (Beta only) Specifies the maximum allowed TTL for cached content served by this origin. * `client_ttl`: (Beta only) Specifies the maximum allowed TTL for cached content served by this origin. * `negative_caching`: (Beta only) Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. * `negative_caching_policy`: (Beta only) Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy. Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs. * `code`: (Beta only) The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once. * `ttl`: (Beta only) The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. * `cache_mode`: (Beta only) Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values: * USE_ORIGIN_HEADERS * FORCE_CACHE_ALL * CACHE_ALL_STATIC * `serve_while_stale`: (Beta only) Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. * `connection_draining`: Settings for connection draining * `draining_timeout_sec`: Time for which instance will be drained (not accept new connections, but still work to finish started). * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `custom_request_headers`: Headers that the HTTP/S load balancer should add to proxied requests. * `custom_response_headers`: (Beta only) Headers that the HTTP/S load balancer should add to proxied responses. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. * `description`: An optional description of this resource. * `enable_cdn`: If true, enable Cloud CDN for this BackendService. * `health_checks`: The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. For internal load balancing, a URL to a HealthCheck resource must be specified instead. * `id`: The unique identifier for the resource. * `iap`: Settings for enabling Cloud Identity Aware Proxy * `enabled`: Enables IAP. * `oauth2_client_id`: OAuth2 Client ID for IAP * `oauth2_client_secret`: OAuth2 Client Secret for IAP * `oauth2_client_secret_sha256`: OAuth2 Client Secret SHA-256 for IAP * `load_balancing_scheme`: Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values: * EXTERNAL * INTERNAL_SELF_MANAGED * `locality_lb_policy`: The load balancing algorithm used within the scope of the locality. The possible values are - * ROUND_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. * LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. * RING_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. * RANDOM - The load balancer selects a random healthy host. * ORIGINAL_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. * MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. Possible values: * ROUND_ROBIN * LEAST_REQUEST * RING_HASH * RANDOM * ORIGINAL_DESTINATION * MAGLEV * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `outlier_detection`: Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. * `base_ejection_time`: The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `consecutive_errors`: Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. * `consecutive_gateway_failure`: The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5. * `enforcing_consecutive_errors`: The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. * `enforcing_consecutive_gateway_failure`: The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. * `enforcing_success_rate`: The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. * `interval`: Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `max_ejection_percent`: Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%. * `success_rate_minimum_hosts`: The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5. * `success_rate_request_volume`: The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100. * `success_rate_stdev_factor`: This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900. * `port_name`: Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL. * `protocol`: The protocol this BackendService uses to communicate with backends. The default is HTTP. **NOTE**: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API. Possible values: * HTTP * HTTPS * HTTP2 * TCP * SSL * GRPC * `security_policy`: The security policy associated with this backend service. * `session_affinity`: Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP. Possible values: * NONE * CLIENT_IP * CLIENT_IP_PORT_PROTO * CLIENT_IP_PROTO * GENERATED_COOKIE * HEADER_FIELD * HTTP_COOKIE * `timeout_sec`: How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400]. * `log_config`: This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. * `enable`: Whether to enable logging for the load balancer traffic served by this backend service. * `sample_rate`: This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_backend_services.md ================================================ +++ title = "google_compute_backend_services resource" draft = false [menu.gcp] title = "google_compute_backend_services" identifier = "inspec/resources/gcp/google_compute_backend_services resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_backend_services` is used to test a Google BackendService resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_backend_services(project: 'chef-gcp-inspec') do its('count') { should be >= 1 } its('names') { should include 'inspec-gcp-backend-service' } its('port_names') { should include 'http' } its('protocols') { should include 'HTTP' } its('timeout_secs') { should include '10' } end ``` ## Properties Properties that can be accessed from the `google_compute_backend_services` resource: See [google_compute_backend_service](google_compute_backend_service) for more detailed information. * `affinity_cookie_ttl_secs`: an array of `google_compute_backend_service` affinity_cookie_ttl_sec * `backends`: an array of `google_compute_backend_service` backends * `circuit_breakers`: an array of `google_compute_backend_service` circuit_breakers * `consistent_hashes`: an array of `google_compute_backend_service` consistent_hash * `cdn_policies`: an array of `google_compute_backend_service` cdn_policy * `connection_drainings`: an array of `google_compute_backend_service` connection_draining * `creation_timestamps`: an array of `google_compute_backend_service` creation_timestamp * `custom_request_headers`: an array of `google_compute_backend_service` custom_request_headers * `custom_response_headers`: (Beta only) an array of `google_compute_backend_service` custom_response_headers * `fingerprints`: an array of `google_compute_backend_service` fingerprint * `descriptions`: an array of `google_compute_backend_service` description * `enable_cdns`: an array of `google_compute_backend_service` enable_cdn * `health_checks`: an array of `google_compute_backend_service` health_checks * `ids`: an array of `google_compute_backend_service` id * `iaps`: an array of `google_compute_backend_service` iap * `load_balancing_schemes`: an array of `google_compute_backend_service` load_balancing_scheme * `locality_lb_policies`: an array of `google_compute_backend_service` locality_lb_policy * `names`: an array of `google_compute_backend_service` name * `outlier_detections`: an array of `google_compute_backend_service` outlier_detection * `port_names`: an array of `google_compute_backend_service` port_name * `protocols`: an array of `google_compute_backend_service` protocol * `security_policies`: an array of `google_compute_backend_service` security_policy * `session_affinities`: an array of `google_compute_backend_service` session_affinity * `timeout_secs`: an array of `google_compute_backend_service` timeout_sec * `log_configs`: an array of `google_compute_backend_service` log_config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_disk.md ================================================ +++ title = "google_compute_disk resource" draft = false [menu.gcp] title = "google_compute_disk" identifier = "inspec/resources/gcp/google_compute_disk resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_disk` is used to test a Google Disk resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby most_recent_image = google_compute_image(project: 'debian-cloud', name: 'debian-10-buster-v20191014') describe google_compute_disk(project: 'chef-gcp-inspec', name: 'inspec-snapshot-disk', zone: 'zone') do it { should exist } # Test that the image is the most recent image for the family its('source_image') { should match most_recent_image.self_link } its('type') { should match 'pd-standard' } end describe.one do google_compute_disk(project: 'chef-gcp-inspec', name: 'inspec-snapshot-disk', zone: 'zone').labels.each_pair do |key, value| describe key do it { should cmp "environment" } end end end describe google_compute_disk(project: 'chef-gcp-inspec', name: 'nonexistent', zone: 'zone') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_disk` resource: * `label_fingerprint`: The fingerprint used for optimistic locking of this resource. Used internally during updates. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: The unique identifier for the resource. * `last_attach_timestamp`: Last attach timestamp in RFC3339 text format. * `last_detach_timestamp`: Last detach timestamp in RFC3339 text format. * `labels`: Labels to apply to this disk. A list of key->value pairs. * `licenses`: Any applicable publicly visible licenses. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `size_gb`: Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. * `users`: Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance * `physical_block_size_bytes`: Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. * `interface`: (Beta only) Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Possible values: * SCSI * NVME * `type`: URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. * `source_image`: The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a private image that you created, specify the image name in the following format: global/images/my-private-image You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-private-family * `resource_policies`: (Beta only) Resource policies applied to this disk for automatic snapshot creations. * `multi_writer`: (Beta only) Indicates whether or not the disk can be read/write attached to more than one instance. * `zone`: A reference to the zone where the disk resides. * `source_image_encryption_key`: The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. * `kms_key_service_account`: The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. * `source_image_id`: The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used. * `disk_encryption_key`: Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. Your project's Compute Engine System service account (`service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com`) must have `roles/cloudkms.cryptoKeyEncrypterDecrypter` to use this feature. * `kms_key_service_account`: The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. * `source_snapshot`: The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. If the snapshot is in another project than this disk, you must supply a full URL. For example, the following are valid values: * `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot` * `projects/project/global/snapshots/snapshot` * `global/snapshots/snapshot` * `source_snapshot_encryption_key`: The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_service_account`: The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. * `source_snapshot_id`: The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_disk_type.md ================================================ +++ title = "google_compute_disk_type resource" draft = false [menu.gcp] title = "google_compute_disk_type" identifier = "inspec/resources/gcp/google_compute_disk_type resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_disk_type` InSpec audit resource to to test a Google Cloud DiskType resource. ## Examples ```ruby describe google_compute_disk_type(project: 'chef-gcp-inspec', zone: 'us-east1-b', name: 'disk_type_name') do it { should exist } it { should be_up } end ``` ## Properties Properties that can be accessed from the `google_compute_disk_type` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `default_disk_size_gb`: Server-defined default disk size in GB. * `deprecated`: The deprecation status associated with this disk type. * `deleted`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED. * `deprecated`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED. * `obsolete`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE. * `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. * `state`: The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. Possible values: * DEPRECATED * OBSOLETE * DELETED * `description`: An optional description of this resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. * `valid_disk_size`: An optional textual description of the valid disk size, such as "10GB-10TB". * `zone`: A reference to the zone where the disk type resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_disk_types.md ================================================ +++ title = "google_compute_disk_types resource" draft = false [menu.gcp] title = "google_compute_disk_types" identifier = "inspec/resources/gcp/google_compute_disk_types resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_disk_types` InSpec audit resource to to test a Google Cloud DiskType resource. ## Examples ```ruby describe google_compute_disk_types(project: 'chef-gcp-inspec', zone: 'us-east1-b') do it { should exist } it { should be_up } end ``` ## Properties Properties that can be accessed from the `google_compute_disk_types` resource: See [google_compute_disk_type](google_compute_disk_type) for more detailed information. * `creation_timestamps`: an array of `google_compute_disk_type` creation_timestamp * `default_disk_size_gbs`: an array of `google_compute_disk_type` default_disk_size_gb * `deprecateds`: an array of `google_compute_disk_type` deprecated * `descriptions`: an array of `google_compute_disk_type` description * `ids`: an array of `google_compute_disk_type` id * `names`: an array of `google_compute_disk_type` name * `valid_disk_sizes`: an array of `google_compute_disk_type` valid_disk_size * `zones`: an array of `google_compute_disk_type` zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_disks.md ================================================ +++ title = "google_compute_disks resource" draft = false [menu.gcp] title = "google_compute_disks" identifier = "inspec/resources/gcp/google_compute_disks resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_disks` is used to test a Google Disk resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby most_recent_image = google_compute_image(project: 'debian-cloud', name: 'debian-10-buster-v20191014') describe google_compute_disks(project: 'chef-gcp-inspec', zone: 'zone') do it { should exist } its('names') { should include 'inspec-snapshot-disk' } its('source_images') { should include most_recent_image.self_link } end ``` ## Properties Properties that can be accessed from the `google_compute_disks` resource: See [google_compute_disk](google_compute_disk) for more detailed information. * `label_fingerprints`: an array of `google_compute_disk` label_fingerprint * `creation_timestamps`: an array of `google_compute_disk` creation_timestamp * `descriptions`: an array of `google_compute_disk` description * `ids`: an array of `google_compute_disk` id * `last_attach_timestamps`: an array of `google_compute_disk` last_attach_timestamp * `last_detach_timestamps`: an array of `google_compute_disk` last_detach_timestamp * `labels`: an array of `google_compute_disk` labels * `licenses`: an array of `google_compute_disk` licenses * `names`: an array of `google_compute_disk` name * `size_gbs`: an array of `google_compute_disk` size_gb * `users`: an array of `google_compute_disk` users * `physical_block_size_bytes`: an array of `google_compute_disk` physical_block_size_bytes * `interfaces`: (Beta only) an array of `google_compute_disk` interface * `types`: an array of `google_compute_disk` type * `source_images`: an array of `google_compute_disk` source_image * `resource_policies`: (Beta only) an array of `google_compute_disk` resource_policies * `multi_writers`: (Beta only) an array of `google_compute_disk` multi_writer * `zones`: an array of `google_compute_disk` zone * `source_image_encryption_keys`: an array of `google_compute_disk` source_image_encryption_key * `source_image_ids`: an array of `google_compute_disk` source_image_id * `disk_encryption_keys`: an array of `google_compute_disk` disk_encryption_key * `source_snapshots`: an array of `google_compute_disk` source_snapshot * `source_snapshot_encryption_keys`: an array of `google_compute_disk` source_snapshot_encryption_key * `source_snapshot_ids`: an array of `google_compute_disk` source_snapshot_id ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_external_vpn_gateway.md ================================================ +++ title = "google_compute_external_vpn_gateway resource" draft = false [menu.gcp] title = "google_compute_external_vpn_gateway" identifier = "inspec/resources/gcp/google_compute_external_vpn_gateway resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_external_vpn_gateway` InSpec audit resource to to test a Google Cloud externalVpnGateway resource. ## Examples ```ruby describe google_compute_external_vpn_gateway(project: 'chef-gcp-inspec', name: 'external-gateway') do it { should exist } it { should be_up } end ``` ## Properties Properties that can be accessed from the `google_compute_external_vpn_gateway` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `redundancy_type`: Indicates the user-supplied redundancy type of this external VPN gateway. Possible values: * SINGLE_IP_INTERNALLY_REDUNDANT * TWO_IPS_REDUNDANCY * FOUR_IPS_REDUNDANCY * `interfaces`: A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. * `id`: The numeric ID of this interface. The allowed input values for this id for different redundancy types of external VPN gateway: SINGLE_IP_INTERNALLY_REDUNDANT - 0 TWO_IPS_REDUNDANCY - 0, 1 FOUR_IPS_REDUNDANCY - 0, 1, 2, 3' * `ip_address`: IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider's VPN gateway, it cannot be an IP address from Google Compute Engine. * `labels`: map (key: string, value: string) Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * `label_fingerprint`: A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway. * `next_page_token`: This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. * `description`: An optional textual description of the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_external_vpn_gateways.md ================================================ +++ title = "google_compute_external_vpn_gateways resource" draft = false [menu.gcp] title = "google_compute_external_vpn_gateways" identifier = "inspec/resources/gcp/google_compute_external_vpn_gateways resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_external_vpn_gateways` InSpec audit resource to to test a Google Cloud externalVpnGateway resource. ## Examples ```ruby describe google_compute_external_vpn_gateways(project: 'chef-gcp-inspec') do it { should exist } it { should be_up } end ``` ## Properties Properties that can be accessed from the `google_compute_external_vpn_gateways` resource: See [google_compute_external_vpn_gateway](google_compute_external_vpn_gateway) for more detailed information. * `creation_timestamps`: an array of `google_compute_external_vpn_gateway` creation_timestamp * `redundancy_types`: an array of `google_compute_external_vpn_gateway` redundancy_type * `interfaces`: an array of `google_compute_external_vpn_gateway` interfaces * `labels`: an array of `google_compute_external_vpn_gateway` labels * `label_fingerprints`: an array of `google_compute_external_vpn_gateway` label_fingerprint * `next_page_tokens`: an array of `google_compute_external_vpn_gateway` next_page_token * `descriptions`: an array of `google_compute_external_vpn_gateway` description * `ids`: an array of `google_compute_external_vpn_gateway` id * `names`: an array of `google_compute_external_vpn_gateway` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_firewall.md ================================================ +++ title = "google_compute_firewall resource" draft = false [menu.gcp] title = "google_compute_firewall" identifier = "inspec/resources/gcp/google_compute_firewall resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_firewall` is used to test a Google Firewall resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_firewall(project: 'chef-gcp-inspec', name: 'inspec-gcp-firewall') do its('direction') { should cmp 'INGRESS' } its('log_config_enabled?') { should be true } its('source_tags') { should include 'some-tag' } end ``` ### Test that a GCP compute firewall allows SSH access on port 22 describe google_compute_firewall(project: 'chef-inspec-gcp', name: 'firewall-rule') do its('allowed_ssh?') { should be true } end ### Test that a GCP compute firewall does not allow HTTP access on port 80 describe google_compute_firewall(project: 'chef-inspec-gcp', name: 'firewall-rule') do its('allowed_http?') { should be false } end ### Test that a GCP compute firewall allows HTTPS access on port 443 describe google_compute_firewall(project: 'chef-inspec-gcp', name: 'firewall-rule') do its('allowed_https?') { should be true } end ### Test the direction of a GCP compute firewall e.g. "INGRESS" or "EGRESS" describe google_compute_firewall(project: 'chef-inspec-gcp', name: 'firewall-rule') do its('direction') { should eq "INGRESS" } end ### Test the source IP range list for the GCP compute firewall is not open to the world describe google_compute_firewall(project: 'chef-inspec-gcp', name: 'firewall-rule') do its('source_ranges') { should_not eq ["0.0.0.0/0"] } # or using helpers its('direction') { should eq "INGRESS" } it { should_not allow_ip_ranges ["0.0.0.0/0"] } end ### Test whether or not a port/protocol is defined for a given firewall rule describe google_compute_firewall(project: 'chef-inspec-gcp', name: 'firewall-rule') do # similar to the http / ssh helpers above it { should_not allow_port_protocol("22", "tcp") } it { should allow_port_protocol("80", "tcp") } end ### Test whether firewall rule allows ingress/egress for specified tags describe google_compute_firewall(project: 'chef-inspec-gcp', name: 'firewall-rule') do its('direction') { should eq "INGRESS" } it { should allow_source_tags ["allow-gcp-tag"] } it { should allow_target_tags ["allow-gcp-other-tag"] } # stricter it { should allow_source_tags_only ["allow-gcp-tag"] } it { should allow_target_tags_only ["allow-gcp-other-tag"] } end ## Properties Properties that can be accessed from the `google_compute_firewall` resource: * `allowed`: The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. * `ip_protocol`: The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip, all), or the IP protocol number. * `ports`: An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `denied`: The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. * `ip_protocol`: The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip, all), or the IP protocol number. * `ports`: An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. * `description`: An optional description of this resource. Provide this property when you create the resource. * `destination_ranges`: If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported. * `direction`: Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags. Possible values: * INGRESS * EGRESS * `disabled`: Denotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. * `log_config`: This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. * `enable`: This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. * `metadata`: This field denotes whether to include or exclude metadata for firewall logs. Possible values: * EXCLUDE_ALL_METADATA * INCLUDE_ALL_METADATA * `id`: The unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `network`: URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/myproject/global/ networks/my-network projects/myproject/global/networks/my-network global/networks/default * `priority`: Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority. * `source_ranges`: If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported. * `source_service_accounts`: If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. * `source_tags`: If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. * `target_service_accounts`: A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. * `target_tags`: A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_firewalls.md ================================================ +++ title = "google_compute_firewalls resource" draft = false [menu.gcp] title = "google_compute_firewalls" identifier = "inspec/resources/gcp/google_compute_firewalls resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_firewalls` is used to test a Google Firewall resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_firewalls(project: 'chef-gcp-inspec') do its('count') { should be >= 1 } its('firewall_names') { should include 'inspec-gcp-firewall' } its('firewall_directions') { should include 'INGRESS' } end ``` ### Test that there are no more than a specified number of firewalls available for the project describe google_compute_firewalls(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test that an expected firewall is available for the project describe google_compute_firewalls(project: 'chef-inspec-gcp') do its('firewall_names') { should include "my-app-firewall-rule" } end ### Test that a particular named rule does not exist describe google_compute_firewalls(project: 'chef-inspec-gcp') do its('firewall_names') { should_not include "default-allow-ssh" } end ### Test there are no firewalls for the "INGRESS" direction describe google_compute_firewalls(project: 'chef-inspec-gcp').where(firewall_direction: 'INGRESS') do it { should_not exist } end ## Properties Properties that can be accessed from the `google_compute_firewalls` resource: See [google_compute_firewall](google_compute_firewall) for more detailed information. * `alloweds`: an array of `google_compute_firewall` allowed * `creation_timestamps`: an array of `google_compute_firewall` creation_timestamp * `denieds`: an array of `google_compute_firewall` denied * `descriptions`: an array of `google_compute_firewall` description * `destination_ranges`: an array of `google_compute_firewall` destination_ranges * `firewall_directions`: an array of `google_compute_firewall` direction * `disableds`: an array of `google_compute_firewall` disabled * `log_configs`: an array of `google_compute_firewall` log_config * `firewall_ids`: an array of `google_compute_firewall` id * `firewall_names`: an array of `google_compute_firewall` name * `networks`: an array of `google_compute_firewall` network * `priorities`: an array of `google_compute_firewall` priority * `source_ranges`: an array of `google_compute_firewall` source_ranges * `source_service_accounts`: an array of `google_compute_firewall` source_service_accounts * `source_tags`: an array of `google_compute_firewall` source_tags * `target_service_accounts`: an array of `google_compute_firewall` target_service_accounts * `target_tags`: an array of `google_compute_firewall` target_tags ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_forwarding_rule.md ================================================ +++ title = "google_compute_forwarding_rule resource" draft = false [menu.gcp] title = "google_compute_forwarding_rule" identifier = "inspec/resources/gcp/google_compute_forwarding_rule resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_forwarding_rule` is used to test a Google ForwardingRule resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_forwarding_rule(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'udp-forwarding-rule') do it { should exist } its('region') { should match 'europe-west2' } its('creation_timestamp') { should be > Time.now - 365*60*60*24*10 } its('load_balancing_scheme') { should match 'EXTERNAL' } its('port_range') { should match "500-500" } its('ip_protocol') { should match "UDP" } end describe google_compute_forwarding_rule(project: 'chef-gcp-inspec', region: 'europe-west2', name: "nonexistent") do it { should_not exist } end ``` ### Test that a GCP compute forwarding_rule exists describe google_compute_forwarding_rule(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-forwarding_rule') do it { should exist } end ### Test when a GCP compute forwarding_rule was created describe google_compute_forwarding_rule(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-forwarding_rule') do its('creation_timestamp_date') { should be > Time.now - 365*60*60*24*10 } end ### Test for an expected forwarding_rule identifier describe google_compute_forwarding_rule(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-forwarding_rule') do its('id') { should eq 12345567789 } end ### Test that a forwarding_rule load_balancing_scheme is as expected describe google_compute_forwarding_rule(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-forwarding_rule') do its('load_balancing_scheme') { should eq "INTERNAL" } end ### Test that a forwarding_rule IP address is as expected describe google_compute_forwarding_rule(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-forwarding_rule') do its('ip_address') { should eq "10.0.0.1" } end ### Test that a forwarding_rule is associated with the expected network describe google_compute_forwarding_rule(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-forwarding_rule') do its('network') { should match "gcp_network_name" } end ## Properties Properties that can be accessed from the `google_compute_forwarding_rule` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `is_mirroring_collector`: Indicates whether or not this load balancer can be used as a collector for packet mirroring. To prevent mirroring loops, instances behind this load balancer will not have their traffic mirrored even if a PacketMirroring rule applies to them. This can only be set to true for load balancers that have their loadBalancingScheme set to INTERNAL. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: The unique identifier for the resource. * `ip_address`: The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: * 100.1.2.3 * https://www.googleapis.com/compute/v1/projects/project/regions/ region/addresses/address * projects/project/regions/region/addresses/address * regions/region/addresses/address * global/addresses/address * address * `ip_protocol`: The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL, only TCP and UDP are valid. Possible values: * TCP * UDP * ESP * AH * SCTP * ICMP * `backend_service`: A BackendService to receive the matched traffic. This is used only for INTERNAL load balancing. * `load_balancing_scheme`: This signifies what the ForwardingRule will be used for and can be EXTERNAL, INTERNAL, or INTERNAL_MANAGED. EXTERNAL is used for Classic Cloud VPN gateways, protocol forwarding to VMs from an external IP address, and HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP load balancers. INTERNAL is used for protocol forwarding to VMs from an internal IP address, and internal TCP/UDP load balancers. INTERNAL_MANAGED is used for internal HTTP(S) load balancers. Possible values: * EXTERNAL * INTERNAL * INTERNAL_MANAGED * `name`: Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `network`: For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used. This field is only used for INTERNAL load balancing. * `port_range`: This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports: * TargetHttpProxy: 80, 8080 * TargetHttpsProxy: 443 * TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetVpnGateway: 500, 4500 * `ports`: This field is used along with the backend_service field for internal load balancing. When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. You may specify a maximum of up to 5 ports. * `subnetwork`: The subnetwork that the load balanced IP should belong to for this Forwarding Rule. This field is only used for INTERNAL load balancing. If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified. * `target`: The URL of the target resource to receive the matched traffic. The target must live in the same region as the forwarding rule. The forwarded traffic must be of a type appropriate to the target object. * `allow_global_access`: If true, clients can access ILB from all regions. Otherwise only allows from the local region the ILB is located at. * `labels`: (Beta only) Labels to apply to this forwarding rule. A list of key->value pairs. * `label_fingerprint`: (Beta only) The fingerprint used for optimistic locking of this resource. Used internally during updates. * `all_ports`: For internal TCP/UDP load balancing (i.e. load balancing scheme is INTERNAL and protocol is TCP/UDP), set this to true to allow packets addressed to any ports to be forwarded to the backends configured with this forwarding rule. Used with backend service. Cannot be set if port or portRange are set. * `network_tier`: The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. Possible values: * PREMIUM * STANDARD * `service_label`: An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name. The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. This field is only used for INTERNAL load balancing. * `service_name`: The internal fully qualified service name for this Forwarding Rule. This field is only used for INTERNAL load balancing. * `region`: A reference to the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_forwarding_rules.md ================================================ +++ title = "google_compute_forwarding_rules resource" draft = false [menu.gcp] title = "google_compute_forwarding_rules" identifier = "inspec/resources/gcp/google_compute_forwarding_rules resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_forwarding_rules` is used to test a Google ForwardingRule resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_forwarding_rules(project: 'chef-gcp-inspec', region: 'europe-west2') do its('forwarding_rule_names') { should include 'udp-forwarding-rule' } end ``` ### Test that there are no more than a specified number of forwarding_rules available for the project and region describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do its('count') { should be <= 100} end ### Test that an expected forwarding_rule identifier is present in the project and region describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do its('forwarding_rule_ids') { should include 12345678975432 } end ### Test that an expected forwarding_rule name is available for the project and region describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do its('forwarding_rule_names') { should include "forwarding_rule-name" } end ### Test that an expected forwarding_rule network name is not present for the project and region describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do its('forwarding_rule_networks') { should not include "network-name" } end ## Properties Properties that can be accessed from the `google_compute_forwarding_rules` resource: See [google_compute_forwarding_rule](google_compute_forwarding_rule) for more detailed information. * `creation_timestamps`: an array of `google_compute_forwarding_rule` creation_timestamp * `is_mirroring_collectors`: an array of `google_compute_forwarding_rule` is_mirroring_collector * `descriptions`: an array of `google_compute_forwarding_rule` description * `forwarding_rule_ids`: an array of `google_compute_forwarding_rule` id * `ip_addresses`: an array of `google_compute_forwarding_rule` ip_address * `ip_protocols`: an array of `google_compute_forwarding_rule` ip_protocol * `backend_services`: an array of `google_compute_forwarding_rule` backend_service * `forwarding_rule_load_balancing_schemes`: an array of `google_compute_forwarding_rule` load_balancing_scheme * `forwarding_rule_names`: an array of `google_compute_forwarding_rule` name * `forwarding_rule_networks`: an array of `google_compute_forwarding_rule` network * `port_ranges`: an array of `google_compute_forwarding_rule` port_range * `ports`: an array of `google_compute_forwarding_rule` ports * `subnetworks`: an array of `google_compute_forwarding_rule` subnetwork * `targets`: an array of `google_compute_forwarding_rule` target * `allow_global_accesses`: an array of `google_compute_forwarding_rule` allow_global_access * `labels`: (Beta only) an array of `google_compute_forwarding_rule` labels * `label_fingerprints`: (Beta only) an array of `google_compute_forwarding_rule` label_fingerprint * `all_ports`: an array of `google_compute_forwarding_rule` all_ports * `network_tiers`: an array of `google_compute_forwarding_rule` network_tier * `service_labels`: an array of `google_compute_forwarding_rule` service_label * `service_names`: an array of `google_compute_forwarding_rule` service_name * `regions`: an array of `google_compute_forwarding_rule` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_global_address.md ================================================ +++ title = "google_compute_global_address resource" draft = false [menu.gcp] title = "google_compute_global_address" identifier = "inspec/resources/gcp/google_compute_global_address resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_global_address` is used to test a Google GlobalAddress resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_global_address(project: 'chef-gcp-inspec', name: 'inspec-gcp-global-address') do it { should exist } its('ip_version') { should eq 'IPV6' } end describe google_compute_global_address(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_global_address` resource: * `address`: The static external IP address represented by this resource. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. * `id`: The unique identifier for the resource. This identifier is defined by the server. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `labels`: (Beta only) Labels to apply to this address. A list of key->value pairs. * `label_fingerprint`: (Beta only) The fingerprint used for optimistic locking of this resource. Used internally during updates. * `ip_version`: The IP Version that will be used by this address. The default value is `IPV4`. Possible values: * IPV4 * IPV6 * `region`: A reference to the region where the regional address resides. * `prefix_length`: The prefix length of the IP range. If not present, it means the address field is a single IP address. This field is not applicable to addresses with addressType=EXTERNAL, or addressType=INTERNAL when purpose=PRIVATE_SERVICE_CONNECT * `address_type`: The type of the address to reserve. * EXTERNAL indicates public/external single IP address. * INTERNAL indicates internal IP ranges belonging to some network. Possible values: * EXTERNAL * INTERNAL * `purpose`: The purpose of the resource. For global internal addresses it can be * VPC_PEERING - for peer networks * PRIVATE_SERVICE_CONNECT - for ([Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) only) Private Service Connect networks This should only be set when using an Internal address. Possible values: * VPC_PEERING * PRIVATE_SERVICE_CONNECT * `network`: The URL of the network in which to reserve the IP range. The IP range must be in RFC1918 space. The network cannot be deleted if there are any reserved IP ranges referring to it. This should only be set when using an Internal address. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_global_addresses.md ================================================ +++ title = "google_compute_global_addresses resource" draft = false [menu.gcp] title = "google_compute_global_addresses" identifier = "inspec/resources/gcp/google_compute_global_addresses resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_global_addresses` is used to test a Google GlobalAddress resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_global_addresses(project: 'chef-gcp-inspec', name: 'inspec-gcp-global-address') do its('count') { should be >= 1 } its('names') { should include 'inspec-gcp-global-address' } its('ip_versions') { should include 'IPV6' } end ``` ## Properties Properties that can be accessed from the `google_compute_global_addresses` resource: See [google_compute_global_address](google_compute_global_address) for more detailed information. * `addresses`: an array of `google_compute_global_address` address * `creation_timestamps`: an array of `google_compute_global_address` creation_timestamp * `descriptions`: an array of `google_compute_global_address` description * `ids`: an array of `google_compute_global_address` id * `names`: an array of `google_compute_global_address` name * `labels`: (Beta only) an array of `google_compute_global_address` labels * `label_fingerprints`: (Beta only) an array of `google_compute_global_address` label_fingerprint * `ip_versions`: an array of `google_compute_global_address` ip_version * `regions`: an array of `google_compute_global_address` region * `prefix_lengths`: an array of `google_compute_global_address` prefix_length * `address_types`: an array of `google_compute_global_address` address_type * `purposes`: an array of `google_compute_global_address` purpose * `networks`: an array of `google_compute_global_address` network ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_global_forwarding_rule.md ================================================ +++ title = "google_compute_global_forwarding_rule resource" draft = false [menu.gcp] title = "google_compute_global_forwarding_rule" identifier = "inspec/resources/gcp/google_compute_global_forwarding_rule resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_global_forwarding_rule` is used to test a Google GlobalForwardingRule resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_global_forwarding_rule(project: 'chef-gcp-inspec', name: 'inspec-gcp-global-forwarding-rule') do it { should exist } its('port_range') { should eq '80-80' } its('target') { should match /\/inspec-gcp-http-proxy$/ } end describe google_compute_global_forwarding_rule(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_global_forwarding_rule` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: The unique identifier for the resource. * `ip_address`: The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule's load balancing scheme (external or internal) and scope (global or regional). The address must be a global IP for external global forwarding rules. If this field is empty, an ephemeral IPv4 address from the same scope (global) is chosen. Global forwarding rules supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource (internal regional static IP address), with a purpose of GCE_END_POINT and addressType of INTERNAL. ([Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) only) This must be a URL reference to an existing Address resource (internal global static IP address), with a purpose of PRIVATE_SERVICE_CONNECT and addressType of INTERNAL. An address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: * 100.1.2.3 * https://www.googleapis.com/compute/v1/projects/project/regions/ region/addresses/address * projects/project/regions/region/addresses/address * regions/region/addresses/address * global/addresses/address * address * `ip_protocol`: The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCP is valid. This field must not be set if the global address is configured as a purpose of PRIVATE_SERVICE_CONNECT and addressType of INTERNAL Possible values: * TCP * UDP * ESP * AH * SCTP * ICMP * `ip_version`: The IP Version that will be used by this global forwarding rule. Possible values: * IPV4 * IPV6 * `labels`: (Beta only) Labels to apply to this forwarding rule. A list of key->value pairs. * `label_fingerprint`: (Beta only) The fingerprint used for optimistic locking of this resource. Used internally during updates. * `load_balancing_scheme`: This signifies what the GlobalForwardingRule will be used for. The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) ([Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) only) Note: This field must be set "" if the global address is configured as a purpose of PRIVATE_SERVICE_CONNECT and addressType of INTERNAL. Possible values: * EXTERNAL * INTERNAL_SELF_MANAGED * `metadata_filters`: Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overridden by those specified in the UrlMap that this ForwardingRule references. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. * `filter_match_criteria`: Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. MATCH_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH_ALL - All filterLabels must have matching labels in the provided metadata. Possible values: * MATCH_ANY * MATCH_ALL * `filter_labels`: The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. * `name`: Name of the metadata label. The length must be between 1 and 1024 characters, inclusive. * `value`: The value that the label must match. The value has a maximum length of 1024 characters. * `name`: Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `network`: This field is not used for external load balancing. For INTERNAL_SELF_MANAGED load balancing, this field identifies the network that the load balanced IP should belong to for this global forwarding rule. If this field is not specified, the default network will be used. * `port_range`: This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports: * TargetHttpProxy: 80, 8080 * TargetHttpsProxy: 443 * TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetVpnGateway: 500, 4500 * `target`: The URL of the target resource to receive the matched traffic. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid. ([Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) only) For global address with a purpose of PRIVATE_SERVICE_CONNECT and addressType of INTERNAL, only "all-apis" and "vpc-sc" are valid. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_global_forwarding_rules.md ================================================ +++ title = "google_compute_global_forwarding_rules resource" draft = false [menu.gcp] title = "google_compute_global_forwarding_rules" identifier = "inspec/resources/gcp/google_compute_global_forwarding_rules resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_global_forwarding_rules` is used to test a Google GlobalForwardingRule resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_global_forwarding_rules(project: 'chef-gcp-inspec') do its('count') { should be >= 1 } its('port_ranges') { should include '80-80' } end ``` ## Properties Properties that can be accessed from the `google_compute_global_forwarding_rules` resource: See [google_compute_global_forwarding_rule](google_compute_global_forwarding_rule) for more detailed information. * `creation_timestamps`: an array of `google_compute_global_forwarding_rule` creation_timestamp * `descriptions`: an array of `google_compute_global_forwarding_rule` description * `ids`: an array of `google_compute_global_forwarding_rule` id * `ip_addresses`: an array of `google_compute_global_forwarding_rule` ip_address * `ip_protocols`: an array of `google_compute_global_forwarding_rule` ip_protocol * `ip_versions`: an array of `google_compute_global_forwarding_rule` ip_version * `labels`: (Beta only) an array of `google_compute_global_forwarding_rule` labels * `label_fingerprints`: (Beta only) an array of `google_compute_global_forwarding_rule` label_fingerprint * `load_balancing_schemes`: an array of `google_compute_global_forwarding_rule` load_balancing_scheme * `metadata_filters`: an array of `google_compute_global_forwarding_rule` metadata_filters * `names`: an array of `google_compute_global_forwarding_rule` name * `networks`: an array of `google_compute_global_forwarding_rule` network * `port_ranges`: an array of `google_compute_global_forwarding_rule` port_range * `targets`: an array of `google_compute_global_forwarding_rule` target ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_global_network_endpoint_group.md ================================================ +++ title = "google_compute_global_network_endpoint_group resource" draft = false [menu.gcp] title = "google_compute_global_network_endpoint_group" identifier = "inspec/resources/gcp/google_compute_global_network_endpoint_group resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_global_network_endpoint_group` InSpec audit resource to to test a Google Cloud GlobalNetworkEndpointGroup resource. ## Examples ```ruby describe google_compute_global_network_endpoint_group(project: 'chef-gcp-inspec', name: 'inspec-gcp-global-endpoint-group') do it { should exist } its('default_port') { should cmp '90' } its('kind') { should cmp '' } its('id') { should cmp '' } its('creation_timestamp') { should cmp '' } its('self_link') { should cmp '' } its('name') { should cmp 'inspec-gcp-global-endpoint-group' } its('description') { should cmp '' } its('network_endpoint_type') { should cmp 'INTERNET_IP_PORT' } its('region') { should cmp '' } its('zone') { should cmp '' } its('network') { should cmp '' } its('subnetwork') { should cmp '' } its('psc_target_service') { should cmp '' } end describe google_compute_global_network_endpoint_group(project: 'chef-gcp-inspec',name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_global_network_endpoint_group` resource: * `kind`: [Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `self_link`: [Output Only] Server-defined URL for the resource. * `name`: Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `network_endpoint_type`: Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT. Possible values: * GCE_VM_IP * GCE_VM_IP_PORT * INTERNET_FQDN_PORT * INTERNET_IP_PORT * NON_GCP_PRIVATE_IP_PORT * PRIVATE_SERVICE_CONNECT * SERVERLESS * `size`: [Output only] Number of network endpoints in the network endpoint group. * `region`: [Output Only] The URL of the region where the network endpoint group is located. * `zone`: [Output Only] The URL of the zone where the network endpoint group is located. * `network`: The URL of the network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified. * `subnetwork`: Optional URL of the subnetwork to which all network endpoints in the NEG belong. * `default_port`: The default port used if the port number is not specified in the network endpoint. * `annotations`: Metadata defined as annotations on the network endpoint group. * `additional_properties`: * `cloud_run`: Configuration for a Cloud Run network endpoint group (NEG). The service must be provided explicitly or in the URL mask. The tag is optional, may be provided explicitly or in the URL mask. Note: Cloud Run service must be in the same project and located in the same region as the Serverless NEG. * `service`: Cloud Run service is the main resource of Cloud Run. The service must be 1-63 characters long, and comply with RFC1035. Example value: "run-service". * `tag`: Optional Cloud Run tag represents the "named-revision" to provide additional fine-grained traffic routing information. The tag must be 1-63 characters long, and comply with RFC1035. Example value: "revision-0010". * `url_mask`: A template to parse and fields from a request URL. URL mask allows for routing to multiple Run services without having to create multiple network endpoint groups and backend services. For example, request URLs "foo1.domain.com/bar1" and "foo1.domain.com/bar2" can be backed by the same Serverless Network Endpoint Group (NEG) with URL mask ".domain.com/". The URL mask will parse them to { service="bar1", tag="foo1" } and { service="bar2", tag="foo2" } respectively. * `app_engine`: Configuration for an App Engine network endpoint group (NEG). The service is optional, may be provided explicitly or in the URL mask. The version is optional and can only be provided explicitly or in the URL mask when service is present. Note: App Engine service must be in the same project and located in the same region as the Serverless NEG. * `service`: Optional serving service. The service name is case-sensitive and must be 1-63 characters long. Example value: "default", "my-service". * `version`: Optional serving version. The version name is case-sensitive and must be 1-100 characters long. Example value: "v1", "v2". * `url_mask`: A template to parse service and version fields from a request URL. URL mask allows for routing to multiple App Engine services without having to create multiple Network Endpoint Groups and backend services. For example, the request URLs "foo1-dot-appname.appspot.com/v1" and "foo1-dot-appname.appspot.com/v2" can be backed by the same Serverless NEG with URL mask "-dot-appname.appspot.com/". The URL mask will parse them to { service = "foo1", version = "v1" } and { service = "foo1", version = "v2" } respectively. * `cloud_function`: Configuration for a Cloud Function network endpoint group (NEG). The function must be provided explicitly or in the URL mask. Note: Cloud Function must be in the same project and located in the same region as the Serverless NEG. * `function`: A user-defined name of the Cloud Function. The function name is case-sensitive and must be 1-63 characters long. Example value: "func1". * `url_mask`: A template to parse function field from a request URL. URL mask allows for routing to multiple Cloud Functions without having to create multiple Network Endpoint Groups and backend services. For example, request URLs " mydomain.com/function1" and "mydomain.com/function2" can be backed by the same Serverless NEG with URL mask "/". The URL mask will parse them to { function = "function1" } and { function = "function2" } respectively. * `psc_target_service`: The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: "asia-northeast3-cloudkms.googleapis.com" * `psc_data`: All data that is specifically relevant to only network endpoint groups of type PRIVATE_SERVICE_CONNECT. * `consumer_psc_address`: [Output Only] Address allocated from given subnetwork for PSC. This IP address acts as a VIP for a PSC NEG, allowing it to act as an endpoint in L7 PSC-XLB. * `psc_connection_id`: [Output Only] The PSC connection id of the PSC Network Endpoint Group Consumer. * `psc_connection_status`: [Output Only] The connection status of the PSC Forwarding Rule. Possible values: * ACCEPTED * CLOSED * NEEDS_ATTENTION * PENDING * REJECTED * STATUS_UNSPECIFIED ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_global_network_endpoint_groups.md ================================================ +++ title = "google_compute_global_network_endpoint_groups resource" draft = false [menu.gcp] title = "google_compute_global_network_endpoint_groups" identifier = "inspec/resources/gcp/google_compute_global_network_endpoint_groups resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_global_network_endpoint_groups` InSpec audit resource to to test a Google Cloud GlobalNetworkEndpointGroup resource. ## Examples ```ruby describe google_compute_global_network_endpoint_groups(project: 'chef-gcp-inspec') do it { should exist } its('default_ports') { should include '90' } its('names') { should include 'inspec-gcp-global-endpoint-group' } its('network_endpoint_types'){ should include 'INTERNET_IP_PORT' } end ``` ## Properties Properties that can be accessed from the `google_compute_global_network_endpoint_groups` resource: See [google_compute_global_network_endpoint_group](google_compute_global_network_endpoint_group) for more detailed information. * `kinds`: an array of `google_compute_global_network_endpoint_group` kind * `ids`: an array of `google_compute_global_network_endpoint_group` id * `creation_timestamps`: an array of `google_compute_global_network_endpoint_group` creation_timestamp * `self_links`: an array of `google_compute_global_network_endpoint_group` self_link * `names`: an array of `google_compute_global_network_endpoint_group` name * `descriptions`: an array of `google_compute_global_network_endpoint_group` description * `network_endpoint_types`: an array of `google_compute_global_network_endpoint_group` network_endpoint_type * `sizes`: an array of `google_compute_global_network_endpoint_group` size * `regions`: an array of `google_compute_global_network_endpoint_group` region * `zones`: an array of `google_compute_global_network_endpoint_group` zone * `networks`: an array of `google_compute_global_network_endpoint_group` network * `subnetworks`: an array of `google_compute_global_network_endpoint_group` subnetwork * `default_ports`: an array of `google_compute_global_network_endpoint_group` default_port * `annotations`: an array of `google_compute_global_network_endpoint_group` annotations * `cloud_runs`: an array of `google_compute_global_network_endpoint_group` cloud_run * `app_engines`: an array of `google_compute_global_network_endpoint_group` app_engine * `cloud_functions`: an array of `google_compute_global_network_endpoint_group` cloud_function * `psc_target_services`: an array of `google_compute_global_network_endpoint_group` psc_target_service * `psc_data`: an array of `google_compute_global_network_endpoint_group` psc_data ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_global_operation.md ================================================ +++ title = "google_compute_global_operation resource" draft = false [menu.gcp] title = "google_compute_global_operation" identifier = "inspec/resources/gcp/google_compute_global_operation resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_global_operation` InSpec audit resource to to test a Google Cloud GlobalOperation resource. ## Examples ```ruby describe google_compute_global_operation(project: 'chef-gcp-inspec', name: 'operation-1634799391539-5ced765030229-be5d5765-6623920f') do it { should exist } it { should be_up } its('operation_type') { should include 'delete' } end ``` ## Properties Properties that can be accessed from the `google_compute_global_operation` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated. * `description`: An optional textual description of the resource. * `id`: The unique identifier for the resource. * `name`: Name of the operation. * `zone`: The URL of the zone where the operation resides. Only applicable when performing per-zone operations. * `client_operation_id`: The value of requestId if you provided it in the request. Not present otherwise. * `operation_type`: The type of operation, such as insert, update, or delete, and so on. * `user`: User who requested the operation, for example: user@example.com. * `progress`: An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. * `insert_time`: The time that this operation was requested. This value is in RFC3339 text format. * `start_time`: The time that this operation was started by the server. This value is in RFC3339 text format. * `end_time`: The time that this operation was completed. This value is in RFC3339 text format. * `status`: The status of the operation, which can be one of the following: * PENDING * PENDINGPENDING * DONE Possible values: * PENDING * PENDING * DONE * `status_message`: An optional textual description of the current status of the operation. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_global_operations.md ================================================ +++ title = "google_compute_global_operations resource" draft = false [menu.gcp] title = "google_compute_global_operations" identifier = "inspec/resources/gcp/google_compute_global_operations resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_global_operations` InSpec audit resource to to test a Google Cloud GlobalOperation resource. ## Examples ```ruby describe google_compute_global_operations(project: 'chef-gcp-inspec') do it { should exist } it { should be_up } its('operation_type') { should include 'delete' } end ``` ## Properties Properties that can be accessed from the `google_compute_global_operations` resource: See [google_compute_global_operation](google_compute_global_operation) for more detailed information. * `creation_timestamps`: an array of `google_compute_global_operation` creation_timestamp * `descriptions`: an array of `google_compute_global_operation` description * `ids`: an array of `google_compute_global_operation` id * `names`: an array of `google_compute_global_operation` name * `zones`: an array of `google_compute_global_operation` zone * `client_operation_ids`: an array of `google_compute_global_operation` client_operation_id * `operation_types`: an array of `google_compute_global_operation` operation_type * `users`: an array of `google_compute_global_operation` user * `progresses`: an array of `google_compute_global_operation` progress * `insert_times`: an array of `google_compute_global_operation` insert_time * `start_times`: an array of `google_compute_global_operation` start_time * `end_times`: an array of `google_compute_global_operation` end_time * `statuses`: an array of `google_compute_global_operation` status * `status_messages`: an array of `google_compute_global_operation` status_message ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_health_check.md ================================================ +++ title = "google_compute_health_check resource" draft = false [menu.gcp] title = "google_compute_health_check" identifier = "inspec/resources/gcp/google_compute_health_check resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_health_check` is used to test a Google HealthCheck resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_health_check(project: 'chef-gcp-inspec', name: 'inspec-gcp-health-check') do it { should exist } its('timeout_sec') { should eq '10' } its('tcp_health_check.port') { should eq '80' } end describe google_compute_health_check(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_health_check` resource: * `check_interval_sec`: How often (in seconds) to send a health check. The default value is 5 seconds. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. Provide this property when you create the resource. * `healthy_threshold`: A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. * `id`: The unique identifier for the resource. This identifier is defined by the server. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `timeout_sec`: How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. * `unhealthy_threshold`: A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. * `type`: Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. Possible values: * TCP * SSL * HTTP * HTTPS * HTTP2 * `http_health_check`: A nested object resource * `host`: The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. * `request_path`: The request path of the HTTP health check request. The default value is /. * `response`: The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. * `port`: The TCP port number for the HTTP health check request. The default value is 80. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `https_health_check`: A nested object resource * `host`: The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. * `request_path`: The request path of the HTTPS health check request. The default value is /. * `response`: The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. * `port`: The TCP port number for the HTTPS health check request. The default value is 443. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `tcp_health_check`: A nested object resource * `request`: The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. * `response`: The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. * `port`: The TCP port number for the TCP health check request. The default value is 443. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `ssl_health_check`: A nested object resource * `request`: The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. * `response`: The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. * `port`: The TCP port number for the SSL health check request. The default value is 443. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `http2_health_check`: A nested object resource * `host`: The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. * `request_path`: The request path of the HTTP2 health check request. The default value is /. * `response`: The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. * `port`: The TCP port number for the HTTP2 health check request. The default value is 443. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `grpc_health_check`: A nested object resource * `port`: The port number for the health check request. Must be specified if portName and portSpecification are not set or if port_specification is USE_FIXED_PORT. Valid values are 1 through 65535. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `grpc_service_name`: The gRPC service name for the health check. The value of grpcServiceName has the following meanings by convention: - Empty serviceName means the overall status of all services at the backend. - Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII. * `log_config`: (Beta only) Configure logging on this health check. * `enable`: Indicates whether or not to export logs. This is false by default, which means no health check logging will be done. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_health_check_service.md ================================================ +++ title = "google_compute_health_check_service resource" draft = false [menu.gcp] title = "google_compute_health_check_service" identifier = "inspec/resources/gcp/google_compute_health_check_service resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_health_check_service` InSpec audit resource to to test a Google Cloud HealthCheckService resource. ## Examples ```ruby describe google_compute_health_check_service(project: 'chef-gcp-inspec', region: 'us-central1', name: 'instance-group-2') do it { should exist } its('name') { should eq 'instance-group-2' } its('health_status_aggregation_policy') { should eq 'NO_AGGREGATION' } end describe google_compute_health_check_service(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_health_check_service` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated. * `description`: An optional textual description of the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. * `health_status_aggregation_policy`: Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. Possible values: * HEALTHY * UNHEALTHY * `health_checks`: A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10. HealthCheck resources must have portSpecification=USE_SERVING_PORT or portSpecification=USE_FIXED_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks must belong to the same region as zones of NEGs. * `network_endpoint_groups`: A list of URLs to the NetworkEndpointGroup resources. Must not have more than 100. For regional HealthCheckService, NEGs must be in zones in the region of the HealthCheckService. * `notification_endpoints`: A list of URLs to the NotificationEndpoint resources. Must not have more than 10. A list of endpoints for receiving notifications of change in health status. For regional HealthCheckService, NotificationEndpoint must be regional and in the same region. For global HealthCheckService, NotificationEndpoint must be global. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthCheckService. An up-to-date fingerprint must be provided in order to patch/update the HealthCheckService; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthCheckService. A base64-encoded string. * `next_page_token`: This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_health_check_services.md ================================================ +++ title = "google_compute_health_check_services resource" draft = false [menu.gcp] title = "google_compute_health_check_services" identifier = "inspec/resources/gcp/google_compute_health_check_services resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_health_check_services` InSpec audit resource to to test a Google Cloud HealthCheckService resource. ## Examples ```ruby describe google_compute_health_check_services(project: 'chef-gcp-inspec', region: 'us-central1') do it { should exist } its('names') { should include 'instance-group-2' } its('health_status_aggregation_policies') { should include 'NO_AGGREGATION' } end ``` ## Properties Properties that can be accessed from the `google_compute_health_check_services` resource: See [google_compute_health_check_service](google_compute_health_check_service) for more detailed information. * `creation_timestamps`: an array of `google_compute_health_check_service` creation_timestamp * `descriptions`: an array of `google_compute_health_check_service` description * `ids`: an array of `google_compute_health_check_service` id * `names`: an array of `google_compute_health_check_service` name * `health_status_aggregation_policies`: an array of `google_compute_health_check_service` health_status_aggregation_policy * `health_checks`: an array of `google_compute_health_check_service` health_checks * `network_endpoint_groups`: an array of `google_compute_health_check_service` network_endpoint_groups * `notification_endpoints`: an array of `google_compute_health_check_service` notification_endpoints * `fingerprints`: an array of `google_compute_health_check_service` fingerprint * `next_page_tokens`: an array of `google_compute_health_check_service` next_page_token ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_health_checks.md ================================================ +++ title = "google_compute_health_checks resource" draft = false [menu.gcp] title = "google_compute_health_checks" identifier = "inspec/resources/gcp/google_compute_health_checks resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_health_checks` is used to test a Google HealthCheck resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_health_checks(project: 'chef-gcp-inspec') do its('names') { should include 'inspec-gcp-health-check' } its('timeout_secs') { should include '10' } end ``` ## Properties Properties that can be accessed from the `google_compute_health_checks` resource: See [google_compute_health_check](google_compute_health_check) for more detailed information. * `check_interval_secs`: an array of `google_compute_health_check` check_interval_sec * `creation_timestamps`: an array of `google_compute_health_check` creation_timestamp * `descriptions`: an array of `google_compute_health_check` description * `healthy_thresholds`: an array of `google_compute_health_check` healthy_threshold * `ids`: an array of `google_compute_health_check` id * `names`: an array of `google_compute_health_check` name * `timeout_secs`: an array of `google_compute_health_check` timeout_sec * `unhealthy_thresholds`: an array of `google_compute_health_check` unhealthy_threshold * `types`: an array of `google_compute_health_check` type * `http_health_checks`: an array of `google_compute_health_check` http_health_check * `https_health_checks`: an array of `google_compute_health_check` https_health_check * `tcp_health_checks`: an array of `google_compute_health_check` tcp_health_check * `ssl_health_checks`: an array of `google_compute_health_check` ssl_health_check * `http2_health_checks`: an array of `google_compute_health_check` http2_health_check * `grpc_health_checks`: an array of `google_compute_health_check` grpc_health_check * `log_configs`: (Beta only) an array of `google_compute_health_check` log_config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_http_health_check.md ================================================ +++ title = "google_compute_http_health_check resource" draft = false [menu.gcp] title = "google_compute_http_health_check" identifier = "inspec/resources/gcp/google_compute_http_health_check resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_http_health_check` is used to test a Google HttpHealthCheck resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_http_health_check(project: 'chef-gcp-inspec', name: 'inspec-gcp-http-health-check') do it { should exist } its('timeout_sec') { should eq '20' } its('request_path') { should eq '/health_check' } its('check_interval_sec') { should eq '20' } end describe google_compute_http_health_check(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_http_health_check` resource: * `check_interval_sec`: How often (in seconds) to send a health check. The default value is 5 seconds. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. Provide this property when you create the resource. * `healthy_threshold`: A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. * `host`: The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. * `id`: The unique identifier for the resource. This identifier is defined by the server. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `port`: The TCP port number for the HTTP health check request. The default value is 80. * `request_path`: The request path of the HTTP health check request. The default value is /. * `timeout_sec`: How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. * `unhealthy_threshold`: A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_http_health_checks.md ================================================ +++ title = "google_compute_http_health_checks resource" draft = false [menu.gcp] title = "google_compute_http_health_checks" identifier = "inspec/resources/gcp/google_compute_http_health_checks resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_http_health_checks` is used to test a Google HttpHealthCheck resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_http_health_checks(project: 'chef-gcp-inspec') do its('names') { should include 'inspec-gcp-http-health-check' } its('timeout_secs') { should include '20' } its('check_interval_secs') { should include '20' } end ``` ## Properties Properties that can be accessed from the `google_compute_http_health_checks` resource: See [google_compute_http_health_check](google_compute_http_health_check) for more detailed information. * `check_interval_secs`: an array of `google_compute_http_health_check` check_interval_sec * `creation_timestamps`: an array of `google_compute_http_health_check` creation_timestamp * `descriptions`: an array of `google_compute_http_health_check` description * `healthy_thresholds`: an array of `google_compute_http_health_check` healthy_threshold * `hosts`: an array of `google_compute_http_health_check` host * `ids`: an array of `google_compute_http_health_check` id * `names`: an array of `google_compute_http_health_check` name * `ports`: an array of `google_compute_http_health_check` port * `request_paths`: an array of `google_compute_http_health_check` request_path * `timeout_secs`: an array of `google_compute_http_health_check` timeout_sec * `unhealthy_thresholds`: an array of `google_compute_http_health_check` unhealthy_threshold ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_https_health_check.md ================================================ +++ title = "google_compute_https_health_check resource" draft = false [menu.gcp] title = "google_compute_https_health_check" identifier = "inspec/resources/gcp/google_compute_https_health_check resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_https_health_check` is used to test a Google HttpsHealthCheck resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_https_health_check(project: 'chef-gcp-inspec', name: 'inspec-gcp-https-health-check') do it { should exist } its('timeout_sec') { should eq '15' } its('request_path') { should eq '/https_health_check' } its('check_interval_sec') { should eq '15' } its('unhealthy_threshold') { should eq '3' } end describe google_compute_https_health_check(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_https_health_check` resource: * `check_interval_sec`: How often (in seconds) to send a health check. The default value is 5 seconds. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. Provide this property when you create the resource. * `healthy_threshold`: A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. * `host`: The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. * `id`: The unique identifier for the resource. This identifier is defined by the server. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `port`: The TCP port number for the HTTPS health check request. The default value is 80. * `request_path`: The request path of the HTTPS health check request. The default value is /. * `timeout_sec`: How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. * `unhealthy_threshold`: A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_https_health_checks.md ================================================ +++ title = "google_compute_https_health_checks resource" draft = false [menu.gcp] title = "google_compute_https_health_checks" identifier = "inspec/resources/gcp/google_compute_https_health_checks resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_https_health_checks` is used to test a Google HttpsHealthCheck resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_https_health_checks(project: 'chef-gcp-inspec') do its('names') { should include 'inspec-gcp-https-health-check' } its('timeout_secs') { should include '15' } its('check_interval_secs') { should include '15' } end ``` ## Properties Properties that can be accessed from the `google_compute_https_health_checks` resource: See [google_compute_https_health_check](google_compute_https_health_check) for more detailed information. * `check_interval_secs`: an array of `google_compute_https_health_check` check_interval_sec * `creation_timestamps`: an array of `google_compute_https_health_check` creation_timestamp * `descriptions`: an array of `google_compute_https_health_check` description * `healthy_thresholds`: an array of `google_compute_https_health_check` healthy_threshold * `hosts`: an array of `google_compute_https_health_check` host * `ids`: an array of `google_compute_https_health_check` id * `names`: an array of `google_compute_https_health_check` name * `ports`: an array of `google_compute_https_health_check` port * `request_paths`: an array of `google_compute_https_health_check` request_path * `timeout_secs`: an array of `google_compute_https_health_check` timeout_sec * `unhealthy_thresholds`: an array of `google_compute_https_health_check` unhealthy_threshold ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_image.md ================================================ +++ title = "google_compute_image resource" draft = false [menu.gcp] title = "google_compute_image" identifier = "inspec/resources/gcp/google_compute_image resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_image` is used to test a Google Image resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_image(project: 'chef-gcp-inspec', name: 'inspec-image') do it { should exist } its('disk_size_gb') { should cmp 3 } end describe google_compute_image(project: 'chef-gcp-inspec', name: 'notfound') do it { should_not exist } end ``` ### Test that a GCP compute image is in a particular status e.g. "READY" means available for use describe google_compute_image(project: 'chef-inspec-gcp', location: 'europe-west2', name: 'compute-address') do its('status') { should eq "READY" } end ### Test that a GCP compute image has the expected family describe google_compute_image(project: 'chef-inspec-gcp', name: 'ubuntu') do its('family') { should match "ubuntu" } end ## Properties Properties that can be accessed from the `google_compute_image` resource: * `archive_size_bytes`: Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `deprecated`: The deprecation status associated with this image. * `deleted`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it. * `deprecated`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it. * `obsolete`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it. * `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. * `state`: The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. Possible values: * DEPRECATED * OBSOLETE * DELETED * `description`: An optional description of this resource. Provide this property when you create the resource. * `disk_size_gb`: Size of the image when restored onto a persistent disk (in GB). * `family`: The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035. * `guest_os_features`: A list of features to enable on the guest operating system. Applicable only for bootable images. * `type`: The type of supported feature. Read [Enabling guest operating system features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) to see a list of available options. Possible values: * MULTI_IP_SUBNET * SECURE_BOOT * SEV_CAPABLE * UEFI_COMPATIBLE * VIRTIO_SCSI_MULTIQUEUE * WINDOWS * GVNIC * `id`: The unique identifier for the resource. This identifier is defined by the server. * `image_encryption_key`: Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_name`: (Beta only) The name of the encryption key that is stored in Google Cloud KMS. * `labels`: Labels to apply to this Image. * `label_fingerprint`: The fingerprint used for optimistic locking of this resource. Used internally during updates. * `licenses`: Any applicable license URI. * `name`: Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `raw_disk`: The parameters of the raw disk image. * `container_type`: The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created. Possible values: * TAR * `sha1_checksum`: An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created. * `source`: The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both. * `source_disk`: The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image. * `source_disk_encryption_key`: The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key. * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_name`: (Beta only) The name of the encryption key that is stored in Google Cloud KMS. * `source_disk_id`: The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name. * `source_image`: URL of the source image used to create this image. In order to create an image, you must provide the full or partial URL of one of the following: * The selfLink URL * This property * The rawDisk.source URL * The sourceDisk URL * `source_snapshot`: URL of the source snapshot used to create this image. In order to create an image, you must provide the full or partial URL of one of the following: * The selfLink URL * This property * The sourceImage URL * The rawDisk.source URL * The sourceDisk URL * `source_type`: The type of the image used to create this disk. The default and only value is RAW Possible values: * RAW * `self_link`: The self link of the image * `status`: The status of the image. Either `READY` `PENDING` or `FAILED`. Possible values: * READY * PENDING * FAILED ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_image_family_view.md ================================================ +++ title = "google_compute_image_family_view resource" draft = false [menu.gcp] title = "google_compute_image_family_view" identifier = "inspec/resources/gcp/google_compute_image_family_view resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_image_family_view` InSpec audit resource to to test a Google Cloud ImageFamilyView resource. ## Examples ```ruby describe google_compute_image_family_view(project: 'chef-gcp-inspec', zone: 'us-central1-c', name: 'test') do it { should exist } its('image_name') { should eq 'image-1' } its('image_source_type') { should eq 'RAW' } its('image_family') { should eq 'test' } end ``` ## Properties Properties that can be accessed from the `google_compute_image_family_view` resource: * `image`: The latest image that is part of the specified image family in the requested location, and that is not deprecated. * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: The unique identifier for the resource. This identifier is defined by the server. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `source_type`: The type of the image used to create this disk. The default and only value is RAW Possible values: * RAW * `deprecated`: The deprecation status associated with this disk type. * `deleted`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED. * `deprecated`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED. * `obsolete`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE. * `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. * `state`: The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. Possible values: * DEPRECATED * OBSOLETE * DELETED * `raw_disk`: The parameters of the raw disk image. * `source`: The full Google Cloud Storage URL where the raw disk image archive is stored. The following are valid formats for the URL: https://storage.googleapis.com/bucketName/image_archive_name https://storage.googleapis.com/bucketName/folder_name/image_archive_name In order to create an image, you must provide the full or partial URL of one of the following: The rawDisk.source URL The sourceDisk URL The sourceImage URL The sourceSnapshot URL * `sha1_checksum`: [Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created. * `container_type`: The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created. Possible values: * TAR * UNDEFINED_CONTAINER_TYPE * `status`: The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to * READY * FAILED * PENDING Possible values: * FAILED * PENDING * READY * `archive_size_bytes`: Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). * `disk_size_gb`: Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). * `source_disk`: URL of the source disk used to create this image. For example, the following are valid values: https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk projects/project/zones/zone/disks/disk zones/zone/disks/disk In order to create an image, you must provide the full or partial URL of one of the following: The rawDisk.source URL The sourceDisk URL The sourceImage URL The sourceSnapshot URL * `source_disk_id`: The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name. * `licenses`: Any applicable license URI. * `storage_locations`: Any applicable license URI. * `family`: The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035. * `image_encryption_key`: The deprecation status associated with this disk type. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_service_account`: The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@ projectId.iam.gserviceaccount.com/ * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" * `rsa_encrypted_key`: Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: The key is wrapped using a RSA public key certificate provided by Google. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/ kms_project_id/locations/ region/keyRings/key_region/cryptoKeys/key * `source_disk_encryption_key`: Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later. * `sha256`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" * `kms_key_service_account`: The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@ projectId.iam.gserviceaccount.com/ * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" * `rsa_encrypted_key`: Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: The key is wrapped using a RSA public key certificate provided by Google. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/ kms_project_id/locations/ region/keyRings/key_region/cryptoKeys/key * `source_snapshot_encryption_key`: The deprecation status associated with this disk type. * `pk`: The Platform Key (PK). * `content`: The raw content in the secure keys file. A base64-encoded string. * `file_type`: The file type of source file. * `keks`: The Key Database (db). * `content`: The raw content in the secure keys file. A base64-encoded string. * `file_type`: The file type of source file. * `dbs`: The Key Database (db). * `content`: The raw content in the secure keys file. A base64-encoded string. * `file_type`: The file type of source file. * `dbxs`: The forbidden key database (dbx). * `content`: The raw content in the secure keys file. A base64-encoded string. * `file_type`: The file type of source file. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_instance.md ================================================ +++ title = "google_compute_instance resource" draft = false [menu.gcp] title = "google_compute_instance" identifier = "inspec/resources/gcp/google_compute_instance resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_instance` is used to test a Google Instance resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_instance(project: 'chef-gcp-inspec', zone: 'zone', name: 'inspec-instance') do it { should exist } its('machine_type') { should match 'n1-standard-1' } its('tags.items') { should include 'foo' } its('tags.items') { should include 'bar' } its('tag_count') { should cmp 2 } its('service_account_scopes') { should include 'https://www.googleapis.com/auth/compute.readonly' } its('metadata_keys') { should include '123' } its('metadata_values') { should include 'asdf' } end describe google_compute_instance(project: 'chef-gcp-inspec', zone: 'zone', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP compute instance does not exist describe google_compute_instance(project: 'chef-inspec-gcp', zone: 'us-east1-b', name: 'inspec-test-vm-not-there') do it { should_not exist } end ### Test that a GCP compute instance is in the expected state ([explore possible states here](https://cloud.google.com/compute/docs/instances/checking-instance-status)) describe google_compute_instance(project: 'chef-inspec-gcp', zone: 'us-east1-b', name: 'inspec-test-vm') do its('status') { should eq 'RUNNING' } end ### Test that a GCP compute instance is the expected size describe google_compute_instance(project: 'chef-inspec-gcp', zone: 'us-east1-b', name: 'inspec-test-vm') do its('machine_type') { should match "f1-micro" } end ### Test that a GCP compute instance has the expected CPU platform describe google_compute_instance(project: 'chef-inspec-gcp', zone: 'us-east1-b', name: 'inspec-test-vm') do its('cpu_platform') { should match "Intel" } end ### Test that a GCP compute instance has the expected number of attached disks describe google_compute_instance(project: 'chef-inspec-gcp', zone: 'us-east1-b', name: 'inspec-test-vm') do its('disk_count'){should eq 2} end ### Test that a GCP compute instance has the expected number of attached network interfaces describe google_compute_instance(project: 'chef-inspec-gcp', zone: 'us-east1-b', name: 'inspec-test-vm') do its('network_interfaces_count'){should eq 1} end ### Test that a GCP compute instance has the expected number of tags describe google_compute_instance(project: 'chef-inspec-gcp', zone: 'us-east1-b', name: 'inspec-test-vm') do its('tag_count'){should eq 1} end ### Test that a GCP compute instance has a single public IP address describe google_compute_instance(project: 'chef-inspec-gcp', zone: 'us-east1-b', name: 'inspec-test-vm') do its('first_network_interface_nat_ip_exists'){ should be true } its('first_network_interface_name'){ should eq "external-nat" } its('first_network_interface_type'){ should eq "one_to_one_nat" } end ### Test that a particular compute instance label key is present describe google_compute_instance(project: 'chef-inspec-gcp', zone: 'us-east1-b', name: 'inspec-test-vm') do its('labels_keys') { should include 'my_favourite_label' } end ### Test that a particular compute instance label value is matching regexp describe google_compute_instance(project: 'chef-inspec-gcp', zone:'us-east1-b', name:'inspec-test-vm').label_value_by_key('business-area') do it { should match '^(marketing|research)$' } end ### Test that a particular compute instance metadata key is present describe google_compute_instance(project: 'chef-inspec-gcp', zone:'us-east1-b', name:'inspec-test-vm') do its('metadata_keys') { should include 'patching-type' } end ### Test that a particular compute instance metadata value is matching regexp describe google_compute_instance(project: 'chef-inspec-gcp', zone:'us-east1-b', name:'inspec-test-vm').metadata_value_by_key('patching-window') do it { should match '^\d{1}-\d{2}$' } end ## Properties Properties that can be accessed from the `google_compute_instance` resource: * `can_ip_forward`: Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. * `cpu_platform`: The CPU platform used by this instance. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `deletion_protection`: Whether the resource should be protected against deletion. * `disks`: An array of disks that are associated with the instances that are created from this template. * `auto_delete`: Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). Tip: Disks should be set to autoDelete=true so that leftover disks are not left behind on machine deletion. * `boot`: Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. * `device_name`: Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. * `disk_encryption_key`: Encrypts or decrypts a disk using a customer-supplied encryption key. * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `rsa_encrypted_key`: Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `index`: Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. * `initialize_params`: Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. * `disk_name`: Specifies the disk name. If not specified, the default is to use the name of the instance. * `disk_size_gb`: Specifies the size of the disk in base-2 GB. * `disk_type`: Reference to a disk type. Specifies the disk type to use to create the instance. If not specified, the default is pd-standard. * `source_image`: The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. To create a disk with one of the public operating system images, specify the image by its family name. * `source_image_encryption_key`: The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `interface`: Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Possible values: * SCSI * NVME * `mode`: The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Possible values: * READ_WRITE * READ_ONLY * `source`: Reference to a disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. * `type`: Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Possible values: * SCRATCH * PERSISTENT * `licenses`: Any applicable publicly visible licenses. * `guest_accelerators`: List of the type and count of accelerator cards attached to the instance * `accelerator_count`: The number of the guest accelerator cards exposed to this instance. * `accelerator_type`: Full or partial URL of the accelerator type resource to expose to this instance. * `hostname`: The hostname of the instance to be created. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. * `id`: The unique identifier for the resource. This identifier is defined by the server. * `label_fingerprint`: The fingerprint used for optimistic locking of this resource. Used internally during updates. * `labels`: Labels to apply to this instance. A list of key->value pairs. * `metadata`: The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. * `machine_type`: A reference to a machine type which defines VM kind. * `min_cpu_platform`: Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms * `name`: The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `network_interfaces`: An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one network interface is supported per instance. * `access_configs`: An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. * `name`: The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access. * `nat_ip`: Reference to an address. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. * `type`: The type of configuration. The default and only option is ONE_TO_ONE_NAT. Possible values: * ONE_TO_ONE_NAT * `set_public_ptr`: Specifies whether a public DNS PTR record should be created to map the external IP address of the instance to a DNS domain name. * `public_ptr_domain_name`: The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled. * `network_tier`: This signifies the networking tier used for configuring this access configuration. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Possible values: * PREMIUM * STANDARD * `alias_ip_ranges`: An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. * `ip_cidr_range`: The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). * `subnetwork_range_name`: Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. * `name`: The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc * `network`: Specifies the title of an existing network. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. * `network_ip`: An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. * `subnetwork`: Reference to a VPC network. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. * `scheduling`: Sets the scheduling options for this instance. * `automatic_restart`: Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. * `on_host_maintenance`: Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. * `preemptible`: Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created. * `service_accounts`: A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. * `email`: Email address of the service account. * `scopes`: The list of scopes to be made available for this service account. * `shielded_instance_config`: Configuration for various parameters related to shielded instances. * `enable_secure_boot`: Defines whether the instance has Secure Boot enabled. * `enable_vtpm`: Defines whether the instance has the vTPM enabled * `enable_integrity_monitoring`: Defines whether the instance has integrity monitoring enabled. * `status`: The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED. As a user, use RUNNING to keep a machine "on" and TERMINATED to turn a machine off Possible values: * PROVISIONING * STAGING * RUNNING * STOPPING * SUSPENDING * SUSPENDED * TERMINATED * `status_message`: An optional, human-readable explanation of the status. * `tags`: A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. * `fingerprint`: Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. * `items`: An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. * `zone`: A reference to the zone where the machine resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_instance_group.md ================================================ +++ title = "google_compute_instance_group resource" draft = false [menu.gcp] title = "google_compute_instance_group" identifier = "inspec/resources/gcp/google_compute_instance_group resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_instance_group` is used to test a Google InstanceGroup resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_instance_group(project: 'chef-gcp-inspec', zone: 'zone', name: 'inspec-instance-group') do it { should exist } its('description') { should cmp 'My instance group for testing' } its('named_ports.count') { should cmp 1 } its('named_ports.first.name') { should cmp 'https' } its('named_ports.first.port') { should cmp '8080' } end describe google_compute_instance_group(project: 'chef-gcp-inspec', zone: 'zone', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP compute instance group has the expected size describe google_compute_instance_group(project: 'chef-inspec-gcp', zone: 'europe-west2-a', name: 'gcp-inspec-test') do its('size') { should eq 2 } end ### Test that a GCP compute instance group has a port with supplied name and value describe google_compute_instance_group(project: 'chef-inspec-gcp', zone: 'europe-west2-a', name: 'gcp-inspec-test') do its('port_name') { should eq "http" } its('port_value') { should eq 80 } end ## Properties Properties that can be accessed from the `google_compute_instance_group` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: A unique identifier for this instance group. * `name`: The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. * `named_ports`: Assigns a name to a port number. For example: {name: "http", port: 80}. This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] Named ports apply to all instances in this instance group. * `name`: The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. * `port`: The port number, which can be a value between 1 and 65535. * `network`: The network to which all instances in the instance group belong. * `region`: The region where the instance group is located (for regional resources). * `subnetwork`: The subnetwork to which all instances in the instance group belong. * `zone`: A reference to the zone where the instance group resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_instance_group_manager.md ================================================ +++ title = "google_compute_instance_group_manager resource" draft = false [menu.gcp] title = "google_compute_instance_group_manager" identifier = "inspec/resources/gcp/google_compute_instance_group_manager resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_instance_group_manager` is used to test a Google InstanceGroupManager resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_instance_group_manager(project: 'chef-gcp-inspec', zone: 'zone', name: 'inspec-gcp-igm') do it { should exist } its('base_instance_name') { should eq 'igm' } its('named_ports.count') { should cmp 1 } its('named_ports.first.name') { should eq 'port' } its('named_ports.first.port') { should eq '80' } end describe google_compute_instance_group_manager(project: 'chef-gcp-inspec', zone: 'zone', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_instance_group_manager` resource: * `base_instance_name`: The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035. * `creation_timestamp`: The creation timestamp for this managed instance group in RFC3339 text format. * `current_actions`: The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions. * `abandoning`: The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it. * `creating`: The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully. If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. * `creating_without_retries`: The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly. * `deleting`: The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. * `none`: The number of instances in the managed instance group that are running and have no scheduled actions. * `recreating`: The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template. * `refreshing`: The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance. * `restarting`: The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: A unique identifier for this resource * `instance_group`: The instance group being managed * `instance_template`: The instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. * `name`: The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. * `named_ports`: Named ports configured for the Instance Groups complementary to this Instance Group Manager. * `name`: The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. * `port`: The port number, which can be a value between 1 and 65535. * `region`: The region this managed instance group resides (for regional resources). * `target_pools`: TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. * `target_size`: The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number. * `zone`: The zone the managed instance group resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_instance_group_managers.md ================================================ +++ title = "google_compute_instance_group_managers resource" draft = false [menu.gcp] title = "google_compute_instance_group_managers" identifier = "inspec/resources/gcp/google_compute_instance_group_managers resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_instance_group_managers` is used to test a Google InstanceGroupManager resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_instance_group_managers(project: 'chef-gcp-inspec', zone: 'zone') do its('base_instance_names') { should include 'igm' } end ``` ## Properties Properties that can be accessed from the `google_compute_instance_group_managers` resource: See [google_compute_instance_group_manager](google_compute_instance_group_manager) for more detailed information. * `base_instance_names`: an array of `google_compute_instance_group_manager` base_instance_name * `creation_timestamps`: an array of `google_compute_instance_group_manager` creation_timestamp * `current_actions`: an array of `google_compute_instance_group_manager` current_actions * `descriptions`: an array of `google_compute_instance_group_manager` description * `ids`: an array of `google_compute_instance_group_manager` id * `instance_groups`: an array of `google_compute_instance_group_manager` instance_group * `instance_templates`: an array of `google_compute_instance_group_manager` instance_template * `names`: an array of `google_compute_instance_group_manager` name * `named_ports`: an array of `google_compute_instance_group_manager` named_ports * `regions`: an array of `google_compute_instance_group_manager` region * `target_pools`: an array of `google_compute_instance_group_manager` target_pools * `target_sizes`: an array of `google_compute_instance_group_manager` target_size * `zones`: an array of `google_compute_instance_group_manager` zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_instance_groups.md ================================================ +++ title = "google_compute_instance_groups resource" draft = false [menu.gcp] title = "google_compute_instance_groups" identifier = "inspec/resources/gcp/google_compute_instance_groups resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_instance_groups` is used to test a Google InstanceGroup resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_instance_groups(project: 'chef-gcp-inspec', zone: 'zone') do its('instance_group_names') { should include 'inspec-instance-group' } end ``` ### Test that there are no more than a specified number of instance groups available for the project describe google_compute_instance_groups(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test that an expected instance_group is available for the project describe google_compute_instance_groups(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do its('instance_group_names') { should include "my-instance-group-name" } end ### Test that a subset of all instance_groups matching "mig*" have size greater than zero google_compute_instance_groups(project: 'chef-inspec-gcp', zone: 'europe-west2-a').where(instance_group_name: /^mig/).instance_group_names.each do |instance_group_name| describe google_compute_instance_group(project: 'chef-inspec-gcp', zone: 'europe-west2-a', name: instance_group_name) do it { should exist } its('size') { should be > 0 } end end ## Properties Properties that can be accessed from the `google_compute_instance_groups` resource: See [google_compute_instance_group](google_compute_instance_group) for more detailed information. * `creation_timestamps`: an array of `google_compute_instance_group` creation_timestamp * `descriptions`: an array of `google_compute_instance_group` description * `instance_group_ids`: an array of `google_compute_instance_group` id * `instance_group_names`: an array of `google_compute_instance_group` name * `named_ports`: an array of `google_compute_instance_group` named_ports * `networks`: an array of `google_compute_instance_group` network * `regions`: an array of `google_compute_instance_group` region * `subnetworks`: an array of `google_compute_instance_group` subnetwork * `zones`: an array of `google_compute_instance_group` zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_instance_template.md ================================================ +++ title = "google_compute_instance_template resource" draft = false [menu.gcp] title = "google_compute_instance_template" identifier = "inspec/resources/gcp/google_compute_instance_template resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_instance_template` is used to test a Google InstanceTemplate resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_instance_template(project: 'chef-gcp-inspec', name: 'inspec-gcp-instance-template') do it { should exist } its('description') { should eq 'A description of the instance template' } its('properties.description') { should eq 'A description of the instance itself' } its('properties.machine_type') { should eq 'f1-micro' } its('properties.tags.items') { should include 'foo' } its('properties.disks.count') { should eq 1 } its('properties.disks.first.auto_delete') { should eq 'true' } its('properties.disks.first.boot') { should eq 'true' } its('properties.network_interfaces.count') { should eq 1 } its('properties.service_accounts.count') { should eq 1 } end describe google_compute_instance_template(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_instance_template` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: The unique identifier for the resource. This identifier is defined by the server. * `name`: Name of the resource. The name is 1-63 characters long and complies with RFC1035. * `properties`: The instance properties for this instance template. * `can_ip_forward`: Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. * `description`: An optional text description for the instances that are created from this instance template. * `disks`: An array of disks that are associated with the instances that are created from this template. * `licenses`: Any applicable license URI. * `auto_delete`: Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). Tip: Disks should be set to autoDelete=true so that leftover disks are not left behind on machine deletion. * `boot`: Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. * `device_name`: Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. * `disk_encryption_key`: Encrypts or decrypts a disk using a customer-supplied encryption key. * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `rsa_encrypted_key`: Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `index`: Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. * `initialize_params`: Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. * `disk_name`: Specifies the disk name. If not specified, the default is to use the name of the instance. * `disk_size_gb`: Specifies the size of the disk in base-2 GB. * `disk_type`: Reference to a disk type. Specifies the disk type to use to create the instance. If not specified, the default is pd-standard. * `source_image`: The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. To create a disk with one of the public operating system images, specify the image by its family name. * `source_image_encryption_key`: The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `interface`: Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Possible values: * SCSI * NVME * `mode`: The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Possible values: * READ_WRITE * READ_ONLY * `source`: Reference to a disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name, not the URL for the disk. * `type`: Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Possible values: * SCRATCH * PERSISTENT * `labels`: Labels to apply to this address. A list of key->value pairs. * `machine_type`: The machine type to use in the VM instance template. * `min_cpu_platform`: Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms * `metadata`: The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. * `guest_accelerators`: List of the type and count of accelerator cards attached to the instance * `accelerator_count`: The number of the guest accelerator cards exposed to this instance. * `accelerator_type`: Full or partial URL of the accelerator type resource to expose to this instance. * `network_interfaces`: An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one network interface is supported per instance. * `access_configs`: An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. * `name`: The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access. * `nat_ip`: Reference to an address. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. * `type`: The type of configuration. The default and only option is ONE_TO_ONE_NAT. Possible values: * ONE_TO_ONE_NAT * `set_public_ptr`: Specifies whether a public DNS PTR record should be created to map the external IP address of the instance to a DNS domain name. * `public_ptr_domain_name`: The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled. * `network_tier`: This signifies the networking tier used for configuring this access configuration. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Possible values: * PREMIUM * STANDARD * `alias_ip_ranges`: An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. * `ip_cidr_range`: The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). * `subnetwork_range_name`: Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. * `name`: The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc * `network`: Specifies the title of an existing network. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. * `network_ip`: An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. * `subnetwork`: Reference to a VPC network. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. * `scheduling`: Sets the scheduling options for this instance. * `automatic_restart`: Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. * `on_host_maintenance`: Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. * `preemptible`: Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created. * `service_accounts`: A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. * `email`: Email address of the service account. * `scopes`: The list of scopes to be made available for this service account. * `tags`: A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. * `fingerprint`: Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. * `items`: An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_instance_templates.md ================================================ +++ title = "google_compute_instance_templates resource" draft = false [menu.gcp] title = "google_compute_instance_templates" identifier = "inspec/resources/gcp/google_compute_instance_templates resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_instance_templates` is used to test a Google InstanceTemplate resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_instance_templates(project: 'chef-gcp-inspec') do its('names') { should include 'inspec-gcp-instance-template' } end ``` ## Properties Properties that can be accessed from the `google_compute_instance_templates` resource: See [google_compute_instance_template](google_compute_instance_template) for more detailed information. * `creation_timestamps`: an array of `google_compute_instance_template` creation_timestamp * `descriptions`: an array of `google_compute_instance_template` description * `ids`: an array of `google_compute_instance_template` id * `names`: an array of `google_compute_instance_template` name * `properties`: an array of `google_compute_instance_template` properties ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_instances.md ================================================ +++ title = "google_compute_instances resource" draft = false [menu.gcp] title = "google_compute_instances" identifier = "inspec/resources/gcp/google_compute_instances resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_instances` is used to test a Google Instance resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_instances(project: 'chef-gcp-inspec', zone: 'zone') do its('instance_names') { should include 'inspec-instance' } end ``` ### Test that there are no more than a specified number of instances in the project and zone describe google_compute_instances(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do its('count') { should be <= 100} end ### Test the exact number of instances in the project and zone describe google_compute_instances(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do its('instance_ids.count') { should cmp 9 } end ### Test that an instance with a particular name exists in the project and zone describe google_compute_instances(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do its('instance_names') { should include "my-favourite-instance" } end ## Properties Properties that can be accessed from the `google_compute_instances` resource: See [google_compute_instance](google_compute_instance) for more detailed information. * `can_ip_forwards`: an array of `google_compute_instance` can_ip_forward * `cpu_platforms`: an array of `google_compute_instance` cpu_platform * `creation_timestamps`: an array of `google_compute_instance` creation_timestamp * `deletion_protections`: an array of `google_compute_instance` deletion_protection * `disks`: an array of `google_compute_instance` disks * `guest_accelerators`: an array of `google_compute_instance` guest_accelerators * `hostnames`: an array of `google_compute_instance` hostname * `instance_ids`: an array of `google_compute_instance` id * `label_fingerprints`: an array of `google_compute_instance` label_fingerprint * `labels`: an array of `google_compute_instance` labels * `metadata`: an array of `google_compute_instance` metadata * `machine_types`: an array of `google_compute_instance` machine_type * `min_cpu_platforms`: an array of `google_compute_instance` min_cpu_platform * `instance_names`: an array of `google_compute_instance` name * `network_interfaces`: an array of `google_compute_instance` network_interfaces * `schedulings`: an array of `google_compute_instance` scheduling * `service_accounts`: an array of `google_compute_instance` service_accounts * `shielded_instance_configs`: an array of `google_compute_instance` shielded_instance_config * `statuses`: an array of `google_compute_instance` status * `status_messages`: an array of `google_compute_instance` status_message * `tags`: an array of `google_compute_instance` tags * `zones`: an array of `google_compute_instance` zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_interconnect.md ================================================ +++ title = "google_compute_interconnect resource" draft = false [menu.gcp] title = "google_compute_interconnect" identifier = "inspec/resources/gcp/google_compute_interconnect resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_interconnect` InSpec audit resource to to test a Google Cloud Interconnect resource. ## Examples ```ruby describe google_compute_interconnect(project: 'chef-gcp-inspec') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_interconnect` resource: * `admin_enabled`: Administrative status of the interconnect. When this is set to true, the Interconnect is functional and can carry traffic. When set to false, no packets can be carried over the interconnect and no BGP routes are exchanged over it. By default, the status is set to true. * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated. * `description`: A description about the purpose of the outage. * `location`: URL of the InterconnectLocation object that represents where this connection is to be provisioned. * `id`: The unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `noc_contact_email`: Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Stackdriver logs alerting and Cloud Notifications. * `peer_ip_address`: IP address configured on the customer side of the Interconnect link. The customer should configure this IP address during turnup when prompted by Google NOC. This can be used only for ping tests. * `google_ip_address`: IP address configured on the customer side of the Interconnect link. The customer should configure this IP address during turnup when prompted by Google NOC. This can be used only for ping tests. * `client_operation_id`: The value of requestId if you provided it in the request. Not present otherwise. * `google_reference_id`: Google reference ID to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. * `provisioned_link_count`: Number of links actually provisioned in this interconnect. * `customer_name`: Customer name, to put in the Letter of Authorization as the party authorized to request a crossconnect. * `requested_link_count`: Customer name, to put in the Letter of Authorization as the party authorized to request a crossconnect. * `operational_status`: The current status of this Interconnect's functionality, which can take one of the following values: * OS_ACTIVE: A valid Interconnect, which is turned up and is ready to use. Attachments may be provisioned on this Interconnect. * OS_UNPROVISIONED: An Interconnect that has not completed turnup. No attachments may be provisioned on this Interconnect. * OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal maintenance. No attachments may be provisioned or updated on this Interconnect. Possible values: * OS_ACTIVE * OS_UNPROVISIONED * OS_UNDER_MAINTENANCE * `link_type`: Type of link requested, which can take one of the following values: * LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics * LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. Note that this field indicates the speed of each of the links in the bundle, not the speed of the entire bundle. Possible values: * LINK_TYPE_ETHERNET_10G_LR * LINK_TYPE_ETHERNET_100G_LR * `interconnect_type`: Type of interconnect, which can take one of the following values: * PARTNER: A partner-managed interconnection shared between customers though a partner. * DEDICATED: A dedicated physical interconnection with the customer. Note that a value IT_PRIVATE has been deprecated in favor of DEDICATED. Possible values: * PARTNER * DEDICATED * `interconnect_attachments`: A list of the URLs of all InterconnectAttachments configured to use this Interconnect. * `expected_outages`: A list of outages expected for this Interconnect. * `name`: Unique identifier for this outage notification. * `description`: A description about the purpose of the outage. * `source`: The party that generated this notification, which can take the following value: * GOOGLE: this notification as generated by Google. Note that the value of NSRC_GOOGLE has been deprecated in favor of GOOGLE. Possible values: * GOOGLE * `state`: State of this notification, which can take one of the following values: * ACTIVE: This outage notification is active. The event could be in the past, present, or future.See startTime and endTime for scheduling. * CANCELLED: The outage associated with this notification was cancelled before the outage was due to start. * COMPLETED: The outage associated with this notification is complete. Note that the versions of this enum prefixed with "NS_" have been deprecated in favor of the unprefixed values. Possible values: * ACTIVE * CANCELLED * COMPLETED * `issue_type`: Form this outage is expected to take, which can take one of the following values: * OUTAGE: The Interconnect may be completely out of service for some or all of the specified window. * PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole should remain up, but with reduced bandwidth. Note that the versions of this enum prefixed with "IT_" have been deprecated in favor of the unprefixed values. Possible values: * OUTAGE * PARTIAL_OUTAGE * `affected_circuits`: If issueType is IT_PARTIAL_OUTAGE, a list of the Google-side circuit IDs that will be affected. * `start_time`: Scheduled start time for the outage (milliseconds since Unix epoch). * `end_time`: Scheduled end time for the outage (milliseconds since Unix epoch). * `circuit_infos`: A list of CircuitInfo objects, that describe the individual circuits in this LAG. * `google_circuit_id`: Google-assigned unique ID for this circuit. Assigned at circuit turn-up. * `google_demarc_id`: Google-assigned unique ID for this circuit. Assigned at circuit turn-up. * `customer_demarc_id`: Customer-side demarc ID for this circuit. * `satisfies_pzs`: Set to true if the resource satisfies the zone separation organization policy constraints and false otherwise. Defaults to false if the field is not present.' ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_interconnect_attachment.md ================================================ +++ title = "google_compute_interconnect_attachment resource" draft = false [menu.gcp] title = "google_compute_interconnect_attachment" identifier = "inspec/resources/gcp/google_compute_interconnect_attachment resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_interconnect_attachment` InSpec audit resource to to test a Google Cloud InterconnectAttachment resource. ## Examples ```ruby describe google_compute_interconnect_attachment(name: ' ', project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } its('kind') { should cmp 'value_kind' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('interconnect') { should cmp 'value_interconnect' } its('router') { should cmp 'value_router' } its('region') { should cmp 'value_region' } its('google_reference_id') { should cmp 'value_googlereferenceid' } its('operational_status') { should cmp 'value_operationalstatus' } its('cloud_router_ip_address') { should cmp 'value_cloudrouteripaddress' } its('customer_router_ip_address') { should cmp 'value_customerrouteripaddress' } its('type') { should cmp 'value_type' } its('pairing_key') { should cmp 'value_pairingkey' } its('edge_availability_domain') { should cmp 'value_edgeavailabilitydomain' } its('bandwidth') { should cmp 'value_bandwidth' } its('label_fingerprint') { should cmp 'value_labelfingerprint' } its('state') { should cmp 'value_state' } its('partner_asn') { should cmp 'value_partnerasn' } its('encryption') { should cmp 'value_encryption' } its('stack_type') { should cmp 'value_stacktype' } its('cloud_router_ipv6address') { should cmp 'value_cloudrouteripv6address' } its('customer_router_ipv6address') { should cmp 'value_customerrouteripv6address' } its('cloud_router_ipv6interface_id') { should cmp 'value_cloudrouteripv6interfaceid' } its('customer_router_ipv6interface_id') { should cmp 'value_customerrouteripv6interfaceid' } its('remote_service') { should cmp 'value_remoteservice' } end describe google_compute_interconnect_attachment(name: ' ', project: 'chef-gcp-inspec', region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_interconnect_attachment` resource: * `kind`: [Output Only] Type of the resource. Always compute#interconnectAttachment for interconnect attachments. * `description`: An optional description of this resource. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `interconnect`: URL of the underlying Interconnect object that this attachment's traffic will traverse through. * `router`: URL of the Cloud Router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured. * `region`: [Output Only] URL of the region where the regional interconnect attachment resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. * `google_reference_id`: [Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. [Deprecated] This field is not used. * `mtu`: Maximum Transmission Unit (MTU), in bytes, of packets passing through this interconnect attachment. Only 1440 and 1500 are allowed. If not specified, the value will default to 1440. * `private_interconnect_info`: Information for an interconnect attachment when this belongs to an interconnect of type DEDICATED. * `tag8021q`: [Output Only] 802.1q encapsulation tag to be used for traffic between Google and the customer, going to and from this network and region. * `operational_status`: [Output Only] The current status of whether or not this interconnect attachment is functional, which can take one of the following values: - OS_ACTIVE: The attachment has been turned up and is ready to use. - OS_UNPROVISIONED: The attachment is not ready to use yet, because turnup is not complete. Possible values: * OS_ACTIVE * OS_UNPROVISIONED * `cloud_router_ip_address`: [Output Only] IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment. * `customer_router_ip_address`: [Output Only] IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment. * `type`: The type of interconnect attachment this is, which can take one of the following values: - DEDICATED: an attachment to a Dedicated Interconnect. - PARTNER: an attachment to a Partner Interconnect, created by the customer. - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by the partner. Possible values: * DEDICATED * PARTNER * PARTNER_PROVIDER * `pairing_key`: [Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier of a PARTNER attachment used to initiate provisioning with a selected partner. Of the form "XXXXX/region/domain" * `admin_enabled`: Determines whether this Attachment will carry packets. Not present for PARTNER_PROVIDER. * `vlan_tag8021q`: The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4093. Only specified at creation time. * `edge_availability_domain`: Desired availability domain for the attachment. Only available for type PARTNER, at creation time, and can take one of the following values: - AVAILABILITY_DOMAIN_ANY - AVAILABILITY_DOMAIN_1 - AVAILABILITY_DOMAIN_2 For improved reliability, customers should configure a pair of attachments, one per availability domain. The selected availability domain will be provided to the Partner via the pairing key, so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY. Possible values: * AVAILABILITY_DOMAIN_1 * AVAILABILITY_DOMAIN_2 * AVAILABILITY_DOMAIN_ANY * `candidate_subnets`: Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress for this attachment. All prefixes must be within link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, /27, etc). Google will attempt to select an unused /29 from the supplied candidate prefix(es). The request will fail if all possible /29s are in use on Google's edge. If not supplied, Google will randomly select an unused /29 from all of link-local space. * `bandwidth`: Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one of the following values: - BPS_50M: 50 Mbit/s - BPS_100M: 100 Mbit/s - BPS_200M: 200 Mbit/s - BPS_300M: 300 Mbit/s - BPS_400M: 400 Mbit/s - BPS_500M: 500 Mbit/s - BPS_1G: 1 Gbit/s - BPS_2G: 2 Gbit/s - BPS_5G: 5 Gbit/s - BPS_10G: 10 Gbit/s - BPS_20G: 20 Gbit/s - BPS_50G: 50 Gbit/s Possible values: * BPS_100M * BPS_10G * BPS_1G * BPS_200M * BPS_20G * BPS_2G * BPS_300M * BPS_400M * BPS_500M * BPS_50G * BPS_50M * BPS_5G * `partner_metadata`: Informational metadata about Partner attachments from Partners to display to customers. These fields are propagated from PARTNER_PROVIDER attachments to their corresponding PARTNER attachments. * `partner_name`: Plain text name of the Partner providing this attachment. This value may be validated to match approved Partner values. * `interconnect_name`: Plain text name of the Interconnect this attachment is connected to, as displayed in the Partner's portal. For instance "Chicago 1". This value may be validated to match approved Partner values. * `portal_url`: URL of the Partner's portal for this Attachment. Partners may customise this to be a deep link to the specific resource on the Partner portal. This value may be validated to match approved Partner values. * `labels`: Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. * `additional_properties`: * `label_fingerprint`: A fingerprint for the labels being applied to this InterconnectAttachment, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an InterconnectAttachment. * `state`: [Output Only] The current state of this attachment's functionality. Enum values ACTIVE and UNPROVISIONED are shared by DEDICATED/PRIVATE, PARTNER, and PARTNER_PROVIDER interconnect attachments, while enum values PENDING_PARTNER, PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used for only PARTNER and PARTNER_PROVIDER interconnect attachments. This state can take one of the following values: - ACTIVE: The attachment has been turned up and is ready to use. - UNPROVISIONED: The attachment is not ready to use yet, because turnup is not complete. - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet been configured on the Partner side. - PARTNER_REQUEST_RECEIVED: A PARTNER attachment is in the process of provisioning after a PARTNER_PROVIDER attachment was created that references it. - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER attachment that is waiting for a customer to activate it. - DEFUNCT: The attachment was deleted externally and is no longer functional. This could be because the associated Interconnect was removed, or because the other side of a Partner attachment was deleted. Possible values: * ACTIVE * DEFUNCT * PARTNER_REQUEST_RECEIVED * PENDING_CUSTOMER * PENDING_PARTNER * STATE_UNSPECIFIED * UNPROVISIONED * `partner_asn`: Optional BGP ASN for the router supplied by a Layer 3 Partner if they configured BGP on behalf of the customer. Output only for PARTNER type, input only for PARTNER_PROVIDER, not available for DEDICATED. * `encryption`: Indicates the user-supplied encryption option of this VLAN attachment (interconnectAttachment). Can only be specified at attachment creation for PARTNER or DEDICATED attachments. Possible values are: - NONE - This is the default value, which means that the VLAN attachment carries unencrypted traffic. VMs are able to send traffic to, or receive traffic from, such a VLAN attachment. - IPSEC - The VLAN attachment carries only encrypted traffic that is encrypted by an IPsec device, such as an HA VPN gateway or third-party IPsec VPN. VMs cannot directly send traffic to, or receive traffic from, such a VLAN attachment. To use *HA VPN over Cloud Interconnect*, the VLAN attachment must be created with this option. Possible values: * IPSEC * NONE * `ipsec_internal_addresses`: A list of URLs of addresses that have been reserved for the VLAN attachment. Used only for the VLAN attachment that has the encryption option as IPSEC. The addresses must be regional internal IP address ranges. When creating an HA VPN gateway over the VLAN attachment, if the attachment is configured to use a regional internal IP address, then the VPN gateway's IP address is allocated from the IP address range specified here. For example, if the HA VPN gateway's interface 0 is paired to this VLAN attachment, then a regional internal IP address for the VPN gateway interface 0 will be allocated from the IP address specified for this VLAN attachment. If this field is not specified when creating the VLAN attachment, then later on when creating an HA VPN gateway on this VLAN attachment, the HA VPN gateway's IP address is allocated from the regional external IP address pool. * `dataplane_version`: [Output Only] Dataplane version for this InterconnectAttachment. This field is only present for Dataplane version 2 and higher. Absence of this field in the API output indicates that the Dataplane is version 1. * `satisfies_pzs`: [Output Only] Reserved for future use. * `stack_type`: The stack type for this interconnect attachment to identify whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will be used. This field can be both set at interconnect attachments creation and update interconnect attachment operations. Possible values: * IPV4_IPV6 * IPV4_ONLY * `cloud_router_ipv6_address`: [Output Only] IPv6 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment. * `customer_router_ipv6_address`: [Output Only] IPv6 address + prefix length to be configured on the customer router subinterface for this interconnect attachment. * `candidate_ipv6_subnets`: This field is not available. * `cloud_router_ipv6_interface_id`: This field is not available. * `customer_router_ipv6_interface_id`: This field is not available. * `subnet_length`: Length of the IPv4 subnet mask. Allowed values: - 29 (default) - 30 The default value is 29, except for Cross-Cloud Interconnect connections that use an InterconnectRemoteLocation with a constraints.subnetLengthRange.min equal to 30. For example, connections that use an Azure remote location fall into this category. In these cases, the default value is 30, and requesting 29 returns an error. Where both 29 and 30 are allowed, 29 is preferred, because it gives Google Cloud Support more debugging visibility. * `remote_service`: [Output Only] If the attachment is on a Cross-Cloud Interconnect connection, this field contains the interconnect's remote location service provider. Example values: "Amazon Web Services" "Microsoft Azure". The field is set only for attachments on Cross-Cloud Interconnect connections. Its value is copied from the InterconnectRemoteLocation remoteService field. * `configuration_constraints`: * `bgp_md5`: [Output Only] Whether the attachment's BGP session requires/allows/disallows BGP MD5 authentication. This can take one of the following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED. For example, a Cross-Cloud Interconnect connection to a remote cloud provider that requires BGP MD5 authentication has the interconnectRemoteLocation attachment_configuration_constraints.bgp_md5 field set to MD5_REQUIRED, and that property is propagated to the attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is returned if MD5 is requested. Possible values: * MD5_OPTIONAL * MD5_REQUIRED * MD5_UNSUPPORTED * `bgp_peer_asn_ranges`: [Output Only] List of ASN ranges that the remote location is known to support. Formatted as an array of inclusive ranges {min: min-value, max: max-value}. For example, [{min: 123, max: 123}, {min: 64512, max: 65534}] allows the peer ASN to be 123 or anything in the range 64512-65534. This field is only advisory. Although the API accepts other ranges, these are the ranges that we recommend. * `min`: * `max`: * `multicast_enabled`: Whether or not to permit multicast traffic for this attachment. Multicast packets will be dropped if this is not enabled. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_interconnect_attachments.md ================================================ +++ title = "google_compute_interconnect_attachments resource" draft = false [menu.gcp] title = "google_compute_interconnect_attachments" identifier = "inspec/resources/gcp/google_compute_interconnect_attachments resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_interconnect_attachments` InSpec audit resource to to test a Google Cloud InterconnectAttachment resource. ## Examples ```ruby describe google_compute_interconnect_attachments(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_interconnect_attachments` resource: See [google_compute_interconnect_attachment](google_compute_interconnect_attachment) for more detailed information. * `kinds`: an array of `google_compute_interconnect_attachment` kind * `descriptions`: an array of `google_compute_interconnect_attachment` description * `self_links`: an array of `google_compute_interconnect_attachment` self_link * `self_link_with_ids`: an array of `google_compute_interconnect_attachment` self_link_with_id * `ids`: an array of `google_compute_interconnect_attachment` id * `creation_timestamps`: an array of `google_compute_interconnect_attachment` creation_timestamp * `names`: an array of `google_compute_interconnect_attachment` name * `interconnects`: an array of `google_compute_interconnect_attachment` interconnect * `routers`: an array of `google_compute_interconnect_attachment` router * `regions`: an array of `google_compute_interconnect_attachment` region * `google_reference_ids`: an array of `google_compute_interconnect_attachment` google_reference_id * `mtus`: an array of `google_compute_interconnect_attachment` mtu * `private_interconnect_infos`: an array of `google_compute_interconnect_attachment` private_interconnect_info * `operational_statuses`: an array of `google_compute_interconnect_attachment` operational_status * `cloud_router_ip_addresses`: an array of `google_compute_interconnect_attachment` cloud_router_ip_address * `customer_router_ip_addresses`: an array of `google_compute_interconnect_attachment` customer_router_ip_address * `types`: an array of `google_compute_interconnect_attachment` type * `pairing_keys`: an array of `google_compute_interconnect_attachment` pairing_key * `admin_enableds`: an array of `google_compute_interconnect_attachment` admin_enabled * `vlan_tag8021qs`: an array of `google_compute_interconnect_attachment` vlan_tag8021q * `edge_availability_domains`: an array of `google_compute_interconnect_attachment` edge_availability_domain * `candidate_subnets`: an array of `google_compute_interconnect_attachment` candidate_subnets * `bandwidths`: an array of `google_compute_interconnect_attachment` bandwidth * `partner_metadata`: an array of `google_compute_interconnect_attachment` partner_metadata * `labels`: an array of `google_compute_interconnect_attachment` labels * `label_fingerprints`: an array of `google_compute_interconnect_attachment` label_fingerprint * `states`: an array of `google_compute_interconnect_attachment` state * `partner_asns`: an array of `google_compute_interconnect_attachment` partner_asn * `encryptions`: an array of `google_compute_interconnect_attachment` encryption * `ipsec_internal_addresses`: an array of `google_compute_interconnect_attachment` ipsec_internal_addresses * `dataplane_versions`: an array of `google_compute_interconnect_attachment` dataplane_version * `satisfies_pzs`: an array of `google_compute_interconnect_attachment` satisfies_pzs * `stack_types`: an array of `google_compute_interconnect_attachment` stack_type * `cloud_router_ipv6_addresses`: an array of `google_compute_interconnect_attachment` cloud_router_ipv6_address * `customer_router_ipv6_addresses`: an array of `google_compute_interconnect_attachment` customer_router_ipv6_address * `candidate_ipv6_subnets`: an array of `google_compute_interconnect_attachment` candidate_ipv6_subnets * `cloud_router_ipv6_interface_ids`: an array of `google_compute_interconnect_attachment` cloud_router_ipv6_interface_id * `customer_router_ipv6_interface_ids`: an array of `google_compute_interconnect_attachment` customer_router_ipv6_interface_id * `subnet_lengths`: an array of `google_compute_interconnect_attachment` subnet_length * `remote_services`: an array of `google_compute_interconnect_attachment` remote_service * `configuration_constraints`: an array of `google_compute_interconnect_attachment` configuration_constraints * `multicast_enableds`: an array of `google_compute_interconnect_attachment` multicast_enabled ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_interconnect_location.md ================================================ +++ title = "google_compute_interconnect_location resource" draft = false [menu.gcp] title = "google_compute_interconnect_location" identifier = "inspec/resources/gcp/google_compute_interconnect_location resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_interconnect_location` InSpec audit resource to to test a Google Cloud InterconnectLocation resource. ## Examples ```ruby describe google_compute_interconnect_location(project: 'chef-gcp-inspec', name: 'akl-zone1-1353') do it { should exist } its('facility_provider_facility_id') { should eq 'Auckland - Albany' } its('facility_provider') { should eq 'Vocus' } end describe google_compute_interconnect_location(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_interconnect_location` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated. * `description`: An optional textual description of the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. * `availability_zone`: Availability zone for this InterconnectLocation. Within a metropolitan area (metro), maintenance will not be simultaneously scheduled in more than one availability zone. Example: "zone1" or "zone2". * `client_operation_id`: The value of requestId if you provided it in the request. Not present otherwise. * `facility_provider`: The name of the provider for this facility (e.g., EQUINIX). * `facility_provider_facility_id`: A provider-assigned Identifier for this facility (e.g., Ashburn-DC1). * `status`: The status of this InterconnectLocation, which can take one of the following values: * CLOSED: The InterconnectLocation is closed and is unavailable for provisioning new Interconnects. * AVAILABLE: The InterconnectLocation is available for provisioning new Interconnects. Possible values: * CLOSED * AVAILABLE ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_interconnect_locations.md ================================================ +++ title = "google_compute_interconnect_locations resource" draft = false [menu.gcp] title = "google_compute_interconnect_locations" identifier = "inspec/resources/gcp/google_compute_interconnect_locations resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_interconnect_locations` InSpec audit resource to to test a Google Cloud InterconnectLocation resource. ## Examples ```ruby describe google_compute_interconnect_locations(project: 'chef-gcp-inspec') do its('names') { should include 'akl-zone1-1353' } its('facility_provider_facility_ids') { should include 'Auckland - Albany' } end ``` ## Properties Properties that can be accessed from the `google_compute_interconnect_locations` resource: See [google_compute_interconnect_location](google_compute_interconnect_location) for more detailed information. * `creation_timestamps`: an array of `google_compute_interconnect_location` creation_timestamp * `descriptions`: an array of `google_compute_interconnect_location` description * `ids`: an array of `google_compute_interconnect_location` id * `names`: an array of `google_compute_interconnect_location` name * `availability_zones`: an array of `google_compute_interconnect_location` availability_zone * `client_operation_ids`: an array of `google_compute_interconnect_location` client_operation_id * `facility_providers`: an array of `google_compute_interconnect_location` facility_provider * `facility_provider_facility_ids`: an array of `google_compute_interconnect_location` facility_provider_facility_id * `statuses`: an array of `google_compute_interconnect_location` status ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_interconnects.md ================================================ +++ title = "google_compute_interconnects resource" draft = false [menu.gcp] title = "google_compute_interconnects" identifier = "inspec/resources/gcp/google_compute_interconnects resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_interconnects` InSpec audit resource to to test a Google Cloud Interconnect resource. ## Examples ```ruby describe google_compute_interconnects(project: 'chef-gcp-inspec') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_interconnects` resource: See [google_compute_interconnect](google_compute_interconnect) for more detailed information. * `admin_enableds`: an array of `google_compute_interconnect` admin_enabled * `creation_timestamps`: an array of `google_compute_interconnect` creation_timestamp * `descriptions`: an array of `google_compute_interconnect` description * `locations`: an array of `google_compute_interconnect` location * `ids`: an array of `google_compute_interconnect` id * `names`: an array of `google_compute_interconnect` name * `noc_contact_emails`: an array of `google_compute_interconnect` noc_contact_email * `peer_ip_addresses`: an array of `google_compute_interconnect` peer_ip_address * `google_ip_addresses`: an array of `google_compute_interconnect` google_ip_address * `client_operation_ids`: an array of `google_compute_interconnect` client_operation_id * `google_reference_ids`: an array of `google_compute_interconnect` google_reference_id * `provisioned_link_counts`: an array of `google_compute_interconnect` provisioned_link_count * `customer_names`: an array of `google_compute_interconnect` customer_name * `requested_link_counts`: an array of `google_compute_interconnect` requested_link_count * `operational_statuses`: an array of `google_compute_interconnect` operational_status * `link_types`: an array of `google_compute_interconnect` link_type * `interconnect_types`: an array of `google_compute_interconnect` interconnect_type * `interconnect_attachments`: an array of `google_compute_interconnect` interconnect_attachments * `expected_outages`: an array of `google_compute_interconnect` expected_outages * `circuit_infos`: an array of `google_compute_interconnect` circuit_infos * `satisfies_pzs`: an array of `google_compute_interconnect` satisfies_pzs ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_license.md ================================================ +++ title = "google_compute_license resource" draft = false [menu.gcp] title = "google_compute_license" identifier = "inspec/resources/gcp/google_compute_license resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_license` InSpec audit resource to to test a Google Cloud License resource. ## Examples ```ruby describe google_compute_license(name: 'value_license_id', project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } its('kind') { should cmp 'value_kind' } its('name') { should cmp 'value_name' } its('id') { should cmp 'value_id' } its('license_code') { should cmp 'value_licensecode' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } end describe google_compute_license(name: 'value_license_id', project: 'chef-gcp-inspec', region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_license` resource: * `kind`: [Output Only] Type of resource. Always compute#license for licenses. * `name`: Name of the resource. The name must be 1-63 characters long and comply with RFC1035. * `charges_use_fee`: [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `license_code`: [Output Only] The unique code used to attach this license to images, snapshots, and disks. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `description`: An optional textual description of the resource; provided by the client when the resource is created. * `transferable`: If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk. * `self_link`: [Output Only] Server-defined URL for the resource. * `resource_requirements`: * `min_guest_cpu_count`: Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start. * `min_memory_mb`: Minimum memory required to use the Instance. Enforced at Instance creation and Instance start. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_license_code.md ================================================ +++ title = "google_compute_license_code resource" draft = false [menu.gcp] title = "google_compute_license_code" identifier = "inspec/resources/gcp/google_compute_license_code resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_license_code` InSpec audit resource to to test a Google Cloud LicenseCode resource. ## Examples ```ruby describe google_compute_license_code(project: 'chef-gcp-inspec', name: 'akl-zone1-1353') do it { should exist } end describe google_compute_license_code(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_license_code` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated. * `description`: An optional textual description of the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. * `transferable`: If true, the license will remain attached when creating images or snapshots from disks.Otherwise, the license is not transferred. * `state`: Current state of this License Code. * `license_alias`: URL and description aliases of Licenses with the same License Code. * `self_link`: Server-defined, fully qualified URL for this resource. * `description`: Description of this License Code. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_licenses.md ================================================ +++ title = "google_compute_licenses resource" draft = false [menu.gcp] title = "google_compute_licenses" identifier = "inspec/resources/gcp/google_compute_licenses resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_licenses` InSpec audit resource to to test a Google Cloud License resource. ## Examples ```ruby describe google_compute_licenses(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_licenses` resource: See [google_compute_license](google_compute_license) for more detailed information. * `kinds`: an array of `google_compute_license` kind * `names`: an array of `google_compute_license` name * `charges_use_fees`: an array of `google_compute_license` charges_use_fee * `ids`: an array of `google_compute_license` id * `license_codes`: an array of `google_compute_license` license_code * `creation_timestamps`: an array of `google_compute_license` creation_timestamp * `descriptions`: an array of `google_compute_license` description * `transferables`: an array of `google_compute_license` transferable * `self_links`: an array of `google_compute_license` self_link * `resource_requirements`: an array of `google_compute_license` resource_requirements ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_machine_image.md ================================================ +++ title = "google_compute_machine_image resource" draft = false [menu.gcp] title = "google_compute_machine_image" identifier = "inspec/resources/gcp/google_compute_machine_image resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_machine_image` InSpec audit resource to to test a Google Cloud MachineImage resource. ## Examples ```ruby describe google_compute_machine_image(name: 'value_name', project: 'chef-gcp-inspec') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } its('source_instance') { should cmp 'value_sourceinstance' } its('status') { should cmp 'value_status' } its('total_storage_bytes') { should cmp 'value_totalstoragebytes' } end describe google_compute_machine_image(name: 'value_name', project: 'chef-gcp-inspec') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_machine_image` resource: * `kind`: [Output Only] The resource type, which is always compute#machineImage for machine image. * `id`: [Output Only] A unique identifier for this machine image. The server defines this identifier. * `creation_timestamp`: [Output Only] The creation timestamp for this machine image in RFC3339 text format. * `name`: Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `self_link`: [Output Only] The URL for this machine image. The server defines this URL. * `source_instance`: The source instance used to create the machine image. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance * `status`: [Output Only] The status of the machine image. One of the following values: INVALID, CREATING, READY, DELETING, and UPLOADING. Possible values: * CREATING * DELETING * INVALID * READY * UPLOADING * `source_instance_properties`: DEPRECATED: Please use compute#instanceProperties instead. New properties will not be added to this field. * `description`: An optional text description for the instances that are created from this machine image. * `tags`: A set of instance tags. * `items`: An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. * `fingerprint`: Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags. To see the latest fingerprint, make get() request to the instance. * `machine_type`: The machine type to use for instances that are created from this machine image. * `can_ip_forward`: Enables instances created based on this machine image to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information. * `network_interfaces`: An array of network access configurations for this interface. * `kind`: [Output Only] Type of the resource. Always compute#networkInterface for network interfaces. * `network`: URL of the VPC network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used. If the selected project doesn't have the default network, you must specify a network or subnet. If the network is not specified but the subnetwork is specified, the network is inferred. If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/global/networks/ network - projects/project/global/networks/network - global/networks/default * `subnetwork`: The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/regions/region /subnetworks/subnetwork - regions/region/subnetworks/subnetwork * `network_ip`: An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. * `ipv6_address`: An IPv6 internal network address for this network interface. To use a static internal IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an internal IPv6 address from the instance's subnetwork. * `internal_ipv6_prefix_length`: The prefix length of the primary internal IPv6 range. * `name`: [Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 and 7. The default interface value is nic0. * `access_configs`: An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. * `kind`: [Output Only] Type of the resource. Always compute#accessConfig for access configs. * `type`: The type of configuration. In accessConfigs (IPv4), the default and only option is ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and only option is DIRECT_IPV6. Possible values: * DIRECT_IPV6 * ONE_TO_ONE_NAT * `name`: The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access. In ipv6AccessConfigs, the recommend name is External IPv6. * `nat_ip`: Applies to accessConfigs (IPv4) only. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. * `external_ipv6`: Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork. * `external_ipv6_prefix_length`: Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range. * `set_public_ptr`: Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated. * `public_ptr_domain_name`: The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be createc for first IP in associated external IPv6 range. * `network_tier`: This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Possible values: * FIXED_STANDARD * PREMIUM * STANDARD * STANDARD_OVERRIDES_FIXED_STANDARD * `security_policy`: [Output Only] The resource URL for the security policy associated with this access config. * `ipv6_access_configs`: An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. * `kind`: [Output Only] Type of the resource. Always compute#accessConfig for access configs. * `type`: The type of configuration. In accessConfigs (IPv4), the default and only option is ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and only option is DIRECT_IPV6. Possible values: * DIRECT_IPV6 * ONE_TO_ONE_NAT * `name`: The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access. In ipv6AccessConfigs, the recommend name is External IPv6. * `nat_ip`: Applies to accessConfigs (IPv4) only. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. * `external_ipv6`: Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork. * `external_ipv6_prefix_length`: Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range. * `set_public_ptr`: Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated. * `public_ptr_domain_name`: The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be createc for first IP in associated external IPv6 range. * `network_tier`: This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Possible values: * FIXED_STANDARD * PREMIUM * STANDARD * STANDARD_OVERRIDES_FIXED_STANDARD * `security_policy`: [Output Only] The resource URL for the security policy associated with this access config. * `alias_ip_ranges`: An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks. * `ip_cidr_range`: The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24). * `subnetwork_range_name`: The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used. * `fingerprint`: Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date. * `stack_type`: The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, use IPV4_IPV6. If not specified, IPV4_ONLY is used. This field can be both set at instance creation and update network interface operations. Possible values: * IPV4_IPV6 * IPV4_ONLY * `ipv6_access_type`: [Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork. Valid only if stackType is IPV4_IPV6. Possible values: * EXTERNAL * INTERNAL * `queue_count`: The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It'll be empty if not specified by the users. * `nic_type`: The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. Possible values: * GVNIC * UNSPECIFIED_NIC_TYPE * VIRTIO_NET * `network_attachment`: The URL of the network attachment that this interface should connect to in the following format: projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}. * `disks`: An array of disks that are associated with the instances that are created from this machine image. * `kind`: [Output Only] Type of the resource. Always compute#attachedDisk for attached disks. * `type`: Specifies the type of the attached disk, either SCRATCH or PERSISTENT. Possible values: * PERSISTENT * SCRATCH * `mode`: The mode in which this disk is attached to the source instance, either READ_WRITE or READ_ONLY. Possible values: * READ_ONLY * READ_WRITE * `source`: Specifies a URL of the disk attached to the source instance. * `device_name`: Specifies the name of the disk attached to the source instance. * `index`: Specifies zero-based index of the disk that is attached to the source instance. * `boot`: Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. * `auto_delete`: Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). * `licenses`: [Output Only] Any valid publicly visible licenses. * `interface`: Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. Possible values: * NVME * SCSI * `guest_os_features`: A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. * `type`: The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE - SEV_SNP_CAPABLE For more information, see Enabling guest operating system features. Possible values: * FEATURE_TYPE_UNSPECIFIED * GVNIC * MULTI_IP_SUBNET * SECURE_BOOT * SEV_CAPABLE * SEV_LIVE_MIGRATABLE * SEV_LIVE_MIGRATABLE_V2 * SEV_SNP_CAPABLE * UEFI_COMPATIBLE * VIRTIO_SCSI_MULTIQUEUE * WINDOWS * `disk_encryption_key`: * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" * `rsa_encrypted_key`: Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1 * `sha256`: [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_service_account`: The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ * `disk_size_gb`: The size of the disk in base-2 GB. * `storage_bytes`: [Output Only] A size of the storage used by the disk's snapshot by this machine image. * `storage_bytes_status`: [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date. Possible values: * UPDATING * UP_TO_DATE * `disk_type`: [Output Only] URL of the disk type resource. For example: projects/project /zones/zone/diskTypes/pd-standard or pd-ssd * `metadata`: A metadata key/value entry. * `kind`: [Output Only] Type of the resource. Always compute#metadata for metadata. * `fingerprint`: Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource. * `items`: Array of key/value pairs. The total size of all keys and values must be less than 512 KB. * `key`: Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project. * `value`: Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB). * `service_accounts`: A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this machine image. Use metadata queries to obtain the access tokens for these instances. * `email`: Email address of the service account. * `scopes`: The list of scopes to be made available for this service account. * `scheduling`: Sets the scheduling options for an Instance. * `on_host_maintenance`: Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy. Possible values: * MIGRATE * TERMINATE * `automatic_restart`: Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine. * `preemptible`: Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states. * `node_affinities`: A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity. * `key`: Corresponds to the label key of Node resource. * `operator`: Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity. Possible values: * IN * NOT_IN * OPERATOR_UNSPECIFIED * `values`: Corresponds to the label values of Node resource. * `min_node_cpus`: The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. * `location_hint`: An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API. * `provisioning_model`: Specifies the provisioning model of the instance. Possible values: * SPOT * STANDARD * `instance_termination_action`: Specifies the termination action for the instance. Possible values: * DELETE * INSTANCE_TERMINATION_ACTION_UNSPECIFIED * STOP * `local_ssd_recovery_timeout`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `labels`: Labels to apply to instances that are created from this machine image. * `additional_properties`: * `guest_accelerators`: A list of guest accelerator cards' type and count to use for instances created from this machine image. * `accelerator_type`: Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types. * `accelerator_count`: The number of the guest accelerator cards exposed to this instance. * `min_cpu_platform`: Minimum cpu/platform to be used by instances created from this machine image. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform. * `deletion_protection`: Whether the instance created from this machine image should be protected against deletion. * `key_revocation_action_type`: KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Possible values: * KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED * NONE * STOP * `instance_properties`: * `description`: An optional text description for the instances that are created from these properties. * `tags`: A set of instance tags. * `items`: An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. * `fingerprint`: Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags. To see the latest fingerprint, make get() request to the instance. * `resource_manager_tags`: Resource manager tags to be bound to the instance. Tag keys and values have the same definition as resource manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and values are in the format `tagValues/456`. The field is ignored (both PUT & PATCH) when empty. * `additional_properties`: * `machine_type`: The machine type to use for instances that are created from these properties. * `can_ip_forward`: Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information. * `network_interfaces`: An array of network access configurations for this interface. * `kind`: [Output Only] Type of the resource. Always compute#networkInterface for network interfaces. * `network`: URL of the VPC network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used. If the selected project doesn't have the default network, you must specify a network or subnet. If the network is not specified but the subnetwork is specified, the network is inferred. If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/global/networks/ network - projects/project/global/networks/network - global/networks/default * `subnetwork`: The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/regions/region /subnetworks/subnetwork - regions/region/subnetworks/subnetwork * `network_ip`: An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. * `ipv6_address`: An IPv6 internal network address for this network interface. To use a static internal IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an internal IPv6 address from the instance's subnetwork. * `internal_ipv6_prefix_length`: The prefix length of the primary internal IPv6 range. * `name`: [Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 and 7. The default interface value is nic0. * `access_configs`: An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. * `kind`: [Output Only] Type of the resource. Always compute#accessConfig for access configs. * `type`: The type of configuration. In accessConfigs (IPv4), the default and only option is ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and only option is DIRECT_IPV6. Possible values: * DIRECT_IPV6 * ONE_TO_ONE_NAT * `name`: The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access. In ipv6AccessConfigs, the recommend name is External IPv6. * `nat_ip`: Applies to accessConfigs (IPv4) only. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. * `external_ipv6`: Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork. * `external_ipv6_prefix_length`: Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range. * `set_public_ptr`: Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated. * `public_ptr_domain_name`: The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be createc for first IP in associated external IPv6 range. * `network_tier`: This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Possible values: * FIXED_STANDARD * PREMIUM * STANDARD * STANDARD_OVERRIDES_FIXED_STANDARD * `security_policy`: [Output Only] The resource URL for the security policy associated with this access config. * `ipv6_access_configs`: An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. * `kind`: [Output Only] Type of the resource. Always compute#accessConfig for access configs. * `type`: The type of configuration. In accessConfigs (IPv4), the default and only option is ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and only option is DIRECT_IPV6. Possible values: * DIRECT_IPV6 * ONE_TO_ONE_NAT * `name`: The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access. In ipv6AccessConfigs, the recommend name is External IPv6. * `nat_ip`: Applies to accessConfigs (IPv4) only. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. * `external_ipv6`: Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork. * `external_ipv6_prefix_length`: Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range. * `set_public_ptr`: Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated. * `public_ptr_domain_name`: The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be createc for first IP in associated external IPv6 range. * `network_tier`: This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Possible values: * FIXED_STANDARD * PREMIUM * STANDARD * STANDARD_OVERRIDES_FIXED_STANDARD * `security_policy`: [Output Only] The resource URL for the security policy associated with this access config. * `alias_ip_ranges`: An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks. * `ip_cidr_range`: The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24). * `subnetwork_range_name`: The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used. * `fingerprint`: Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date. * `stack_type`: The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, use IPV4_IPV6. If not specified, IPV4_ONLY is used. This field can be both set at instance creation and update network interface operations. Possible values: * IPV4_IPV6 * IPV4_ONLY * `ipv6_access_type`: [Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork. Valid only if stackType is IPV4_IPV6. Possible values: * EXTERNAL * INTERNAL * `queue_count`: The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It'll be empty if not specified by the users. * `nic_type`: The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. Possible values: * GVNIC * UNSPECIFIED_NIC_TYPE * VIRTIO_NET * `network_attachment`: The URL of the network attachment that this interface should connect to in the following format: projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}. * `disks`: An array of disks that are associated with the instances that are created from these properties. * `kind`: [Output Only] Type of the resource. Always compute#attachedDisk for attached disks. * `type`: Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Possible values: * PERSISTENT * SCRATCH * `mode`: The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Possible values: * READ_ONLY * READ_WRITE * `saved_state`: For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api. Possible values: * DISK_SAVED_STATE_UNSPECIFIED * PRESERVED * `source`: Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name for zonal disk, and the URL for regional disk. * `device_name`: Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks. * `index`: [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number. * `boot`: Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. * `initialize_params`: [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This field is persisted and returned for instanceTemplate and not returned in the context of instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both. * `disk_name`: Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created. * `source_image`: The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a custom image that you created, specify the image name in the following format: global/images/my-custom-image You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-image-family If the source image is deleted later, this field will not be set. * `disk_size_gb`: Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB. * `disk_type`: Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example: https://www.googleapis.com/compute/v1/projects/project/zones/zone /diskTypes/pd-standard For a full list of acceptable values, see Persistent disk types. If you specify this field when creating a VM, you can provide either the full or partial URL. For example, the following values are valid: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /diskTypes/diskType - projects/project/zones/zone/diskTypes/diskType - zones/zone/diskTypes/diskType If you specify this field when creating or updating an instance template or all-instances configuration, specify the type of the disk, not the URL. For example: pd-standard. * `source_image_encryption_key`: * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" * `rsa_encrypted_key`: Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1 * `sha256`: [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_service_account`: The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ * `labels`: Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks. * `additional_properties`: * `source_snapshot`: The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD. To create a disk with a snapshot that you created, specify the snapshot name in the following format: global/snapshots/my-backup If the source snapshot is deleted later, this field will not be set. * `source_snapshot_encryption_key`: * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" * `rsa_encrypted_key`: Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1 * `sha256`: [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_service_account`: The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ * `description`: An optional description. Provide this property when creating the disk. * `replica_zones`: Required for each regional disk associated with the instance. Specify the URLs of the zones where the disk should be replicated to. You must provide exactly two replica zones, and one zone must be the same as the instance zone. * `resource_policies`: Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name. * `on_update_action`: Specifies which action to take on instance update with this disk. Default is to use the existing disk. Possible values: * RECREATE_DISK * RECREATE_DISK_IF_SOURCE_CHANGED * USE_EXISTING_DISK * `provisioned_iops`: Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation. * `licenses`: A list of publicly visible licenses. Reserved for Google's use. * `architecture`: The architecture of the attached disk. Valid values are arm64 or x86_64. Possible values: * ARCHITECTURE_UNSPECIFIED * ARM64 * X86_64 * `resource_manager_tags`: Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and values are in the format `tagValues/456`. The field is ignored (both PUT & PATCH) when empty. * `additional_properties`: * `provisioned_throughput`: Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be between 1 and 7,124. * `auto_delete`: Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). * `licenses`: [Output Only] Any valid publicly visible licenses. * `interface`: Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks. Possible values: * NVME * SCSI * `guest_os_features`: A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. * `type`: The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE - SEV_SNP_CAPABLE For more information, see Enabling guest operating system features. Possible values: * FEATURE_TYPE_UNSPECIFIED * GVNIC * MULTI_IP_SUBNET * SECURE_BOOT * SEV_CAPABLE * SEV_LIVE_MIGRATABLE * SEV_LIVE_MIGRATABLE_V2 * SEV_SNP_CAPABLE * UEFI_COMPATIBLE * VIRTIO_SCSI_MULTIQUEUE * WINDOWS * `disk_encryption_key`: * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" * `rsa_encrypted_key`: Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1 * `sha256`: [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_service_account`: The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ * `disk_size_gb`: The size of the disk in GB. * `shielded_instance_initial_state`: Initial State for shielded instance, these are public keys which are safe to store in public * `pk`: * `content`: The raw content in the secure keys file. * `file_type`: The file type of source file. Possible values: * BIN * UNDEFINED * X509 * `keks`: The Key Exchange Key (KEK). * `content`: The raw content in the secure keys file. * `file_type`: The file type of source file. Possible values: * BIN * UNDEFINED * X509 * `dbs`: The Key Database (db). * `content`: The raw content in the secure keys file. * `file_type`: The file type of source file. Possible values: * BIN * UNDEFINED * X509 * `dbxs`: The forbidden key database (dbx). * `content`: The raw content in the secure keys file. * `file_type`: The file type of source file. Possible values: * BIN * UNDEFINED * X509 * `force_attach`: [Input Only] Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error. * `architecture`: [Output Only] The architecture of the attached disk. Valid values are ARM64 or X86_64. Possible values: * ARCHITECTURE_UNSPECIFIED * ARM64 * X86_64 * `metadata`: A metadata key/value entry. * `kind`: [Output Only] Type of the resource. Always compute#metadata for metadata. * `fingerprint`: Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource. * `items`: Array of key/value pairs. The total size of all keys and values must be less than 512 KB. * `key`: Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project. * `value`: Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB). * `service_accounts`: A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances. * `email`: Email address of the service account. * `scopes`: The list of scopes to be made available for this service account. * `scheduling`: Sets the scheduling options for an Instance. * `on_host_maintenance`: Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy. Possible values: * MIGRATE * TERMINATE * `automatic_restart`: Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine. * `preemptible`: Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states. * `node_affinities`: A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity. * `key`: Corresponds to the label key of Node resource. * `operator`: Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity. Possible values: * IN * NOT_IN * OPERATOR_UNSPECIFIED * `values`: Corresponds to the label values of Node resource. * `min_node_cpus`: The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. * `location_hint`: An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API. * `provisioning_model`: Specifies the provisioning model of the instance. Possible values: * SPOT * STANDARD * `instance_termination_action`: Specifies the termination action for the instance. Possible values: * DELETE * INSTANCE_TERMINATION_ACTION_UNSPECIFIED * STOP * `local_ssd_recovery_timeout`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `labels`: Labels to apply to instances that are created from these properties. * `additional_properties`: * `guest_accelerators`: A list of guest accelerator cards' type and count to use for instances created from these properties. * `accelerator_type`: Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types. * `accelerator_count`: The number of the guest accelerator cards exposed to this instance. * `min_cpu_platform`: Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform. * `reservation_affinity`: Specifies the reservations that this instance can consume from. * `consume_reservation_type`: Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples. Possible values: * ANY_RESERVATION * NO_RESERVATION * SPECIFIC_RESERVATION * UNSPECIFIED * `key`: Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value. * `values`: Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project. * `shielded_instance_config`: A set of Shielded Instance options. * `enable_secure_boot`: Defines whether the instance has Secure Boot enabled. Disabled by default. * `enable_vtpm`: Defines whether the instance has the vTPM enabled. Enabled by default. * `enable_integrity_monitoring`: Defines whether the instance has integrity monitoring enabled. Enabled by default. * `resource_policies`: Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet. * `confidential_instance_config`: A set of Confidential Instance options. * `enable_confidential_compute`: Defines whether the instance should have confidential compute enabled. * `private_ipv6_google_access`: The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default. Note that for MachineImage, this is not supported yet. Possible values: * ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE * ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE * INHERIT_FROM_SUBNETWORK * `advanced_machine_features`: Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled). * `enable_nested_virtualization`: Whether to enable nested virtualization or not (default is false). * `threads_per_core`: The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed. * `visible_core_count`: The number of physical cores to expose to an instance. Multiply by the number of threads per core to compute the total number of virtual CPUs to expose to the instance. If unset, the number of cores is inferred from the instance's nominal CPU count and the underlying platform's SMT width. * `enable_uefi_networking`: Whether to enable UEFI networking for instance creation. * `network_performance_config`: * `total_egress_bandwidth_tier`: Possible values: * DEFAULT * TIER_1 * `key_revocation_action_type`: KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Possible values: * KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED * NONE * STOP * `saved_disks`: An array of Machine Image specific properties for disks attached to the source instance * `kind`: [Output Only] Type of the resource. Always compute#savedDisk for attached disks. * `source_disk`: Specifies a URL of the disk attached to the source instance. * `storage_bytes`: [Output Only] Size of the individual disk snapshot used by this machine image. * `storage_bytes_status`: [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date. Possible values: * UPDATING * UP_TO_DATE * `architecture`: [Output Only] The architecture of the attached disk. Possible values: * ARCHITECTURE_UNSPECIFIED * ARM64 * X86_64 * `storage_locations`: The regional or multi-regional Cloud Storage bucket location where the machine image is stored. * `machine_image_encryption_key`: * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" * `rsa_encrypted_key`: Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1 * `sha256`: [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_service_account`: The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ * `guest_flush`: [Input Only] Whether to attempt an application consistent machine image by informing the OS to prepare for the snapshot process. * `source_disk_encryption_keys`: [Input Only] The customer-supplied encryption key of the disks attached to the source instance. Required if the source disk is protected by a customer-supplied encryption key. * `source_disk`: URL of the disk attached to the source instance. This can be a full or valid partial URL. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /disks/disk - projects/project/zones/zone/disks/disk - zones/zone/disks/disk * `disk_encryption_key`: * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" * `rsa_encrypted_key`: Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1 * `sha256`: [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_service_account`: The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ * `total_storage_bytes`: [Output Only] Total size of the storage used by the machine image. * `satisfies_pzs`: [Output Only] Reserved for future use. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_machine_images.md ================================================ +++ title = "google_compute_machine_images resource" draft = false [menu.gcp] title = "google_compute_machine_images" identifier = "inspec/resources/gcp/google_compute_machine_images resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_machine_images` InSpec audit resource to to test a Google Cloud MachineImage resource. ## Examples ```ruby describe google_compute_machine_images(project: 'chef-gcp-inspec') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_machine_images` resource: See [google_compute_machine_image](google_compute_machine_image) for more detailed information. * `kinds`: an array of `google_compute_machine_image` kind * `ids`: an array of `google_compute_machine_image` id * `creation_timestamps`: an array of `google_compute_machine_image` creation_timestamp * `names`: an array of `google_compute_machine_image` name * `descriptions`: an array of `google_compute_machine_image` description * `self_links`: an array of `google_compute_machine_image` self_link * `source_instances`: an array of `google_compute_machine_image` source_instance * `statuses`: an array of `google_compute_machine_image` status * `source_instance_properties`: an array of `google_compute_machine_image` source_instance_properties * `instance_properties`: an array of `google_compute_machine_image` instance_properties * `saved_disks`: an array of `google_compute_machine_image` saved_disks * `storage_locations`: an array of `google_compute_machine_image` storage_locations * `machine_image_encryption_keys`: an array of `google_compute_machine_image` machine_image_encryption_key * `guest_flushes`: an array of `google_compute_machine_image` guest_flush * `source_disk_encryption_keys`: an array of `google_compute_machine_image` source_disk_encryption_keys * `total_storage_bytes`: an array of `google_compute_machine_image` total_storage_bytes * `satisfies_pzs`: an array of `google_compute_machine_image` satisfies_pzs ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_machine_type.md ================================================ +++ title = "google_compute_machine_type resource" draft = false [menu.gcp] title = "google_compute_machine_type" identifier = "inspec/resources/gcp/google_compute_machine_type resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_machine_type` InSpec audit resource to to test a Google Cloud MachineType resource. ## Examples ```ruby describe google_compute_machine_type(name: 'value_name', project: 'chef-gcp-inspec', zone: ' value_zone') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('maximum_persistent_disks_size_gb') { should cmp 'value_maximumpersistentdiskssizegb' } its('zone') { should cmp 'value_zone' } its('self_link') { should cmp 'value_selflink' } end describe google_compute_machine_type(name: 'value_name', project: 'chef-gcp-inspec', zone: ' value_zone') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_machine_type` resource: * `kind`: [Output Only] The type of the resource. Always compute#machineType for machine types. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: [Output Only] Name of the resource. * `description`: [Output Only] An optional textual description of the resource. * `guest_cpus`: [Output Only] The number of virtual CPUs that are available to the instance. * `memory_mb`: [Output Only] The amount of physical memory available to the instance, defined in MB. * `image_space_gb`: [Deprecated] This property is deprecated and will never be populated with any relevant values. * `scratch_disks`: [Output Only] A list of extended scratch disks assigned to the instance. * `disk_gb`: Size of the scratch disk, defined in GB. * `maximum_persistent_disks`: [Output Only] Maximum persistent disks allowed. * `maximum_persistent_disks_size_gb`: [Output Only] Maximum total persistent disks size (GB) allowed. * `deprecated`: Deprecation status for a public resource. * `state`: The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. Possible values: * ACTIVE * DELETED * DEPRECATED * OBSOLETE * `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. * `deprecated`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it. * `obsolete`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it. * `deleted`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it. * `zone`: [Output Only] The name of the zone where the machine type resides, such as us-central1-a. * `self_link`: [Output Only] Server-defined URL for the resource. * `is_shared_cpu`: [Output Only] Whether this machine type has a shared CPU. See Shared-core machine types for more information. * `accelerators`: [Output Only] A list of accelerator configurations assigned to this machine type. * `guest_accelerator_type`: The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4. * `guest_accelerator_count`: Number of accelerator cards exposed to the guest. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_machine_types.md ================================================ +++ title = "google_compute_machine_types resource" draft = false [menu.gcp] title = "google_compute_machine_types" identifier = "inspec/resources/gcp/google_compute_machine_types resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_machine_types` InSpec audit resource to to test a Google Cloud MachineType resource. ## Examples ```ruby describe google_compute_machine_types(project: 'chef-gcp-inspec', zone: ' value_zone') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_machine_types` resource: See [google_compute_machine_type](google_compute_machine_type) for more detailed information. * `kinds`: an array of `google_compute_machine_type` kind * `ids`: an array of `google_compute_machine_type` id * `creation_timestamps`: an array of `google_compute_machine_type` creation_timestamp * `names`: an array of `google_compute_machine_type` name * `descriptions`: an array of `google_compute_machine_type` description * `guest_cpus`: an array of `google_compute_machine_type` guest_cpus * `memory_mbs`: an array of `google_compute_machine_type` memory_mb * `image_space_gbs`: an array of `google_compute_machine_type` image_space_gb * `scratch_disks`: an array of `google_compute_machine_type` scratch_disks * `maximum_persistent_disks`: an array of `google_compute_machine_type` maximum_persistent_disks * `maximum_persistent_disks_size_gbs`: an array of `google_compute_machine_type` maximum_persistent_disks_size_gb * `deprecateds`: an array of `google_compute_machine_type` deprecated * `zones`: an array of `google_compute_machine_type` zone * `self_links`: an array of `google_compute_machine_type` self_link * `is_shared_cpus`: an array of `google_compute_machine_type` is_shared_cpu * `accelerators`: an array of `google_compute_machine_type` accelerators ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_network.md ================================================ +++ title = "google_compute_network resource" draft = false [menu.gcp] title = "google_compute_network" identifier = "inspec/resources/gcp/google_compute_network resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_network` is used to test a Google Network resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_network(project: 'chef-gcp-inspec', name: 'inspec-network') do it { should exist } its('routing_config.routing_mode') { should cmp 'REGIONAL' } end describe google_compute_network(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP compute network exists describe google_compute_network(project: 'chef-inspec-gcp', name: 'gcp-inspec-network') do it { should exist } end ### Test when a GCP compute network was created describe google_compute_network(project: 'chef-inspec-gcp', name: 'gcp-inspec-network') do its('creation_timestamp_date') { should be > Time.now - 365*60*60*24*10 } end ### Test for an expected network identifier describe google_compute_network(project: 'chef-inspec-gcp', name: 'gcp-inspec-network') do its('id') { should eq 12345567789 } end ### Test whether a single attached subnetwork name is correct describe google_compute_network(project: 'chef-inspec-gcp', name: 'gcp-inspec-network') do its ('subnetworks.count') { should eq 1 } its ('subnetworks.first') { should match "subnetwork-name"} end ### Test whether the network is configured to automatically create subnetworks or not describe google_compute_network(project: 'chef-inspec-gcp', name: 'gcp-inspec-network') do its ('auto_create_subnetworks'){ should be false } end ### Check the network routing configuration routing mode describe google_compute_network(project: 'chef-inspec-gcp', name: 'gcp-inspec-network') do its ('routing_config.routing_mode') { should eq "REGIONAL" } end ## Properties Properties that can be accessed from the `google_compute_network` resource: * `description`: An optional description of this resource. The resource must be recreated to modify this field. * `gateway_ipv4`: The gateway address for default routing out of the network. This value is selected by GCP. * `id`: The unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `subnetworks`: Server-defined fully-qualified URLs for all subnetworks in this network. * `auto_create_subnetworks`: When set to `true`, the network is created in "auto subnet mode" and it will create a subnet for each region automatically across the `10.128.0.0/9` address range. When set to `false`, the network is created in "custom subnet mode" so the user can explicitly connect subnetwork resources. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `routing_config`: The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce. * `routing_mode`: The network-wide routing mode to use. If set to `REGIONAL`, this network's cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set to `GLOBAL`, this network's cloud routers will advertise routes with all subnetworks of this network, across regions. Possible values: * REGIONAL * GLOBAL * `peerings`: Peerings for a network * `name`: Name of the peering. * `state`: State of the peering. * `state_details`: Details about the current state of the peering. * `network`: URL of the peer network * `export_custom_routes`: Whether to export the custom routes to the peer network. * `import_custom_routes`: Whether to import the custom routes to the peer network. * `peer_mtu`: Maximum Transmission Unit in bytes. * `mtu`: Maximum Transmission Unit in bytes. The minimum value for this field is 1460 and the maximum value is 1500 bytes. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_network_attachment.md ================================================ +++ title = "google_compute_network_attachment resource" draft = false [menu.gcp] title = "google_compute_network_attachment" identifier = "inspec/resources/gcp/google_compute_network_attachment resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_network_attachment` InSpec audit resource to to test a Google Cloud NetworkAttachment resource. ## Examples ```ruby describe google_compute_network_attachment(name: 'value_name', project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('region') { should cmp 'value_region' } its('connection_preference') { should cmp 'value_connectionpreference' } its('fingerprint') { should cmp 'value_fingerprint' } its('network') { should cmp 'value_network' } end describe google_compute_network_attachment(name: 'value_name', project: 'chef-gcp-inspec', region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_network_attachment` resource: * `kind`: [Output Only] Type of the resource. * `id`: [Output Only] The unique identifier for the resource type. The server generates this identifier. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource's resource id. * `region`: [Output Only] URL of the region where the network attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. * `connection_preference`: Possible values: * ACCEPT_AUTOMATIC * ACCEPT_MANUAL * INVALID * `connection_endpoints`: [Output Only] An array of connections for all the producers connected to this network attachment. * `status`: The status of a connected endpoint to this network attachment. Possible values: * ACCEPTED * CLOSED * NEEDS_ATTENTION * PENDING * REJECTED * STATUS_UNSPECIFIED * `project_id_or_num`: The project id or number of the interface to which the IP was assigned. * `subnetwork`: The subnetwork used to assign the IP to the producer instance network interface. * `ip_address`: The IPv4 address assigned to the producer instance network interface. This value will be a range in case of Serverless. * `ipv6_address`: The IPv6 address assigned to the producer instance network interface. This is only assigned when the stack types of both the instance network interface and the consumer subnet are IPv4_IPv6. * `secondary_ip_cidr_ranges`: Alias IP ranges from the same subnetwork. * `subnetwork_cidr_range`: [Output Only] The CIDR range of the subnet from which the IPv4 internal IP was allocated from. * `subnetworks`: An array of URLs where each entry is the URL of a subnet provided by the service consumer to use for endpoints in the producers that connect to this network attachment. * `producer_reject_lists`: Projects that are not allowed to connect to this network attachment. The project can be specified using its id or number. * `producer_accept_lists`: Projects that are allowed to connect to this network attachment. The project can be specified using its id or number. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch. * `network`: [Output Only] The URL of the network which the Network Attachment belongs to. Practically it is inferred by fetching the network of the first subnetwork associated. Because it is required that all the subnetworks must be from the same network, it is assured that the Network Attachment belongs to the same network as all the subnetworks. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_network_attachments.md ================================================ +++ title = "google_compute_network_attachments resource" draft = false [menu.gcp] title = "google_compute_network_attachments" identifier = "inspec/resources/gcp/google_compute_network_attachments resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_network_attachments` InSpec audit resource to to test a Google Cloud NetworkAttachment resource. ## Examples ```ruby describe google_compute_network_attachments(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_network_attachments` resource: See [google_compute_network_attachment](google_compute_network_attachment) for more detailed information. * `kinds`: an array of `google_compute_network_attachment` kind * `ids`: an array of `google_compute_network_attachment` id * `creation_timestamps`: an array of `google_compute_network_attachment` creation_timestamp * `names`: an array of `google_compute_network_attachment` name * `descriptions`: an array of `google_compute_network_attachment` description * `self_links`: an array of `google_compute_network_attachment` self_link * `self_link_with_ids`: an array of `google_compute_network_attachment` self_link_with_id * `regions`: an array of `google_compute_network_attachment` region * `connection_preferences`: an array of `google_compute_network_attachment` connection_preference * `connection_endpoints`: an array of `google_compute_network_attachment` connection_endpoints * `subnetworks`: an array of `google_compute_network_attachment` subnetworks * `producer_reject_lists`: an array of `google_compute_network_attachment` producer_reject_lists * `producer_accept_lists`: an array of `google_compute_network_attachment` producer_accept_lists * `fingerprints`: an array of `google_compute_network_attachment` fingerprint * `networks`: an array of `google_compute_network_attachment` network ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_network_edge_security_service.md ================================================ +++ title = "google_compute_network_edge_security_service resource" draft = false [menu.gcp] title = "google_compute_network_edge_security_service" identifier = "inspec/resources/gcp/google_compute_network_edge_security_service resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_network_edge_security_service` InSpec audit resource to to test a Google Cloud NetworkEdgeSecurityService resource. ## Examples ```ruby describe google_compute_network_edge_security_service(name: 'value_name', project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('region') { should cmp 'value_region' } its('fingerprint') { should cmp 'value_fingerprint' } its('security_policy') { should cmp 'value_securitypolicy' } end describe google_compute_network_edge_security_service(name: ' ', project: 'chef-gcp-inspec', region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_network_edge_security_service` resource: * `kind`: [Output only] Type of the resource. Always compute#networkEdgeSecurityService for NetworkEdgeSecurityServices * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `region`: [Output Only] URL of the region where the resource resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a NetworkEdgeSecurityService. An up-to-date fingerprint must be provided in order to update the NetworkEdgeSecurityService, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a NetworkEdgeSecurityService. * `security_policy`: The resource URL for the network edge security service associated with this network edge security service. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_network_endpoint_group.md ================================================ +++ title = "google_compute_network_endpoint_group resource" draft = false [menu.gcp] title = "google_compute_network_endpoint_group" identifier = "inspec/resources/gcp/google_compute_network_endpoint_group resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_network_endpoint_group` is used to test a Google NetworkEndpointGroup resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_network_endpoint_group(project: 'chef-gcp-inspec', zone: 'zone', name: 'inspec-gcp-endpoint-group') do it { should exist } its('default_port') { should cmp '90' } end describe google_compute_network_endpoint_group(project: 'chef-gcp-inspec', zone: 'zone', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_network_endpoint_group` resource: * `id`: The unique identifier for the resource. * `name`: Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `network_endpoint_type`: Type of network endpoints in this network endpoint group. Possible values: * GCE_VM_IP_PORT * `size`: Number of network endpoints in the network endpoint group. * `network`: The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified. * `subnetwork`: Optional subnetwork to which all network endpoints in the NEG belong. * `default_port`: The default port used if the port number is not specified in the network endpoint. * `zone`: Zone where the network endpoint group is located. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_network_endpoint_groups.md ================================================ +++ title = "google_compute_network_endpoint_groups resource" draft = false [menu.gcp] title = "google_compute_network_endpoint_groups" identifier = "inspec/resources/gcp/google_compute_network_endpoint_groups resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_network_endpoint_groups` is used to test a Google NetworkEndpointGroup resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_network_endpoint_groups(project: 'chef-gcp-inspec', zone: 'zone') do its('default_ports') { should include '90' } its('names') { should include 'inspec-gcp-endpoint-group' } end ``` ## Properties Properties that can be accessed from the `google_compute_network_endpoint_groups` resource: See [google_compute_network_endpoint_group](google_compute_network_endpoint_group) for more detailed information. * `ids`: an array of `google_compute_network_endpoint_group` id * `names`: an array of `google_compute_network_endpoint_group` name * `descriptions`: an array of `google_compute_network_endpoint_group` description * `network_endpoint_types`: an array of `google_compute_network_endpoint_group` network_endpoint_type * `sizes`: an array of `google_compute_network_endpoint_group` size * `networks`: an array of `google_compute_network_endpoint_group` network * `subnetworks`: an array of `google_compute_network_endpoint_group` subnetwork * `default_ports`: an array of `google_compute_network_endpoint_group` default_port * `zones`: an array of `google_compute_network_endpoint_group` zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_network_firewall_policies.md ================================================ +++ title = "google_compute_network_firewall_policies resource" draft = false [menu.gcp] title = "google_compute_network_firewall_policies" identifier = "inspec/resources/gcp/google_compute_network_firewall_policies resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_network_firewall_policies` InSpec audit resource to to test a Google Cloud NetworkFirewallPolicy resource. ## Examples ```ruby describe google_compute_network_firewall_policies(project: 'chef-gcp-inspec') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_network_firewall_policies` resource: See [google_compute_network_firewall_policy](google_compute_network_firewall_policy) for more detailed information. * `kinds`: an array of `google_compute_network_firewall_policy` kind * `ids`: an array of `google_compute_network_firewall_policy` id * `creation_timestamps`: an array of `google_compute_network_firewall_policy` creation_timestamp * `names`: an array of `google_compute_network_firewall_policy` name * `descriptions`: an array of `google_compute_network_firewall_policy` description * `rules`: an array of `google_compute_network_firewall_policy` rules * `fingerprints`: an array of `google_compute_network_firewall_policy` fingerprint * `self_links`: an array of `google_compute_network_firewall_policy` self_link * `self_link_with_ids`: an array of `google_compute_network_firewall_policy` self_link_with_id * `associations`: an array of `google_compute_network_firewall_policy` associations * `rule_tuple_counts`: an array of `google_compute_network_firewall_policy` rule_tuple_count * `short_names`: an array of `google_compute_network_firewall_policy` short_name * `display_names`: an array of `google_compute_network_firewall_policy` display_name * `parents`: an array of `google_compute_network_firewall_policy` parent * `regions`: an array of `google_compute_network_firewall_policy` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_network_firewall_policy.md ================================================ +++ title = "google_compute_network_firewall_policy resource" draft = false [menu.gcp] title = "google_compute_network_firewall_policy" identifier = "inspec/resources/gcp/google_compute_network_firewall_policy resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_network_firewall_policy` InSpec audit resource to to test a Google Cloud NetworkFirewallPolicy resource. ## Examples ```ruby describe google_compute_network_firewall_policy(name: 'value_name', project: 'chef-gcp-inspec') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('fingerprint') { should cmp 'value_fingerprint' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('short_name') { should cmp 'value_shortname' } its('display_name') { should cmp 'value_displayname' } its('parent') { should cmp 'value_parent' } its('region') { should cmp 'value_region' } end describe google_compute_network_firewall_policy(name: 'value_name', project: 'chef-gcp-inspec') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_network_firewall_policy` resource: * `kind`: [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. * `description`: An optional description of this resource. Provide this property when you create the resource. * `rules`: A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. * `kind`: [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules * `rule_name`: An optional name for the rule. This field is not a unique identifier and can be updated. * `description`: An optional description for this resource. * `priority`: An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority. * `match`: Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. * `src_ip_ranges`: CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. * `dest_ip_ranges`: CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. * `layer4_configs`: Pairs of IP protocols and ports that the rule should match. * `ip_protocol`: The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number. * `ports`: An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. * `src_secure_tags`: List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. * `name`: Name of the secure tag, created with TagManager's TagValue API. * `state`: [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted. Possible values: * EFFECTIVE * INEFFECTIVE * `dest_address_groups`: Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10. * `src_address_groups`: Address groups which should be matched against the traffic source. Maximum number of source address groups is 10. * `src_fqdns`: Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100. * `dest_fqdns`: Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100. * `src_region_codes`: Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000. * `dest_region_codes`: Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000. * `dest_threat_intelligences`: Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination. * `src_threat_intelligences`: Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source. * `action`: The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny" and "goto_next". * `direction`: The direction in which this rule applies. Possible values: * EGRESS * INGRESS * `target_resources`: A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. * `enable_logging`: Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. * `rule_tuple_count`: [Output Only] Calculation of the complexity of a single firewall policy rule. * `target_service_accounts`: A list of service accounts indicating the sets of instances that are applied with this rule. * `target_secure_tags`: A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256. * `name`: Name of the secure tag, created with TagManager's TagValue API. * `state`: [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted. Possible values: * EFFECTIVE * INEFFECTIVE * `disabled`: Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. * `fingerprint`: Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `associations`: A list of associations that belong to this firewall policy. * `name`: The name for an association. * `attachment_target`: The target that the firewall policy is attached to. * `firewall_policy_id`: [Output Only] The firewall policy ID of the association. * `short_name`: [Output Only] The short name of the firewall policy of the association. * `display_name`: [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. * `rule_tuple_count`: [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. * `short_name`: User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `display_name`: Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `parent`: [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. * `region`: [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_networks.md ================================================ +++ title = "google_compute_networks resource" draft = false [menu.gcp] title = "google_compute_networks" identifier = "inspec/resources/gcp/google_compute_networks resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_networks` is used to test a Google Network resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_networks(project: 'chef-gcp-inspec') do its('network_names') { should include 'inspec-network' } end ``` ### Test that there are no more than a specified number of networks available for the project describe google_compute_networks(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test that an expected network identifier is present in the project describe google_compute_networks(project: 'chef-inspec-gcp') do its('network_ids') { should include 12345678975432 } end ### Test that an expected network name is available for the project describe google_compute_networks(project: 'chef-inspec-gcp') do its('network_names') { should include "network-name" } end ## Properties Properties that can be accessed from the `google_compute_networks` resource: See [google_compute_network](google_compute_network) for more detailed information. * `descriptions`: an array of `google_compute_network` description * `gateway_ipv4s`: an array of `google_compute_network` gateway_ipv4 * `network_ids`: an array of `google_compute_network` id * `network_names`: an array of `google_compute_network` name * `subnetworks`: an array of `google_compute_network` subnetworks * `auto_create_subnetworks`: an array of `google_compute_network` auto_create_subnetworks * `creation_timestamps`: an array of `google_compute_network` creation_timestamp * `routing_configs`: an array of `google_compute_network` routing_config * `peerings`: an array of `google_compute_network` peerings * `mtus`: an array of `google_compute_network` mtu ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_node_group.md ================================================ +++ title = "google_compute_node_group resource" draft = false [menu.gcp] title = "google_compute_node_group" identifier = "inspec/resources/gcp/google_compute_node_group resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_node_group` is used to test a Google NodeGroup resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_node_group(project: 'chef-gcp-inspec', zone: 'zone', name: 'inspec-node-group') do it { should exist } its('description') { should cmp 'A description of the node group' } its('size') { should cmp '0' } end describe google_compute_node_group(project: 'chef-gcp-inspec', zone: 'zone', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_node_group` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional textual description of the resource. * `name`: Name of the resource. * `node_template`: The URL of the node template to which this node group belongs. * `size`: The total number of nodes in the node group. * `maintenance_policy`: Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. * `autoscaling_policy`: If you use sole-tenant nodes for your workloads, you can use the node group autoscaler to automatically manage the sizes of your node groups. * `mode`: The autoscaling mode. Set to one of the following: - OFF: Disables the autoscaler. - ON: Enables scaling in and scaling out. - ONLY_SCALE_OUT: Enables only scaling out. You must use this mode if your node groups are configured to restart their hosted VMs on minimal servers. Possible values: * OFF * ON * ONLY_SCALE_OUT * `min_nodes`: Minimum size of the node group. Must be less than or equal to max-nodes. The default value is 0. * `max_nodes`: Maximum size of the node group. Set to a value less than or equal to 100 and greater than or equal to min-nodes. * `zone`: Zone where this node group is located ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_node_groups.md ================================================ +++ title = "google_compute_node_groups resource" draft = false [menu.gcp] title = "google_compute_node_groups" identifier = "inspec/resources/gcp/google_compute_node_groups resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_node_groups` is used to test a Google NodeGroup resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_node_groups(project: 'chef-gcp-inspec', zone: 'zone') do it { should exist } its('descriptions') { should include 'A description of the node group' } its('sizes') { should include '0' } its('names') { should include 'inspec-node-group' } end ``` ## Properties Properties that can be accessed from the `google_compute_node_groups` resource: See [google_compute_node_group](google_compute_node_group) for more detailed information. * `creation_timestamps`: an array of `google_compute_node_group` creation_timestamp * `descriptions`: an array of `google_compute_node_group` description * `names`: an array of `google_compute_node_group` name * `node_templates`: an array of `google_compute_node_group` node_template * `sizes`: an array of `google_compute_node_group` size * `maintenance_policies`: an array of `google_compute_node_group` maintenance_policy * `autoscaling_policies`: an array of `google_compute_node_group` autoscaling_policy * `zones`: an array of `google_compute_node_group` zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_node_template.md ================================================ +++ title = "google_compute_node_template resource" draft = false [menu.gcp] title = "google_compute_node_template" identifier = "inspec/resources/gcp/google_compute_node_template resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_node_template` is used to test a Google NodeTemplate resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_node_template(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'inspec-node-template') do it { should exist } its('node_affinity_labels') { should include('key' => 'value') } end describe google_compute_node_template(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_node_template` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional textual description of the resource. * `name`: Name of the resource. * `node_affinity_labels`: Labels to use for node affinity, which will be used in instance scheduling. * `node_type`: Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified. * `node_type_flexibility`: Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. * `cpus`: Number of virtual CPUs to use. * `memory`: Physical memory available to the node, defined in MB. * `local_ssd`: Use local SSD * `server_binding`: (Beta only) The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. * `type`: Type of server binding policy. If `RESTART_NODE_ON_ANY_SERVER`, nodes using this template will restart on any physical server following a maintenance event. If `RESTART_NODE_ON_MINIMAL_SERVER`, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied. Possible values: * RESTART_NODE_ON_ANY_SERVER * RESTART_NODE_ON_MINIMAL_SERVERS * `cpu_overcommit_type`: (Beta only) CPU overcommit. Possible values: * ENABLED * NONE * `region`: Region where nodes using the node template will be created ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_node_templates.md ================================================ +++ title = "google_compute_node_templates resource" draft = false [menu.gcp] title = "google_compute_node_templates" identifier = "inspec/resources/gcp/google_compute_node_templates resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_node_templates` is used to test a Google NodeTemplate resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_node_templates(project: 'chef-gcp-inspec', region: 'europe-west2') do its('names') { should include 'inspec-node-template' } end ``` ## Properties Properties that can be accessed from the `google_compute_node_templates` resource: See [google_compute_node_template](google_compute_node_template) for more detailed information. * `creation_timestamps`: an array of `google_compute_node_template` creation_timestamp * `descriptions`: an array of `google_compute_node_template` description * `names`: an array of `google_compute_node_template` name * `node_affinity_labels`: an array of `google_compute_node_template` node_affinity_labels * `node_types`: an array of `google_compute_node_template` node_type * `node_type_flexibilities`: an array of `google_compute_node_template` node_type_flexibility * `server_bindings`: (Beta only) an array of `google_compute_node_template` server_binding * `cpu_overcommit_types`: (Beta only) an array of `google_compute_node_template` cpu_overcommit_type * `regions`: an array of `google_compute_node_template` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_node_type.md ================================================ +++ title = "google_compute_node_type resource" draft = false [menu.gcp] title = "google_compute_node_type" identifier = "inspec/resources/gcp/google_compute_node_type resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_node_type` InSpec audit resource to to test a Google Cloud NodeType resource. ## Examples ```ruby describe google_compute_v1_node_type(nodeType: ' ', project: 'chef-gcp-inspec', zone: ' value_zone') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('cpu_platform') { should cmp 'value_cpuplatform' } its('zone') { should cmp 'value_zone' } its('self_link') { should cmp 'value_selflink' } end describe google_compute_v1_node_type(nodeType: ' ', project: 'chef-gcp-inspec', zone: ' value_zone') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_node_type` resource: * `kind`: [Output Only] The type of the resource. Always compute#nodeType for node types. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: [Output Only] Name of the resource. * `description`: [Output Only] An optional textual description of the resource. * `cpu_platform`: [Output Only] The CPU platform used by this node type. * `guest_cpus`: [Output Only] The number of virtual CPUs that are available to the node type. * `memory_mb`: [Output Only] The amount of physical memory available to the node type, defined in MB. * `local_ssd_gb`: [Output Only] Local SSD available to the node type, defined in GB. * `deprecated`: Deprecation status for a public resource. * `state`: The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. Possible values: * ACTIVE * DELETED * DEPRECATED * OBSOLETE * `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. * `deprecated`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it. * `obsolete`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it. * `deleted`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it. * `zone`: [Output Only] The name of the zone where the node type resides, such as us-central1-a. * `self_link`: [Output Only] Server-defined URL for the resource. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_node_types.md ================================================ +++ title = "google_compute_node_types resource" draft = false [menu.gcp] title = "google_compute_node_types" identifier = "inspec/resources/gcp/google_compute_node_types resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_node_types` InSpec audit resource to to test a Google Cloud NodeType resource. ## Examples ```ruby describe google_compute_v1_node_types(project: 'chef-gcp-inspec', zone: ' value_zone') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_node_types` resource: See [google_compute_node_type](google_compute_node_type) for more detailed information. * `kinds`: an array of `google_compute_node_type` kind * `ids`: an array of `google_compute_node_type` id * `creation_timestamps`: an array of `google_compute_node_type` creation_timestamp * `names`: an array of `google_compute_node_type` name * `descriptions`: an array of `google_compute_node_type` description * `cpu_platforms`: an array of `google_compute_node_type` cpu_platform * `guest_cpus`: an array of `google_compute_node_type` guest_cpus * `memory_mbs`: an array of `google_compute_node_type` memory_mb * `local_ssd_gbs`: an array of `google_compute_node_type` local_ssd_gb * `deprecateds`: an array of `google_compute_node_type` deprecated * `zones`: an array of `google_compute_node_type` zone * `self_links`: an array of `google_compute_node_type` self_link ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_packet_mirroring.md ================================================ +++ title = "google_compute_packet_mirroring resource" draft = false [menu.gcp] title = "google_compute_packet_mirroring" identifier = "inspec/resources/gcp/google_compute_packet_mirroring resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_packet_mirroring` InSpec audit resource to to test a Google Cloud PacketMirroring resource. ## Examples ```ruby describe google_compute_packet_mirroring(name: 'value_name', project: 'chef-gcp-inspec', region: 'value_region') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('region') { should cmp 'value_region' } its('enable') { should cmp 'value_enable' } end describe google_compute_packet_mirroring(name: 'value_name', project: 'chef-gcp-inspec', region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_packet_mirroring` resource: * `kind`: [Output Only] Type of the resource. Always compute#packetMirroring for packet mirrorings. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `name`: Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `region`: [Output Only] URI of the region where the packetMirroring resides. * `network`: * `url`: URL of the network resource. * `canonical_url`: [Output Only] Unique identifier for the network; defined by the server. * `priority`: The priority of applying this configuration. Priority is used to break ties in cases where there is more than one matching rule. In the case of two rules that apply for a given Instance, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535. * `collector_ilb`: * `url`: Resource URL to the forwarding rule representing the ILB configured as destination of the mirrored traffic. * `canonical_url`: [Output Only] Unique identifier for the forwarding rule; defined by the server. * `mirrored_resources`: * `subnetworks`: A set of subnetworks for which traffic from/to all VM instances will be mirrored. They must live in the same region as this packetMirroring. You may specify a maximum of 5 subnetworks. * `url`: Resource URL to the subnetwork for which traffic from/to all VM instances will be mirrored. * `canonical_url`: [Output Only] Unique identifier for the subnetwork; defined by the server. * `instances`: A set of virtual machine instances that are being mirrored. They must live in zones contained in the same region as this packetMirroring. Note that this config will apply only to those network interfaces of the Instances that belong to the network specified in this packetMirroring. You may specify a maximum of 50 Instances. * `url`: Resource URL to the virtual machine instance which is being mirrored. * `canonical_url`: [Output Only] Unique identifier for the instance; defined by the server. * `tags`: A set of mirrored tags. Traffic from/to all VM instances that have one or more of these tags will be mirrored. * `filter`: * `cidr_ranges`: One or more IPv4 or IPv6 CIDR ranges that apply as filter on the source (ingress) or destination (egress) IP in the IP header. If no ranges are specified, all IPv4 traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. To mirror all IPv4 and IPv6 traffic, use "0.0.0.0/0,::/0". Note: Support for IPv6 traffic is in preview. * `ip_protocols`: Protocols that apply as filter on mirrored traffic. If no protocols are specified, all traffic that matches the specified CIDR ranges is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. * `direction`: Direction of traffic to mirror, either INGRESS, EGRESS, or BOTH. The default is BOTH. Possible values: * BOTH * EGRESS * INGRESS * `enable`: Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be enforced on the network. The default is TRUE. Possible values: * FALSE * TRUE ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_packet_mirrorings.md ================================================ +++ title = "google_compute_packet_mirrorings resource" draft = false [menu.gcp] title = "google_compute_packet_mirrorings" identifier = "inspec/resources/gcp/google_compute_packet_mirrorings resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_packet_mirrorings` InSpec audit resource to to test a Google Cloud PacketMirroring resource. ## Examples ```ruby describe google_compute_packet_mirrorings(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_packet_mirrorings` resource: See [google_compute_packet_mirroring](google_compute_packet_mirroring) for more detailed information. * `kinds`: an array of `google_compute_packet_mirroring` kind * `ids`: an array of `google_compute_packet_mirroring` id * `creation_timestamps`: an array of `google_compute_packet_mirroring` creation_timestamp * `self_links`: an array of `google_compute_packet_mirroring` self_link * `self_link_with_ids`: an array of `google_compute_packet_mirroring` self_link_with_id * `names`: an array of `google_compute_packet_mirroring` name * `descriptions`: an array of `google_compute_packet_mirroring` description * `regions`: an array of `google_compute_packet_mirroring` region * `networks`: an array of `google_compute_packet_mirroring` network * `priorities`: an array of `google_compute_packet_mirroring` priority * `collector_ilbs`: an array of `google_compute_packet_mirroring` collector_ilb * `mirrored_resources`: an array of `google_compute_packet_mirroring` mirrored_resources * `filters`: an array of `google_compute_packet_mirroring` filter * `enables`: an array of `google_compute_packet_mirroring` enable ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_project_info.md ================================================ +++ title = "google_compute_project_info resource" draft = false [menu.gcp] title = "google_compute_project_info" identifier = "inspec/resources/gcp/google_compute_project_info resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_project_info` is used to test a Google ProjectInfo resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_project_info(project: 'chef-gcp-inspec') do it { should exist } its('default_service_account') { should match "developer.gserviceaccount.com" } end ``` ### Test that GCP compute project information exists describe google_compute_project_info(project: 'chef-inspec-gcp') do it { should exist } end ### Test that GCP compute project default service account is as expected describe google_compute_project_info(project: 'chef-inspec-gcp') do its('default_service_account') { should eq '12345-compute@developer.gserviceaccount.com' } end ## Properties Properties that can be accessed from the `google_compute_project_info` resource: * `name`: The name of this project * `common_instance_metadata`: Metadata shared for all instances in this project * `items`: Array of key/values * `key`: Key of the metadata key/value pair * `value`: Value of the metadata key/value pair * `enabled_features`: Restricted features enabled for use on this project * `default_service_account`: Default service account used by VMs in this project * `xpn_project_status`: The role this project has in a shared VPC configuration. * `default_network_tier`: The default network tier used for configuring resources in this project * `quotas`: Quotas applied to this project * `metric`: Name of the quota metric * `limit`: Quota limit for this metric * `usage`: Current usage of this metric * `owner`: Owning resource. This is the resource on which this quota is applied. * `creation_timestamp`: Creation timestamp in RFC3339 text format. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_public_delegated_prefix.md ================================================ +++ title = "google_compute_public_delegated_prefix resource" draft = false [menu.gcp] title = "google_compute_public_delegated_prefix" identifier = "inspec/resources/gcp/google_compute_public_delegated_prefix resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_public_delegated_prefix` InSpec audit resource to to test a Google Cloud PublicDelegatedPrefix resource. ## Examples ```ruby describe google_compute_public_delegated_prefix(project: 'chef-gcp-inspec', region: 'us-east1-b', name: 'test') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_public_delegated_prefix` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `ip_cidr_range`: The IPv4 address range, in CIDR format, represented by this public delegated prefix. * `parent_prefix`: The value of requestId if you provided it in the request. Not present otherwise. * `is_live_migration`: If true, the prefix will be live migrated. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a new PublicDelegatedPrefix. An up-to-date fingerprint must be provided in order to update the PublicDelegatedPrefix, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a PublicDelegatedPrefix. A base64-encoded string. * `status`: The status of the public delegated prefix, which can be one of following values: * INITIALIZING The public delegated prefix is being initialized and addresses cannot be created yet. * READY_TO_ANNOUNCE The public delegated prefix is a live migration prefix and is active. * ANNOUNCED The public delegated prefix is active. * DELETING The public delegated prefix is being deprovsioned. Possible values: * INITIALIZING * READY_TO_ANNOUNCE * ANNOUNCED * DELETING ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_public_delegated_prefixes.md ================================================ +++ title = "google_compute_public_delegated_prefixes resource" draft = false [menu.gcp] title = "google_compute_public_delegated_prefixes" identifier = "inspec/resources/gcp/google_compute_public_delegated_prefixes resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_public_delegated_prefixes` InSpec audit resource to to test a Google Cloud PublicDelegatedPrefix resource. ## Examples ```ruby describe google_compute_public_delegated_prefixes(project: 'chef-gcp-inspec', region: 'us-east1-b') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_public_delegated_prefixes` resource: See [google_compute_public_delegated_prefix](google_compute_public_delegated_prefix) for more detailed information. * `creation_timestamps`: an array of `google_compute_public_delegated_prefix` creation_timestamp * `descriptions`: an array of `google_compute_public_delegated_prefix` description * `ids`: an array of `google_compute_public_delegated_prefix` id * `names`: an array of `google_compute_public_delegated_prefix` name * `ip_cidr_ranges`: an array of `google_compute_public_delegated_prefix` ip_cidr_range * `parent_prefixes`: an array of `google_compute_public_delegated_prefix` parent_prefix * `is_live_migrations`: an array of `google_compute_public_delegated_prefix` is_live_migration * `fingerprints`: an array of `google_compute_public_delegated_prefix` fingerprint * `statuses`: an array of `google_compute_public_delegated_prefix` status ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region.md ================================================ +++ title = "google_compute_region resource" draft = false [menu.gcp] title = "google_compute_region" identifier = "inspec/resources/gcp/google_compute_region resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_region` is used to test a Google Region resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_region(project: 'chef-gcp-inspec', name: 'europe-west2') do it { should exist } it { should be_up } its('zone_names') { should include "#{gcp_location}-a" } end describe google_compute_region(project: 'chef-gcp-inspec', name: 'notthere') do it { should_not exist } end ``` ### Test that a GCP compute region exists ``` describe google_compute_region(project: 'chef-inspec-gcp', region: 'europe-west2') do it { should exist } end ``` ### Test that a GCP compute region is in the expected state ``` describe google_compute_region(project: 'chef-inspec-gcp', region: 'europe-west2') do its('status') { should eq 'UP' } # or equivalently it { should be_up } end ``` ### Test a GCP compute region identifier ``` describe google_compute_region(project: 'chef-inspec-gcp', region: "asia-east1") do its('id') { should eq "1220" } end ``` ### Check that a region is associated with the expected zone fully qualified name ``` describe google_compute_region(project: 'chef-inspec-gcp', region: "asia-east1") do its('zones') { should include "https://www.googleapis.com/compute/v1/projects/spaterson-project/zones/asia-east1-a" } end ``` ### Check that a region is associated with the expected zone short name ``` describe google_compute_region(project: 'chef-inspec-gcp', region: "asia-east1") do its('zone_names') { should include "asia-east1-a" } end ``` The `zone_names` property is also useful for subsequently looping over associated `google_compute_zone` resources. For example: ``` google_compute_region(project: 'chef-inspec-gcp', region: "asia-east1").zone_names.each do |zone_name| describe google_compute_zone(project: 'chef-inspec-gcp', name: zone_name) do it { should be_up } end end ``` ## Properties Properties that can be accessed from the `google_compute_region` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `deprecated`: The deprecation state of this resource. * `deleted`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED. * `deprecated`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED. * `obsolete`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE. * `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. * `state`: The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. Possible values: * DEPRECATED * OBSOLETE * DELETED * `description`: An optional description of this resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. * `quotas`: Quotas assigned to this region. * `metric`: Name of the quota metric. * `limit`: Quota limit for this metric. * `usage`: Current usage of this metric. * `owner`: Owning resource. This is the resource on which this quota is applied. * `status`: Status of the region, either UP or DOWN. Possible values: * UP * DOWN * `zones`: List of zones within the region ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_autoscaler.md ================================================ +++ title = "google_compute_region_autoscaler resource" draft = false [menu.gcp] title = "google_compute_region_autoscaler" identifier = "inspec/resources/gcp/google_compute_region_autoscaler resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_autoscaler` InSpec audit resource to to test a Google Cloud RegionAutoscaler resource. ## Examples ```ruby describe google_compute_region_autoscaler(name: 'value_name', project: 'chef-gcp-inspec', region: 'value_region') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('target') { should cmp 'value_target' } its('zone') { should cmp 'value_zone' } its('region') { should cmp 'value_region' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('status') { should cmp 'value_status' } end describe google_compute_region_autoscaler(name: 'value_name', project: 'chef-gcp-inspec', region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_autoscaler` resource: * `kind`: [Output Only] Type of the resource. Always compute#autoscaler for autoscalers. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `target`: URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler. * `autoscaling_policy`: Cloud Autoscaler policy. * `min_num_replicas`: The minimum number of replicas that the autoscaler can scale in to. This cannot be less than 0. If not provided, autoscaler chooses a default value depending on maximum number of instances allowed. * `max_num_replicas`: The maximum number of instances that the autoscaler can scale out to. This is required when creating or updating an autoscaler. The maximum number of replicas must not be lower than minimal number of replicas. * `scale_down_control`: Configuration that allows for slower scale in so that even if Autoscaler recommends an abrupt scale in of a MIG, it will be throttled as specified by the parameters below. * `max_scaled_down_replicas`: Encapsulates numeric value that can be either absolute or relative. * `fixed`: Specifies a fixed number of VM instances. This must be a positive integer. * `percent`: Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. * `calculated`: [Output Only] Absolute value of VM instances calculated based on the specific mode. - If the value is fixed, then the calculated value is equal to the fixed value. - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded. * `time_window_sec`: How far back autoscaling looks when computing recommendations to include directives regarding slower scale in, as described above. * `scale_in_control`: Configuration that allows for slower scale in so that even if Autoscaler recommends an abrupt scale in of a MIG, it will be throttled as specified by the parameters below. * `max_scaled_in_replicas`: Encapsulates numeric value that can be either absolute or relative. * `fixed`: Specifies a fixed number of VM instances. This must be a positive integer. * `percent`: Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. * `calculated`: [Output Only] Absolute value of VM instances calculated based on the specific mode. - If the value is fixed, then the calculated value is equal to the fixed value. - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded. * `time_window_sec`: How far back autoscaling looks when computing recommendations to include directives regarding slower scale in, as described above. * `cool_down_period_sec`: The number of seconds that your application takes to initialize on a VM instance. This is referred to as the [initialization period](/compute/docs/autoscaler#cool_down_period). Specifying an accurate initialization period improves autoscaler decisions. For example, when scaling out, the autoscaler ignores data from VMs that are still initializing because those VMs might not yet represent normal usage of your application. The default initialization period is 60 seconds. Initialization periods might vary because of numerous factors. We recommend that you test how long your application takes to initialize. To do this, create a VM and time your application's startup process. * `cpu_utilization`: CPU utilization policy. * `utilization_target`: The target CPU utilization that the autoscaler maintains. Must be a float value in the range (0, 1]. If not specified, the default is 0.6. If the CPU level is below the target utilization, the autoscaler scales in the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization. If the average CPU is above the target utilization, the autoscaler scales out until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization. * `predictive_method`: Indicates whether predictive autoscaling based on CPU metric is enabled. Valid values are: * NONE (default). No predictive method is used. The autoscaler scales the group to meet current demand based on real-time metrics. * OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by monitoring daily and weekly load patterns and scaling out ahead of anticipated demand. Possible values: * NONE * OPTIMIZE_AVAILABILITY * PREDICTIVE_METHOD_UNSPECIFIED * STANDARD * `custom_metric_utilizations`: Configuration parameters of autoscaling based on a custom metric. * `metric`: The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE. * `filter`: A filter string, compatible with a Stackdriver Monitoring filter string for TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. For the filter to be valid for autoscaling purposes, the following rules apply: - You can only use the AND operator for joining selectors. - You can only use direct equality comparison operator (=) without any functions for each selector. - You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. - The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a *per-group metric* for the purpose of autoscaling. If not specified, the type defaults to gce_instance. Try to provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value. * `utilization_target`: The target value of the metric that autoscaler maintains. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric. For example, a good metric to use as a utilization_target is https://www.googleapis.com/compute/v1/instance/network/received_bytes_count. The autoscaler works to keep this value constant for each of the instances. * `single_instance_assignment`: If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. Autoscaler keeps the number of instances proportional to the value of this metric. The metric itself does not change value due to group resizing. A good metric to use with the target is for example pubsub.googleapis.com/subscription/num_undelivered_messages or a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can't include a chunk assignable to a single instance, it could be better used with utilization_target instead. * `utilization_target_type`: Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. Possible values: * DELTA_PER_MINUTE * DELTA_PER_SECOND * GAUGE * `load_balancing_utilization`: Configuration parameters of autoscaling based on load balancing. * `utilization_target`: Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that the autoscaler maintains. Must be a positive float value. If not defined, the default is 0.8. * `mode`: Defines the operating mode for this policy. The following modes are available: - OFF: Disables the autoscaler but maintains its configuration. - ONLY_SCALE_OUT: Restricts the autoscaler to add VM instances only. - ON: Enables all autoscaler activities according to its policy. For more information, see "Turning off or restricting an autoscaler" Possible values: * OFF * ON * ONLY_SCALE_OUT * ONLY_UP * `scaling_schedules`: Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed. * `additional_properties`: Scaling based on user-defined schedule. The message describes a single scaling schedule. A scaling schedule changes the minimum number of VM instances an autoscaler can recommend, which can trigger scaling out. * `zone`: [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). * `region`: [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `status`: [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. Possible values: * ACTIVE * DELETING * ERROR * PENDING * `status_details`: [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. * `message`: The status message. * `type`: The type of error, warning, or notice returned. Current set of possible values: - ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance group are unhealthy (not in RUNNING state). - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service attached to the instance group. - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size greater than maxNumReplicas. - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric samples are not exported often enough to be a credible base for autoscaling. - CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified does not exist or does not have the necessary labels. - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to maxNumReplicas. This means the autoscaler cannot add or remove instances from the instance group. - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not receive any data from the custom metric configured for autoscaling. - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is configured to scale based on a load balancing signal but the instance group has not received any requests from the load balancer. - MODE_OFF (WARNING): Autoscaling is turned off. The number of instances in the group won't change automatically. The autoscaling configuration is preserved. - MODE_ONLY_UP (WARNING): Autoscaling is in the "Autoscale only out" mode. The autoscaler can add instances but not remove any. - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be autoscaled because it has more than one backend service attached to it. - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for the necessary resources, such as CPU or number of instances. - REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional autoscalers: there is a resource stockout in the chosen region. - SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does not exist. - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): Autoscaling does not work with an HTTP/S load balancer that has been configured for maxRate. - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a resource stockout in the chosen zone. For regional autoscalers: in at least one of the zones you're using there is a resource stockout. New values might be added in the future. Some of the values might not be available in all API versions. Possible values: * ALL_INSTANCES_UNHEALTHY * BACKEND_SERVICE_DOES_NOT_EXIST * CAPPED_AT_MAX_NUM_REPLICAS * CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE * CUSTOM_METRIC_INVALID * MIN_EQUALS_MAX * MISSING_CUSTOM_METRIC_DATA_POINTS * MISSING_LOAD_BALANCING_DATA_POINTS * MODE_OFF * MODE_ONLY_SCALE_OUT * MODE_ONLY_UP * MORE_THAN_ONE_BACKEND_SERVICE * NOT_ENOUGH_QUOTA_AVAILABLE * REGION_RESOURCE_STOCKOUT * SCALING_TARGET_DOES_NOT_EXIST * SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX * SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN * UNKNOWN * UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION * ZONE_RESOURCE_STOCKOUT * `recommended_size`: [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates the recommended MIG size even when the autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to an existing managed instance group or autoscaler did not generate its prediction. * `scaling_schedule_status`: [Output Only] Status information of existing scaling schedules. * `additional_properties`: ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_autoscalers.md ================================================ +++ title = "google_compute_region_autoscalers resource" draft = false [menu.gcp] title = "google_compute_region_autoscalers" identifier = "inspec/resources/gcp/google_compute_region_autoscalers resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_autoscalers` InSpec audit resource to to test a Google Cloud RegionAutoscaler resource. ## Examples ```ruby describe google_compute_region_autoscalers(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_autoscalers` resource: See [google_compute_region_autoscaler](google_compute_region_autoscaler) for more detailed information. * `kinds`: an array of `google_compute_region_autoscaler` kind * `ids`: an array of `google_compute_region_autoscaler` id * `creation_timestamps`: an array of `google_compute_region_autoscaler` creation_timestamp * `names`: an array of `google_compute_region_autoscaler` name * `descriptions`: an array of `google_compute_region_autoscaler` description * `targets`: an array of `google_compute_region_autoscaler` target * `autoscaling_policies`: an array of `google_compute_region_autoscaler` autoscaling_policy * `zones`: an array of `google_compute_region_autoscaler` zone * `regions`: an array of `google_compute_region_autoscaler` region * `self_links`: an array of `google_compute_region_autoscaler` self_link * `self_link_with_ids`: an array of `google_compute_region_autoscaler` self_link_with_id * `statuses`: an array of `google_compute_region_autoscaler` status * `status_details`: an array of `google_compute_region_autoscaler` status_details * `recommended_sizes`: an array of `google_compute_region_autoscaler` recommended_size * `scaling_schedule_statuses`: an array of `google_compute_region_autoscaler` scaling_schedule_status ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_backend_service.md ================================================ +++ title = "google_compute_region_backend_service resource" draft = false [menu.gcp] title = "google_compute_region_backend_service" identifier = "inspec/resources/gcp/google_compute_region_backend_service resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_region_backend_service` is used to test a Google RegionBackendService resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_region_backend_service(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'inspec-gcp-region-backend-service') do it { should exist } its('description') { should eq 'A regional description' } its('protocol') { should eq 'TCP' } its('timeout_sec') { should eq '15' } end describe google_compute_region_backend_service(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_backend_service` resource: * `affinity_cookie_ttl_sec`: Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used. * `backends`: The set of backends that serve this RegionBackendService. * `balancing_mode`: Specifies the balancing mode for this backend. Possible values: * UTILIZATION * RATE * CONNECTION * `capacity_scaler`: A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). ~>**NOTE**: This field cannot be set for INTERNAL region backend services (default loadBalancingScheme), but is required for non-INTERNAL backend service. The total capacity_scaler for all backends must be non-zero. A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0]. * `description`: An optional description of this resource. Provide this property when you create the resource. * `failover`: This field designates whether this is a failover backend. More than one failover backend can be configured for a given RegionBackendService. * `group`: The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. When the `load_balancing_scheme` is INTERNAL, only instance groups are supported. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL. * `max_connections`: The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. Cannot be set for INTERNAL backend services. For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance or maxConnectionsPerEndpoint, as appropriate for group type, must be set. * `max_connections_per_instance`: The max number of simultaneous connections that a single backend instance can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. * `max_connections_per_endpoint`: The max number of simultaneous connections that a single backend network endpoint can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set. * `max_rate`: The max requests per second (RPS) of the group. Cannot be set for INTERNAL backend services. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. Either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set. * `max_rate_per_instance`: The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. Cannot be set for INTERNAL backend services. * `max_rate_per_endpoint`: The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. Cannot be set for INTERNAL backend services. * `max_utilization`: Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. Valid range is [0.0, 1.0]. Cannot be set for INTERNAL backend services. * `circuit_breakers`: Settings controlling the volume of connections to a backend service. This field is applicable only when the `load_balancing_scheme` is set to INTERNAL_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. * `connect_timeout`: (Beta only) The timeout for new network connections to hosts. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. * `max_requests_per_connection`: Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. * `max_connections`: The maximum number of connections to the backend cluster. Defaults to 1024. * `max_pending_requests`: The maximum number of pending requests to the backend cluster. Defaults to 1024. * `max_requests`: The maximum number of parallel requests to the backend cluster. Defaults to 1024. * `max_retries`: The maximum number of parallel retries to the backend cluster. Defaults to 3. * `consistent_hash`: Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies when all of the following are true - * `load_balancing_scheme` is set to INTERNAL_MANAGED * `protocol` is set to HTTP, HTTPS, or HTTP2 * `locality_lb_policy` is set to MAGLEV or RING_HASH * `http_cookie`: Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. * `ttl`: Lifetime of the cookie. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. * `name`: Name of the cookie. * `path`: Path to set for the cookie. * `http_header_name`: The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD. * `minimum_ring_size`: The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024. * `cdn_policy`: Cloud CDN configuration for this BackendService. * `cache_key_policy`: The CacheKeyPolicy for this CdnPolicy. * `include_host`: If true requests to different hosts will be cached separately. * `include_protocol`: If true, http and https requests will be cached separately. * `include_query_string`: If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. * `query_string_blacklist`: Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. * `query_string_whitelist`: Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. * `signed_url_cache_max_age_sec`: Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. * `default_ttl`: (Beta only) Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). * `max_ttl`: (Beta only) Specifies the maximum allowed TTL for cached content served by this origin. * `client_ttl`: (Beta only) Specifies the maximum allowed TTL for cached content served by this origin. * `negative_caching`: (Beta only) Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. * `negative_caching_policy`: (Beta only) Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy. Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs. * `code`: (Beta only) The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once. * `ttl`: (Beta only) The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. * `cache_mode`: (Beta only) Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values: * USE_ORIGIN_HEADERS * FORCE_CACHE_ALL * CACHE_ALL_STATIC * `serve_while_stale`: (Beta only) Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. * `connection_draining`: Settings for connection draining * `draining_timeout_sec`: Time for which instance will be drained (not accept new connections, but still work to finish started). * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. * `failover_policy`: Policy for failovers. * `disable_connection_drain_on_failover`: On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min. This can be set to true only if the protocol is TCP. The default is false. * `drop_traffic_if_unhealthy`: This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group. The default is false. * `failover_ratio`: The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend. In case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the "force" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy. This field is only used with l4 load balancing. * `enable_cdn`: If true, enable Cloud CDN for this RegionBackendService. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. * `health_checks`: The set of URLs to HealthCheck resources for health checking this RegionBackendService. Currently at most one health check can be specified. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. * `id`: The unique identifier for the resource. * `load_balancing_scheme`: Indicates what kind of load balancing this regional backend service will be used for. A backend service created for one type of load balancing cannot be used with the other(s). Possible values: * EXTERNAL * INTERNAL * INTERNAL_MANAGED * `locality_lb_policy`: The load balancing algorithm used within the scope of the locality. The possible values are - * ROUND_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. * LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. * RING_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. * RANDOM - The load balancer selects a random healthy host. * ORIGINAL_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. * MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the `load_balancing_scheme` is set to INTERNAL_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. Possible values: * ROUND_ROBIN * LEAST_REQUEST * RING_HASH * RANDOM * ORIGINAL_DESTINATION * MAGLEV * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `outlier_detection`: Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the `load_balancing_scheme` is set to INTERNAL_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. * `base_ejection_time`: The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `consecutive_errors`: Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. * `consecutive_gateway_failure`: The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5. * `enforcing_consecutive_errors`: The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. * `enforcing_consecutive_gateway_failure`: The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. * `enforcing_success_rate`: The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. * `interval`: Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `max_ejection_percent`: Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%. * `success_rate_minimum_hosts`: The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5. * `success_rate_request_volume`: The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100. * `success_rate_stdev_factor`: This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900. * `port_name`: A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. API sets a default of "http" if not given. Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing). * `protocol`: The protocol this RegionBackendService uses to communicate with backends. The default is HTTP. **NOTE**: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API. Possible values: * HTTP * HTTPS * HTTP2 * SSL * TCP * UDP * GRPC * `session_affinity`: Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP. Possible values: * NONE * CLIENT_IP * CLIENT_IP_PORT_PROTO * CLIENT_IP_PROTO * GENERATED_COOKIE * HEADER_FIELD * HTTP_COOKIE * `timeout_sec`: How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400]. * `log_config`: This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. * `enable`: Whether to enable logging for the load balancer traffic served by this backend service. * `sample_rate`: This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0. * `network`: The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL. * `region`: A reference to the region where the regional backend service resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_backend_services.md ================================================ +++ title = "google_compute_region_backend_services resource" draft = false [menu.gcp] title = "google_compute_region_backend_services" identifier = "inspec/resources/gcp/google_compute_region_backend_services resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_region_backend_services` is used to test a Google RegionBackendService resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_region_backend_services(project: 'chef-gcp-inspec', region: 'europe-west2') do its('count') { should be >= 1 } its('names') { should include 'inspec-gcp-region-backend-service' } its('protocols') { should include 'TCP' } its('timeout_secs') { should include '15' } end ``` ## Properties Properties that can be accessed from the `google_compute_region_backend_services` resource: See [google_compute_region_backend_service](google_compute_region_backend_service) for more detailed information. * `affinity_cookie_ttl_secs`: an array of `google_compute_region_backend_service` affinity_cookie_ttl_sec * `backends`: an array of `google_compute_region_backend_service` backends * `circuit_breakers`: an array of `google_compute_region_backend_service` circuit_breakers * `consistent_hashes`: an array of `google_compute_region_backend_service` consistent_hash * `cdn_policies`: an array of `google_compute_region_backend_service` cdn_policy * `connection_drainings`: an array of `google_compute_region_backend_service` connection_draining * `creation_timestamps`: an array of `google_compute_region_backend_service` creation_timestamp * `descriptions`: an array of `google_compute_region_backend_service` description * `failover_policies`: an array of `google_compute_region_backend_service` failover_policy * `enable_cdns`: an array of `google_compute_region_backend_service` enable_cdn * `fingerprints`: an array of `google_compute_region_backend_service` fingerprint * `health_checks`: an array of `google_compute_region_backend_service` health_checks * `ids`: an array of `google_compute_region_backend_service` id * `load_balancing_schemes`: an array of `google_compute_region_backend_service` load_balancing_scheme * `locality_lb_policies`: an array of `google_compute_region_backend_service` locality_lb_policy * `names`: an array of `google_compute_region_backend_service` name * `outlier_detections`: an array of `google_compute_region_backend_service` outlier_detection * `port_names`: an array of `google_compute_region_backend_service` port_name * `protocols`: an array of `google_compute_region_backend_service` protocol * `session_affinities`: an array of `google_compute_region_backend_service` session_affinity * `timeout_secs`: an array of `google_compute_region_backend_service` timeout_sec * `log_configs`: an array of `google_compute_region_backend_service` log_config * `networks`: an array of `google_compute_region_backend_service` network * `regions`: an array of `google_compute_region_backend_service` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_commitment.md ================================================ +++ title = "google_compute_region_commitment resource" draft = false [menu.gcp] title = "google_compute_region_commitment" identifier = "inspec/resources/gcp/google_compute_region_commitment resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_commitment` InSpec audit resource to to test a Google Cloud RegionCommitment resource. ## Examples ```ruby describe google_compute_region_commitment(name: ' value_name', project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('region') { should cmp 'value_region' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('status') { should cmp 'value_status' } its('status_message') { should cmp 'value_statusmessage' } its('plan') { should cmp 'value_plan' } its('start_timestamp') { should cmp 'value_starttimestamp' } its('end_timestamp') { should cmp 'value_endtimestamp' } its('type') { should cmp 'value_type' } its('category') { should cmp 'value_category' } its('split_source_commitment') { should cmp 'value_splitsourcecommitment' } end describe google_compute_region_commitment(name: ' ', project: 'chef-gcp-inspec', region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_commitment` resource: * `kind`: [Output Only] Type of the resource. Always compute#commitment for commitments. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `region`: [Output Only] URL of the region where this commitment may be used. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `status`: [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED. Possible values: * ACTIVE * CANCELED_EARLY_TERMINATION * CANCELING * CANCELLED * CREATING * EXPIRED * NOT_YET_ACTIVE * `status_message`: [Output Only] An optional, human-readable explanation of the status. * `plan`: The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years). Possible values: * INVALID * THIRTY_SIX_MONTH * TWELVE_MONTH * `start_timestamp`: [Output Only] Commitment start time in RFC3339 text format. * `end_timestamp`: [Output Only] Commitment end time in RFC3339 text format. * `resources`: A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. * `type`: Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR. Possible values: * ACCELERATOR * LOCAL_SSD * MEMORY * UNSPECIFIED * VCPU * `amount`: The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU. * `accelerator_type`: Name of the accelerator type resource. Applicable only when the type is ACCELERATOR. * `type`: The type of commitment, which affects the discount rate and the eligible resources. Type MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized machines. Type ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to accelerator optimized machines. Possible values: * ACCELERATOR_OPTIMIZED * ACCELERATOR_OPTIMIZED_A3 * COMPUTE_OPTIMIZED * COMPUTE_OPTIMIZED_C2D * COMPUTE_OPTIMIZED_C3 * COMPUTE_OPTIMIZED_C3D * COMPUTE_OPTIMIZED_H3 * GENERAL_PURPOSE * GENERAL_PURPOSE_E2 * GENERAL_PURPOSE_N2 * GENERAL_PURPOSE_N2D * GENERAL_PURPOSE_N4 * GENERAL_PURPOSE_T2D * GRAPHICS_OPTIMIZED * MEMORY_OPTIMIZED * MEMORY_OPTIMIZED_M3 * STORAGE_OPTIMIZED_Z3 * TYPE_UNSPECIFIED * `reservations`: List of create-on-create reservations for this commitment. * `kind`: [Output Only] Type of the resource. Always compute#reservations for reservations. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `self_link`: [Output Only] Server-defined fully-qualified URL for this resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `zone`: Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment. * `description`: An optional description of this resource. Provide this property when you create the resource. * `name`: The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `specific_reservation`: This reservation type allows to pre allocate specific instance configuration. Next ID: 6 * `instance_properties`: Properties of the SKU instances being reserved. Next ID: 9 * `machine_type`: Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. * `guest_accelerators`: Specifies accelerator type and count. * `accelerator_type`: Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types. * `accelerator_count`: The number of the guest accelerator cards exposed to this instance. * `min_cpu_platform`: Minimum cpu platform the reservation. * `local_ssds`: Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. * `disk_size_gb`: Specifies the size of the disk in base-2 GB. * `interface`: Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. Possible values: * NVDIMM * NVME * SCSI * `maintenance_freeze_duration_hours`: Specifies the number of hours after reservation creation where instances using the reservation won't be scheduled for maintenance. * `location_hint`: An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API. * `maintenance_interval`: Specifies the frequency of planned maintenance events. The accepted values are: `PERIODIC`. Possible values: * AS_NEEDED * PERIODIC * RECURRENT * `count`: Specifies the number of resources that are allocated. * `in_use_count`: [Output Only] Indicates how many instances are in use. * `assured_count`: [Output Only] Indicates how many instances are actually usable currently. * `source_instance_template`: Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field. This field is optional, and it can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate * `aggregate_reservation`: This reservation type is specified by total resource amounts (e.g. total count of CPUs) and can account for multiple instance SKUs. In other words, one can create instances of varying shapes against this reservation. * `vm_family`: The VM family that all instances scheduled against this reservation must belong to. Possible values: * VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L * VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP * VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P * `reserved_resources`: List of reserved resources (CPUs, memory, accelerators). * `accelerator`: * `accelerator_count`: Number of accelerators of specified type. * `accelerator_type`: Full or partial URL to accelerator type. e.g. "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l" * `in_use_resources`: [Output only] List of resources currently in use. * `accelerator`: * `accelerator_count`: Number of accelerators of specified type. * `accelerator_type`: Full or partial URL to accelerator type. e.g. "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l" * `workload_type`: The workload type of the instances that will target this reservation. Possible values: * BATCH * SERVING * UNSPECIFIED * `commitment`: [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. * `specific_reservation_required`: Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation. * `status`: [Output Only] The status of the reservation. Possible values: * CREATING * DELETING * INVALID * READY * UPDATING * `share_settings`: The share setting for reservations and sole tenancy node groups. * `share_type`: Type of sharing for this shared-reservation Possible values: * DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS * LOCAL * ORGANIZATION * SHARE_TYPE_UNSPECIFIED * SPECIFIC_PROJECTS * `projects`: A List of Project names to specify consumer projects for this shared-reservation. This is only valid when share_type's value is SPECIFIC_PROJECTS. * `project_map`: A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS. * `additional_properties`: Config for each project in the share settings. * `folder_map`: A map of folder id and folder config to specify consumer projects for this shared-reservation. This is only valid when share_type's value is DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS. Folder id should be a string of number, and without "folders/" prefix. * `additional_properties`: Config for each folder in the share settings. * `satisfies_pzs`: [Output Only] Reserved for future use. * `resource_policies`: Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation. * `additional_properties`: * `resource_status`: [Output Only] Contains output only fields. * `specific_sku_allocation`: Contains Properties set for the reservation. * `source_instance_template_id`: ID of the instance template used to populate reservation properties. * `delete_at_time`: Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. * `delete_after_duration`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `category`: The category of the commitment. Category MACHINE specifies commitments composed of machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments composed of software licenses, listed in licenseResources. Note that only MACHINE commitments should have a Type specified. Possible values: * CATEGORY_UNSPECIFIED * LICENSE * MACHINE * `license_resource`: Commitment for a particular license resource. * `license`: Any applicable license URI. * `amount`: The number of licenses purchased. * `cores_per_license`: Specifies the core range of the instance for which this license applies. * `auto_renew`: Specifies whether to enable automatic renewal for the commitment. The default value is false if not specified. The field can be updated until the day of the commitment expiration at 12:00am PST. If the field is set to true, the commitment will be automatically renewed for either one or three years according to the terms of the existing commitment. * `merge_source_commitments`: List of source commitments to be merged into a new commitment. * `split_source_commitment`: Source commitment to be split into a new commitment. * `resource_status`: [Output Only] Contains output only fields. * `cancellation_information`: * `cancellation_fee`: Represents an amount of money with its currency type. * `currency_code`: The three-letter currency code defined in ISO 4217. * `units`: The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. * `nanos`: Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. * `cancellation_fee_expiration_timestamp`: [Output Only] An optional, cancellation fee expiration time. RFC3339 text format. * `cancellation_cap`: Represents an amount of money with its currency type. * `currency_code`: The three-letter currency code defined in ISO 4217. * `units`: The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. * `nanos`: Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. * `canceled_commitment`: Represents an amount of money with its currency type. * `currency_code`: The three-letter currency code defined in ISO 4217. * `units`: The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. * `nanos`: Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. * `canceled_commitment_last_updated_timestamp`: [Output Only] An optional last update time of canceled_commitment. RFC3339 text format. * `existing_reservations`: Specifies the already existing reservations to attach to the Commitment. This field is optional, and it can be a full or partial URL. For example, the following are valid URLs to an reservation: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /reservations/reservation - projects/project/zones/zone/reservations/reservation ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_commitments.md ================================================ +++ title = "google_compute_region_commitments resource" draft = false [menu.gcp] title = "google_compute_region_commitments" identifier = "inspec/resources/gcp/google_compute_region_commitments resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_commitments` InSpec audit resource to to test a Google Cloud RegionCommitment resource. ## Examples ```ruby describe google_compute_region_commitments(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_commitments` resource: See [google_compute_region_commitment](google_compute_region_commitment) for more detailed information. * `kinds`: an array of `google_compute_region_commitment` kind * `ids`: an array of `google_compute_region_commitment` id * `creation_timestamps`: an array of `google_compute_region_commitment` creation_timestamp * `names`: an array of `google_compute_region_commitment` name * `descriptions`: an array of `google_compute_region_commitment` description * `regions`: an array of `google_compute_region_commitment` region * `self_links`: an array of `google_compute_region_commitment` self_link * `self_link_with_ids`: an array of `google_compute_region_commitment` self_link_with_id * `statuses`: an array of `google_compute_region_commitment` status * `status_messages`: an array of `google_compute_region_commitment` status_message * `plans`: an array of `google_compute_region_commitment` plan * `start_timestamps`: an array of `google_compute_region_commitment` start_timestamp * `end_timestamps`: an array of `google_compute_region_commitment` end_timestamp * `resources`: an array of `google_compute_region_commitment` resources * `types`: an array of `google_compute_region_commitment` type * `reservations`: an array of `google_compute_region_commitment` reservations * `categories`: an array of `google_compute_region_commitment` category * `license_resources`: an array of `google_compute_region_commitment` license_resource * `auto_renews`: an array of `google_compute_region_commitment` auto_renew * `merge_source_commitments`: an array of `google_compute_region_commitment` merge_source_commitments * `split_source_commitments`: an array of `google_compute_region_commitment` split_source_commitment * `resource_statuses`: an array of `google_compute_region_commitment` resource_status * `existing_reservations`: an array of `google_compute_region_commitment` existing_reservations ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_disk_type.md ================================================ +++ title = "google_compute_region_disk_type resource" draft = false [menu.gcp] title = "google_compute_region_disk_type" identifier = "inspec/resources/gcp/google_compute_region_disk_type resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_disk_type` InSpec audit resource to to test a Google Cloud RegionDiskType resource. ## Examples ```ruby describe google_compute_region_disk_type(disk_type: 'value_name', project: 'chef-gcp-inspec', region: 'value_region') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('valid_disk_size') { should cmp 'value_validdisksize' } its('zone') { should cmp 'value_zone' } its('self_link') { should cmp 'value_selflink' } its('default_disk_size_gb') { should cmp 'value_defaultdisksizegb' } its('region') { should cmp 'value_region' } end describe google_compute_region_disk_type(disk_type: 'value_name', project: 'chef-gcp-inspec', region: 'value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_disk_type` resource: * `kind`: [Output Only] Type of the resource. Always compute#diskType for disk types. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: [Output Only] Name of the resource. * `description`: [Output Only] An optional description of this resource. * `valid_disk_size`: [Output Only] An optional textual description of the valid disk size, such as "10GB-10TB". * `deprecated`: Deprecation status for a public resource. * `state`: The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. Possible values: * ACTIVE * DELETED * DEPRECATED * OBSOLETE * `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. * `deprecated`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it. * `obsolete`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it. * `deleted`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it. * `zone`: [Output Only] URL of the zone where the disk type resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. * `self_link`: [Output Only] Server-defined URL for the resource. * `default_disk_size_gb`: [Output Only] Server-defined default disk size in GB. * `region`: [Output Only] URL of the region where the disk type resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_disk_types.md ================================================ +++ title = "google_compute_region_disk_types resource" draft = false [menu.gcp] title = "google_compute_region_disk_types" identifier = "inspec/resources/gcp/google_compute_region_disk_types resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_disk_types` InSpec audit resource to to test a Google Cloud RegionDiskType resource. ## Examples ```ruby describe google_compute_region_disk_types(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_disk_types` resource: See [google_compute_region_disk_type](google_compute_region_disk_type) for more detailed information. * `kinds`: an array of `google_compute_region_disk_type` kind * `ids`: an array of `google_compute_region_disk_type` id * `creation_timestamps`: an array of `google_compute_region_disk_type` creation_timestamp * `names`: an array of `google_compute_region_disk_type` name * `descriptions`: an array of `google_compute_region_disk_type` description * `valid_disk_sizes`: an array of `google_compute_region_disk_type` valid_disk_size * `deprecateds`: an array of `google_compute_region_disk_type` deprecated * `zones`: an array of `google_compute_region_disk_type` zone * `self_links`: an array of `google_compute_region_disk_type` self_link * `default_disk_size_gbs`: an array of `google_compute_region_disk_type` default_disk_size_gb * `regions`: an array of `google_compute_region_disk_type` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_health_check.md ================================================ +++ title = "google_compute_region_health_check resource" draft = false [menu.gcp] title = "google_compute_region_health_check" identifier = "inspec/resources/gcp/google_compute_region_health_check resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_health_check` InSpec audit resource to to test a Google Cloud RegionHealthCheck resource. ## Examples ```ruby describe google_compute_region_health_check(project: 'chef-gcp-inspec', region: '', name: '') do it { should exist } its('type') { should eq "TCP" } end describe google_compute_region_health_check(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'notthere') do it { should_not exist } end ``` ### Test that a GCP compute region exists ``` describe google_compute_region_health_check(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'test1') do it { should exist } end ``` ### Test that a GCP compute region is in the expected state ``` describe google_compute_region_health_check(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'test1') do its('status') { should eq 'UP' } end ``` ### Test a GCP compute region identifier ``` describe google_compute_region_health_check(project: 'chef-inspec-gcp', region: "asia-east1", name: 'test1') do its('unhealthy_threshold') { should eq 2 } end ``` ### Check that a region is associated with the expected zone fully qualified name ``` describe google_compute_region_health_check(project: 'chef-inspec-gcp', region: "asia-east1", name: 'test1') do its('healthy_threshold') { should eq 2 } end ``` ### Check that a region is associated with the expected zone short name ``` describe google_compute_region_health_check(project: 'chef-inspec-gcp', region: "asia-east1", name: 'test1') do its('types') { should include "TCP" } end ``` ``` ## Properties Properties that can be accessed from the `google_compute_region_health_check` resource: * `check_interval_sec`: How often (in seconds) to send a health check. The default value is 5 seconds. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. Provide this property when you create the resource. * `healthy_threshold`: A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. * `id`: The unique identifier for the resource. This identifier is defined by the server. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `unhealthy_threshold`: A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. * `timeout_sec`: How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. * `type`: Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. Possible values: * TCP * SSL * HTTP * HTTPS * HTTP2 * `http_health_check`: A nested object resource * `host`: The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. * `request_path`: The request path of the HTTP health check request. The default value is /. * `response`: The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. * `port`: The TCP port number for the HTTP health check request. The default value is 80. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `https_health_check`: A nested object resource * `host`: The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. * `request_path`: The request path of the HTTPS health check request. The default value is /. * `response`: The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. * `port`: The TCP port number for the HTTPS health check request. The default value is 443. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `tcp_health_check`: A nested object resource * `request`: The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. * `response`: The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. * `port`: The TCP port number for the TCP health check request. The default value is 80. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `ssl_health_check`: A nested object resource * `request`: The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. * `response`: The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. * `port`: The TCP port number for the SSL health check request. The default value is 443. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `http2_health_check`: A nested object resource * `host`: The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. * `request_path`: The request path of the HTTP2 health check request. The default value is /. * `response`: The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. * `port`: The TCP port number for the HTTP2 health check request. The default value is 443. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `grpc_health_check`: A nested object resource * `port`: The port number for the health check request. Must be specified if portName and portSpecification are not set or if port_specification is USE_FIXED_PORT. Valid values are 1 through 65535. * `port_name`: Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. * `port_specification`: Specifies how port is selected for health checking, can be one of the following values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking. * `USE_NAMED_PORT`: The `portName` is used for health checking. * `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified in `port` and `portName` fields. Possible values: * USE_FIXED_PORT * USE_NAMED_PORT * USE_SERVING_PORT * `grpc_service_name`: The gRPC service name for the health check. The value of grpcServiceName has the following meanings by convention: * Empty serviceName means the overall status of all services at the backend. * Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII. * `log_config`: Configure logging on this health check. * `enable`: Indicates whether or not to export logs. This is false by default, which means no health check logging will be done. * `region`: The region where the regional health check resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_health_checks.md ================================================ +++ title = "google_compute_region_health_checks resource" draft = false [menu.gcp] title = "google_compute_region_health_checks" identifier = "inspec/resources/gcp/google_compute_region_health_checks resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_health_checks` InSpec audit resource to to test a Google Cloud RegionHealthCheck resource. ## Examples ```ruby describe google_compute_region_health_checks(project: 'chef-gcp-inspec', region: '') do its('types') { should include "TCP" } end ``` ### Use this InSpec resource to enumerate IDs then test in-depth using `google_compute_region` ``` google_compute_region_health_checks(project: 'chef-inspec-gcp', region: 'europe-west2').region_names.each do |region_name| describe google_compute_region(project: 'chef-inspec-gcp', region: region_name) do it { should exist } end end ``` ### Test that there are more than a specified number of regions available for the project ``` describe google_compute_region_health_checks(project: 'chef-inspec-gcp', region: 'europe-west2') do its('unhealthy_thresholds') { should eq 2} end ``` ### Test that an expected region is available for the project ``` describe google_compute_region_health_checks(project: 'chef-inspec-gcp', region: 'europe-west2') do its('healthy_thresholds') { should include 2 } end ``` ### Test whether any regions are in status "DOWN" ``` describe google_compute_region_health_checks(project: 'chef-inspec-gcp', region: 'europe-west2') do its('check_interval_secs') { should_not include 5 } end ``` ``` ## Properties Properties that can be accessed from the `google_compute_region_health_checks` resource: See [google_compute_region_health_check](google_compute_region_health_check) for more detailed information. * `check_interval_secs`: an array of `google_compute_region_health_check` check_interval_sec * `creation_timestamps`: an array of `google_compute_region_health_check` creation_timestamp * `descriptions`: an array of `google_compute_region_health_check` description * `healthy_thresholds`: an array of `google_compute_region_health_check` healthy_threshold * `ids`: an array of `google_compute_region_health_check` id * `names`: an array of `google_compute_region_health_check` name * `unhealthy_thresholds`: an array of `google_compute_region_health_check` unhealthy_threshold * `timeout_secs`: an array of `google_compute_region_health_check` timeout_sec * `types`: an array of `google_compute_region_health_check` type * `http_health_checks`: an array of `google_compute_region_health_check` http_health_check * `https_health_checks`: an array of `google_compute_region_health_check` https_health_check * `tcp_health_checks`: an array of `google_compute_region_health_check` tcp_health_check * `ssl_health_checks`: an array of `google_compute_region_health_check` ssl_health_check * `http2_health_checks`: an array of `google_compute_region_health_check` http2_health_check * `grpc_health_checks`: an array of `google_compute_region_health_check` grpc_health_check * `log_configs`: an array of `google_compute_region_health_check` log_config * `regions`: an array of `google_compute_region_health_check` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_instance_group.md ================================================ +++ title = "google_compute_region_instance_group resource" draft = false [menu.gcp] title = "google_compute_region_instance_group" identifier = "inspec/resources/gcp/google_compute_region_instance_group resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_instance_group` InSpec audit resource to to test a Google Cloud RegionInstanceGroup resource. ## Examples ```ruby describe google_compute_region_instance_group(project: 'chef-gcp-inspec', region: 'us-central1', name: 'instance-group-2') do it { should exist } its('name') { should eq 'instance-group-2' } its('size') { should eq '1' } its('named_ports.first.name') { should eq 'port' } its('named_ports.first.port') { should eq '80' } end describe google_compute_region_instance_group(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_instance_group` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated. * `description`: An optional textual description of the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. * `fingerprint`: The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently. base64-encoded string. * `network`: The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0). * `zone`: The URL of the zone where the instance group is located (for zonal resources). * `size`: The total number of instances in the instance group. * `region`: The URL of the region where the instance group is located (for regional resources). * `named_ports`: Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] Named ports apply to all instances in this instance group. * `name`: The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. * `port`: The port number, which can be a value between 1 and 65535. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_instance_group_manager.md ================================================ +++ title = "google_compute_region_instance_group_manager resource" draft = false [menu.gcp] title = "google_compute_region_instance_group_manager" identifier = "inspec/resources/gcp/google_compute_region_instance_group_manager resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_region_instance_group_manager` is used to test a Google RegionInstanceGroupManager resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_region_instance_group_manager(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'inspec-rigm') do it { should exist } its('base_instance_name') { should eq 'rigm1' } its('target_size') { should eq '1' } its('named_ports.first.name') { should eq 'https' } its('named_ports.first.port') { should eq '8888' } its('auto_healing_policies.first.initial_delay_sec') { should eq '300' } end describe google_compute_region_instance_group_manager(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP compute region instance group manager has the expected size describe google_compute_region_instance_group_manager(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-test') do its('target_size') { should eq 2 } end ### Test that a GCP compute region instance group manager has a port with supplied name and value describe google_compute_region_instance_group_manager(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-test') do its('named_ports') { should include "http" } end ## Properties Properties that can be accessed from the `google_compute_region_instance_group_manager` resource: * `base_instance_name`: The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035. * `creation_timestamp`: The creation timestamp for this managed instance group in RFC3339 text format. * `current_actions`: The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions. * `abandoning`: The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it. * `creating`: The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully. If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. * `creating_without_retries`: The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly. * `deleting`: The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. * `none`: The number of instances in the managed instance group that are running and have no scheduled actions. * `recreating`: The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template. * `refreshing`: The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance. * `restarting`: The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: A unique identifier for this resource * `instance_group`: The instance group being managed * `instance_template`: The instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. * `name`: The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. * `named_ports`: Named ports configured for the Instance Groups complementary to this Instance Group Manager. * `name`: The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. * `port`: The port number, which can be a value between 1 and 65535. * `target_pools`: TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. * `target_size`: The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number. * `auto_healing_policies`: The autohealing policy for this managed instance group * `health_check`: The URL for the health check that signals autohealing. * `initial_delay_sec`: The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances * `region`: The region the managed instance group resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_instance_group_managers.md ================================================ +++ title = "google_compute_region_instance_group_managers resource" draft = false [menu.gcp] title = "google_compute_region_instance_group_managers" identifier = "inspec/resources/gcp/google_compute_region_instance_group_managers resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_region_instance_group_managers` is used to test a Google RegionInstanceGroupManager resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_region_instance_group_managers(project: 'chef-gcp-inspec', region: 'europe-west2') do its('instance_group_manager_names') { should include 'inspec-rigm' } its('base_instance_names') { should include 'rigm1' } end ``` ### Test that there are no more than a specified number of instance groups available for the project describe google_compute_region_instance_group_managers(project: 'chef-inspec-gcp', region: 'europe-west2') do its('count') { should be <= 100} end ### Test that an expected instance_group is available for the project describe google_compute_region_instance_group_managers(project: 'chef-inspec-gcp', region: 'europe-west2') do its('instance_group_names') { should include "my-instance-group-name" } end ### Test that a subset of all instance_groups matching "mig*" have size greater than zero google_compute_region_instance_group_managers(project: 'chef-inspec-gcp', region: 'europe-west2').where(instance_group_name: /^mig/).instance_group_names.each do |instance_group_name| describe google_compute_instance_group(project: 'chef-inspec-gcp', region: 'europe-west2', name: instance_group_name) do it { should exist } its('target_size') { should be > 0 } end end ## Properties Properties that can be accessed from the `google_compute_region_instance_group_managers` resource: See [google_compute_region_instance_group_manager](google_compute_region_instance_group_manager) for more detailed information. * `base_instance_names`: an array of `google_compute_region_instance_group_manager` base_instance_name * `creation_timestamps`: an array of `google_compute_region_instance_group_manager` creation_timestamp * `current_actions`: an array of `google_compute_region_instance_group_manager` current_actions * `descriptions`: an array of `google_compute_region_instance_group_manager` description * `instance_group_manager_ids`: an array of `google_compute_region_instance_group_manager` id * `instance_groups`: an array of `google_compute_region_instance_group_manager` instance_group * `instance_templates`: an array of `google_compute_region_instance_group_manager` instance_template * `instance_group_manager_names`: an array of `google_compute_region_instance_group_manager` name * `named_ports`: an array of `google_compute_region_instance_group_manager` named_ports * `target_pools`: an array of `google_compute_region_instance_group_manager` target_pools * `target_sizes`: an array of `google_compute_region_instance_group_manager` target_size * `auto_healing_policies`: an array of `google_compute_region_instance_group_manager` auto_healing_policies * `regions`: an array of `google_compute_region_instance_group_manager` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_instance_groups.md ================================================ +++ title = "google_compute_region_instance_groups resource" draft = false [menu.gcp] title = "google_compute_region_instance_groups" identifier = "inspec/resources/gcp/google_compute_region_instance_groups resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_instance_groups` InSpec audit resource to to test a Google Cloud RegionInstanceGroup resource. ## Examples ```ruby describe google_compute_region_instance_groups(project: 'chef-gcp-inspec', region: 'us-central1') do it { should exist } its('names') { should include 'instance-group-2' } end ``` ## Properties Properties that can be accessed from the `google_compute_region_instance_groups` resource: See [google_compute_region_instance_group](google_compute_region_instance_group) for more detailed information. * `creation_timestamps`: an array of `google_compute_region_instance_group` creation_timestamp * `descriptions`: an array of `google_compute_region_instance_group` description * `ids`: an array of `google_compute_region_instance_group` id * `names`: an array of `google_compute_region_instance_group` name * `fingerprints`: an array of `google_compute_region_instance_group` fingerprint * `networks`: an array of `google_compute_region_instance_group` network * `zones`: an array of `google_compute_region_instance_group` zone * `sizes`: an array of `google_compute_region_instance_group` size * `regions`: an array of `google_compute_region_instance_group` region * `named_ports`: an array of `google_compute_region_instance_group` named_ports ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_network_endpoint_group.md ================================================ +++ title = "google_compute_region_network_endpoint_group resource" draft = false [menu.gcp] title = "google_compute_region_network_endpoint_group" identifier = "inspec/resources/gcp/google_compute_region_network_endpoint_group resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_network_endpoint_group` InSpec audit resource to to test a Google Cloud RegionNetworkEndpointGroup resource. ## Examples ```ruby describe google_compute_region_network_endpoint_group(network_endpoint_group: ' ', project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('self_link') { should cmp 'value_selflink' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('network_endpoint_type') { should cmp 'value_networkendpointtype' } its('region') { should cmp 'value_region' } its('zone') { should cmp 'value_zone' } its('network') { should cmp 'value_network' } its('subnetwork') { should cmp 'value_subnetwork' } its('psc_target_service') { should cmp 'value_psctargetservice' } end describe google_compute_region_network_endpoint_group(network_endpoint_group: ' ', project: 'chef-gcp-inspec', region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_network_endpoint_group` resource: * `kind`: [Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `self_link`: [Output Only] Server-defined URL for the resource. * `name`: Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `network_endpoint_type`: Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT. Possible values: * GCE_VM_IP * GCE_VM_IP_PORT * INTERNET_FQDN_PORT * INTERNET_IP_PORT * NON_GCP_PRIVATE_IP_PORT * PRIVATE_SERVICE_CONNECT * SERVERLESS * `size`: [Output only] Number of network endpoints in the network endpoint group. * `region`: [Output Only] The URL of the region where the network endpoint group is located. * `zone`: [Output Only] The URL of the zone where the network endpoint group is located. * `network`: The URL of the network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified. * `subnetwork`: Optional URL of the subnetwork to which all network endpoints in the NEG belong. * `default_port`: The default port used if the port number is not specified in the network endpoint. * `annotations`: Metadata defined as annotations on the network endpoint group. * `additional_properties`: * `cloud_run`: Configuration for a Cloud Run network endpoint group (NEG). The service must be provided explicitly or in the URL mask. The tag is optional, may be provided explicitly or in the URL mask. Note: Cloud Run service must be in the same project and located in the same region as the Serverless NEG. * `service`: Cloud Run service is the main resource of Cloud Run. The service must be 1-63 characters long, and comply with RFC1035. Example value: "run-service". * `tag`: Optional Cloud Run tag represents the "named-revision" to provide additional fine-grained traffic routing information. The tag must be 1-63 characters long, and comply with RFC1035. Example value: "revision-0010". * `url_mask`: A template to parse and fields from a request URL. URL mask allows for routing to multiple Run services without having to create multiple network endpoint groups and backend services. For example, request URLs "foo1.domain.com/bar1" and "foo1.domain.com/bar2" can be backed by the same Serverless Network Endpoint Group (NEG) with URL mask ".domain.com/". The URL mask will parse them to { service="bar1", tag="foo1" } and { service="bar2", tag="foo2" } respectively. * `app_engine`: Configuration for an App Engine network endpoint group (NEG). The service is optional, may be provided explicitly or in the URL mask. The version is optional and can only be provided explicitly or in the URL mask when service is present. Note: App Engine service must be in the same project and located in the same region as the Serverless NEG. * `service`: Optional serving service. The service name is case-sensitive and must be 1-63 characters long. Example value: "default", "my-service". * `version`: Optional serving version. The version name is case-sensitive and must be 1-100 characters long. Example value: "v1", "v2". * `url_mask`: A template to parse service and version fields from a request URL. URL mask allows for routing to multiple App Engine services without having to create multiple Network Endpoint Groups and backend services. For example, the request URLs "foo1-dot-appname.appspot.com/v1" and "foo1-dot-appname.appspot.com/v2" can be backed by the same Serverless NEG with URL mask "-dot-appname.appspot.com/". The URL mask will parse them to { service = "foo1", version = "v1" } and { service = "foo1", version = "v2" } respectively. * `cloud_function`: Configuration for a Cloud Function network endpoint group (NEG). The function must be provided explicitly or in the URL mask. Note: Cloud Function must be in the same project and located in the same region as the Serverless NEG. * `function`: A user-defined name of the Cloud Function. The function name is case-sensitive and must be 1-63 characters long. Example value: "func1". * `url_mask`: A template to parse function field from a request URL. URL mask allows for routing to multiple Cloud Functions without having to create multiple Network Endpoint Groups and backend services. For example, request URLs " mydomain.com/function1" and "mydomain.com/function2" can be backed by the same Serverless NEG with URL mask "/". The URL mask will parse them to { function = "function1" } and { function = "function2" } respectively. * `psc_target_service`: The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: "asia-northeast3-cloudkms.googleapis.com" * `psc_data`: All data that is specifically relevant to only network endpoint groups of type PRIVATE_SERVICE_CONNECT. * `consumer_psc_address`: [Output Only] Address allocated from given subnetwork for PSC. This IP address acts as a VIP for a PSC NEG, allowing it to act as an endpoint in L7 PSC-XLB. * `psc_connection_id`: [Output Only] The PSC connection id of the PSC Network Endpoint Group Consumer. * `psc_connection_status`: [Output Only] The connection status of the PSC Forwarding Rule. Possible values: * ACCEPTED * CLOSED * NEEDS_ATTENTION * PENDING * REJECTED * STATUS_UNSPECIFIED ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_network_endpoint_groups.md ================================================ +++ title = "google_compute_region_network_endpoint_groups resource" draft = false [menu.gcp] title = "google_compute_region_network_endpoint_groups" identifier = "inspec/resources/gcp/google_compute_region_network_endpoint_groups resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_network_endpoint_groups` InSpec audit resource to to test a Google Cloud RegionNetworkEndpointGroup resource. ## Examples ```ruby describe google_compute_region_network_endpoint_groups(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_network_endpoint_groups` resource: See [google_compute_region_network_endpoint_group](google_compute_region_network_endpoint_group) for more detailed information. * `kinds`: an array of `google_compute_region_network_endpoint_group` kind * `ids`: an array of `google_compute_region_network_endpoint_group` id * `creation_timestamps`: an array of `google_compute_region_network_endpoint_group` creation_timestamp * `self_links`: an array of `google_compute_region_network_endpoint_group` self_link * `names`: an array of `google_compute_region_network_endpoint_group` name * `descriptions`: an array of `google_compute_region_network_endpoint_group` description * `network_endpoint_types`: an array of `google_compute_region_network_endpoint_group` network_endpoint_type * `sizes`: an array of `google_compute_region_network_endpoint_group` size * `regions`: an array of `google_compute_region_network_endpoint_group` region * `zones`: an array of `google_compute_region_network_endpoint_group` zone * `networks`: an array of `google_compute_region_network_endpoint_group` network * `subnetworks`: an array of `google_compute_region_network_endpoint_group` subnetwork * `default_ports`: an array of `google_compute_region_network_endpoint_group` default_port * `annotations`: an array of `google_compute_region_network_endpoint_group` annotations * `cloud_runs`: an array of `google_compute_region_network_endpoint_group` cloud_run * `app_engines`: an array of `google_compute_region_network_endpoint_group` app_engine * `cloud_functions`: an array of `google_compute_region_network_endpoint_group` cloud_function * `psc_target_services`: an array of `google_compute_region_network_endpoint_group` psc_target_service * `psc_data`: an array of `google_compute_region_network_endpoint_group` psc_data ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_operation.md ================================================ +++ title = "google_compute_region_operation resource" draft = false [menu.gcp] title = "google_compute_region_operation" identifier = "inspec/resources/gcp/google_compute_region_operation resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_operation` InSpec audit resource to to test a Google Cloud RegionOperation resource. ## Examples ```ruby describe google_compute_region_operation(project: 'chef-gcp-inspec', region: '', name: 'operation-1641188435323-5d4a6f5b26934-9281422c-dce238f5') do it { should exist } its('name') { should eq 'operation-1641188435323-5d4a6f5b26934-9281422c-dce238f5' } its('status') { should eq '' } its('progress') { should eq '100' } end describe google_compute_region_operation(project: 'chef-gcp-inspec', region: '', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_operation` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated. * `description`: An optional textual description of the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. * `target_id`: The unique target ID, which identifies a specific incarnation of the target resource. * `status`: The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. Possible values: * PENDING * RUNNING * DONE * `user`: User who requested the operation, for example: user@example.com. * `insert_time`: The time that this operation was requested. This value is in RFC3339 text format. * `start_time`: The time that this operation was requested. This value is in RFC3339 text format. * `end_time`: The time that this operation was requested. This value is in RFC3339 text format. * `progress`: An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. * `zone`: The URL of the zone where the instance group is located (for zonal resources). ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_operations.md ================================================ +++ title = "google_compute_region_operations resource" draft = false [menu.gcp] title = "google_compute_region_operations" identifier = "inspec/resources/gcp/google_compute_region_operations resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_operations` InSpec audit resource to to test a Google Cloud RegionOperation resource. ## Examples ```ruby describe google_compute_region_operations(project: 'chef-gcp-inspec', region: '') do it { should exist } its('names') { should include 'operation-1641188435323-5d4a6f5b26934-9281422c-dce238f5' } its('progress') { should include '100' } end ``` ## Properties Properties that can be accessed from the `google_compute_region_operations` resource: See [google_compute_region_operation](google_compute_region_operation) for more detailed information. * `creation_timestamps`: an array of `google_compute_region_operation` creation_timestamp * `descriptions`: an array of `google_compute_region_operation` description * `ids`: an array of `google_compute_region_operation` id * `names`: an array of `google_compute_region_operation` name * `target_ids`: an array of `google_compute_region_operation` target_id * `statuses`: an array of `google_compute_region_operation` status * `users`: an array of `google_compute_region_operation` user * `insert_times`: an array of `google_compute_region_operation` insert_time * `start_times`: an array of `google_compute_region_operation` start_time * `end_times`: an array of `google_compute_region_operation` end_time * `progresses`: an array of `google_compute_region_operation` progress * `zones`: an array of `google_compute_region_operation` zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_security_policies.md ================================================ +++ title = "google_compute_region_security_policies resource" draft = false [menu.gcp] title = "google_compute_region_security_policies" identifier = "inspec/resources/gcp/google_compute_region_security_policies resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_security_policies` InSpec audit resource to test the properties of a Google Cloud RegionSecurityPolicy resource. ## Examples ```ruby describe google_compute_region_security_policies(project: 'chef-gcp-inspec', region: ' ') do it { should exist } end ``` ## Parameters Parameters that can be accessed from the `google_compute_region_security_policies` resource: See [google_compute_region_security_policy](google_compute_region_security_policy) for more detailed information. * `user_defined_fields`: an array of `google_compute_region_security_policy` user_defined_fields * `kinds`: an array of `google_compute_region_security_policy` kind * `ids`: an array of `google_compute_region_security_policy` id * `creation_timestamps`: an array of `google_compute_region_security_policy` creation_timestamp * `names`: an array of `google_compute_region_security_policy` name * `descriptions`: an array of `google_compute_region_security_policy` description * `rules`: an array of `google_compute_region_security_policy` rules * `cloud_armor_configs`: an array of `google_compute_region_security_policy` cloud_armor_config * `adaptive_protection_configs`: an array of `google_compute_region_security_policy` adaptive_protection_config * `ddos_protection_configs`: an array of `google_compute_region_security_policy` ddos_protection_config * `advanced_options_configs`: an array of `google_compute_region_security_policy` advanced_options_config * `recaptcha_options_configs`: an array of `google_compute_region_security_policy` recaptcha_options_config * `fingerprints`: an array of `google_compute_region_security_policy` fingerprint * `self_links`: an array of `google_compute_region_security_policy` self_link * `self_link_with_ids`: an array of `google_compute_region_security_policy` self_link_with_id * `types`: an array of `google_compute_region_security_policy` type * `associations`: an array of `google_compute_region_security_policy` associations * `labels`: an array of `google_compute_region_security_policy` labels * `label_fingerprints`: an array of `google_compute_region_security_policy` label_fingerprint * `rule_tuple_counts`: an array of `google_compute_region_security_policy` rule_tuple_count * `display_names`: an array of `google_compute_region_security_policy` display_name * `parents`: an array of `google_compute_region_security_policy` parent * `regions`: an array of `google_compute_region_security_policy` region ## Properties Properties that can be accessed from the `google_compute_region_security_policies` resource: See [google_compute_region_security_policy](google_compute_region_security_policy) for more detailed information. * `user_defined_fields`: an array of `google_compute_region_security_policy` user_defined_fields * `kinds`: an array of `google_compute_region_security_policy` kind * `ids`: an array of `google_compute_region_security_policy` id * `creation_timestamps`: an array of `google_compute_region_security_policy` creation_timestamp * `names`: an array of `google_compute_region_security_policy` name * `descriptions`: an array of `google_compute_region_security_policy` description * `rules`: an array of `google_compute_region_security_policy` rules * `cloud_armor_configs`: an array of `google_compute_region_security_policy` cloud_armor_config * `adaptive_protection_configs`: an array of `google_compute_region_security_policy` adaptive_protection_config * `ddos_protection_configs`: an array of `google_compute_region_security_policy` ddos_protection_config * `advanced_options_configs`: an array of `google_compute_region_security_policy` advanced_options_config * `recaptcha_options_configs`: an array of `google_compute_region_security_policy` recaptcha_options_config * `fingerprints`: an array of `google_compute_region_security_policy` fingerprint * `self_links`: an array of `google_compute_region_security_policy` self_link * `self_link_with_ids`: an array of `google_compute_region_security_policy` self_link_with_id * `types`: an array of `google_compute_region_security_policy` type * `associations`: an array of `google_compute_region_security_policy` associations * `labels`: an array of `google_compute_region_security_policy` labels * `label_fingerprints`: an array of `google_compute_region_security_policy` label_fingerprint * `rule_tuple_counts`: an array of `google_compute_region_security_policy` rule_tuple_count * `display_names`: an array of `google_compute_region_security_policy` display_name * `parents`: an array of `google_compute_region_security_policy` parent * `regions`: an array of `google_compute_region_security_policy` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_security_policy.md ================================================ +++ title = "google_compute_region_security_policy resource" draft = false [menu.gcp] title = "google_compute_region_security_policy" identifier = "inspec/resources/gcp/google_compute_region_security_policy resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_security_policy` InSpec audit resource to test the properties of a Google Cloud RegionSecurityPolicy resource. ## Examples ```ruby describe google_compute_region_security_policy(project: 'chef-gcp-inspec', region: ' ', securityPolicy: ' ') do it { should exist } its('kind') { should cmp '' } its('id') { should cmp '' } its('creation_timestamp') { should cmp '' } its('name') { should cmp '' } its('description') { should cmp '' } its('fingerprint') { should cmp '' } its('self_link') { should cmp '' } its('self_link_with_id') { should cmp '' } its('type') { should cmp '' } its('label_fingerprint') { should cmp '' } its('display_name') { should cmp '' } its('parent') { should cmp '' } its('region') { should cmp '' } end describe google_compute_region_security_policy(project: 'chef-gcp-inspec', region: ' ', securityPolicy: ' ') do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_compute_region_security_policy` resource: ## Properties Properties that can be accessed from the `google_compute_region_security_policy` resource: * `user_defined_fields`: Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A user-defined field consists of up to 4 bytes extracted from a fixed offset in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an optional mask to select certain bits. Rules may then specify matching values for these fields. Example: userDefinedFields: - name: "ipv4_fragment_offset" base: IPV4 offset: 6 size: 2 mask: "0x1fff" * `name`: The name of this field. Must be unique within the policy. * `base`: The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required Possible values: * IPV4 * IPV6 * TCP * UDP * `offset`: Offset of the first byte of the field (in network byte order) relative to 'base'. * `size`: Size of the field in bytes. Valid values: 1-4. * `mask`: If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask. * `kind`: [Output only] Type of the resource. Always compute#securityPolicyfor security policies * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `rules`: A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. * `kind`: [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules * `description`: An optional description of this resource. Provide this property when you create the resource. * `priority`: An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority. * `match`: Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. * `expr`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `expr_options`: * `recaptcha_options`: * `action_token_site_keys`: A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created. * `session_token_site_keys`: A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created. * `versioned_expr`: Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config. Possible values: * FIREWALL * SRC_IPS_V1 * `config`: * `src_ip_ranges`: CIDR IP address range. Maximum number of src_ip_ranges allowed is 10. * `dest_ip_ranges`: CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL. * `dest_ports`: Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL. * `ip_protocol`: The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number. * `ports`: An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. * `layer4_configs`: Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL. * `ip_protocol`: The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number. * `ports`: An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. * `network_match`: Represents a match condition that incoming network traffic is evaluated against. * `user_defined_fields`: User-defined fields. Each element names a defined field and lists the matching values for that field. * `name`: Name of the user-defined field, as given in the definition. * `values`: Matching values of the field. Each element can be a 32-bit unsigned decimal or hexadecimal (starting with "0x") number (e.g. "64") or range (e.g. "0x400-0x7ff"). * `src_ip_ranges`: Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format. * `dest_ip_ranges`: Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text format. * `ip_protocols`: IPv4 protocol / IPv6 next header (after extension headers). Each element can be an 8-bit unsigned decimal number (e.g. "6"), range (e.g. "253-254"), or one of the following protocol names: "tcp", "udp", "icmp", "esp", "ah", "ipip", or "sctp". * `src_ports`: Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). * `dest_ports`: Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). * `src_region_codes`: Two-letter ISO 3166-1 alpha-2 country code associated with the source IP address. * `src_asns`: BGP Autonomous System Number associated with the source IP address. * `action`: The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for `STATUS` are 403, 404, and 502. - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. * `preview`: If set to true, the specified action is not enforced. * `direction`: The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. Possible values: * EGRESS * INGRESS * `target_resources`: A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL. * `enable_logging`: Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL. * `rule_tuple_count`: [Output Only] Calculation of the complexity of a single firewall security policy rule. * `rate_limit_options`: * `rate_limit_threshold`: * `count`: Number of HTTP(S) requests for calculating the threshold. * `interval_sec`: Interval over which the threshold is computed. * `conform_action`: Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. * `exceed_action`: Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are `deny(STATUS)`, where valid values for `STATUS` are 403, 404, 429, and 502, and `redirect`, where the redirect parameters come from `exceedRedirectOptions` below. The `redirect` action is only supported in Global Security Policies of type CLOUD_ARMOR. * `exceed_redirect_options`: * `type`: Type of the redirect action. Possible values: * EXTERNAL_302 * GOOGLE_RECAPTCHA * `target`: Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. * `exceed_action_rpc_status`: Simplified google.rpc.Status type (omitting details). * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. * `enforce_on_key`: Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values: * ALL * ALL_IPS * HTTP_COOKIE * HTTP_HEADER * HTTP_PATH * IP * REGION_CODE * SNI * TLS_JA3_FINGERPRINT * USER_IP * XFF_IP * `enforce_on_key_name`: Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value. * `enforce_on_key_configs`: If specified, any combination of values of enforce_on_key_type/enforce_on_key_name is treated as the key on which ratelimit threshold/action is enforced. You can specify up to 3 enforce_on_key_configs. If enforce_on_key_configs is specified, enforce_on_key must not be specified. * `enforce_on_key_type`: Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKeyConfigs" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values: * ALL * ALL_IPS * HTTP_COOKIE * HTTP_HEADER * HTTP_PATH * IP * REGION_CODE * SNI * TLS_JA3_FINGERPRINT * USER_IP * XFF_IP * `enforce_on_key_name`: Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value. * `ban_threshold`: * `count`: Number of HTTP(S) requests for calculating the threshold. * `interval_sec`: Interval over which the threshold is computed. * `ban_duration_sec`: Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold. * `target_service_accounts`: A list of service accounts indicating the sets of instances that are applied with this rule. * `rule_number`: Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server. * `redirect_target`: This must be specified for redirect actions. Cannot be specified for any other actions. * `header_action`: * `request_headers_to_adds`: The list of request headers to add or overwrite if they're already present. * `header_name`: The name of the header to set. * `header_value`: The value to set the named header to. * `redirect_options`: * `type`: Type of the redirect action. Possible values: * EXTERNAL_302 * GOOGLE_RECAPTCHA * `target`: Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. * `rule_managed_protection_tier`: [Output Only] The minimum managed protection tier required for this rule. [Deprecated] Use requiredManagedProtectionTiers instead. Possible values: * CAMP_PLUS_ANNUAL * CAMP_PLUS_PAYGO * CA_STANDARD * `preconfigured_waf_config`: * `exclusions`: A list of exclusions to apply during preconfigured WAF evaluation. * `target_rule_set`: Target WAF rule set to apply the preconfigured WAF exclusion. * `target_rule_ids`: A list of target rule IDs under the WAF rule set to apply the preconfigured WAF exclusion. If omitted, it refers to all the rule IDs under the WAF rule set. * `request_headers_to_exclude`: A list of request header names whose value will be excluded from inspection during preconfigured WAF evaluation. * `val`: The value of the field. * `op`: The match operator for the field. Possible values: * CONTAINS * ENDS_WITH * EQUALS * EQUALS_ANY * STARTS_WITH * `request_cookies_to_exclude`: A list of request cookie names whose value will be excluded from inspection during preconfigured WAF evaluation. * `val`: The value of the field. * `op`: The match operator for the field. Possible values: * CONTAINS * ENDS_WITH * EQUALS * EQUALS_ANY * STARTS_WITH * `request_query_params_to_exclude`: A list of request query parameter names whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body. * `val`: The value of the field. * `op`: The match operator for the field. Possible values: * CONTAINS * ENDS_WITH * EQUALS * EQUALS_ANY * STARTS_WITH * `request_uris_to_exclude`: A list of request URIs from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded. * `val`: The value of the field. * `op`: The match operator for the field. Possible values: * CONTAINS * ENDS_WITH * EQUALS * EQUALS_ANY * STARTS_WITH * `cloud_armor_config`: Configuration options for Cloud Armor. * `enable_ml`: If set to true, enables Cloud Armor Machine Learning. * `adaptive_protection_config`: Configuration options for Cloud Armor Adaptive Protection (CAAP). * `layer7_ddos_defense_config`: Configuration options for L7 DDoS detection. This field is only supported in Global Security Policies of type CLOUD_ARMOR. * `enable`: If set to true, enables CAAP for L7 DDoS detection. This field is only supported in Global Security Policies of type CLOUD_ARMOR. * `rule_visibility`: Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules. This field is only supported in Global Security Policies of type CLOUD_ARMOR. Possible values: * PREMIUM * STANDARD * `threshold_configs`: Configuration options for layer7 adaptive protection for various customizable thresholds. * `name`: The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the security policy. * `auto_deploy_load_threshold`: * `auto_deploy_confidence_threshold`: * `auto_deploy_impacted_baseline_threshold`: * `auto_deploy_expiration_sec`: * `detection_load_threshold`: * `detection_absolute_qps`: * `detection_relative_to_baseline_qps`: * `traffic_granularity_configs`: Configuration options for enabling Adaptive Protection to operate on specified granular traffic units. * `type`: Type of this configuration. Possible values: * HTTP_HEADER_HOST * HTTP_PATH * UNSPECIFIED_TYPE * `value`: Requests that match this value constitute a granular traffic unit. * `enable_each_unique_value`: If enabled, traffic matching each unique value for the specified type constitutes a separate traffic unit. It can only be set to true if `value` is empty. * `auto_deploy_config`: Configuration options for Adaptive Protection auto-deploy feature. * `load_threshold`: * `confidence_threshold`: * `impacted_baseline_threshold`: * `expiration_sec`: * `ddos_protection_config`: * `ddos_protection`: Possible values: * ADVANCED * ADVANCED_PREVIEW * STANDARD * `advanced_options_config`: * `json_parsing`: Possible values: * DISABLED * STANDARD * STANDARD_WITH_GRAPHQL * `json_custom_config`: * `content_types`: A list of custom Content-Type header values to apply the JSON parsing. As per RFC 1341, a Content-Type header value has the following format: Content-Type := type "/" subtype *[";" parameter] When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded. * `log_level`: Possible values: * NORMAL * VERBOSE * `user_ip_request_headers`: An optional list of case-insensitive request header names to use for resolving the callers client IP address. * `recaptcha_options_config`: * `redirect_site_key`: An optional field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used. This field is only supported in Global Security Policies of type CLOUD_ARMOR. * `fingerprint`: Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `type`: The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time. Possible values: * CLOUD_ARMOR * CLOUD_ARMOR_EDGE * CLOUD_ARMOR_INTERNAL_SERVICE * CLOUD_ARMOR_NETWORK * FIREWALL * `associations`: A list of associations that belong to this policy. * `name`: The name for an association. * `attachment_id`: The resource that the security policy is attached to. * `security_policy_id`: [Output Only] The security policy ID of the association. * `display_name`: [Output Only] The display name of the security policy of the association. * `labels`: Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. * `additional_properties`: * `label_fingerprint`: A fingerprint for the labels being applied to this security policy, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the security policy. * `rule_tuple_count`: [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples. * `display_name`: User-provided name of the organization security policy. The name should be unique in the organization in which the security policy is created. This should only be used when SecurityPolicyType is FIREWALL. The name must be 1-63 characters long, and comply with https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `parent`: [Output Only] The parent of the security policy. * `region`: [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_ssl_policies.md ================================================ +++ title = "google_compute_region_ssl_policies resource" draft = false [menu.gcp] title = "google_compute_region_ssl_policies" identifier = "inspec/resources/gcp/google_compute_region_ssl_policies resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_ssl_policies` InSpec audit resource to to test a Google Cloud RegionSslPolicy resource. ## Examples ```ruby describe google_compute_region_ssl_policies(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_ssl_policies` resource: See [google_compute_region_ssl_policy](google_compute_region_ssl_policy) for more detailed information. * `kinds`: an array of `google_compute_region_ssl_policy` kind * `ids`: an array of `google_compute_region_ssl_policy` id * `creation_timestamps`: an array of `google_compute_region_ssl_policy` creation_timestamp * `self_links`: an array of `google_compute_region_ssl_policy` self_link * `self_link_with_ids`: an array of `google_compute_region_ssl_policy` self_link_with_id * `names`: an array of `google_compute_region_ssl_policy` name * `descriptions`: an array of `google_compute_region_ssl_policy` description * `profiles`: an array of `google_compute_region_ssl_policy` profile * `min_tls_versions`: an array of `google_compute_region_ssl_policy` min_tls_version * `enabled_features`: an array of `google_compute_region_ssl_policy` enabled_features * `custom_features`: an array of `google_compute_region_ssl_policy` custom_features * `fingerprints`: an array of `google_compute_region_ssl_policy` fingerprint * `warnings`: an array of `google_compute_region_ssl_policy` warnings * `tls_settings`: an array of `google_compute_region_ssl_policy` tls_settings * `regions`: an array of `google_compute_region_ssl_policy` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_ssl_policy.md ================================================ +++ title = "google_compute_region_ssl_policy resource" draft = false [menu.gcp] title = "google_compute_region_ssl_policy" identifier = "inspec/resources/gcp/google_compute_region_ssl_policy resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_ssl_policy` InSpec audit resource to to test a Google Cloud RegionSslPolicy resource. ## Examples ```ruby describe google_compute_region_ssl_policy(project: 'chef-gcp-inspec', region: ' value_region', sslPolicy: ' ') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('profile') { should cmp 'value_profile' } its('min_tls_version') { should cmp 'value_mintlsversion' } its('fingerprint') { should cmp 'value_fingerprint' } its('region') { should cmp 'value_region' } end describe google_compute_region_ssl_policy(project: 'chef-gcp-inspec', region: ' value_region', sslPolicy: ' ') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_ssl_policy` resource: * `kind`: [Output only] Type of the resource. Always compute#sslPolicyfor SSL policies. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `name`: Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `profile`: Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. This can be one of COMPATIBLE, MODERN, RESTRICTED, or CUSTOM. If using CUSTOM, the set of SSL features to enable must be specified in the customFeatures field. Possible values: * COMPATIBLE * CUSTOM * MODERN * RESTRICTED * `min_tls_version`: The minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer. This can be one of TLS_1_0, TLS_1_1, TLS_1_2. Possible values: * TLS_1_0 * TLS_1_1 * TLS_1_2 * `enabled_features`: [Output Only] The list of features enabled in the SSL policy. * `custom_features`: A list of features enabled when the selected profile is CUSTOM. The method returns the set of features that can be specified in this list. This field must be empty if the profile is not CUSTOM. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an SslPolicy. * `warnings`: [Output Only] If potential misconfigurations are detected for this SSL policy, this field will be populated with warning messages. * `code`: [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. Possible values: * CLEANUP_FAILED * DEPRECATED_RESOURCE_USED * DEPRECATED_TYPE_USED * DISK_SIZE_LARGER_THAN_IMAGE_SIZE * EXPERIMENTAL_TYPE_USED * EXTERNAL_API_WARNING * FIELD_VALUE_OVERRIDEN * INJECTED_KERNELS_DEPRECATED * INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB * LARGE_DEPLOYMENT_WARNING * LIST_OVERHEAD_QUOTA_EXCEED * MISSING_TYPE_DEPENDENCY * NEXT_HOP_ADDRESS_NOT_ASSIGNED * NEXT_HOP_CANNOT_IP_FORWARD * NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE * NEXT_HOP_INSTANCE_NOT_FOUND * NEXT_HOP_INSTANCE_NOT_ON_NETWORK * NEXT_HOP_NOT_RUNNING * NOT_CRITICAL_ERROR * NO_RESULTS_ON_PAGE * PARTIAL_SUCCESS * REQUIRED_TOS_AGREEMENT * RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING * RESOURCE_NOT_DELETED * SCHEMA_VALIDATION_IGNORED * SINGLE_INSTANCE_PROPERTY_TEMPLATE * UNDECLARED_PROPERTIES * UNREACHABLE * `message`: [Output Only] A human-readable description of the warning code. * `data`: [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } * `key`: [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). * `value`: [Output Only] A warning data value corresponding to the key. * `tls_settings`: The TLS settings for the server. * `tls_mode`: Indicates whether connections should be secured using TLS. The value of this field determines how TLS is enforced. This field can be set to one of the following: - SIMPLE Secure connections with standard TLS semantics. - MUTUAL Secure connections to the backends using mutual TLS by presenting client certificates for authentication. Possible values: * INVALID * MUTUAL * SIMPLE * `proxy_tls_context`: [Deprecated] The TLS settings for the client or server. The TLS settings for the client or server. * `certificate_context`: [Deprecated] Defines the mechanism to obtain the client or server certificate. Defines the mechanism to obtain the client or server certificate. * `certificate_source`: Defines how TLS certificates are obtained. Possible values: * INVALID * USE_PATH * USE_SDS * `certificate_paths`: [Deprecated] The paths to the mounted TLS Certificates and private key. The paths to the mounted TLS Certificates and private key. * `certificate_path`: The path to the file holding the client or server TLS certificate to use. * `private_key_path`: The path to the file holding the client or server private key. * `sds_config`: [Deprecated] The configuration to access the SDS server. The configuration to access the SDS server. * `grpc_service_config`: [Deprecated] gRPC config to access the SDS server. gRPC config to access the SDS server. * `target_uri`: The target URI of the SDS server. * `channel_credentials`: [Deprecated] gRPC channel credentials to access the SDS server. gRPC channel credentials to access the SDS server. * `channel_credential_type`: The channel credentials to access the SDS server. This field can be set to one of the following: CERTIFICATES: Use TLS certificates to access the SDS server. GCE_VM: Use local GCE VM credentials to access the SDS server. Possible values: * CERTIFICATES * GCE_VM * INVALID * `certificates`: [Deprecated] The paths to the mounted TLS Certificates and private key. The paths to the mounted TLS Certificates and private key. * `certificate_path`: The path to the file holding the client or server TLS certificate to use. * `private_key_path`: The path to the file holding the client or server private key. * `call_credentials`: [Deprecated] gRPC call credentials to access the SDS server. gRPC call credentials to access the SDS server. * `call_credential_type`: The type of call credentials to use for GRPC requests to the SDS server. This field can be set to one of the following: - GCE_VM: The local GCE VM service account credentials are used to access the SDS server. - FROM_PLUGIN: Custom authenticator credentials are used to access the SDS server. Possible values: * FROM_PLUGIN * GCE_VM * INVALID * `from_plugin`: [Deprecated] Custom authenticator credentials. Custom authenticator credentials. * `name`: Plugin name. * `struct_config`: A text proto that conforms to a Struct type definition interpreted by the plugin. * `validation_context`: [Deprecated] Defines the mechanism to obtain the Certificate Authority certificate to validate the client/server certificate. validate the client/server certificate. * `validation_source`: Defines how TLS certificates are obtained. Possible values: * INVALID * USE_PATH * USE_SDS * `certificate_path`: The path to the file holding the CA certificate to validate the client or server certificate. * `sds_config`: [Deprecated] The configuration to access the SDS server. The configuration to access the SDS server. * `grpc_service_config`: [Deprecated] gRPC config to access the SDS server. gRPC config to access the SDS server. * `target_uri`: The target URI of the SDS server. * `channel_credentials`: [Deprecated] gRPC channel credentials to access the SDS server. gRPC channel credentials to access the SDS server. * `channel_credential_type`: The channel credentials to access the SDS server. This field can be set to one of the following: CERTIFICATES: Use TLS certificates to access the SDS server. GCE_VM: Use local GCE VM credentials to access the SDS server. Possible values: * CERTIFICATES * GCE_VM * INVALID * `certificates`: [Deprecated] The paths to the mounted TLS Certificates and private key. The paths to the mounted TLS Certificates and private key. * `certificate_path`: The path to the file holding the client or server TLS certificate to use. * `private_key_path`: The path to the file holding the client or server private key. * `call_credentials`: [Deprecated] gRPC call credentials to access the SDS server. gRPC call credentials to access the SDS server. * `call_credential_type`: The type of call credentials to use for GRPC requests to the SDS server. This field can be set to one of the following: - GCE_VM: The local GCE VM service account credentials are used to access the SDS server. - FROM_PLUGIN: Custom authenticator credentials are used to access the SDS server. Possible values: * FROM_PLUGIN * GCE_VM * INVALID * `from_plugin`: [Deprecated] Custom authenticator credentials. Custom authenticator credentials. * `name`: Plugin name. * `struct_config`: A text proto that conforms to a Struct type definition interpreted by the plugin. * `subject_alt_names`: A list of alternate names to verify the subject identity in the certificate presented by the client. * `region`: [Output Only] URL of the region where the regional SSL policy resides. This field is not applicable to global SSL policies. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_target_http_proxies.md ================================================ +++ title = "google_compute_region_target_http_proxies resource" draft = false [menu.gcp] title = "google_compute_region_target_http_proxies" identifier = "inspec/resources/gcp/google_compute_region_target_http_proxies resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_target_http_proxies` InSpec audit resource to to test a Google Cloud RegionTargetHttpProxy resource. ## Examples ```ruby describe google_compute_region_target_http_proxies(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_target_http_proxies` resource: See [google_compute_region_target_http_proxy](google_compute_region_target_http_proxy) for more detailed information. * `kinds`: an array of `google_compute_region_target_http_proxy` kind * `ids`: an array of `google_compute_region_target_http_proxy` id * `creation_timestamps`: an array of `google_compute_region_target_http_proxy` creation_timestamp * `names`: an array of `google_compute_region_target_http_proxy` name * `descriptions`: an array of `google_compute_region_target_http_proxy` description * `self_links`: an array of `google_compute_region_target_http_proxy` self_link * `self_link_with_ids`: an array of `google_compute_region_target_http_proxy` self_link_with_id * `url_maps`: an array of `google_compute_region_target_http_proxy` url_map * `regions`: an array of `google_compute_region_target_http_proxy` region * `proxy_binds`: an array of `google_compute_region_target_http_proxy` proxy_bind * `http_filters`: an array of `google_compute_region_target_http_proxy` http_filters * `fingerprints`: an array of `google_compute_region_target_http_proxy` fingerprint * `http_keep_alive_timeout_secs`: an array of `google_compute_region_target_http_proxy` http_keep_alive_timeout_sec ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_target_http_proxy.md ================================================ +++ title = "google_compute_region_target_http_proxy resource" draft = false [menu.gcp] title = "google_compute_region_target_http_proxy" identifier = "inspec/resources/gcp/google_compute_region_target_http_proxy resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_target_http_proxy` InSpec audit resource to to test a Google Cloud RegionTargetHttpProxy resource. ## Examples ```ruby describe google_compute_region_target_http_proxy(project: 'chef-gcp-inspec', region: ' value_region', targetHttpProxy: ' ') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('url_map') { should cmp 'value_urlmap' } its('region') { should cmp 'value_region' } its('fingerprint') { should cmp 'value_fingerprint' } end describe google_compute_region_target_http_proxy(project: 'chef-gcp-inspec', region: ' value_region', targetHttpProxy: ' ') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_target_http_proxy` resource: * `kind`: [Output Only] Type of resource. Always compute#targetHttpProxy for target HTTP proxies. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `url_map`: URL to the UrlMap resource that defines the mapping from URL to the BackendService. * `region`: [Output Only] URL of the region where the regional Target HTTP Proxy resides. This field is not applicable to global Target HTTP Proxies. * `proxy_bind`: This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED. When this field is set to true, Envoy proxies set up inbound traffic interception and bind to the IP address and port specified in the forwarding rule. This is generally useful when using Traffic Director to configure Envoy as a gateway or middle proxy (in other words, not a sidecar proxy). The Envoy proxy listens for inbound requests and handles requests when it receives them. The default is false. * `http_filters`: URLs to networkservices.HttpFilter resources enabled for xDS clients using this configuration. For example, https://networkservices.googleapis.com/v1alpha1/projects/project/locations/ locationhttpFilters/httpFilter Only filters that handle outbound connection and stream events may be specified. These filters work in conjunction with a default set of HTTP filters that may already be configured by Traffic Director. Traffic Director will determine the final location of these filters within xDS configuration based on the name of the HTTP filter. If Traffic Director positions multiple filters at the same location, those filters will be in the same order as specified in this list. httpFilters only applies for loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a TargetHttpProxy. An up-to-date fingerprint must be provided in order to patch/update the TargetHttpProxy; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the TargetHttpProxy. * `http_keep_alive_timeout_sec`: Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value (610 seconds) will be used. For global external Application Load Balancers, the minimum allowed value is 5 seconds and the maximum allowed value is 1200 seconds. For classic Application Load Balancers, this option is not supported. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_target_https_proxies.md ================================================ +++ title = "google_compute_region_target_https_proxies resource" draft = false [menu.gcp] title = "google_compute_region_target_https_proxies" identifier = "inspec/resources/gcp/google_compute_region_target_https_proxies resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_target_https_proxies` InSpec audit resource to to test a Google Cloud RegionTargetHttpsProxy resource. ## Examples ```ruby describe google_compute_region_target_https_proxies(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_target_https_proxies` resource: See [google_compute_region_target_https_proxy](google_compute_region_target_https_proxy) for more detailed information. * `kinds`: an array of `google_compute_region_target_https_proxy` kind * `ids`: an array of `google_compute_region_target_https_proxy` id * `creation_timestamps`: an array of `google_compute_region_target_https_proxy` creation_timestamp * `names`: an array of `google_compute_region_target_https_proxy` name * `descriptions`: an array of `google_compute_region_target_https_proxy` description * `self_links`: an array of `google_compute_region_target_https_proxy` self_link * `self_link_with_ids`: an array of `google_compute_region_target_https_proxy` self_link_with_id * `url_maps`: an array of `google_compute_region_target_https_proxy` url_map * `ssl_certificates`: an array of `google_compute_region_target_https_proxy` ssl_certificates * `certificate_maps`: an array of `google_compute_region_target_https_proxy` certificate_map * `quic_overrides`: an array of `google_compute_region_target_https_proxy` quic_override * `ssl_policies`: an array of `google_compute_region_target_https_proxy` ssl_policy * `regions`: an array of `google_compute_region_target_https_proxy` region * `proxy_binds`: an array of `google_compute_region_target_https_proxy` proxy_bind * `http_filters`: an array of `google_compute_region_target_https_proxy` http_filters * `server_tls_policies`: an array of `google_compute_region_target_https_proxy` server_tls_policy * `authentications`: an array of `google_compute_region_target_https_proxy` authentication * `authorization_policies`: an array of `google_compute_region_target_https_proxy` authorization_policy * `authorizations`: an array of `google_compute_region_target_https_proxy` authorization * `fingerprints`: an array of `google_compute_region_target_https_proxy` fingerprint * `http_keep_alive_timeout_secs`: an array of `google_compute_region_target_https_proxy` http_keep_alive_timeout_sec * `tls_early_data`: an array of `google_compute_region_target_https_proxy` tls_early_data ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_target_https_proxy.md ================================================ +++ title = "google_compute_region_target_https_proxy resource" draft = false [menu.gcp] title = "google_compute_region_target_https_proxy" identifier = "inspec/resources/gcp/google_compute_region_target_https_proxy resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_target_https_proxy` InSpec audit resource to to test a Google Cloud RegionTargetHttpsProxy resource. ## Examples ```ruby describe google_compute_region_target_https_proxy(project: 'chef-gcp-inspec', region: ' value_region', targetHttpsProxy: ' ') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('url_map') { should cmp 'value_urlmap' } its('certificate_map') { should cmp 'value_certificatemap' } its('quic_override') { should cmp 'value_quicoverride' } its('ssl_policy') { should cmp 'value_sslpolicy' } its('region') { should cmp 'value_region' } its('server_tls_policy') { should cmp 'value_servertlspolicy' } its('authentication') { should cmp 'value_authentication' } its('authorization_policy') { should cmp 'value_authorizationpolicy' } its('authorization') { should cmp 'value_authorization' } its('fingerprint') { should cmp 'value_fingerprint' } its('tls_early_data') { should cmp 'value_tlsearlydata' } end describe google_compute_region_target_https_proxy(project: 'chef-gcp-inspec', region: ' value_region', targetHttpsProxy: ' ') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_target_https_proxy` resource: * `kind`: [Output Only] Type of resource. Always compute#targetHttpsProxy for target HTTPS proxies. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `url_map`: A fully-qualified or valid partial URL to the UrlMap resource that defines the mapping from URL to the BackendService. For example, the following are all valid URLs for specifying a URL map: - https://www.googleapis.compute/v1/projects/project/global/urlMaps/ url-map - projects/project/global/urlMaps/url-map - global/urlMaps/url-map * `ssl_certificates`: URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. Currently, you may specify up to 15 SSL certificates. sslCertificates do not apply when the load balancing scheme is set to INTERNAL_SELF_MANAGED. * `certificate_map`: URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for global target proxies. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}. * `quic_override`: Specifies the QUIC override policy for this TargetHttpsProxy resource. This setting determines whether the load balancer attempts to negotiate QUIC with clients. You can specify NONE, ENABLE, or DISABLE. - When quic-override is set to NONE, Google manages whether QUIC is used. - When quic-override is set to ENABLE, the load balancer uses QUIC when possible. - When quic-override is set to DISABLE, the load balancer doesn't use QUIC. - If the quic-override flag is not specified, NONE is implied. Possible values: * DISABLE * ENABLE * NONE * `ssl_policy`: URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource has no SSL policy configured. * `region`: [Output Only] URL of the region where the regional TargetHttpsProxy resides. This field is not applicable to global TargetHttpsProxies. * `proxy_bind`: This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED. When this field is set to true, Envoy proxies set up inbound traffic interception and bind to the IP address and port specified in the forwarding rule. This is generally useful when using Traffic Director to configure Envoy as a gateway or middle proxy (in other words, not a sidecar proxy). The Envoy proxy listens for inbound requests and handles requests when it receives them. The default is false. * `http_filters`: URLs to networkservices.HttpFilter resources enabled for xDS clients using this configuration. For example, https://networkservices.googleapis.com/beta/projects/project/locations/ locationhttpFilters/httpFilter Only filters that handle outbound connection and stream events may be specified. These filters work in conjunction with a default set of HTTP filters that may already be configured by Traffic Director. Traffic Director will determine the final location of these filters within xDS configuration based on the name of the HTTP filter. If Traffic Director positions multiple filters at the same location, those filters will be in the same order as specified in this list. httpFilters only applies for loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details. * `server_tls_policy`: Optional. A URL referring to a networksecurity.ServerTlsPolicy resource that describes how the proxy should authenticate inbound traffic. serverTlsPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL or EXTERNAL_MANAGED. For details which ServerTlsPolicy resources are accepted with INTERNAL_SELF_MANAGED and which with EXTERNAL, EXTERNAL_MANAGED loadBalancingScheme consult ServerTlsPolicy documentation. If left blank, communications are not encrypted. * `authentication`: [Deprecated] Use serverTlsPolicy instead. * `authorization_policy`: Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact. * `authorization`: [Deprecated] Use authorizationPolicy instead. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a TargetHttpsProxy. An up-to-date fingerprint must be provided in order to patch the TargetHttpsProxy; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the TargetHttpsProxy. * `http_keep_alive_timeout_sec`: Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value (610 seconds) will be used. For global external Application Load Balancers, the minimum allowed value is 5 seconds and the maximum allowed value is 1200 seconds. For classic Application Load Balancers, this option is not supported. * `tls_early_data`: Specifies whether TLS 1.3 0-RTT Data ("Early Data") should be accepted for this service. Early Data allows a TLS resumption handshake to include the initial application payload (a HTTP request) alongside the handshake, reducing the effective round trips to "zero". This applies to TLS 1.3 connections over TCP (HTTP/2) as well as over UDP (QUIC/h3). This can improve application performance, especially on networks where interruptions may be common, such as on mobile. Requests with Early Data will have the "Early-Data" HTTP header set on the request, with a value of "1", to allow the backend to determine whether Early Data was included. Note: TLS Early Data may allow requests to be replayed, as the data is sent to the backend before the handshake has fully completed. Applications that allow idempotent HTTP methods to make non-idempotent changes, such as a GET request updating a database, should not accept Early Data on those requests, and reject requests with the "Early-Data: 1" HTTP header by returning a HTTP 425 (Too Early) status code, in order to remain RFC compliant. The default value is DISABLED. Possible values: * DISABLED * PERMISSIVE * STRICT ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_url_map.md ================================================ +++ title = "google_compute_region_url_map resource" draft = false [menu.gcp] title = "google_compute_region_url_map" identifier = "inspec/resources/gcp/google_compute_region_url_map resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_url_map` InSpec audit resource to to test a Google Cloud RegionUrlMap resource. ## Examples ```ruby describe google_compute_region_url_map(project: 'chef-gcp-inspec', region: ' value_region', name: ' ') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } its('default_service') { should cmp 'value_defaultservice' } its('fingerprint') { should cmp 'value_fingerprint' } its('region') { should cmp 'value_region' } end describe google_compute_region_url_map(project: 'chef-gcp-inspec', region: ' value_region', name: ' ') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_url_map` resource: * `kind`: [Output Only] Type of the resource. Always compute#urlMaps for url maps. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `self_link`: [Output Only] Server-defined URL for the resource. * `host_rules`: The list of host rules to use against the URL. * `description`: An optional description of this resource. Provide this property when you create the resource. * `hosts`: The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. * `path_matcher`: The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. * `path_matchers`: The list of named PathMatchers to use against the URL. * `name`: The name to which this PathMatcher is referred by the HostRule. * `description`: An optional description of this resource. Provide this property when you create the resource. * `default_service`: The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use * `default_route_action`: * `weighted_backend_services`: A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number. After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. * `backend_service`: The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight. * `weight`: Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000. * `header_action`: The request and response header transformations that take effect before the request is passed along to the selected backendService. * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request before forwarding the request to the backendService. * `request_headers_to_add`: Headers to add to a matching request before forwarding the request to the backendService. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response before sending the response back to the client. * `response_headers_to_add`: Headers to add the response before sending the response back to the client. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `url_rewrite`: The spec for modifying the path before sending the request to the matched backend service. * `path_prefix_rewrite`: Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters. * `host_rewrite`: Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be from 1 to 255 characters. * `path_template_rewrite`: If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified. * `timeout`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `retry_policy`: The retry policy associates with HttpRouteRule * `retry_conditions`: Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: retry is attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all. For example, disconnects, reset, read timeout, connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. - connect-failure: a retry is attempted on failures connecting to the instance or endpoint. For example, connection timeouts. - retriable-4xx: a retry is attempted if the instance or endpoint responds with a 4xx response code. The only error that you can retry is error code 409. - refused-stream: a retry is attempted if the instance or endpoint resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: a retry is attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: a retry is attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: a retry is attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: a retry is attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: a retry is attempted if the gRPC status code in the response header is set to unavailable. Only the following codes are supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true. - cancelled - deadline-exceeded - internal - resource-exhausted - unavailable * `num_retries`: Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. * `per_try_timeout`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `request_mirror_policy`: A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. The load balancer doesn't wait for responses from the shadow service. Before sending traffic to the shadow service, the host or authority header is suffixed with -shadow. * `backend_service`: The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service. * `cors_policy`: The specification for allowing client-side cross-origin requests. For more information about the W3C recommendation for cross-origin resource sharing (CORS), see Fetch API Living Standard. * `allow_origins`: Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. * `allow_origin_regexes`: Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * `allow_methods`: Specifies the content for the Access-Control-Allow-Methods header. * `allow_headers`: Specifies the content for the Access-Control-Allow-Headers header. * `expose_headers`: Specifies the content for the Access-Control-Expose-Headers header. * `max_age`: Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header. * `allow_credentials`: In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false. * `disabled`: If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. * `fault_injection_policy`: The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by the load balancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the load balancer for a percentage of requests. * `delay`: Specifies the delay introduced by the load balancer before forwarding the request to the backend service as part of fault injection. * `fixed_delay`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `percentage`: The percentage of traffic for connections, operations, or requests for which a delay is introduced as part of fault injection. The value must be from 0.0 to 100.0 inclusive. * `abort`: Specification for how requests are aborted as part of fault injection. * `http_status`: The HTTP status code used to abort the request. The value must be from 200 to 599 inclusive. For gRPC protocol, the gRPC status code is mapped to HTTP status code according to this mapping table. HTTP status 200 is mapped to gRPC status UNKNOWN. Injecting an OK status is currently not supported by Traffic Director. * `percentage`: The percentage of traffic for connections, operations, or requests that is aborted as part of fault injection. The value must be from 0.0 to 100.0 inclusive. * `max_stream_duration`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `default_url_redirect`: Specifies settings for an HTTP redirect. * `host_redirect`: The host that is used in the redirect response instead of the one that was supplied in the request. The value must be from 1 to 255 characters. * `path_redirect`: The path that is used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request is used for the redirect. The value must be from 1 to 1024 characters. * `prefix_redirect`: The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request is used for the redirect. The value must be from 1 to 1024 characters. * `redirect_response_code`: The HTTP Status code to use for this RedirectAction. Supported values are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - FOUND, which corresponds to 302. - SEE_OTHER which corresponds to 303. - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method is retained. - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method is retained. Possible values: * FOUND * MOVED_PERMANENTLY_DEFAULT * PERMANENT_REDIRECT * SEE_OTHER * TEMPORARY_REDIRECT * `https_redirect`: If set to true, the URL scheme in the redirected request is set to HTTPS. If set to false, the URL scheme of the redirected request remains the same as that of the request. This must only be set for URL maps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. * `strip_query`: If set to true, any accompanying query portion of the original URL is removed before redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. * `path_rules`: The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. * `service`: The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. * `route_action`: * `weighted_backend_services`: A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number. After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. * `backend_service`: The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight. * `weight`: Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000. * `header_action`: The request and response header transformations that take effect before the request is passed along to the selected backendService. * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request before forwarding the request to the backendService. * `request_headers_to_add`: Headers to add to a matching request before forwarding the request to the backendService. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response before sending the response back to the client. * `response_headers_to_add`: Headers to add the response before sending the response back to the client. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `url_rewrite`: The spec for modifying the path before sending the request to the matched backend service. * `path_prefix_rewrite`: Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters. * `host_rewrite`: Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be from 1 to 255 characters. * `path_template_rewrite`: If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified. * `timeout`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `retry_policy`: The retry policy associates with HttpRouteRule * `retry_conditions`: Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: retry is attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all. For example, disconnects, reset, read timeout, connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. - connect-failure: a retry is attempted on failures connecting to the instance or endpoint. For example, connection timeouts. - retriable-4xx: a retry is attempted if the instance or endpoint responds with a 4xx response code. The only error that you can retry is error code 409. - refused-stream: a retry is attempted if the instance or endpoint resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: a retry is attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: a retry is attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: a retry is attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: a retry is attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: a retry is attempted if the gRPC status code in the response header is set to unavailable. Only the following codes are supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true. - cancelled - deadline-exceeded - internal - resource-exhausted - unavailable * `num_retries`: Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. * `per_try_timeout`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `request_mirror_policy`: A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. The load balancer doesn't wait for responses from the shadow service. Before sending traffic to the shadow service, the host or authority header is suffixed with -shadow. * `backend_service`: The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service. * `cors_policy`: The specification for allowing client-side cross-origin requests. For more information about the W3C recommendation for cross-origin resource sharing (CORS), see Fetch API Living Standard. * `allow_origins`: Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. * `allow_origin_regexes`: Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * `allow_methods`: Specifies the content for the Access-Control-Allow-Methods header. * `allow_headers`: Specifies the content for the Access-Control-Allow-Headers header. * `expose_headers`: Specifies the content for the Access-Control-Expose-Headers header. * `max_age`: Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header. * `allow_credentials`: In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false. * `disabled`: If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. * `fault_injection_policy`: The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by the load balancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the load balancer for a percentage of requests. * `delay`: Specifies the delay introduced by the load balancer before forwarding the request to the backend service as part of fault injection. * `fixed_delay`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `percentage`: The percentage of traffic for connections, operations, or requests for which a delay is introduced as part of fault injection. The value must be from 0.0 to 100.0 inclusive. * `abort`: Specification for how requests are aborted as part of fault injection. * `http_status`: The HTTP status code used to abort the request. The value must be from 200 to 599 inclusive. For gRPC protocol, the gRPC status code is mapped to HTTP status code according to this mapping table. HTTP status 200 is mapped to gRPC status UNKNOWN. Injecting an OK status is currently not supported by Traffic Director. * `percentage`: The percentage of traffic for connections, operations, or requests that is aborted as part of fault injection. The value must be from 0.0 to 100.0 inclusive. * `max_stream_duration`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `url_redirect`: Specifies settings for an HTTP redirect. * `host_redirect`: The host that is used in the redirect response instead of the one that was supplied in the request. The value must be from 1 to 255 characters. * `path_redirect`: The path that is used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request is used for the redirect. The value must be from 1 to 1024 characters. * `prefix_redirect`: The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request is used for the redirect. The value must be from 1 to 1024 characters. * `redirect_response_code`: The HTTP Status code to use for this RedirectAction. Supported values are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - FOUND, which corresponds to 302. - SEE_OTHER which corresponds to 303. - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method is retained. - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method is retained. Possible values: * FOUND * MOVED_PERMANENTLY_DEFAULT * PERMANENT_REDIRECT * SEE_OTHER * TEMPORARY_REDIRECT * `https_redirect`: If set to true, the URL scheme in the redirected request is set to HTTPS. If set to false, the URL scheme of the redirected request remains the same as that of the request. This must only be set for URL maps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. * `strip_query`: If set to true, any accompanying query portion of the original URL is removed before redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. * `paths`: The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. * `custom_error_response_policy`: Specifies the custom error response policy that must be applied when the backend service or backend bucket responds with an error. * `error_response_rules`: Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect. * `match_response_codes`: Valid values include: - A number between 400 and 599: For example 401 or 503, in which case the load balancer applies the policy if the error code exactly matches this value. - 5xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 500 to 599. - 4xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 400 to 499. Values must be unique within matchResponseCodes and across all errorResponseRules of CustomErrorResponsePolicy. * `path`: The full path to a file within backendBucket . For example: /errors/defaultError.html path must start with a leading slash. path cannot have trailing slashes. If the file is not available in backendBucket or the load balancer cannot reach the BackendBucket, a simple Not Found Error is returned to the client. The value must be from 1 to 1024 characters * `override_response_code`: The HTTP status code returned with the response containing the custom error content. If overrideResponseCode is not supplied, the same response code returned by the original backend bucket or backend service is returned to the client. * `error_service`: The full or partial URL to the BackendBucket resource that contains the custom error content. Examples are: - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket - compute/v1/projects/project/global/backendBuckets/myBackendBucket - global/backendBuckets/myBackendBucket If errorService is not specified at lower levels like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService. If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). errorService is not supported for internal or regional HTTP/HTTPS load balancers. * `route_rules`: The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. routeRules are evaluated in order of priority, from the lowest to highest number. Within a given pathMatcher, you can set only one of pathRules or routeRules. * `priority`: For routeRules within a given pathMatcher, priority determines the order in which a load balancer interprets routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number from 0 to 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules. * `description`: The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters. * `match_rules`: The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule. * `prefix_match`: For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /. The value must be from 1 to 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. * `full_path_match`: For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. fullPathMatch must be from 1 to 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. * `regex_match`: For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For more information about regular expression syntax, see Syntax. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * `ignore_case`: Specifies that prefixMatch and fullPathMatch matches are case sensitive. The default value is false. ignoreCase must not be used with regexMatch. Not supported when the URL map is bound to a target gRPC proxy. * `header_matches`: Specifies a list of header match criteria, all of which must match corresponding headers in the request. * `header_name`: The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`. * `exact_match`: The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. * `regex_match`: The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * `range_match`: HttpRouteRuleMatch criteria for field values that must stay within the specified integer range. * `range_start`: The start of the range (inclusive) in signed long integer format. * `range_end`: The end of the range (exclusive) in signed long integer format. * `present_match`: A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. * `prefix_match`: The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. * `suffix_match`: The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. * `invert_match`: If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false. * `query_parameter_matches`: Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Not supported when the URL map is bound to a target gRPC proxy. * `name`: The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails. * `present_match`: Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch, or regexMatch must be set. * `exact_match`: The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch, or regexMatch must be set. * `regex_match`: The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For more information about regular expression syntax, see Syntax. Only one of presentMatch, exactMatch, or regexMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * `metadata_filters`: Opaque filter criteria used by the load balancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to the load balancer, xDS clients present node metadata. When there is a match, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. If multiple metadata filters are specified, all of them need to be satisfied in order to be considered a match. metadataFilters specified here is applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to. metadataFilters only applies to load balancers that have loadBalancingScheme set to INTERNAL_SELF_MANAGED. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. * `filter_match_criteria`: Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata. Possible values: * MATCH_ALL * MATCH_ANY * NOT_SET * `filter_labels`: The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. * `name`: Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long. * `value`: The value of the label must match the specified value. value can have a maximum length of 1024 characters. * `path_template_match`: If specified, the route is a pattern match expression that must match the :path header once the query string is removed. A pattern match allows you to match - The value must be between 1 and 1024 characters - The pattern must start with a leading slash ("/") - There may be no more than 5 operators in pattern Precisely one of prefix_match, full_path_match, regex_match or path_template_match must be set. * `service`: The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. * `route_action`: * `weighted_backend_services`: A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number. After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. * `backend_service`: The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight. * `weight`: Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000. * `header_action`: The request and response header transformations that take effect before the request is passed along to the selected backendService. * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request before forwarding the request to the backendService. * `request_headers_to_add`: Headers to add to a matching request before forwarding the request to the backendService. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response before sending the response back to the client. * `response_headers_to_add`: Headers to add the response before sending the response back to the client. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `url_rewrite`: The spec for modifying the path before sending the request to the matched backend service. * `path_prefix_rewrite`: Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters. * `host_rewrite`: Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be from 1 to 255 characters. * `path_template_rewrite`: If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified. * `timeout`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `retry_policy`: The retry policy associates with HttpRouteRule * `retry_conditions`: Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: retry is attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all. For example, disconnects, reset, read timeout, connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. - connect-failure: a retry is attempted on failures connecting to the instance or endpoint. For example, connection timeouts. - retriable-4xx: a retry is attempted if the instance or endpoint responds with a 4xx response code. The only error that you can retry is error code 409. - refused-stream: a retry is attempted if the instance or endpoint resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: a retry is attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: a retry is attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: a retry is attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: a retry is attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: a retry is attempted if the gRPC status code in the response header is set to unavailable. Only the following codes are supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true. - cancelled - deadline-exceeded - internal - resource-exhausted - unavailable * `num_retries`: Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. * `per_try_timeout`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `request_mirror_policy`: A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. The load balancer doesn't wait for responses from the shadow service. Before sending traffic to the shadow service, the host or authority header is suffixed with -shadow. * `backend_service`: The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service. * `cors_policy`: The specification for allowing client-side cross-origin requests. For more information about the W3C recommendation for cross-origin resource sharing (CORS), see Fetch API Living Standard. * `allow_origins`: Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. * `allow_origin_regexes`: Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * `allow_methods`: Specifies the content for the Access-Control-Allow-Methods header. * `allow_headers`: Specifies the content for the Access-Control-Allow-Headers header. * `expose_headers`: Specifies the content for the Access-Control-Expose-Headers header. * `max_age`: Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header. * `allow_credentials`: In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false. * `disabled`: If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. * `fault_injection_policy`: The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by the load balancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the load balancer for a percentage of requests. * `delay`: Specifies the delay introduced by the load balancer before forwarding the request to the backend service as part of fault injection. * `fixed_delay`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `percentage`: The percentage of traffic for connections, operations, or requests for which a delay is introduced as part of fault injection. The value must be from 0.0 to 100.0 inclusive. * `abort`: Specification for how requests are aborted as part of fault injection. * `http_status`: The HTTP status code used to abort the request. The value must be from 200 to 599 inclusive. For gRPC protocol, the gRPC status code is mapped to HTTP status code according to this mapping table. HTTP status 200 is mapped to gRPC status UNKNOWN. Injecting an OK status is currently not supported by Traffic Director. * `percentage`: The percentage of traffic for connections, operations, or requests that is aborted as part of fault injection. The value must be from 0.0 to 100.0 inclusive. * `max_stream_duration`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `url_redirect`: Specifies settings for an HTTP redirect. * `host_redirect`: The host that is used in the redirect response instead of the one that was supplied in the request. The value must be from 1 to 255 characters. * `path_redirect`: The path that is used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request is used for the redirect. The value must be from 1 to 1024 characters. * `prefix_redirect`: The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request is used for the redirect. The value must be from 1 to 1024 characters. * `redirect_response_code`: The HTTP Status code to use for this RedirectAction. Supported values are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - FOUND, which corresponds to 302. - SEE_OTHER which corresponds to 303. - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method is retained. - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method is retained. Possible values: * FOUND * MOVED_PERMANENTLY_DEFAULT * PERMANENT_REDIRECT * SEE_OTHER * TEMPORARY_REDIRECT * `https_redirect`: If set to true, the URL scheme in the redirected request is set to HTTPS. If set to false, the URL scheme of the redirected request remains the same as that of the request. This must only be set for URL maps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. * `strip_query`: If set to true, any accompanying query portion of the original URL is removed before redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. * `header_action`: The request and response header transformations that take effect before the request is passed along to the selected backendService. * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request before forwarding the request to the backendService. * `request_headers_to_add`: Headers to add to a matching request before forwarding the request to the backendService. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response before sending the response back to the client. * `response_headers_to_add`: Headers to add the response before sending the response back to the client. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `http_filter_configs`: Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for load balancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. * `filter_name`: Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm * `config_type_url`: The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct * `config`: The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl * `http_filter_metadata`: Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for load balancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details. The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. * `filter_name`: Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm * `config_type_url`: The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct * `config`: The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl * `custom_error_response_policy`: Specifies the custom error response policy that must be applied when the backend service or backend bucket responds with an error. * `error_response_rules`: Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect. * `match_response_codes`: Valid values include: - A number between 400 and 599: For example 401 or 503, in which case the load balancer applies the policy if the error code exactly matches this value. - 5xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 500 to 599. - 4xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 400 to 499. Values must be unique within matchResponseCodes and across all errorResponseRules of CustomErrorResponsePolicy. * `path`: The full path to a file within backendBucket . For example: /errors/defaultError.html path must start with a leading slash. path cannot have trailing slashes. If the file is not available in backendBucket or the load balancer cannot reach the BackendBucket, a simple Not Found Error is returned to the client. The value must be from 1 to 1024 characters * `override_response_code`: The HTTP status code returned with the response containing the custom error content. If overrideResponseCode is not supplied, the same response code returned by the original backend bucket or backend service is returned to the client. * `error_service`: The full or partial URL to the BackendBucket resource that contains the custom error content. Examples are: - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket - compute/v1/projects/project/global/backendBuckets/myBackendBucket - global/backendBuckets/myBackendBucket If errorService is not specified at lower levels like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService. If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). errorService is not supported for internal or regional HTTP/HTTPS load balancers. * `header_action`: The request and response header transformations that take effect before the request is passed along to the selected backendService. * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request before forwarding the request to the backendService. * `request_headers_to_add`: Headers to add to a matching request before forwarding the request to the backendService. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response before sending the response back to the client. * `response_headers_to_add`: Headers to add the response before sending the response back to the client. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `default_custom_error_response_policy`: Specifies the custom error response policy that must be applied when the backend service or backend bucket responds with an error. * `error_response_rules`: Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect. * `match_response_codes`: Valid values include: - A number between 400 and 599: For example 401 or 503, in which case the load balancer applies the policy if the error code exactly matches this value. - 5xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 500 to 599. - 4xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 400 to 499. Values must be unique within matchResponseCodes and across all errorResponseRules of CustomErrorResponsePolicy. * `path`: The full path to a file within backendBucket . For example: /errors/defaultError.html path must start with a leading slash. path cannot have trailing slashes. If the file is not available in backendBucket or the load balancer cannot reach the BackendBucket, a simple Not Found Error is returned to the client. The value must be from 1 to 1024 characters * `override_response_code`: The HTTP status code returned with the response containing the custom error content. If overrideResponseCode is not supplied, the same response code returned by the original backend bucket or backend service is returned to the client. * `error_service`: The full or partial URL to the BackendBucket resource that contains the custom error content. Examples are: - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket - compute/v1/projects/project/global/backendBuckets/myBackendBucket - global/backendBuckets/myBackendBucket If errorService is not specified at lower levels like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService. If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). errorService is not supported for internal or regional HTTP/HTTPS load balancers. * `tests`: The list of expected URL mapping tests. Request to update the UrlMap succeeds only if all test cases pass. You can specify a maximum of 100 tests per UrlMap. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. * `description`: Description of this test case. * `host`: Host portion of the URL. If headers contains a host header, then host must also match the header value. * `path`: Path portion of the URL. * `backend_service_weight`: The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting. * `headers`: HTTP headers for this request. If headers contains a host header, then host must also match the header value. * `name`: Header name. * `value`: Header value. * `service`: Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set. * `expected_url_redirect`: The expected URL that should be redirected to for the host and path being tested. [Deprecated] This field is deprecated. Use expected_output_url instead. * `expected_output_url`: The expected output URL evaluated by the load balancer containing the scheme, host, path and query parameters. For rules that forward requests to backends, the test passes only when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any query parameters. expectedOutputUrl is optional when service is specified. * `expected_redirect_response_code`: For rules with urlRedirect, the test passes only if expectedRedirectResponseCode matches the HTTP status code in load balancer's redirect response. expectedRedirectResponseCode cannot be set when service is set. * `default_service`: The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. * `default_route_action`: * `weighted_backend_services`: A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number. After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. * `backend_service`: The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight. * `weight`: Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000. * `header_action`: The request and response header transformations that take effect before the request is passed along to the selected backendService. * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request before forwarding the request to the backendService. * `request_headers_to_add`: Headers to add to a matching request before forwarding the request to the backendService. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response before sending the response back to the client. * `response_headers_to_add`: Headers to add the response before sending the response back to the client. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `url_rewrite`: The spec for modifying the path before sending the request to the matched backend service. * `path_prefix_rewrite`: Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters. * `host_rewrite`: Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be from 1 to 255 characters. * `path_template_rewrite`: If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified. * `timeout`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `retry_policy`: The retry policy associates with HttpRouteRule * `retry_conditions`: Specifies one or more conditions when this retry policy applies. Valid values are: - 5xx: retry is attempted if the instance or endpoint responds with any 5xx response code, or if the instance or endpoint does not respond at all. For example, disconnects, reset, read timeout, connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. - connect-failure: a retry is attempted on failures connecting to the instance or endpoint. For example, connection timeouts. - retriable-4xx: a retry is attempted if the instance or endpoint responds with a 4xx response code. The only error that you can retry is error code 409. - refused-stream: a retry is attempted if the instance or endpoint resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: a retry is attempted if the gRPC status code in the response header is set to cancelled. - deadline-exceeded: a retry is attempted if the gRPC status code in the response header is set to deadline-exceeded. - internal: a retry is attempted if the gRPC status code in the response header is set to internal. - resource-exhausted: a retry is attempted if the gRPC status code in the response header is set to resource-exhausted. - unavailable: a retry is attempted if the gRPC status code in the response header is set to unavailable. Only the following codes are supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true. - cancelled - deadline-exceeded - internal - resource-exhausted - unavailable * `num_retries`: Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. * `per_try_timeout`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `request_mirror_policy`: A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. The load balancer doesn't wait for responses from the shadow service. Before sending traffic to the shadow service, the host or authority header is suffixed with -shadow. * `backend_service`: The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service. * `cors_policy`: The specification for allowing client-side cross-origin requests. For more information about the W3C recommendation for cross-origin resource sharing (CORS), see Fetch API Living Standard. * `allow_origins`: Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. * `allow_origin_regexes`: Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * `allow_methods`: Specifies the content for the Access-Control-Allow-Methods header. * `allow_headers`: Specifies the content for the Access-Control-Allow-Headers header. * `expose_headers`: Specifies the content for the Access-Control-Expose-Headers header. * `max_age`: Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header. * `allow_credentials`: In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false. * `disabled`: If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. * `fault_injection_policy`: The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by the load balancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the load balancer for a percentage of requests. * `delay`: Specifies the delay introduced by the load balancer before forwarding the request to the backend service as part of fault injection. * `fixed_delay`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `percentage`: The percentage of traffic for connections, operations, or requests for which a delay is introduced as part of fault injection. The value must be from 0.0 to 100.0 inclusive. * `abort`: Specification for how requests are aborted as part of fault injection. * `http_status`: The HTTP status code used to abort the request. The value must be from 200 to 599 inclusive. For gRPC protocol, the gRPC status code is mapped to HTTP status code according to this mapping table. HTTP status 200 is mapped to gRPC status UNKNOWN. Injecting an OK status is currently not supported by Traffic Director. * `percentage`: The percentage of traffic for connections, operations, or requests that is aborted as part of fault injection. The value must be from 0.0 to 100.0 inclusive. * `max_stream_duration`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. * `default_url_redirect`: Specifies settings for an HTTP redirect. * `host_redirect`: The host that is used in the redirect response instead of the one that was supplied in the request. The value must be from 1 to 255 characters. * `path_redirect`: The path that is used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request is used for the redirect. The value must be from 1 to 1024 characters. * `prefix_redirect`: The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request is used for the redirect. The value must be from 1 to 1024 characters. * `redirect_response_code`: The HTTP Status code to use for this RedirectAction. Supported values are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - FOUND, which corresponds to 302. - SEE_OTHER which corresponds to 303. - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method is retained. - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method is retained. Possible values: * FOUND * MOVED_PERMANENTLY_DEFAULT * PERMANENT_REDIRECT * SEE_OTHER * TEMPORARY_REDIRECT * `https_redirect`: If set to true, the URL scheme in the redirected request is set to HTTPS. If set to false, the URL scheme of the redirected request remains the same as that of the request. This must only be set for URL maps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. * `strip_query`: If set to true, any accompanying query portion of the original URL is removed before redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. * `header_action`: The request and response header transformations that take effect before the request is passed along to the selected backendService. * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request before forwarding the request to the backendService. * `request_headers_to_add`: Headers to add to a matching request before forwarding the request to the backendService. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response before sending the response back to the client. * `response_headers_to_add`: Headers to add the response before sending the response back to the client. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. * `default_custom_error_response_policy`: Specifies the custom error response policy that must be applied when the backend service or backend bucket responds with an error. * `error_response_rules`: Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect. * `match_response_codes`: Valid values include: - A number between 400 and 599: For example 401 or 503, in which case the load balancer applies the policy if the error code exactly matches this value. - 5xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 500 to 599. - 4xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 400 to 499. Values must be unique within matchResponseCodes and across all errorResponseRules of CustomErrorResponsePolicy. * `path`: The full path to a file within backendBucket . For example: /errors/defaultError.html path must start with a leading slash. path cannot have trailing slashes. If the file is not available in backendBucket or the load balancer cannot reach the BackendBucket, a simple Not Found Error is returned to the client. The value must be from 1 to 1024 characters * `override_response_code`: The HTTP status code returned with the response containing the custom error content. If overrideResponseCode is not supplied, the same response code returned by the original backend bucket or backend service is returned to the client. * `error_service`: The full or partial URL to the BackendBucket resource that contains the custom error content. Examples are: - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket - compute/v1/projects/project/global/backendBuckets/myBackendBucket - global/backendBuckets/myBackendBucket If errorService is not specified at lower levels like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService. If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). errorService is not supported for internal or regional HTTP/HTTPS load balancers. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field is ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a UrlMap. * `region`: [Output Only] URL of the region where the regional URL map resides. This field is not applicable to global URL maps. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_region_url_maps.md ================================================ +++ title = "google_compute_region_url_maps resource" draft = false [menu.gcp] title = "google_compute_region_url_maps" identifier = "inspec/resources/gcp/google_compute_region_url_maps resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_region_url_maps` InSpec audit resource to to test a Google Cloud RegionUrlMap resource. ## Examples ```ruby describe google_compute_region_url_maps(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_region_url_maps` resource: See [google_compute_region_url_map](google_compute_region_url_map) for more detailed information. * `kinds`: an array of `google_compute_region_url_map` kind * `ids`: an array of `google_compute_region_url_map` id * `creation_timestamps`: an array of `google_compute_region_url_map` creation_timestamp * `names`: an array of `google_compute_region_url_map` name * `descriptions`: an array of `google_compute_region_url_map` description * `self_links`: an array of `google_compute_region_url_map` self_link * `host_rules`: an array of `google_compute_region_url_map` host_rules * `path_matchers`: an array of `google_compute_region_url_map` path_matchers * `tests`: an array of `google_compute_region_url_map` tests * `default_services`: an array of `google_compute_region_url_map` default_service * `default_route_actions`: an array of `google_compute_region_url_map` default_route_action * `default_url_redirects`: an array of `google_compute_region_url_map` default_url_redirect * `header_actions`: an array of `google_compute_region_url_map` header_action * `default_custom_error_response_policies`: an array of `google_compute_region_url_map` default_custom_error_response_policy * `fingerprints`: an array of `google_compute_region_url_map` fingerprint * `regions`: an array of `google_compute_region_url_map` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_regional_disk.md ================================================ +++ title = "google_compute_regional_disk resource" draft = false [menu.gcp] title = "google_compute_regional_disk" identifier = "inspec/resources/gcp/google_compute_regional_disk resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_regional_disk` is used to test a Google Regional Disk resource. ## Examples ```ruby describe google_compute_regional_disk(project: 'chef-gcp-inspec', name: 'my_disk', region: 'region') do it { should exist } its('type') { should match 'pd-standard' } end describe.one do google_compute_regional_disk(project: 'chef-gcp-inspec', name: 'my_disk', region: 'region').labels.each_pair do |key, value| describe key do it { should cmp "environment" } end end end describe google_compute_regional_disk(project: 'chef-gcp-inspec', name: 'nonexistent', region: 'region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_regional_disk` resource: * `label_fingerprint`: The fingerprint used for optimistic locking of this resource. Used internally during updates. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `size_gb`: Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. * `physical_block_size_bytes`: Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. * `type`: URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. * `region`: A reference to the region where the disk resides. * `replica_zones`: A reference to the zones where the disk resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_regional_disks.md ================================================ +++ title = "google_compute_regional_disks resource" draft = false [menu.gcp] title = "google_compute_regional_disks" identifier = "inspec/resources/gcp/google_compute_regional_disks resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_regional_disks` is used to test a Google Regional Disk resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby most_recent_image = google_compute_image(project: 'debian-cloud', name: 'debian-10-buster-v20191014') describe google_compute_regional_disks(project: 'chef-gcp-inspec', region: 'region') do it { should exist } its('names') { should include 'inspec-snapshot-disk' } its('source_images') { should include most_recent_image.self_link } end ``` ## Properties Properties that can be accessed from the `google_compute_regional_disks` resource: See [google_compute_regional_disk](google_compute_regional_disk) for more detailed information. * `ids`: an array of `google_compute_regional_disk` id * `creation_timestamps`: an array of `google_compute_regional_disk` creation_timestamp * `names`: an array of `google_compute_regional_disk` name * `descriptions`: an array of `google_compute_regional_disk` description * `size_gbs`: an array of `google_compute_regional_disk` size_gb * `zones`: an array of `google_compute_zoneal_disk` zone * `source_snapshots`: an array of `google_compute_regional_disk` source_snapshot * `source_snapshot_encryption_keys`: an array of `google_compute_regional_disk` source_snapshot_encryption_key * `source_snapshot_ids`: an array of `google_compute_regional_disk` source_snapshot_id * `source_images`: an array of `google_compute_regional_disk` source_image * `source_image_ids`: an array of `google_compute_regional_disk` source_image_id * `source_image_encryption_keys`: an array of `google_compute_regional_disk` source_image_encryption_key * `types`: an array of `google_compute_regional_disk` type * `licenses`: an array of `google_compute_regional_disk` licenses * `last_attach_timestamps`: an array of `google_compute_regional_disk` last_attach_timestamp * `last_detach_timestamps`: an array of `google_compute_regional_disk` last_detach_timestamp * `users`: an array of `google_compute_regional_disk` users * `disk_encryption_keys`: an array of `google_compute_regional_disk` disk_encryption_key * `labels`: an array of `google_compute_regional_disk` labels * `label_fingerprints`: an array of `google_compute_regional_disk` label_fingerprint * `physical_block_size_bytes`: an array of `google_compute_regional_disk` physical_block_size_bytes * `regions`: an array of `google_compute_regional_disk` region * `replica_zones`: an array of `google_compute_regional_disk` replica_zone * `statuses`: an array of `google_compute_statusal_disk` status ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_regions.md ================================================ +++ title = "google_compute_regions resource" draft = false [menu.gcp] title = "google_compute_regions" identifier = "inspec/resources/gcp/google_compute_regions resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_regions` is used to test a Google Region resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_regions(project: 'chef-gcp-inspec') do its('count') { should be >= 1 } its('region_names') { should include "#{gcp_location}" } its('region_statuses') { should_not include "DOWN" } its('region_ids') { should include "1290" } end ``` ### Use this InSpec resource to enumerate IDs then test in-depth using `google_compute_region` ``` google_compute_regions(project: 'chef-inspec-gcp').region_names.each do |region_name| describe google_compute_region(project: 'chef-inspec-gcp', region: region_name) do it { should be_up } end end ``` ### Test that there are more than a specified number of regions available for the project ``` describe google_compute_regions(project: 'chef-inspec-gcp') do its('count') { should be >= 10} end ``` ### Test that an expected region is available for the project ``` describe google_compute_regions(project: 'chef-inspec-gcp') do its('region_names') { should include 'europe-west2' } end ``` ### Test whether any regions are in status "DOWN" ``` describe google_compute_regions(project: 'chef-inspec-gcp') do its('region_statuses') { should_not include "DOWN" } end ``` ### Test that a subset of all regions matching "europe*" are "UP" ``` google_compute_regions(project: gcp_project_id).where(region_name: /^europe/).region_names.each do |region_name| describe google_compute_region(project: 'chef-inspec-gcp', region: region_name) do it { should be_up } end end ``` ## Properties Properties that can be accessed from the `google_compute_regions` resource: See [google_compute_region](google_compute_region) for more detailed information. * `creation_timestamps`: an array of `google_compute_region` creation_timestamp * `deprecateds`: an array of `google_compute_region` deprecated * `descriptions`: an array of `google_compute_region` description * `region_ids`: an array of `google_compute_region` id * `region_names`: an array of `google_compute_region` name * `quotas`: an array of `google_compute_region` quotas * `region_statuses`: an array of `google_compute_region` status * `zones`: an array of `google_compute_region` zones ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_reservation.md ================================================ +++ title = "google_compute_reservation resource" draft = false [menu.gcp] title = "google_compute_reservation" identifier = "inspec/resources/gcp/google_compute_reservation resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_reservation` InSpec audit resource to to test a Google Cloud Reservation resource. ## Examples ```ruby describe google_compute_reservation(project: 'chef-gcp-inspec', name: ' value_name', zone: ' value_zone') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('zone') { should cmp 'value_zone' } its('description') { should cmp 'value_description' } its('name') { should cmp 'value_name' } its('commitment') { should cmp 'value_commitment' } its('status') { should cmp 'value_status' } its('delete_at_time') { should cmp 'value_deleteattime' } end describe google_compute_reservation(project: 'chef-gcp-inspec', name: "does_not_exit", zone: ' value_zone') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_reservation` resource: * `kind`: [Output Only] Type of the resource. Always compute#reservations for reservations. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `self_link`: [Output Only] Server-defined fully-qualified URL for this resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `zone`: Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment. * `description`: An optional description of this resource. Provide this property when you create the resource. * `name`: The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `specific_reservation`: This reservation type allows to pre allocate specific instance configuration. Next ID: 6 * `instance_properties`: Properties of the SKU instances being reserved. Next ID: 9 * `machine_type`: Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. * `guest_accelerators`: Specifies accelerator type and count. * `accelerator_type`: Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types. * `accelerator_count`: The number of the guest accelerator cards exposed to this instance. * `min_cpu_platform`: Minimum cpu platform the reservation. * `local_ssds`: Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. * `disk_size_gb`: Specifies the size of the disk in base-2 GB. * `interface`: Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. Possible values: * NVDIMM * NVME * SCSI * `maintenance_freeze_duration_hours`: Specifies the number of hours after reservation creation where instances using the reservation won't be scheduled for maintenance. * `location_hint`: An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API. * `maintenance_interval`: Specifies the frequency of planned maintenance events. The accepted values are: `PERIODIC`. Possible values: * AS_NEEDED * PERIODIC * RECURRENT * `count`: Specifies the number of resources that are allocated. * `in_use_count`: [Output Only] Indicates how many instances are in use. * `assured_count`: [Output Only] Indicates how many instances are actually usable currently. * `source_instance_template`: Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field. This field is optional, and it can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate * `aggregate_reservation`: This reservation type is specified by total resource amounts (e.g. total count of CPUs) and can account for multiple instance SKUs. In other words, one can create instances of varying shapes against this reservation. * `vm_family`: The VM family that all instances scheduled against this reservation must belong to. Possible values: * VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L * VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP * VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P * `reserved_resources`: List of reserved resources (CPUs, memory, accelerators). * `accelerator`: * `accelerator_count`: Number of accelerators of specified type. * `accelerator_type`: Full or partial URL to accelerator type. e.g. "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l" * `in_use_resources`: [Output only] List of resources currently in use. * `accelerator`: * `accelerator_count`: Number of accelerators of specified type. * `accelerator_type`: Full or partial URL to accelerator type. e.g. "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l" * `workload_type`: The workload type of the instances that will target this reservation. Possible values: * BATCH * SERVING * UNSPECIFIED * `commitment`: [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. * `specific_reservation_required`: Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation. * `status`: [Output Only] The status of the reservation. Possible values: * CREATING * DELETING * INVALID * READY * UPDATING * `share_settings`: The share setting for reservations and sole tenancy node groups. * `share_type`: Type of sharing for this shared-reservation Possible values: * DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS * LOCAL * ORGANIZATION * SHARE_TYPE_UNSPECIFIED * SPECIFIC_PROJECTS * `projects`: A List of Project names to specify consumer projects for this shared-reservation. This is only valid when share_type's value is SPECIFIC_PROJECTS. * `project_map`: A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS. * `additional_properties`: Config for each project in the share settings. * `folder_map`: A map of folder id and folder config to specify consumer projects for this shared-reservation. This is only valid when share_type's value is DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS. Folder id should be a string of number, and without "folders/" prefix. * `additional_properties`: Config for each folder in the share settings. * `satisfies_pzs`: [Output Only] Reserved for future use. * `resource_policies`: Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation. * `additional_properties`: * `resource_status`: [Output Only] Contains output only fields. * `specific_sku_allocation`: Contains Properties set for the reservation. * `source_instance_template_id`: ID of the instance template used to populate reservation properties. * `delete_at_time`: Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. * `delete_after_duration`: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_reservations.md ================================================ +++ title = "google_compute_reservations resource" draft = false [menu.gcp] title = "google_compute_reservations" identifier = "inspec/resources/gcp/google_compute_reservations resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_reservations` InSpec audit resource to to test a Google Cloud Reservation resource. ## Examples ```ruby describe google_compute_reservations(project: 'chef-gcp-inspec', zone: ' value_zone') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_reservations` resource: See [google_compute_reservation](google_compute_reservation) for more detailed information. * `kinds`: an array of `google_compute_reservation` kind * `ids`: an array of `google_compute_reservation` id * `creation_timestamps`: an array of `google_compute_reservation` creation_timestamp * `self_links`: an array of `google_compute_reservation` self_link * `self_link_with_ids`: an array of `google_compute_reservation` self_link_with_id * `zones`: an array of `google_compute_reservation` zone * `descriptions`: an array of `google_compute_reservation` description * `names`: an array of `google_compute_reservation` name * `specific_reservations`: an array of `google_compute_reservation` specific_reservation * `aggregate_reservations`: an array of `google_compute_reservation` aggregate_reservation * `commitments`: an array of `google_compute_reservation` commitment * `specific_reservation_requireds`: an array of `google_compute_reservation` specific_reservation_required * `statuses`: an array of `google_compute_reservation` status * `share_settings`: an array of `google_compute_reservation` share_settings * `satisfies_pzs`: an array of `google_compute_reservation` satisfies_pzs * `resource_policies`: an array of `google_compute_reservation` resource_policies * `resource_statuses`: an array of `google_compute_reservation` resource_status * `delete_at_times`: an array of `google_compute_reservation` delete_at_time * `delete_after_durations`: an array of `google_compute_reservation` delete_after_duration ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_resource_policies.md ================================================ +++ title = "google_compute_resource_policies resource" draft = false [menu.gcp] title = "google_compute_resource_policies" identifier = "inspec/resources/gcp/google_compute_resource_policies resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_resource_policies` InSpec audit resource to to test a Google Cloud ResourcePolicy resource. ## Examples ```ruby describe google_compute_resource_policies(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_resource_policies` resource: See [google_compute_resource_policy](google_compute_resource_policy) for more detailed information. * `kinds`: an array of `google_compute_resource_policy` kind * `ids`: an array of `google_compute_resource_policy` id * `creation_timestamps`: an array of `google_compute_resource_policy` creation_timestamp * `self_links`: an array of `google_compute_resource_policy` self_link * `self_link_with_ids`: an array of `google_compute_resource_policy` self_link_with_id * `regions`: an array of `google_compute_resource_policy` region * `descriptions`: an array of `google_compute_resource_policy` description * `names`: an array of `google_compute_resource_policy` name * `vm_maintenance_policies`: an array of `google_compute_resource_policy` vm_maintenance_policy * `snapshot_schedule_policies`: an array of `google_compute_resource_policy` snapshot_schedule_policy * `group_placement_policies`: an array of `google_compute_resource_policy` group_placement_policy * `instance_schedule_policies`: an array of `google_compute_resource_policy` instance_schedule_policy * `statuses`: an array of `google_compute_resource_policy` status * `resource_statuses`: an array of `google_compute_resource_policy` resource_status ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_resource_policy.md ================================================ +++ title = "google_compute_resource_policy resource" draft = false [menu.gcp] title = "google_compute_resource_policy" identifier = "inspec/resources/gcp/google_compute_resource_policy resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_resource_policy` InSpec audit resource to to test a Google Cloud ResourcePolicy resource. ## Examples ```ruby describe google_compute_resource_policy(project: 'chef-gcp-inspec', region: 'value_region', name: 'value_name') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('region') { should cmp 'value_region' } its('description') { should cmp 'value_description' } its('name') { should cmp 'value_name' } its('status') { should cmp 'value_status' } end describe google_compute_resource_policy(project: 'chef-gcp-inspec', region: ' value_region', name: 'value_name') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_resource_policy` resource: * `kind`: [Output Only] Type of the resource. Always compute#resource_policies for resource policies. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `self_link`: [Output Only] Server-defined fully-qualified URL for this resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `region`: * `description`: * `name`: The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `vm_maintenance_policy`: * `maintenance_window`: A maintenance window for VMs. When set, we restrict our maintenance operations to this window. * `daily_maintenance_window`: Time window specified for daily operations. * `days_in_cycle`: Defines a schedule with units measured in days. The value determines how many days pass between the start of each cycle. * `start_time`: Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid. * `duration`: [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario. * `concurrency_control_group`: A concurrency control configuration. Defines a group config that, when attached to an instance, recognizes that instance as part of a group of instances where only up the concurrency_limit of instances in that group can undergo simultaneous maintenance. For more information: go/concurrency-control-design-doc * `concurrency_limit`: * `snapshot_schedule_policy`: A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained. * `schedule`: A schedule for disks where the schedueled operations are performed. * `hourly_schedule`: Time window specified for hourly operations. * `hours_in_cycle`: Defines a schedule with units measured in hours. The value determines how many hours pass between the start of each cycle. * `start_time`: Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. * `duration`: [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario. * `daily_schedule`: Time window specified for daily operations. * `days_in_cycle`: Defines a schedule with units measured in days. The value determines how many days pass between the start of each cycle. * `start_time`: Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid. * `duration`: [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario. * `weekly_schedule`: Time window specified for weekly operations. * `day_of_weeks`: Up to 7 intervals/windows, one for each day of the week. * `day`: Defines a schedule that runs on specific days of the week. Specify one or more days. The following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY. Possible values: * FRIDAY * INVALID * MONDAY * SATURDAY * SUNDAY * THURSDAY * TUESDAY * WEDNESDAY * `start_time`: Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. * `duration`: [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario. * `retention_policy`: Policy for retention of scheduled snapshots. * `max_retention_days`: Maximum age of the snapshot that is allowed to be kept. * `on_policy_switch`: Possible values: * DO_NOT_RETROACTIVELY_APPLY * RETROACTIVELY_APPLY * UNSPECIFIED_ON_POLICY_SWITCH * `on_source_disk_delete`: Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Possible values: * APPLY_RETENTION_POLICY * KEEP_AUTO_SNAPSHOTS * UNSPECIFIED_ON_SOURCE_DISK_DELETE * `snapshot_properties`: Specified snapshot properties for scheduled snapshots created by this policy. * `labels`: Labels to apply to scheduled snapshots. These can be later modified by the setLabels method. Label values may be empty. * `additional_properties`: * `storage_locations`: Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional). * `guest_flush`: Indication to perform a 'guest aware' snapshot. * `chain_name`: Chain name that the snapshot is created in. * `group_placement_policy`: A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation as well as network locality * `style`: Specifies instances to hosts placement relationship Possible values: * COMPACT * FULLY_SPREAD * UNSPECIFIED_PLACEMENT_TYPE * `locality`: Specifies network locality Possible values: * BEST_EFFORT * STRICT * UNSPECIFIED_LOCALITY * `vm_count`: Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs. * `availability_domain_count`: The number of availability domains to spread instances across. If two instances are in different availability domain, they are not in the same low latency network. * `collocation`: Specifies network collocation Possible values: * CLUSTERED * COLLOCATED * UNSPECIFIED_COLLOCATION * `scope`: Scope specifies the availability domain to which the VMs should be spread. Possible values: * HOST * UNSPECIFIED_SCOPE * `tpu_topology`: Specifies the shape of the TPU slice * `max_distance`: Specifies the number of max logical switches. * `slice_count`: Specifies the number of slices in a multislice workload. * `instance_schedule_policy`: An InstanceSchedulePolicy specifies when and how frequent certain operations are performed on the instance. * `vm_start_schedule`: Schedule for an instance operation. * `schedule`: Specifies the frequency for the operation, using the unix-cron format. * `vm_stop_schedule`: Schedule for an instance operation. * `schedule`: Specifies the frequency for the operation, using the unix-cron format. * `time_zone`: Specifies the time zone to be used in interpreting Schedule.schedule. The value of this field must be a time zone name from the tz database: https://wikipedia.org/wiki/Tz_database. * `start_time`: The start time of the schedule. The timestamp is an RFC3339 string. * `expiration_time`: The expiration time of the schedule. The timestamp is an RFC3339 string. * `status`: [Output Only] The status of resource policy creation. Possible values: * CREATING * DELETING * EXPIRED * INVALID * READY * `resource_status`: Contains output only fields. Use this sub-message for all output fields set on ResourcePolicy. The internal structure of this "status" field should mimic the structure of ResourcePolicy proto specification. * `instance_schedule_policy`: * `next_run_start_time`: [Output Only] The next time the schedule is planned to run. The actual time might be slightly different. The timestamp is an RFC3339 string. * `last_run_start_time`: [Output Only] The last time the schedule successfully ran. The timestamp is an RFC3339 string. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_route.md ================================================ +++ title = "google_compute_route resource" draft = false [menu.gcp] title = "google_compute_route" identifier = "inspec/resources/gcp/google_compute_route resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_route` is used to test a Google Route resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_route(project: 'chef-gcp-inspec', name: 'inspec-gcp-route') do it { should exist } its('dest_range') { should eq '15.0.0.0/24' } its('network') { should match /\/gcp-inspec-network$/ } its('next_hop_ip') { should eq '10.2.0.1' } its('priority') { should eq '100' } end describe google_compute_route(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_route` resource: * `dest_range`: The destination range of outgoing packets that this route applies to. Only IPv4 is supported. * `description`: An optional description of this resource. Provide this property when you create the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `network`: The network that this route applies to. * `priority`: The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535. * `tags`: A list of instance tags to which this route applies. * `next_hop_gateway`: URL to a gateway that should handle matching packets. Currently, you can only specify the internet gateway, using a full or partial valid URL: * https://www.googleapis.com/compute/v1/projects/project/ global/gateways/default-internet-gateway * projects/project/global/gateways/default-internet-gateway * global/gateways/default-internet-gateway * `next_hop_instance`: URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: * https://www.googleapis.com/compute/v1/projects/project/zones/zone/ instances/instance * projects/project/zones/zone/instances/instance * zones/zone/instances/instance * `next_hop_ip`: Network IP address of an instance that should handle matching packets. * `next_hop_vpn_tunnel`: URL to a VpnTunnel that should handle matching packets. * `next_hop_network`: URL to a Network that should handle matching packets. * `next_hop_ilb`: The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule regions/region/forwardingRules/forwardingRule Note that this can only be used when the destinationRange is a public (non-RFC 1918) IP CIDR range. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_router.md ================================================ +++ title = "google_compute_router resource" draft = false [menu.gcp] title = "google_compute_router" identifier = "inspec/resources/gcp/google_compute_router resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_router` is used to test a Google Router resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_router(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'inspec-gcp-router') do it { should exist } its('bgp.asn') { should eq '64514' } its('bgp.advertise_mode') { should eq 'CUSTOM' } its('bgp.advertised_groups') { should include 'ALL_SUBNETS' } its('bgp.advertised_ip_ranges.count') { should eq 2 } its('bgp.advertised_ip_ranges.first.range') { should eq '1.2.3.4' } its('bgp.advertised_ip_ranges.last.range') { should eq '1.2.3.4' } its('network') { should match /\/gcp-inspec-network$/ } end describe google_compute_router(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_router` resource: * `id`: The unique identifier for the resource. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `name`: Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. * `network`: A reference to the network to which this router belongs. * `bgp`: BGP information specific to this router. * `asn`: Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. * `advertise_mode`: User-specified flag to indicate which mode to use for advertisement. Possible values: * DEFAULT * CUSTOM * `advertised_groups`: User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETS * `advertised_ip_ranges`: User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. * `range`: The IP range to advertise. The value must be a CIDR-formatted string. * `description`: User-specified description for the IP range. * `region`: Region where the router resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_router_nat.md ================================================ +++ title = "google_compute_router_nat resource" draft = false [menu.gcp] title = "google_compute_router_nat" identifier = "inspec/resources/gcp/google_compute_router_nat resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_router_nat` is used to test a Google RouterNat resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_router_nat(project: 'chef-gcp-inspec', region: 'europe-west2', router: 'inspec-gcp-router', name: 'inspec-router-nat') do it { should exist } its('nat_ip_allocate_option') { should cmp 'AUTO_ONLY' } its('source_subnetwork_ip_ranges_to_nat') { should cmp 'ALL_SUBNETWORKS_ALL_IP_RANGES' } its('min_ports_per_vm') { should cmp '2' } its('log_config.enable') { should cmp 'true' } its('log_config.filter') { should cmp 'ERRORS_ONLY' } end describe google_compute_router(project: 'chef-gcp-inspec', region: 'europe-west2', router: 'nonexistent', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_router_nat` resource: * `name`: Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035. * `nat_ip_allocate_option`: How external IPs should be allocated for this NAT. Valid values are `AUTO_ONLY` for only allowing NAT IPs allocated by Google Cloud Platform, or `MANUAL_ONLY` for only user-allocated NAT IP addresses. Possible values: * MANUAL_ONLY * AUTO_ONLY * `nat_ips`: Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY. * `drain_nat_ips`: A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. * `source_subnetwork_ip_ranges_to_nat`: How NAT should be configured per Subnetwork. If `ALL_SUBNETWORKS_ALL_IP_RANGES`, all of the IP ranges in every Subnetwork are allowed to Nat. If `ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES`, all of the primary IP ranges in every Subnetwork are allowed to Nat. `LIST_OF_SUBNETWORKS`: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region. Possible values: * ALL_SUBNETWORKS_ALL_IP_RANGES * ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES * LIST_OF_SUBNETWORKS * `subnetwork`: One or more subnetwork NAT configurations. Only used if `source_subnetwork_ip_ranges_to_nat` is set to `LIST_OF_SUBNETWORKS` * `name`: Self-link of subnetwork to NAT * `source_ip_ranges_to_nat`: List of options for which source IPs in the subnetwork should have NAT enabled. Supported values include: `ALL_IP_RANGES`, `LIST_OF_SECONDARY_IP_RANGES`, `PRIMARY_IP_RANGE`. * `secondary_ip_range_names`: List of the secondary ranges of the subnetwork that are allowed to use NAT. This can be populated only if `LIST_OF_SECONDARY_IP_RANGES` is one of the values in sourceIpRangesToNat * `min_ports_per_vm`: Minimum number of ports allocated to a VM from this NAT. * `udp_idle_timeout_sec`: Timeout (in seconds) for UDP connections. Defaults to 30s if not set. * `icmp_idle_timeout_sec`: Timeout (in seconds) for ICMP connections. Defaults to 30s if not set. * `tcp_established_idle_timeout_sec`: Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set. * `tcp_transitory_idle_timeout_sec`: Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set. * `log_config`: Configuration for logging on NAT * `enable`: Indicates whether or not to export logs. * `filter`: Specifies the desired filtering of logs on this NAT. Possible values: * ERRORS_ONLY * TRANSLATIONS_ONLY * ALL * `enable_endpoint_independent_mapping`: Specifies if endpoint independent mapping is enabled. This is enabled by default. For more information see the [official documentation](https://cloud.google.com/nat/docs/overview#specs-rfcs). * `router`: The name of the Cloud Router in which this NAT will be configured. * `region`: Region where the router and NAT reside. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_router_nats.md ================================================ +++ title = "google_compute_router_nats resource" draft = false [menu.gcp] title = "google_compute_router_nats" identifier = "inspec/resources/gcp/google_compute_router_nats resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_router_nats` is used to test a Google RouterNat resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_router_nats(project: 'chef-gcp-inspec', region: 'europe-west2', router: 'inspec-gcp-router') do its('names') { should include 'inspec-router-nat' } end ``` ## Properties Properties that can be accessed from the `google_compute_router_nats` resource: See [google_compute_router_nat](google_compute_router_nat) for more detailed information. * `names`: an array of `google_compute_router_nat` name * `nat_ip_allocate_options`: an array of `google_compute_router_nat` nat_ip_allocate_option * `nat_ips`: an array of `google_compute_router_nat` nat_ips * `drain_nat_ips`: an array of `google_compute_router_nat` drain_nat_ips * `source_subnetwork_ip_ranges_to_nats`: an array of `google_compute_router_nat` source_subnetwork_ip_ranges_to_nat * `subnetworks`: an array of `google_compute_router_nat` subnetwork * `min_ports_per_vms`: an array of `google_compute_router_nat` min_ports_per_vm * `udp_idle_timeout_secs`: an array of `google_compute_router_nat` udp_idle_timeout_sec * `icmp_idle_timeout_secs`: an array of `google_compute_router_nat` icmp_idle_timeout_sec * `tcp_established_idle_timeout_secs`: an array of `google_compute_router_nat` tcp_established_idle_timeout_sec * `tcp_transitory_idle_timeout_secs`: an array of `google_compute_router_nat` tcp_transitory_idle_timeout_sec * `log_configs`: an array of `google_compute_router_nat` log_config * `enable_endpoint_independent_mappings`: an array of `google_compute_router_nat` enable_endpoint_independent_mapping * `routers`: an array of `google_compute_router_nat` router * `regions`: an array of `google_compute_router_nat` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_routers.md ================================================ +++ title = "google_compute_routers resource" draft = false [menu.gcp] title = "google_compute_routers" identifier = "inspec/resources/gcp/google_compute_routers resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_routers` is used to test a Google Router resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_routers(project: 'chef-gcp-inspec', region: 'europe-west2') do its('names') { should include 'inspec-gcp-router' } end ``` ## Properties Properties that can be accessed from the `google_compute_routers` resource: See [google_compute_router](google_compute_router) for more detailed information. * `ids`: an array of `google_compute_router` id * `creation_timestamps`: an array of `google_compute_router` creation_timestamp * `names`: an array of `google_compute_router` name * `descriptions`: an array of `google_compute_router` description * `networks`: an array of `google_compute_router` network * `bgps`: an array of `google_compute_router` bgp * `regions`: an array of `google_compute_router` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_routes.md ================================================ +++ title = "google_compute_routes resource" draft = false [menu.gcp] title = "google_compute_routes" identifier = "inspec/resources/gcp/google_compute_routes resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_routes` is used to test a Google Route resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_routes(project: 'chef-gcp-inspec') do its('count') { should be >= 1 } its('dest_ranges') { should include '15.0.0.0/24' } its('next_hop_ips') { should include '10.2.0.1' } its('priorities') { should include '100' } end ``` ## Properties Properties that can be accessed from the `google_compute_routes` resource: See [google_compute_route](google_compute_route) for more detailed information. * `dest_ranges`: an array of `google_compute_route` dest_range * `descriptions`: an array of `google_compute_route` description * `names`: an array of `google_compute_route` name * `networks`: an array of `google_compute_route` network * `priorities`: an array of `google_compute_route` priority * `tags`: an array of `google_compute_route` tags * `next_hop_gateways`: an array of `google_compute_route` next_hop_gateway * `next_hop_instances`: an array of `google_compute_route` next_hop_instance * `next_hop_ips`: an array of `google_compute_route` next_hop_ip * `next_hop_vpn_tunnels`: an array of `google_compute_route` next_hop_vpn_tunnel * `next_hop_networks`: an array of `google_compute_route` next_hop_network * `next_hop_ilbs`: an array of `google_compute_route` next_hop_ilb ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_security_policies.md ================================================ +++ title = "google_compute_security_policies resource" draft = false [menu.gcp] title = "google_compute_security_policies" identifier = "inspec/resources/gcp/google_compute_security_policies resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_security_policies` is used to test a Google SecurityPolicy resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_security_policies(project: 'chef-gcp-inspec') do its('count') { should be >= 1 } its('names') { should include 'sec-policy' } end ``` ## Properties Properties that can be accessed from the `google_compute_security_policies` resource: See [google_compute_security_policy](google_compute_security_policy) for more detailed information. * `names`: an array of `google_compute_security_policy` name * `ids`: an array of `google_compute_security_policy` id * `rules`: an array of `google_compute_security_policy` rules ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_security_policy.md ================================================ +++ title = "google_compute_security_policy resource" draft = false [menu.gcp] title = "google_compute_security_policy" identifier = "inspec/resources/gcp/google_compute_security_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_security_policy` is used to test a Google SecurityPolicy resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_security_policy(project: 'chef-gcp-inspec', name: 'sec-policy') do it { should exist } its('rules.size') { should cmp 2 } its('rules.first.priority') { should cmp '1000' } its('rules.first.match.config.src_ip_ranges.first') { should cmp '9.9.9.0/24' } end describe google_compute_security_policy(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_security_policy` resource: * `name`: Name of the security policy. * `id`: The unique identifier for the resource. * `rules`: A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. * `description`: A description of the rule. * `priority`: An integer indicating the priority of a rule in the list. The priority must be a value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority. * `action`: The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. * `preview`: If set to true, the specified action is not enforced. * `match`: A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. * `description`: A description of the rule. * `expr`: User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `versioned_expr`: Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: `SRC_IPS_V1` - must specify the corresponding srcIpRange field in config. * `config`: The configuration options available when specifying versionedExpr. This field must be specified if versionedExpr is specified and cannot be specified if versionedExpr is not specified. * `src_ip_ranges`: CIDR IP address range. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_service_attachment.md ================================================ +++ title = "google_compute_service_attachment resource" draft = false [menu.gcp] title = "google_compute_service_attachment" identifier = "inspec/resources/gcp/google_compute_service_attachment resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_service_attachment` InSpec audit resource to to test a Google Cloud ServiceAttachment resource. ## Examples ```ruby describe google_compute_service_attachment(project: 'chef-gcp-inspec', region: ' value_region', service_attachment: ' ') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } its('region') { should cmp 'value_region' } its('producer_forwarding_rule') { should cmp 'value_producerforwardingrule' } its('target_service') { should cmp 'value_targetservice' } its('connection_preference') { should cmp 'value_connectionpreference' } its('fingerprint') { should cmp 'value_fingerprint' } end describe google_compute_service_attachment(project: 'chef-gcp-inspec', region: ' value_region', service_attachment: ' ') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_service_attachment` resource: * `kind`: [Output Only] Type of the resource. Always compute#serviceAttachment for service attachments. * `id`: [Output Only] The unique identifier for the resource type. The server generates this identifier. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `self_link`: [Output Only] Server-defined URL for the resource. * `region`: [Output Only] URL of the region where the service attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. * `producer_forwarding_rule`: The URL of a forwarding rule with loadBalancingScheme INTERNAL* that is serving the endpoint identified by this service attachment. * `target_service`: The URL of a service serving the endpoint identified by this service attachment. * `connection_preference`: The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service attachment is one that always accepts the connection from consumer forwarding rules. Possible values: * ACCEPT_AUTOMATIC * ACCEPT_MANUAL * CONNECTION_PREFERENCE_UNSPECIFIED * `connected_endpoints`: [Output Only] An array of connections for all the consumers connected to this service attachment. * `status`: The status of a connected endpoint to this service attachment. Possible values: * ACCEPTED * CLOSED * NEEDS_ATTENTION * PENDING * REJECTED * STATUS_UNSPECIFIED * `psc_connection_id`: The PSC connection id of the connected endpoint. * `endpoint`: The url of a connected endpoint. * `consumer_network`: The url of the consumer network. * `nat_subnets`: An array of URLs where each entry is the URL of a subnet provided by the service producer to use for NAT in this service attachment. * `enable_proxy_protocol`: If true, enable the proxy protocol which is for supplying client TCP/IP address data in TCP connections that traverse proxies on their way to destination servers. * `consumer_reject_lists`: Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number. * `consumer_accept_lists`: Projects that are allowed to connect to this service attachment. * `project_id_or_num`: The project id or number for the project to set the limit for. * `network_url`: The network URL for the network to set the limit for. * `connection_limit`: The value of the limit to set. * `psc_service_attachment_id`: * `high`: * `low`: * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ServiceAttachment. An up-to-date fingerprint must be provided in order to patch/update the ServiceAttachment; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the ServiceAttachment. * `domain_names`: If specified, the domain name will be used during the integration between the PSC connected endpoints and the Cloud DNS. For example, this is a valid domain name: "p.mycompany.com.". Current max number of domain names supported is 1. * `reconcile_connections`: This flag determines whether a consumer accept/reject list change can reconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints. - If false, connection policy update will only affect existing PENDING PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain untouched regardless how the connection policy is modified . - If true, update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED PSC endpoint will be moved to REJECTED if its project is added to the reject list. For newly created service attachment, this boolean defaults to false. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_service_attachments.md ================================================ +++ title = "google_compute_service_attachments resource" draft = false [menu.gcp] title = "google_compute_service_attachments" identifier = "inspec/resources/gcp/google_compute_service_attachments resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_service_attachments` InSpec audit resource to to test a Google Cloud ServiceAttachment resource. ## Examples ```ruby describe google_compute_service_attachments(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_service_attachments` resource: See [google_compute_service_attachment](google_compute_service_attachment) for more detailed information. * `kinds`: an array of `google_compute_service_attachment` kind * `ids`: an array of `google_compute_service_attachment` id * `creation_timestamps`: an array of `google_compute_service_attachment` creation_timestamp * `names`: an array of `google_compute_service_attachment` name * `descriptions`: an array of `google_compute_service_attachment` description * `self_links`: an array of `google_compute_service_attachment` self_link * `regions`: an array of `google_compute_service_attachment` region * `producer_forwarding_rules`: an array of `google_compute_service_attachment` producer_forwarding_rule * `target_services`: an array of `google_compute_service_attachment` target_service * `connection_preferences`: an array of `google_compute_service_attachment` connection_preference * `connected_endpoints`: an array of `google_compute_service_attachment` connected_endpoints * `nat_subnets`: an array of `google_compute_service_attachment` nat_subnets * `enable_proxy_protocols`: an array of `google_compute_service_attachment` enable_proxy_protocol * `consumer_reject_lists`: an array of `google_compute_service_attachment` consumer_reject_lists * `consumer_accept_lists`: an array of `google_compute_service_attachment` consumer_accept_lists * `psc_service_attachment_ids`: an array of `google_compute_service_attachment` psc_service_attachment_id * `fingerprints`: an array of `google_compute_service_attachment` fingerprint * `domain_names`: an array of `google_compute_service_attachment` domain_names * `reconcile_connections`: an array of `google_compute_service_attachment` reconcile_connections ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_snapshot.md ================================================ +++ title = "google_compute_snapshot resource" draft = false [menu.gcp] title = "google_compute_snapshot" identifier = "inspec/resources/gcp/google_compute_snapshot resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_snapshot` is used to test a Google Snapshot resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_snapshot(project: 'chef-gcp-inspec', name: 'inspec-gcp-disk-snapshot') do it { should exist } its('source_disk') { should match 'inspec-snapshot-disk' } end describe google_compute_snapshot(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_snapshot` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `id`: The unique identifier for the resource. * `disk_size_gb`: Size of the snapshot, specified in GB. * `name`: Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. * `storage_bytes`: A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion. * `storage_locations`: Cloud Storage bucket storage location of the snapshot (regional or multi-regional). * `licenses`: A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image). snapshotEncryptionKey nested object Encrypts the snapshot using a customer-supplied encryption key. * `labels`: Labels to apply to this Snapshot. * `label_fingerprint`: The fingerprint used for optimistic locking of this resource. Used internally during updates. * `source_disk`: A reference to the disk used to create this snapshot. * `zone`: A reference to the zone where the disk is hosted. * `snapshot_encryption_key`: The customer-supplied encryption key of the snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. * `kms_key_service_account`: The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. * `source_disk_encryption_key`: The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. * `raw_key`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. * `kms_key_service_account`: The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_snapshots.md ================================================ +++ title = "google_compute_snapshots resource" draft = false [menu.gcp] title = "google_compute_snapshots" identifier = "inspec/resources/gcp/google_compute_snapshots resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_snapshots` is used to test a Google Snapshot resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_snapshots(project: 'chef-gcp-inspec') do its('count') { should be >= 1 } end describe.one do google_compute_snapshots(project: 'chef-gcp-inspec').names do |snapshot_name| describe google_compute_snapshot(project: 'chef-gcp-inspec', name: snapshot_name) do its('source_disk') { should match 'inspec-snapshot-disk' } end end end ``` ## Properties Properties that can be accessed from the `google_compute_snapshots` resource: See [google_compute_snapshot](google_compute_snapshot) for more detailed information. * `creation_timestamps`: an array of `google_compute_snapshot` creation_timestamp * `ids`: an array of `google_compute_snapshot` id * `disk_size_gbs`: an array of `google_compute_snapshot` disk_size_gb * `names`: an array of `google_compute_snapshot` name * `descriptions`: an array of `google_compute_snapshot` description * `storage_bytes`: an array of `google_compute_snapshot` storage_bytes * `storage_locations`: an array of `google_compute_snapshot` storage_locations * `licenses`: an array of `google_compute_snapshot` licenses * `labels`: an array of `google_compute_snapshot` labels * `label_fingerprints`: an array of `google_compute_snapshot` label_fingerprint * `source_disks`: an array of `google_compute_snapshot` source_disk * `zones`: an array of `google_compute_snapshot` zone * `snapshot_encryption_keys`: an array of `google_compute_snapshot` snapshot_encryption_key * `source_disk_encryption_keys`: an array of `google_compute_snapshot` source_disk_encryption_key ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_ssl_certificate.md ================================================ +++ title = "google_compute_ssl_certificate resource" draft = false [menu.gcp] title = "google_compute_ssl_certificate" identifier = "inspec/resources/gcp/google_compute_ssl_certificate resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_ssl_certificate` is used to test a Google SslCertificate resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_ssl_certificate(project: 'chef-gcp-inspec', name: 'inspec-gcp-ssl-certificate') do it { should exist } its('description') { should eq 'A fake ssl certificate (DO NOT USE)' } its('certificate') { should eq '-----BEGIN CERTIFICATE----- MIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT BgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm b3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN AQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2 MDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP BgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM FUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z aXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH KoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ 4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O BBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn 0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O M3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ zqGNhIPGq2ULqXKK8BY= -----END CERTIFICATE----- ' } end describe google_compute_ssl_certificate(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_ssl_certificate` resource: * `certificate`: The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `private_key`: The write-only private key in PEM format. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_ssl_certificates.md ================================================ +++ title = "google_compute_ssl_certificates resource" draft = false [menu.gcp] title = "google_compute_ssl_certificates" identifier = "inspec/resources/gcp/google_compute_ssl_certificates resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_ssl_certificates` is used to test a Google SslCertificate resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_ssl_certificates(project: 'chef-gcp-inspec') do its('names') { should include 'inspec-gcp-ssl-certificate' } its('descriptions') { should include 'A fake ssl certificate (DO NOT USE)' } its('certificates') { should include '-----BEGIN CERTIFICATE----- MIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT BgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm b3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN AQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2 MDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP BgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM FUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z aXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH KoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ 4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O BBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn 0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O M3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ zqGNhIPGq2ULqXKK8BY= -----END CERTIFICATE----- ' } end ``` ## Properties Properties that can be accessed from the `google_compute_ssl_certificates` resource: See [google_compute_ssl_certificate](google_compute_ssl_certificate) for more detailed information. * `certificates`: an array of `google_compute_ssl_certificate` certificate * `creation_timestamps`: an array of `google_compute_ssl_certificate` creation_timestamp * `descriptions`: an array of `google_compute_ssl_certificate` description * `ids`: an array of `google_compute_ssl_certificate` id * `names`: an array of `google_compute_ssl_certificate` name * `private_keys`: an array of `google_compute_ssl_certificate` private_key ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_ssl_policies.md ================================================ +++ title = "google_compute_ssl_policies resource" draft = false [menu.gcp] title = "google_compute_ssl_policies" identifier = "inspec/resources/gcp/google_compute_ssl_policies resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_ssl_policies` is used to test a Google SslPolicy resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_ssl_policies(project: 'chef-gcp-inspec') do it { should exist } its('names') { should include 'inspec-gcp-ssl-policy' } its('profiles') { should include 'CUSTOM' } its('count') { should eq 1 } end google_compute_ssl_policies(project: 'chef-gcp-inspec').names.each do |policy_name| describe google_compute_ssl_policy(project: 'chef-gcp-inspec', name: policy_name) do its('min_tls_version') { should eq 'TLS_1_2' } end end ``` ## Properties Properties that can be accessed from the `google_compute_ssl_policies` resource: See [google_compute_ssl_policy](google_compute_ssl_policy) for more detailed information. * `creation_timestamps`: an array of `google_compute_ssl_policy` creation_timestamp * `descriptions`: an array of `google_compute_ssl_policy` description * `ids`: an array of `google_compute_ssl_policy` id * `names`: an array of `google_compute_ssl_policy` name * `profiles`: an array of `google_compute_ssl_policy` profile * `min_tls_versions`: an array of `google_compute_ssl_policy` min_tls_version * `enabled_features`: an array of `google_compute_ssl_policy` enabled_features * `custom_features`: an array of `google_compute_ssl_policy` custom_features * `fingerprints`: an array of `google_compute_ssl_policy` fingerprint * `warnings`: an array of `google_compute_ssl_policy` warnings ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_ssl_policy.md ================================================ +++ title = "google_compute_ssl_policy resource" draft = false [menu.gcp] title = "google_compute_ssl_policy" identifier = "inspec/resources/gcp/google_compute_ssl_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_ssl_policy` is used to test a Google SslPolicy resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_ssl_policy(project: 'chef-gcp-inspec', name: 'inspec-gcp-ssl-policy') do it { should exist } its('min_tls_version') { should eq 'TLS_1_2' } its('profile') { should eq 'CUSTOM' } its('custom_features') { should include 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384' } its('custom_features') { should include 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384' } end describe google_compute_ssl_policy(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_ssl_policy` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `profile`: Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. If using `CUSTOM`, the set of SSL features to enable must be specified in the `customFeatures` field. Possible values: * COMPATIBLE * MODERN * RESTRICTED * CUSTOM * `min_tls_version`: The minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer. Possible values: * TLS_1_0 * TLS_1_1 * TLS_1_2 * `enabled_features`: The list of features enabled in the SSL policy. * `custom_features`: A list of features enabled when the selected profile is CUSTOM. The method returns the set of features that can be specified in this list. This field must be empty if the profile is not CUSTOM. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. * `warnings`: If potential misconfigurations are detected for this SSL policy, this field will be populated with warning messages. * `code`: A warning code, if applicable. * `message`: A human-readable description of the warning code. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_subnetwork.md ================================================ +++ title = "google_compute_subnetwork resource" draft = false [menu.gcp] title = "google_compute_subnetwork" identifier = "inspec/resources/gcp/google_compute_subnetwork resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_subnetwork` is used to test a Google Subnetwork resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_subnetwork(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'inspec-subnet') do it { should exist } its('ip_cidr_range') { should eq '10.2.0.0/16' } its('log_config.enable') { should be true } its('log_config.flow_sampling') { should cmp '0.5' } its('log_config.aggregation_interval') { should cmp 'INTERVAL_10_MIN' } its('log_config.metadata') { should include 'INCLUDE_ALL_METADATA' } end describe google_compute_subnetwork(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP compute subnetwork exists describe google_compute_subnetwork(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-subnetwork') do it { should exist } end ### Test when a GCP compute subnetwork was created describe google_compute_subnetwork(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-subnetwork') do its('creation_timestamp') { should be > Time.now - 365*60*60*24*10 } end ### Test for an expected subnetwork identifier describe google_compute_subnetwork(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-subnetwork') do its('id') { should eq 12345567789 } end ### Test that a subnetwork gateway address is as expected describe google_compute_subnetwork(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-subnetwork') do its('gateway_address') { should eq "10.2.0.1" } end ### Test that a subnetwork IP CIDR range is as expected describe google_compute_subnetwork(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-subnetwork') do its('ip_cidr_range') { should eq "10.2.0.0/29" } end ### Test that a subnetwork is associated with the expected network describe google_compute_subnetwork(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-subnetwork') do its('network') { should match "gcp_network_name" } end ### Test whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access describe google_compute_subnetwork(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-subnetwork') do its('private_ip_google_access') { should be false } end ## Properties Properties that can be accessed from the `google_compute_subnetwork` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. * `gateway_address`: The gateway address for default routes to reach destination addresses outside this subnetwork. * `id`: The unique identifier for the resource. * `ip_cidr_range`: The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. * `name`: The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `network`: The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks. * `purpose`: (Beta only) The purpose of the resource. This field can be either PRIVATE or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE. If set to INTERNAL_HTTPS_LOAD_BALANCER you must also set the role. Possible values: * INTERNAL_HTTPS_LOAD_BALANCER * PRIVATE * `role`: (Beta only) The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. Possible values: * ACTIVE * BACKUP * `secondary_ip_ranges`: An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. * `range_name`: The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork. * `ip_cidr_range`: The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. * `private_ip_google_access`: When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access. * `private_ipv6_google_access`: The private IPv6 google access type for the VMs in this subnet. * `region`: The GCP region for this subnetwork. * `log_config`: Denotes the logging options for the subnetwork flow logs. If logging is enabled logs will be exported to Stackdriver. This field cannot be set if the `purpose` of this subnetwork is `INTERNAL_HTTPS_LOAD_BALANCER` * `enable`: If logging is enabled for this subnetwork * `aggregation_interval`: Can only be specified if VPC flow logging for this subnetwork is enabled. Toggles the aggregation interval for collecting flow logs. Increasing the interval time will reduce the amount of generated flow logs for long lasting connections. Default is an interval of 5 seconds per connection. Possible values: * INTERVAL_5_SEC * INTERVAL_30_SEC * INTERVAL_1_MIN * INTERVAL_5_MIN * INTERVAL_10_MIN * INTERVAL_15_MIN * `flow_sampling`: Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default is 0.5 which means half of all collected logs are reported. * `metadata`: Can only be specified if VPC flow logging for this subnetwork is enabled. Configures whether metadata fields should be added to the reported VPC flow logs. Possible values: * EXCLUDE_ALL_METADATA * INCLUDE_ALL_METADATA * CUSTOM_METADATA * `metadata_fields`: List of metadata fields that should be added to reported logs. Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" is set to CUSTOM_METADATA. * `filter_expr`: Export filter used to define which VPC flow logs should be logged, as as CEL expression. See https://cloud.google.com/vpc/docs/flow-logs#filtering for details on how to format this field. The default value is 'true', which evaluates to include everything. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_subnetwork_iam_binding.md ================================================ +++ title = "google_compute_subnetwork_iam_binding resource" draft = false [menu.gcp] title = "google_compute_subnetwork_iam_binding" identifier = "inspec/resources/gcp/google_compute_subnetwork_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_subnetwork_iam_binding` is used to test a Google Subnetwork Iam Bindings ## Examples ```ruby describe google_compute_subnetwork_iam_binding(project: "project", region: "region", name: "name", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_compute_subnetwork_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_subnetwork_iam_policy.md ================================================ +++ title = "google_compute_subnetwork_iam_policy resource" draft = false [menu.gcp] title = "google_compute_subnetwork_iam_policy" identifier = "inspec/resources/gcp/google_compute_subnetwork_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_subnetwork_iam_policy` is used to test a Google Subnetwork Iam Policy resource. ## Examples ```ruby describe google_compute_subnetwork_iam_policy(project: "project", region: "region", name: "name") do it { should exist } end google_compute_subnetwork_iam_policy(project: "project", region: "region", name: "name").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_compute_subnetwork_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_subnetworks.md ================================================ +++ title = "google_compute_subnetworks resource" draft = false [menu.gcp] title = "google_compute_subnetworks" identifier = "inspec/resources/gcp/google_compute_subnetworks resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_subnetworks` is used to test a Google Subnetwork resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_subnetworks(project: 'chef-gcp-inspec', region: 'europe-west2') do its('ip_cidr_ranges') { should include '10.2.0.0/16' } its('subnetwork_names') { should include 'inspec-subnet' } end ``` ### Test that there are no more than a specified number of subnetworks available for the project and region describe google_compute_subnetworks(project: 'chef-inspec-gcp', region: 'europe-west2') do its('count') { should be <= 100} end ### Test that an expected subnetwork identifier is present in the project and region describe google_compute_subnetworks(project: 'chef-inspec-gcp', region: 'europe-west2') do its('subnetwork_ids') { should include 12345678975432 } end ### Test that an expected subnetwork name is available for the project and region describe google_compute_subnetworks(project: 'chef-inspec-gcp', region: 'europe-west2') do its('subnetwork_names') { should include "subnetwork-name" } end ### Test that an expected subnetwork network name is not present for the project and region describe google_compute_subnetworks(project: 'chef-inspec-gcp', region: 'europe-west2') do its('subnetwork_networks') { should not include "network-name" } end ## Properties Properties that can be accessed from the `google_compute_subnetworks` resource: See [google_compute_subnetwork](google_compute_subnetwork) for more detailed information. * `creation_timestamps`: an array of `google_compute_subnetwork` creation_timestamp * `descriptions`: an array of `google_compute_subnetwork` description * `gateway_addresses`: an array of `google_compute_subnetwork` gateway_address * `subnetwork_ids`: an array of `google_compute_subnetwork` id * `ip_cidr_ranges`: an array of `google_compute_subnetwork` ip_cidr_range * `subnetwork_names`: an array of `google_compute_subnetwork` name * `networks`: an array of `google_compute_subnetwork` network * `purposes`: (Beta only) an array of `google_compute_subnetwork` purpose * `roles`: (Beta only) an array of `google_compute_subnetwork` role * `secondary_ip_ranges`: an array of `google_compute_subnetwork` secondary_ip_ranges * `private_ip_google_accesses`: an array of `google_compute_subnetwork` private_ip_google_access * `private_ipv6_google_accesses`: an array of `google_compute_subnetwork` private_ipv6_google_access * `regions`: an array of `google_compute_subnetwork` region * `log_configs`: an array of `google_compute_subnetwork` log_config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_grpc_proxies.md ================================================ +++ title = "google_compute_target_grpc_proxies resource" draft = false [menu.gcp] title = "google_compute_target_grpc_proxies" identifier = "inspec/resources/gcp/google_compute_target_grpc_proxies resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_target_grpc_proxies` InSpec audit resource to to test a Google Cloud TargetGrpcProxy resource. ## Examples ```ruby describe google_compute_target_grpc_proxies(project: 'chef-gcp-inspec') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_grpc_proxies` resource: See [google_compute_target_grpc_proxy](google_compute_target_grpc_proxy) for more detailed information. * `kinds`: an array of `google_compute_target_grpc_proxy` kind * `ids`: an array of `google_compute_target_grpc_proxy` id * `creation_timestamps`: an array of `google_compute_target_grpc_proxy` creation_timestamp * `names`: an array of `google_compute_target_grpc_proxy` name * `descriptions`: an array of `google_compute_target_grpc_proxy` description * `self_links`: an array of `google_compute_target_grpc_proxy` self_link * `self_link_with_ids`: an array of `google_compute_target_grpc_proxy` self_link_with_id * `url_maps`: an array of `google_compute_target_grpc_proxy` url_map * `validate_for_proxylesses`: an array of `google_compute_target_grpc_proxy` validate_for_proxyless * `fingerprints`: an array of `google_compute_target_grpc_proxy` fingerprint ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_grpc_proxy.md ================================================ +++ title = "google_compute_target_grpc_proxy resource" draft = false [menu.gcp] title = "google_compute_target_grpc_proxy" identifier = "inspec/resources/gcp/google_compute_target_grpc_proxy resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_target_grpc_proxy` InSpec audit resource to to test a Google Cloud TargetGrpcProxy resource. ## Examples ```ruby describe google_compute_target_grpc_proxy(project: 'chef-gcp-inspec', name: ' ') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('url_map') { should cmp 'value_urlmap' } its('fingerprint') { should cmp 'value_fingerprint' } end describe google_compute_target_grpc_proxy(project: 'chef-gcp-inspec', name: ' ') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_grpc_proxy` resource: * `kind`: [Output Only] Type of the resource. Always compute#targetGrpcProxy for target grpc proxies. * `id`: [Output Only] The unique identifier for the resource type. The server generates this identifier. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL with id for the resource. * `url_map`: URL to the UrlMap resource that defines the mapping from URL to the BackendService. The protocol field in the BackendService must be set to GRPC. * `validate_for_proxyless`: If true, indicates that the BackendServices referenced by the urlMap may be accessed by gRPC applications without using a sidecar proxy. This will enable configuration checks on urlMap and its referenced BackendServices to not allow unsupported features. A gRPC application must use "xds:///" scheme in the target URI of the service it is connecting to. If false, indicates that the BackendServices referenced by the urlMap will be accessed by gRPC applications via a sidecar proxy. In this case, a gRPC application must not use "xds:///" scheme in the target URI of the service it is connecting to * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a TargetGrpcProxy. An up-to-date fingerprint must be provided in order to patch/update the TargetGrpcProxy; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the TargetGrpcProxy. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_http_proxies.md ================================================ +++ title = "google_compute_target_http_proxies resource" draft = false [menu.gcp] title = "google_compute_target_http_proxies" identifier = "inspec/resources/gcp/google_compute_target_http_proxies resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_target_http_proxies` is used to test a Google TargetHttpProxy resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_target_http_proxies(project: 'chef-gcp-inspec') do its('names') { should include 'inspec-gcp-http-proxy' } its('descriptions') { should include 'A HTTP proxy' } end ``` ## Properties Properties that can be accessed from the `google_compute_target_http_proxies` resource: See [google_compute_target_http_proxy](google_compute_target_http_proxy) for more detailed information. * `creation_timestamps`: an array of `google_compute_target_http_proxy` creation_timestamp * `descriptions`: an array of `google_compute_target_http_proxy` description * `ids`: an array of `google_compute_target_http_proxy` id * `names`: an array of `google_compute_target_http_proxy` name * `url_maps`: an array of `google_compute_target_http_proxy` url_map ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_http_proxy.md ================================================ +++ title = "google_compute_target_http_proxy resource" draft = false [menu.gcp] title = "google_compute_target_http_proxy" identifier = "inspec/resources/gcp/google_compute_target_http_proxy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_target_http_proxy` is used to test a Google TargetHttpProxy resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_target_http_proxy(project: 'chef-gcp-inspec', name: 'inspec-gcp-http-proxy') do it { should exist } its('description') { should eq 'A HTTP proxy' } its('url_map') { should match /\/inspec-gcp-url-map$/ } end describe google_compute_target_http_proxy(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_http_proxy` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `url_map`: A reference to the UrlMap resource that defines the mapping from URL to the BackendService. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_https_proxies.md ================================================ +++ title = "google_compute_target_https_proxies resource" draft = false [menu.gcp] title = "google_compute_target_https_proxies" identifier = "inspec/resources/gcp/google_compute_target_https_proxies resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_target_https_proxies` is used to test a Google TargetHttpsProxy resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_target_https_proxies(project: 'chef-gcp-inspec') do its('names') { should include 'inspec-gcp-https-proxy' } its('descriptions') { should include 'A HTTPS target proxy' } end ``` ## Properties Properties that can be accessed from the `google_compute_target_https_proxies` resource: See [google_compute_target_https_proxy](google_compute_target_https_proxy) for more detailed information. * `creation_timestamps`: an array of `google_compute_target_https_proxy` creation_timestamp * `descriptions`: an array of `google_compute_target_https_proxy` description * `ids`: an array of `google_compute_target_https_proxy` id * `names`: an array of `google_compute_target_https_proxy` name * `quic_overrides`: an array of `google_compute_target_https_proxy` quic_override * `ssl_certificates`: an array of `google_compute_target_https_proxy` ssl_certificates * `ssl_policies`: an array of `google_compute_target_https_proxy` ssl_policy * `url_maps`: an array of `google_compute_target_https_proxy` url_map ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_https_proxy.md ================================================ +++ title = "google_compute_target_https_proxy resource" draft = false [menu.gcp] title = "google_compute_target_https_proxy" identifier = "inspec/resources/gcp/google_compute_target_https_proxy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_target_https_proxy` is used to test a Google TargetHttpsProxy resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_target_https_proxy(project: 'chef-gcp-inspec', name: 'inspec-gcp-https-proxy') do it { should exist } its('url_map') { should match /\/inspec-gcp-url-map$/ } its('description') { should eq 'A HTTPS target proxy' } end describe google_compute_target_https_proxy(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_https_proxy` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `quic_override`: Specifies the QUIC override policy for this resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE. Possible values: * NONE * ENABLE * DISABLE * `ssl_certificates`: A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. * `ssl_policy`: A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured. * `url_map`: A reference to the UrlMap resource that defines the mapping from URL to the BackendService. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_instance.md ================================================ +++ title = "google_compute_target_instance resource" draft = false [menu.gcp] title = "google_compute_target_instance" identifier = "inspec/resources/gcp/google_compute_target_instance resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_target_instance` InSpec audit resource to to test a Google Cloud TargetInstance resource. ## Examples ```ruby describe google_compute_target_instance(project: 'chef-gcp-inspec', name: ' ', zone: ' value_zone') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('zone') { should cmp 'value_zone' } its('nat_policy') { should cmp 'value_natpolicy' } its('instance') { should cmp 'value_instance' } its('self_link') { should cmp 'value_selflink' } its('self_link_with_id') { should cmp 'value_selflinkwithid' } its('network') { should cmp 'value_network' } its('security_policy') { should cmp 'value_securitypolicy' } end describe google_compute_target_instance(project: 'chef-gcp-inspec', name: ' ', zone: ' value_zone') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_instance` resource: * `kind`: [Output Only] The type of the resource. Always compute#targetInstance for target instances. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `zone`: [Output Only] URL of the zone where the target instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. * `nat_policy`: Must have a value of NO_NAT. Protocol forwarding delivers packets while preserving the destination IP address of the forwarding rule referencing the target instance. Possible values: * NO_NAT * `instance`: A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance * `self_link`: [Output Only] Server-defined URL for the resource. * `self_link_with_id`: [Output Only] Server-defined URL for this resource with the resource id. * `network`: The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to. * `security_policy`: [Output Only] The resource URL for the security policy associated with this target instance. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_instances.md ================================================ +++ title = "google_compute_target_instances resource" draft = false [menu.gcp] title = "google_compute_target_instances" identifier = "inspec/resources/gcp/google_compute_target_instances resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_target_instances` InSpec audit resource to to test a Google Cloud TargetInstance resource. ## Examples ```ruby describe google_compute_target_instances(project: 'chef-gcp-inspec', zone: ' value_zone') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_instances` resource: See [google_compute_target_instance](google_compute_target_instance) for more detailed information. * `kinds`: an array of `google_compute_target_instance` kind * `ids`: an array of `google_compute_target_instance` id * `creation_timestamps`: an array of `google_compute_target_instance` creation_timestamp * `names`: an array of `google_compute_target_instance` name * `descriptions`: an array of `google_compute_target_instance` description * `zones`: an array of `google_compute_target_instance` zone * `nat_policies`: an array of `google_compute_target_instance` nat_policy * `instances`: an array of `google_compute_target_instance` instance * `self_links`: an array of `google_compute_target_instance` self_link * `self_link_with_ids`: an array of `google_compute_target_instance` self_link_with_id * `networks`: an array of `google_compute_target_instance` network * `security_policies`: an array of `google_compute_target_instance` security_policy ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_pool.md ================================================ +++ title = "google_compute_target_pool resource" draft = false [menu.gcp] title = "google_compute_target_pool" identifier = "inspec/resources/gcp/google_compute_target_pool resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_target_pool` is used to test a Google TargetPool resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_target_pool(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'inspec-gcp-target-pool') do it { should exist } its('session_affinity') { should eq 'CLIENT_IP' } it { should has_target_instance('gcp_ext_vm_name', 'zone') } end describe google_compute_target_pool(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_pool` resource: * `backup_pool`: This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. * `failover_ratio`: This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. * `health_check`: A reference to a HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. If not specified it means all member instances will be considered healthy at all times. * `id`: The unique identifier for the resource. * `instances`: A list of virtual machine instances serving this pool. They must live in zones contained in the same region as this pool. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `session_affinity`: Session affinity option. Must be one of these values: * NONE: Connections from the same client IP may go to any instance in the pool. * CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. * CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy. Possible values: * NONE * CLIENT_IP * CLIENT_IP_PROTO * `region`: The region where the target pool resides. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_pools.md ================================================ +++ title = "google_compute_target_pools resource" draft = false [menu.gcp] title = "google_compute_target_pools" identifier = "inspec/resources/gcp/google_compute_target_pools resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_target_pools` is used to test a Google TargetPool resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_target_pools(project: 'chef-gcp-inspec', region: 'europe-west2') do its('names') { should include 'inspec-gcp-target-pool' } its('session_affinities') { should include 'CLIENT_IP' } end ``` ## Properties Properties that can be accessed from the `google_compute_target_pools` resource: See [google_compute_target_pool](google_compute_target_pool) for more detailed information. * `backup_pools`: an array of `google_compute_target_pool` backup_pool * `creation_timestamps`: an array of `google_compute_target_pool` creation_timestamp * `descriptions`: an array of `google_compute_target_pool` description * `failover_ratios`: an array of `google_compute_target_pool` failover_ratio * `health_checks`: an array of `google_compute_target_pool` health_check * `ids`: an array of `google_compute_target_pool` id * `instances`: an array of `google_compute_target_pool` instances * `names`: an array of `google_compute_target_pool` name * `session_affinities`: an array of `google_compute_target_pool` session_affinity * `regions`: an array of `google_compute_target_pool` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_ssl_proxies.md ================================================ +++ title = "google_compute_target_ssl_proxies resource" draft = false [menu.gcp] title = "google_compute_target_ssl_proxies" identifier = "inspec/resources/gcp/google_compute_target_ssl_proxies resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_target_ssl_proxies` InSpec audit resource to to test a Google Cloud TargetSslProxy resource. ## Examples ```ruby describe google_compute_target_ssl_proxies(project: 'chef-gcp-inspec') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_ssl_proxies` resource: See [google_compute_target_ssl_proxy](google_compute_target_ssl_proxy) for more detailed information. * `kinds`: an array of `google_compute_target_ssl_proxy` kind * `ids`: an array of `google_compute_target_ssl_proxy` id * `creation_timestamps`: an array of `google_compute_target_ssl_proxy` creation_timestamp * `names`: an array of `google_compute_target_ssl_proxy` name * `descriptions`: an array of `google_compute_target_ssl_proxy` description * `self_links`: an array of `google_compute_target_ssl_proxy` self_link * `services`: an array of `google_compute_target_ssl_proxy` service * `ssl_certificates`: an array of `google_compute_target_ssl_proxy` ssl_certificates * `certificate_maps`: an array of `google_compute_target_ssl_proxy` certificate_map * `proxy_headers`: an array of `google_compute_target_ssl_proxy` proxy_header * `ssl_policies`: an array of `google_compute_target_ssl_proxy` ssl_policy ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_ssl_proxy.md ================================================ +++ title = "google_compute_target_ssl_proxy resource" draft = false [menu.gcp] title = "google_compute_target_ssl_proxy" identifier = "inspec/resources/gcp/google_compute_target_ssl_proxy resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_target_ssl_proxy` InSpec audit resource to to test a Google Cloud TargetSslProxy resource. ## Examples ```ruby describe google_compute_target_ssl_proxy(project: 'chef-gcp-inspec', name: ' ') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('self_link') { should cmp 'value_selflink' } its('service') { should cmp 'value_service' } its('certificate_map') { should cmp 'value_certificatemap' } its('proxy_header') { should cmp 'value_proxyheader' } its('ssl_policy') { should cmp 'value_sslpolicy' } end describe google_compute_target_ssl_proxy(project: 'chef-gcp-inspec', name: ' ') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_ssl_proxy` resource: * `kind`: [Output Only] Type of the resource. Always compute#targetSslProxy for target SSL proxies. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `self_link`: [Output Only] Server-defined URL for the resource. * `service`: URL to the BackendService resource. * `ssl_certificates`: URLs to SslCertificate resources that are used to authenticate connections to Backends. At least one SSL certificate must be specified. Currently, you may specify up to 15 SSL certificates. sslCertificates do not apply when the load balancing scheme is set to INTERNAL_SELF_MANAGED. * `certificate_map`: URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for global target proxies. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. Possible values: * NONE * PROXY_V1 * `ssl_policy`: URL of SslPolicy resource that will be associated with the TargetSslProxy resource. If not set, the TargetSslProxy resource will not have any SSL policy configured. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_tcp_proxies.md ================================================ +++ title = "google_compute_target_tcp_proxies resource" draft = false [menu.gcp] title = "google_compute_target_tcp_proxies" identifier = "inspec/resources/gcp/google_compute_target_tcp_proxies resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_target_tcp_proxies` is used to test a Google TargetTcpProxy resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_target_tcp_proxies(project: 'chef-gcp-inspec') do its('names') { should include 'inspec-gcp-target-tcp-proxy' } its('proxy_headers') { should include 'NONE' } end ``` ## Properties Properties that can be accessed from the `google_compute_target_tcp_proxies` resource: See [google_compute_target_tcp_proxy](google_compute_target_tcp_proxy) for more detailed information. * `creation_timestamps`: an array of `google_compute_target_tcp_proxy` creation_timestamp * `descriptions`: an array of `google_compute_target_tcp_proxy` description * `ids`: an array of `google_compute_target_tcp_proxy` id * `names`: an array of `google_compute_target_tcp_proxy` name * `proxy_headers`: an array of `google_compute_target_tcp_proxy` proxy_header * `services`: an array of `google_compute_target_tcp_proxy` service ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_tcp_proxy.md ================================================ +++ title = "google_compute_target_tcp_proxy resource" draft = false [menu.gcp] title = "google_compute_target_tcp_proxy" identifier = "inspec/resources/gcp/google_compute_target_tcp_proxy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_target_tcp_proxy` is used to test a Google TargetTcpProxy resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_target_tcp_proxy(project: 'chef-gcp-inspec', name: 'inspec-gcp-target-tcp-proxy') do it { should exist } its('proxy_header') { should eq 'NONE' } its('service') { should match /\/gcp-inspec-tcp-backend-service$/ } end describe google_compute_target_tcp_proxy(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_tcp_proxy` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `description`: An optional description of this resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `proxy_header`: Specifies the type of proxy header to append before sending data to the backend. Possible values: * NONE * PROXY_V1 * `service`: A reference to the BackendService resource. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_vpn_gateway.md ================================================ +++ title = "google_compute_target_vpn_gateway resource" draft = false [menu.gcp] title = "google_compute_target_vpn_gateway" identifier = "inspec/resources/gcp/google_compute_target_vpn_gateway resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_target_vpn_gateway` InSpec audit resource to to test a Google Cloud TargetVpnGateway resource. ## Examples ```ruby describe google_compute_target_vpn_gateway(project: 'chef-gcp-inspec', region: ' value_region', name: 'value_name') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('region') { should cmp 'value_region' } its('network') { should cmp 'value_network' } its('status') { should cmp 'value_status' } its('self_link') { should cmp 'value_selflink' } its('label_fingerprint') { should cmp 'value_labelfingerprint' } end describe google_compute_target_vpn_gateway(project: 'chef-gcp-inspec', region: ' value_region', name: 'value_name') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_vpn_gateway` resource: * `kind`: [Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `region`: [Output Only] URL of the region where the target VPN gateway resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. * `network`: URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created. * `tunnels`: [Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using the compute.vpntunnels.insert method and associated with a VPN gateway. * `status`: [Output Only] The status of the VPN gateway, which can be one of the following: CREATING, READY, FAILED, or DELETING. Possible values: * CREATING * DELETING * FAILED * READY * `self_link`: [Output Only] Server-defined URL for the resource. * `forwarding_rules`: [Output Only] A list of URLs to the ForwardingRule resources. ForwardingRules are created using compute.forwardingRules.insert and associated with a VPN gateway. * `labels`: Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. * `additional_properties`: * `label_fingerprint`: A fingerprint for the labels being applied to this TargetVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a TargetVpnGateway. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_target_vpn_gateways.md ================================================ +++ title = "google_compute_target_vpn_gateways resource" draft = false [menu.gcp] title = "google_compute_target_vpn_gateways" identifier = "inspec/resources/gcp/google_compute_target_vpn_gateways resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_target_vpn_gateways` InSpec audit resource to to test a Google Cloud TargetVpnGateway resource. ## Examples ```ruby describe google_compute_target_vpn_gateways(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_target_vpn_gateways` resource: See [google_compute_target_vpn_gateway](google_compute_target_vpn_gateway) for more detailed information. * `kinds`: an array of `google_compute_target_vpn_gateway` kind * `ids`: an array of `google_compute_target_vpn_gateway` id * `creation_timestamps`: an array of `google_compute_target_vpn_gateway` creation_timestamp * `names`: an array of `google_compute_target_vpn_gateway` name * `descriptions`: an array of `google_compute_target_vpn_gateway` description * `regions`: an array of `google_compute_target_vpn_gateway` region * `networks`: an array of `google_compute_target_vpn_gateway` network * `tunnels`: an array of `google_compute_target_vpn_gateway` tunnels * `statuses`: an array of `google_compute_target_vpn_gateway` status * `self_links`: an array of `google_compute_target_vpn_gateway` self_link * `forwarding_rules`: an array of `google_compute_target_vpn_gateway` forwarding_rules * `labels`: an array of `google_compute_target_vpn_gateway` labels * `label_fingerprints`: an array of `google_compute_target_vpn_gateway` label_fingerprint ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_url_map.md ================================================ +++ title = "google_compute_url_map resource" draft = false [menu.gcp] title = "google_compute_url_map" identifier = "inspec/resources/gcp/google_compute_url_map resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_url_map` is used to test a Google UrlMap resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_url_map(project: 'chef-gcp-inspec', name: 'inspec-gcp-url-map') do it { should exist } its('description') { should eq 'URL map description' } its('default_service') { should match /\/inspec-gcp-backend-service$/ } its('host_rules.count') { should eq 1 } its('host_rules.first.hosts') { should include 'site.com' } its('path_matchers.count') { should eq 1 } its('path_matchers.first.default_service') { should match /\/inspec-gcp-backend-service$/ } its('tests.count') { should eq 1 } its('tests.first.host') { should eq 'test.com' } its('tests.first.path') { should eq '/home' } end describe google_compute_url_map(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_url_map` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `default_service`: The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. * `description`: An optional description of this resource. Provide this property when you create the resource. * `id`: The unique identifier for the resource. * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. * `header_action`: Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here take effect after headerAction specified under pathMatcher. * `request_headers_to_add`: Headers to add to a matching request prior to forwarding the request to the backendService. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. * `response_headers_to_add`: Headers to add the response prior to sending the response back to the client. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response prior to sending the response back to the client. * `host_rules`: The list of HostRules to use against the URL. * `description`: An optional description of this resource. Provide this property when you create the resource. * `hosts`: The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or .. * `path_matcher`: The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `path_matchers`: The list of named PathMatchers to use against the URL. * `default_service`: The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource defaultService: - compute.backendBuckets.use - compute.backendServices.use * `description`: An optional description of this resource. Provide this property when you create the resource. * `header_action`: Specifies changes to request and response headers that need to take effect for the selected backendService. HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap * `request_headers_to_add`: Headers to add to a matching request prior to forwarding the request to the backendService. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. * `response_headers_to_add`: Headers to add the response prior to sending the response back to the client. * `header_name`: The name of the header. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response prior to sending the response back to the client. * `name`: The name to which this PathMatcher is referred by the HostRule. * `default_url_redirect`: When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. * `host_redirect`: The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. * `https_redirect`: If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. * `path_redirect`: The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. * `prefix_redirect`: The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. * `redirect_response_code`: The HTTP Status code to use for this RedirectAction. Supported values are: * MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. * FOUND, which corresponds to 302. * SEE_OTHER which corresponds to 303. * TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained. Possible values: * FOUND * MOVED_PERMANENTLY_DEFAULT * PERMANENT_REDIRECT * SEE_OTHER * TEMPORARY_REDIRECT * `strip_query`: If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. * `default_route_action`: defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. * `url_rewrite`: The spec to modify the URL of the request, prior to forwarding the request to the matched service. * `path_prefix_rewrite`: Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. * `host_rewrite`: Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. * `timeout`: Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. * `retry_policy`: Specifies the retry policy associated with this route. * `retry_conditions`: Specfies one or more conditions when this retry rule applies. Valid values are: * 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, * connection failure, and refused streams. * gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. * connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. * retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. * refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. * cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled * deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded * resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted * unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable * `num_retries`: Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. * `per_try_timeout`: Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. * `request_mirror_policy`: Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. * `backend_service`: The full or partial URL to the BackendService resource being mirrored to. * `cors_policy`: The specification for allowing client side cross-origin requests. Please see [W3C Recommendation for Cross Origin Resource Sharing](https://www.w3.org/TR/cors/) * `allow_origins`: Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. * `allow_origin_regexes`: Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. * `allow_methods`: Specifies the content for the Access-Control-Allow-Methods header. * `allow_headers`: Specifies the content for the Access-Control-Allow-Headers header. * `expose_headers`: Specifies the content for the Access-Control-Expose-Headers header. * `max_age`: Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header. * `allow_credentials`: In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. * `disabled`: If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. * `fault_injection_policy`: The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. * `delay`: The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. * `fixed_delay`: Specifies the value of the fixed delay interval. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. * `percentage`: The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. * `abort`: The specification for how client requests are aborted as part of fault injection. * `http_status`: The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. * `percentage`: The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. * `tests`: The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. * `description`: Description of this test case. * `host`: Host portion of the URL. * `path`: Path portion of the URL. * `service`: Expected BackendService resource the given URL should be mapped to. * `default_url_redirect`: When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. * `host_redirect`: The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. * `https_redirect`: If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. * `path_redirect`: The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. * `prefix_redirect`: The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. * `redirect_response_code`: The HTTP Status code to use for this RedirectAction. Supported values are: * MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. * FOUND, which corresponds to 302. * SEE_OTHER which corresponds to 303. * TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained. Possible values: * FOUND * MOVED_PERMANENTLY_DEFAULT * PERMANENT_REDIRECT * SEE_OTHER * TEMPORARY_REDIRECT * `strip_query`: If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. * `default_route_action`: defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. * `weighted_backend_services`: A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. * `backend_service`: The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. * `weight`: Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 * `header_action`: Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. * `request_headers_to_add`: Headers to add to a matching request prior to forwarding the request to the backendService. * `header_name`: The name of the header to add. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response prior to sending the response back to the client. * `response_headers_to_add`: Headers to add the response prior to sending the response back to the client. * `header_name`: The name of the header to add. * `header_value`: The value of the header to add. * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. * `url_rewrite`: The spec to modify the URL of the request, prior to forwarding the request to the matched service. * `path_prefix_rewrite`: Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. * `host_rewrite`: Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. * `timeout`: Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. * `retry_policy`: Specifies the retry policy associated with this route. * `retry_conditions`: Specfies one or more conditions when this retry rule applies. Valid values are: * 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, * connection failure, and refused streams. * gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. * connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. * retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. * refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. * cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled * deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded * resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted * unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable * `num_retries`: Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. * `per_try_timeout`: Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. * `request_mirror_policy`: Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. * `backend_service`: The full or partial URL to the BackendService resource being mirrored to. * `cors_policy`: The specification for allowing client side cross-origin requests. Please see [W3C Recommendation for Cross Origin Resource Sharing](https://www.w3.org/TR/cors/) * `allow_origins`: Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. * `allow_origin_regexes`: Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. * `allow_methods`: Specifies the content for the Access-Control-Allow-Methods header. * `allow_headers`: Specifies the content for the Access-Control-Allow-Headers header. * `expose_headers`: Specifies the content for the Access-Control-Expose-Headers header. * `max_age`: Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header. * `allow_credentials`: In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. * `disabled`: If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. * `fault_injection_policy`: The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. * `delay`: The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. * `fixed_delay`: Specifies the value of the fixed delay interval. * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. * `percentage`: The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. * `abort`: The specification for how client requests are aborted as part of fault injection. * `http_status`: The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. * `percentage`: The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_url_maps.md ================================================ +++ title = "google_compute_url_maps resource" draft = false [menu.gcp] title = "google_compute_url_maps" identifier = "inspec/resources/gcp/google_compute_url_maps resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_url_maps` is used to test a Google UrlMap resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_url_maps(project: 'chef-gcp-inspec') do its('names') { should include 'inspec-gcp-url-map' } end ``` ## Properties Properties that can be accessed from the `google_compute_url_maps` resource: See [google_compute_url_map](google_compute_url_map) for more detailed information. * `creation_timestamps`: an array of `google_compute_url_map` creation_timestamp * `default_services`: an array of `google_compute_url_map` default_service * `descriptions`: an array of `google_compute_url_map` description * `ids`: an array of `google_compute_url_map` id * `fingerprints`: an array of `google_compute_url_map` fingerprint * `header_actions`: an array of `google_compute_url_map` header_action * `host_rules`: an array of `google_compute_url_map` host_rules * `names`: an array of `google_compute_url_map` name * `path_matchers`: an array of `google_compute_url_map` path_matchers * `tests`: an array of `google_compute_url_map` tests * `default_url_redirects`: an array of `google_compute_url_map` default_url_redirect * `default_route_actions`: an array of `google_compute_url_map` default_route_action ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_vpn_gateway.md ================================================ +++ title = "google_compute_vpn_gateway resource" draft = false [menu.gcp] title = "google_compute_vpn_gateway" identifier = "inspec/resources/gcp/google_compute_vpn_gateway resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_vpn_gateway` InSpec audit resource to to test a Google Cloud VpnGateway resource. ## Examples ```ruby describe google_compute_vpn_gateway(project: 'chef-gcp-inspec', region: ' value_region', vpnGateway: ' ') do it { should exist } its('kind') { should cmp 'value_kind' } its('id') { should cmp 'value_id' } its('creation_timestamp') { should cmp 'value_creationtimestamp' } its('name') { should cmp 'value_name' } its('description') { should cmp 'value_description' } its('region') { should cmp 'value_region' } its('network') { should cmp 'value_network' } its('self_link') { should cmp 'value_selflink' } its('label_fingerprint') { should cmp 'value_labelfingerprint' } its('stack_type') { should cmp 'value_stacktype' } end describe google_compute_vpn_gateway(project: 'chef-gcp-inspec', region: ' value_region', vpnGateway: ' ') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_vpn_gateway` resource: * `kind`: [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways. * `id`: [Output Only] The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: [Output Only] Creation timestamp in RFC3339 text format. * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. Provide this property when you create the resource. * `region`: [Output Only] URL of the region where the VPN gateway resides. * `network`: URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created. * `self_link`: [Output Only] Server-defined URL for the resource. * `labels`: Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. * `additional_properties`: * `label_fingerprint`: A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway. * `vpn_interfaces`: The list of VPN interfaces associated with this VPN gateway. * `id`: [Output Only] Numeric identifier for this VPN interface associated with the VPN gateway. * `ip_address`: [Output Only] IP address for this VPN interface associated with the VPN gateway. The IP address could be either a regional external IP address or a regional internal IP address. The two IP addresses for a VPN gateway must be all regional external or regional internal IP addresses. There cannot be a mix of regional external IP addresses and regional internal IP addresses. For HA VPN over Cloud Interconnect, the IP addresses for both interfaces could either be regional internal IP addresses or regional external IP addresses. For regular (non HA VPN over Cloud Interconnect) HA VPN tunnels, the IP address must be a regional external IP address. * `interconnect_attachment`: URL of the VLAN attachment (interconnectAttachment) resource for this VPN gateway interface. When the value of this field is present, the VPN gateway is used for HA VPN over Cloud Interconnect; all egress or ingress traffic for this VPN gateway interface goes through the specified VLAN attachment resource. * `stack_type`: The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6. If not specified, IPV4_ONLY will be used. Possible values: * IPV4_IPV6 * IPV4_ONLY ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_vpn_gateways.md ================================================ +++ title = "google_compute_vpn_gateways resource" draft = false [menu.gcp] title = "google_compute_vpn_gateways" identifier = "inspec/resources/gcp/google_compute_vpn_gateways resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_vpn_gateways` InSpec audit resource to to test a Google Cloud VpnGateway resource. ## Examples ```ruby describe google_compute_vpn_gateways(project: 'chef-gcp-inspec', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_compute_vpn_gateways` resource: See [google_compute_vpn_gateway](google_compute_vpn_gateway) for more detailed information. * `kinds`: an array of `google_compute_vpn_gateway` kind * `ids`: an array of `google_compute_vpn_gateway` id * `creation_timestamps`: an array of `google_compute_vpn_gateway` creation_timestamp * `names`: an array of `google_compute_vpn_gateway` name * `descriptions`: an array of `google_compute_vpn_gateway` description * `regions`: an array of `google_compute_vpn_gateway` region * `networks`: an array of `google_compute_vpn_gateway` network * `self_links`: an array of `google_compute_vpn_gateway` self_link * `labels`: an array of `google_compute_vpn_gateway` labels * `label_fingerprints`: an array of `google_compute_vpn_gateway` label_fingerprint * `vpn_interfaces`: an array of `google_compute_vpn_gateway` vpn_interfaces * `stack_types`: an array of `google_compute_vpn_gateway` stack_type ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_vpn_tunnel.md ================================================ +++ title = "google_compute_vpn_tunnel resource" draft = false [menu.gcp] title = "google_compute_vpn_tunnel" identifier = "inspec/resources/gcp/google_compute_vpn_tunnel resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_vpn_tunnel` is used to test a Google VpnTunnel resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_vpn_tunnel(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'inspec-vpn-tunnel') do it { should exist } its('peer_ip') { should eq '15.0.0.120' } end describe google_compute_vpn_tunnel(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP compute vpn_tunnel exists describe google_compute_vpn_tunnel(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-vpn-tunnel') do it { should exist } end ### Test when a GCP compute vpn_tunnel was created describe google_compute_vpn_tunnel(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-vpn-tunnel') do its('creation_timestamp_date') { should be > Time.now - 365*60*60*24*10 } end ### Test for an expected vpn_tunnel identifier describe google_compute_vpn_tunnel(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-vpn-tunnel') do its('id') { should eq 12345567789 } end ### Test that a vpn_tunnel peer address is as expected describe google_compute_vpn_tunnel(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-vpn-tunnel') do its('peer_ip') { should eq "123.123.123.123" } end ### Test that a vpn_tunnel status is as expected describe google_compute_vpn_tunnel(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-vpn_tunnel') do its('status') { should eq "ESTABLISHED" } end ## Properties Properties that can be accessed from the `google_compute_vpn_tunnel` resource: * `id`: The unique identifier for the resource. This identifier is defined by the server. * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `name`: Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `description`: An optional description of this resource. * `target_vpn_gateway`: URL of the Target VPN gateway with which this VPN tunnel is associated. * `vpn_gateway`: URL of the VPN gateway with which this VPN tunnel is associated. This must be used if a High Availability VPN gateway resource is created. * `vpn_gateway_interface`: The interface ID of the VPN gateway with which this VPN tunnel is associated. * `peer_external_gateway`: URL of the peer side external VPN gateway to which this VPN tunnel is connected. * `peer_external_gateway_interface`: The interface ID of the external VPN gateway to which this VPN tunnel is connected. * `peer_gcp_gateway`: URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. If provided, the VPN tunnel will automatically use the same vpn_gateway_interface ID in the peer GCP VPN gateway. * `router`: URL of router resource to be used for dynamic routing. * `peer_ip`: IP address of the peer VPN gateway. Only IPv4 is supported. * `shared_secret`: Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway. * `shared_secret_hash`: Hash of the shared secret. * `ike_version`: IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2. * `local_traffic_selector`: Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example `192.168.0.0/16`. The ranges should be disjoint. Only IPv4 is supported. * `remote_traffic_selector`: Remote traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example `192.168.0.0/16`. The ranges should be disjoint. Only IPv4 is supported. * `labels`: (Beta only) Labels to apply to this VpnTunnel. * `label_fingerprint`: (Beta only) The fingerprint used for optimistic locking of this resource. Used internally during updates. * `region`: The region where the tunnel is located. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_vpn_tunnels.md ================================================ +++ title = "google_compute_vpn_tunnels resource" draft = false [menu.gcp] title = "google_compute_vpn_tunnels" identifier = "inspec/resources/gcp/google_compute_vpn_tunnels resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_vpn_tunnels` is used to test a Google VpnTunnel resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_vpn_tunnels(project: 'chef-gcp-inspec', region: 'europe-west2') do its('vpn_tunnel_names') { should include 'inspec-vpn-tunnel' } its('peer_ips') { should include '15.0.0.120' } end ``` ### Test that there are no more than a specified number of vpn_tunnels available for the project and region describe google_compute_vpn_tunnels(project: 'chef-inspec-gcp', region: 'europe-west2') do its('count') { should be <= 100} end ### Test that an expected vpn_tunnel name is available for the project and region describe google_compute_vpn_tunnels(project: 'chef-inspec-gcp', region: 'europe-west2') do its('vpn_tunnel_names') { should include "vpn_tunnel-name" } end ### Test that an expected vpn_tunnel target_vpn_gateways name is not present for the project and region describe google_compute_vpn_tunnels(project: 'chef-inspec-gcp', region: 'europe-west2') do its('vpn_tunnel_target_vpn_gateways') { should not include "gateway-name" } end ## Properties Properties that can be accessed from the `google_compute_vpn_tunnels` resource: See [google_compute_vpn_tunnel](google_compute_vpn_tunnel) for more detailed information. * `ids`: an array of `google_compute_vpn_tunnel` id * `creation_timestamps`: an array of `google_compute_vpn_tunnel` creation_timestamp * `vpn_tunnel_names`: an array of `google_compute_vpn_tunnel` name * `descriptions`: an array of `google_compute_vpn_tunnel` description * `target_vpn_gateways`: an array of `google_compute_vpn_tunnel` target_vpn_gateway * `vpn_gateways`: an array of `google_compute_vpn_tunnel` vpn_gateway * `vpn_gateway_interfaces`: an array of `google_compute_vpn_tunnel` vpn_gateway_interface * `peer_external_gateways`: an array of `google_compute_vpn_tunnel` peer_external_gateway * `peer_external_gateway_interfaces`: an array of `google_compute_vpn_tunnel` peer_external_gateway_interface * `peer_gcp_gateways`: an array of `google_compute_vpn_tunnel` peer_gcp_gateway * `routers`: an array of `google_compute_vpn_tunnel` router * `peer_ips`: an array of `google_compute_vpn_tunnel` peer_ip * `shared_secrets`: an array of `google_compute_vpn_tunnel` shared_secret * `shared_secret_hashes`: an array of `google_compute_vpn_tunnel` shared_secret_hash * `ike_versions`: an array of `google_compute_vpn_tunnel` ike_version * `local_traffic_selectors`: an array of `google_compute_vpn_tunnel` local_traffic_selector * `remote_traffic_selectors`: an array of `google_compute_vpn_tunnel` remote_traffic_selector * `labels`: (Beta only) an array of `google_compute_vpn_tunnel` labels * `label_fingerprints`: (Beta only) an array of `google_compute_vpn_tunnel` label_fingerprint * `regions`: an array of `google_compute_vpn_tunnel` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_xpn_resources.md ================================================ +++ title = "google_compute_xpn_resources resource" draft = false [menu.gcp] title = "google_compute_xpn_resources" identifier = "inspec/resources/gcp/google_compute_xpn_resources resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_xpn_resources` InSpec audit resource to to test a Google Cloud Project resource. ## Examples ```ruby describe google_compute_xpn_resources(project: 'chef-gcp-inspec') do it { should exist } its('ids') { should include xpn_resources['id']} its('types') { should include xpn_resources['type']} end ``` ## Properties Properties that can be accessed from the `google_compute_xpn_resources` resource: See [google_compute_xpn_resources](google_compute_xpn_resources) for more detailed information. * `kind`: Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects) * `resources[]`: Service resources (a.k.a service projects) attached to this project as their shared VPC host. * `resources[].type`: The type of the service resource. * `resources[].id`: The ID of the service resource. In the case of projects, this field supports project id (e.g., my-project-123) and project number (e.g. 12345678). ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_zone.md ================================================ +++ title = "google_compute_zone resource" draft = false [menu.gcp] title = "google_compute_zone" identifier = "inspec/resources/gcp/google_compute_zone resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_zone` is used to test a Google Zone resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_compute_zone(project: 'chef-gcp-inspec', name: "us-central1-a") do it { should exist } it { should be_up } end ``` ### Test that a GCP compute zone exists describe google_compute_zone(project: 'chef-inspec-gcp', zone: 'us-east1-b') do it { should exist } end ### Test that a GCP compute zone is in the expected state describe google_compute_zone(project: 'chef-inspec-gcp', zone: 'us-east1-b') do its('status') { should eq 'UP' } # or equivalently it { should be_up } end ### Test that a GCP compute zone has an expected CPU platform describe google_compute_zone(project: 'chef-inspec-gcp', zone: 'us-east1-b') do its('available_cpu_platforms') { should include "Intel Skylake" } end ## Properties Properties that can be accessed from the `google_compute_zone` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. * `deprecated`: The deprecation status associated with this machine type. * `deleted`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it. * `deprecated`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it. * `obsolete`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it. * `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. * `state`: The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. Possible values: * DEPRECATED * OBSOLETE * DELETED * `description`: An optional textual description of the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. * `region`: The region where the zone is located. * `status`: The status of the zone. Possible values: * UP * DOWN * `available_cpu_platforms`: The available CPU platforms in this zone ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_zone_operation.md ================================================ +++ title = "google_compute_zone_operation resource" draft = false [menu.gcp] title = "google_compute_zone_operation" identifier = "inspec/resources/gcp/google_compute_zone_operation resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_zone_operation` InSpec audit resource to to test a Google Cloud ZoneOperation resource. ## Examples ```ruby describe google_compute_zone_operation(project: 'chef-gcp-inspec', zone: 'us-central1-a', name: 'operation-1641188179305-5d4a6e66fe2bd-8fd1812d-d97f3b69') do it { should exist } its('name') { should eq 'operation-1641188179305-5d4a6e66fe2bd-8fd1812d-d97f3b69' } its('status') { should eq '' } its('progress') { should eq '100' } end describe google_compute_zone_operation(project: 'chef-gcp-inspec', zone: 'us-central1-a', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_compute_zone_operation` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated. * `description`: An optional textual description of the resource. * `id`: The unique identifier for the resource. * `name`: Name of the resource. * `status_message`: An optional, human-readable explanation of the status. * `target_id`: The unique target ID, which identifies a specific incarnation of the target resource. * `status`: The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. Possible values: * PENDING * RUNNING * DONE * `user`: User who requested the operation, for example: user@example.com. * `insert_time`: The time that this operation was requested. This value is in RFC3339 text format. * `start_time`: The time that this operation was requested. This value is in RFC3339 text format. * `end_time`: The time that this operation was requested. This value is in RFC3339 text format. * `progress`: An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. * `region`: The URL of the region where the operation resides. Only applicable when performing regional operations. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_zone_operations.md ================================================ +++ title = "google_compute_zone_operations resource" draft = false [menu.gcp] title = "google_compute_zone_operations" identifier = "inspec/resources/gcp/google_compute_zone_operations resource" parent = "inspec/resources/gcp" +++ Use the `google_compute_zone_operations` InSpec audit resource to to test a Google Cloud ZoneOperation resource. ## Examples ```ruby describe google_compute_zone_operations(project: 'chef-gcp-inspec', zone: 'us-central1-a') do it { should exist } its('names') { should include 'operation-1641188179305-5d4a6e66fe2bd-8fd1812d-d97f3b69' } its('progresses') { should include '100' } end ``` ## Properties Properties that can be accessed from the `google_compute_zone_operations` resource: See [google_compute_zone_operation](google_compute_zone_operation) for more detailed information. * `creation_timestamps`: an array of `google_compute_zone_operation` creation_timestamp * `descriptions`: an array of `google_compute_zone_operation` description * `ids`: an array of `google_compute_zone_operation` id * `names`: an array of `google_compute_zone_operation` name * `status_messages`: an array of `google_compute_zone_operation` status_message * `target_ids`: an array of `google_compute_zone_operation` target_id * `statuses`: an array of `google_compute_zone_operation` status * `users`: an array of `google_compute_zone_operation` user * `insert_times`: an array of `google_compute_zone_operation` insert_time * `start_times`: an array of `google_compute_zone_operation` start_time * `end_times`: an array of `google_compute_zone_operation` end_time * `progresses`: an array of `google_compute_zone_operation` progress * `regions`: an array of `google_compute_zone_operation` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_compute_zones.md ================================================ +++ title = "google_compute_zones resource" draft = false [menu.gcp] title = "google_compute_zones" identifier = "inspec/resources/gcp/google_compute_zones resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_compute_zones` is used to test a Google Zone resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby google_compute_zones(project: 'chef-gcp-inspec').zone_names.each do |zone_name| describe google_compute_zone(project: 'chef-gcp-inspec', name: zone_name) do it { should exist } it { should be_up } end end ``` ### Test that there are no more than a specified number of zones available for the project describe google_compute_zones(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test the exact number of zones in the project describe google_compute_zones(project: 'chef-inspec-gcp') do its('zone_ids.count') { should cmp 9 } end ### Test that an expected zone is available for the project describe google_compute_zones(project: 'chef-inspec-gcp') do its('zone_names') { should include "us-east1-b" } end ### Test whether any zones are in status "DOWN" describe google_compute_zones(project: 'chef-inspec-gcp') do its('zone_statuses') { should_not include "DOWN" } end ### Test that a subset of all zones matching "us*" are "UP" google_compute_zones(project: 'chef-inspec-gcp').where(zone_name: /^us/).zone_names.each do |zone_name| describe google_compute_zone(project: 'chef-inspec-gcp', zone: zone_name) do it { should exist } its('status') { should eq 'UP' } end end ## Properties Properties that can be accessed from the `google_compute_zones` resource: See [google_compute_zone](google_compute_zone) for more detailed information. * `creation_timestamps`: an array of `google_compute_zone` creation_timestamp * `deprecateds`: an array of `google_compute_zone` deprecated * `descriptions`: an array of `google_compute_zone` description * `zone_ids`: an array of `google_compute_zone` id * `zone_names`: an array of `google_compute_zone` name * `regions`: an array of `google_compute_zone` region * `zone_statuses`: an array of `google_compute_zone` status * `available_cpu_platforms`: an array of `google_compute_zone` available_cpu_platforms ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_container_cluster.md ================================================ +++ title = "google_container_cluster resource" draft = false [menu.gcp] title = "google_container_cluster" identifier = "inspec/resources/gcp/google_container_cluster resource" parent = "inspec/resources/gcp" +++ Use the `google_container_cluster` InSpec audit resource to to test a Google Cloud Cluster resource. ## Examples ```ruby describe google_container_cluster(project: 'chef-gcp-inspec', location: 'europe-west2-a', name: 'gcp-inspec-kube-cluster') do it { should exist } its('locations.sort'){ should cmp [ 'europe-west2-a', 'europe-west2-b', 'europe-west2-c' ].sort } its('master_auth.username') { should eq 'gcp-inspec-kube-admin' } end describe google_container_cluster(project: 'chef-gcp-inspec', location: 'europe-west2-a', name: 'nonexistent') do it { should_not exist } end describe google_container_cluster(project: 'chef-gcp-inspec', location: 'europe-west2-a', name: 'gcp-inspec-kube-cluster', beta: true) do it { should exist } its('release_channel.channel') { should cmp "RAPID" } end ``` ### Test that a GCP container cluster is in a particular state e.g. "RUNNING" describe google_container_cluster(project: 'chef-inspec-gcp', location: 'europe-west2-a', name: 'inspec-gcp-kube-cluster') do its('status') { should eq 'RUNNING' } end ### Test that a GCP container cluster has the expected kube master user/password describe google_container_cluster(project: 'chef-inspec-gcp', location: 'europe-west2-a', name: 'inspec-gcp-kube-cluster') do its('master_auth.username'){ should eq "user_name"} its('master_auth.password'){ should eq "choose_something_strong"} end ### Test that the locations where the GCP container cluster is running match those expected describe google_container_cluster(project: 'chef-inspec-gcp', location: 'europe-west2-a', name: 'inspec-gcp-kube-cluster') do its('locations.sort'){should cmp ["europe-west2-a", "europe-west2-b", "europe-west2-c"].sort} end ### Test GCP container cluster network and subnetwork settings describe google_container_cluster(project: 'chef-inspec-gcp', location: 'europe-west2-a', name: 'inspec-gcp-kube-cluster') do its('network'){should eq "default"} its('subnetwork'){should eq "default"} end ### Test GCP container cluster node pool configuration settings describe google_container_cluster(project: 'chef-inspec-gcp', location: 'europe-west2-a', name: 'inspec-gcp-kube-cluster') do its('node_config.disk_size_gb'){should eq 100} its('node_config.image_type'){should eq "COS"} its('node_config.machine_type'){should eq "n1-standard-1"} its('node_ipv4_cidr_size'){should eq 24} its('node_pools.count'){should eq 1} end ## Properties Properties that can be accessed from the `google_container_cluster` resource: * `name`: The name of this cluster. The name must be unique within this project and location, and can be up to 40 characters. Must be Lowercase letters, numbers, and hyphens only. Must start with a letter. Must end with a number or a letter. * `description`: An optional description of this cluster. * `initial_node_count`: The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "nodeConfig") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. This field has been deprecated. Please use nodePool.initial_node_count instead. * `node_config`: Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "initialNodeCount") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. For responses, this field will be populated with the node configuration of the first node pool. If unspecified, the defaults are used. * `machine_type`: The name of a Google Compute Engine machine type (e.g. n1-standard-1). If unspecified, the default machine type is n1-standard-1. * `disk_size_gb`: Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. * `oauth_scopes`: The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: https://www.googleapis.com/auth/compute is required for mounting persistent storage on your nodes. https://www.googleapis.com/auth/devstorage.read_only is required for communicating with gcr.io (the Google Container Registry). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added. * `service_account`: The Google Cloud Platform Service Account to be used by the node VMs. If no Service Account is specified, the "default" service account is used. * `metadata`: The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * `image_type`: The image type to use for this node. Note that for a given image type, the latest version of it will be used. * `labels`: The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that Kubernetes may apply to the node. In case of conflict in label keys, the applied set may differ depending on the Kubernetes version -- it's best to assume the behavior is undefined and conflicts should be avoided. For more information, including usage and the valid values, see: http://kubernetes.io/v1.1/docs/user-guide/labels.html An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * `local_ssd_count`: The number of local SSD disks to be attached to the node. The limit for this value is dependant upon the maximum number of disks available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits for more information. * `tags`: The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035. * `preemptible`: Whether the nodes are created as preemptible VM instances. See: https://cloud.google.com/compute/docs/instances/preemptible for more information about preemptible VM instances. * `accelerators`: A list of hardware accelerators to be attached to each node. See https://cloud.google.com/compute/docs/gpus for more information about support for GPUs. * `accelerator_count`: The number of accelerator cards exposed to an instance. * `accelerator_type`: The accelerator type resource name * `disk_type`: Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') If unspecified, the default disk type is 'pd-standard' * `min_cpu_platform`: Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform. * `taints`: List of kubernetes taints to be applied to each node. For more information, including usage and the valid values, see: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ * `key`: Key for taint * `value`: Value for taint * `effect`: Effect for taint Possible values: * EFFECT_UNSPECIFIED * NO_SCHEDULE * PREFER_NO_SCHEDULE * NO_EXECUTE * `shielded_instance_config`: Shielded Instance options. * `enable_secure_boot`: Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. * `enable_integrity_monitoring`: Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. * `master_auth`: The authentication information for accessing the master endpoint. * `username`: The username to use for HTTP basic authentication to the master endpoint. * `password`: The password to use for HTTP basic authentication to the master endpoint. Because the master endpoint is open to the Internet, you should create a strong password with a minimum of 16 characters. * `client_certificate_config`: Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, a client certificate is issued. * `issue_client_certificate`: Issue a client certificate. * `cluster_ca_certificate`: Base64-encoded public certificate that is the root of trust for the cluster. * `client_certificate`: Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. * `client_key`: Base64-encoded private key used by clients to authenticate to the cluster endpoint. * `fleet`: The fleet configuration for the cluster. * `project`: The Fleet host project(project ID or project number) where this cluster will be registered to. This field cannot be changed after the cluster has been registered. * `membership`: The full resource name of the registered fleet membership of the cluster, in the format //gkehub.googleapis.com/projects/*/locations/*/memberships/*. * `pre_registered`: Whether the cluster has been registered through the fleet API. * `logging_service`: The logging service the cluster should use to write logs. Currently available options: logging.googleapis.com - the Google Cloud Logging service. none - no logs will be exported from the cluster. if left as an empty string,logging.googleapis.com will be used. Possible values: * logging.googleapis.com * none * `monitoring_service`: The monitoring service the cluster should use to write metrics. Currently available options: monitoring.googleapis.com - the Google Cloud Monitoring service. none - no metrics will be exported from the cluster. if left as an empty string, monitoring.googleapis.com will be used. Possible values: * monitoring.googleapis.com * none * `network`: The name of the Google Compute Engine network to which the cluster is connected. If left unspecified, the default network will be used. * `database_encryption`: Configuration of etcd encryption. * `state`: Denotes the state of etcd encryption. Possible values: * ENCRYPTED * DECRYPTED * `key_name`: Name of CloudKMS key to use for the encryption of secrets in etcd. Ex. `projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key` * `private_cluster_config`: Configuration for a private cluster. * `enable_private_nodes`: Whether nodes have internal IP addresses only. If enabled, all nodes are given only RFC 1918 private addresses and communicate with the master via private networking. * `enable_private_endpoint`: Whether the master's internal IP address is used as the cluster endpoint. * `master_ipv4_cidr_block`: The IP range in CIDR notation to use for the hosted master network. This range will be used for assigning internal IP addresses to the master or set of masters, as well as the ILB VIP. This range must not overlap with any other ranges in use within the cluster's network. * `private_endpoint`: The internal IP address of this cluster's master endpoint. * `public_endpoint`: The external IP address of this cluster's master endpoint. * `cluster_ipv4_cidr`: The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8. * `enable_tpu`: (Optional) Whether to enable Cloud TPU resources in this cluster. See the official documentation - https://cloud.google.com/tpu/docs/kubernetes-engine-setup * `tpu_ipv4_cidr_block`: The IP address range of the Cloud TPUs in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). * `addons_config`: Configurations for the various addons available to run in the cluster. * `http_load_balancing`: Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. * `disabled`: Whether the HTTP Load Balancing controller is enabled in the cluster. When enabled, it runs a small pod in the cluster that manages the load balancers. * `horizontal_pod_autoscaling`: Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. * `disabled`: Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. When enabled, it ensures that a Heapster pod is running in the cluster, which is also used by the Cloud Monitoring service. * `kubernetes_dashboard`: Configuration for the Kubernetes Dashboard. This addon is deprecated, and will be disabled in 1.15. It is recommended to use the Cloud Console to manage and monitor your Kubernetes clusters, workloads and applications. * `disabled`: Whether the Kubernetes Dashboard is enabled for this cluster. * `network_policy_config`: Configuration for NetworkPolicy. This only tracks whether the addon is enabled or not on the Master, it does not track whether network policy is enabled for the nodes. * `disabled`: Whether NetworkPolicy is enabled for this cluster. * `gce_persistent_disk_csi_driver_config`: Configuration for enable the automatic deployment and management of the persistent disk driver without having to manually set it up. * `enabled`: Whether NetworkPolicy is enabled for this cluster. * `subnetwork`: The name of the Google Compute Engine subnetwork to which the cluster is connected. * `locations`: The list of Google Compute Engine zones in which the cluster's nodes should be located. * `resource_labels`: The resource labels for the cluster to use to annotate any related Google Compute Engine resources. * `label_fingerprint`: The fingerprint of the set of labels for this cluster. * `legacy_abac`: Configuration for the legacy ABAC authorization mode. * `enabled`: Whether the ABAC authorizer is enabled for this cluster. When enabled, identities in the system, including service accounts, nodes, and controllers, will have statically granted permissions beyond those provided by the RBAC configuration or IAM. * `network_policy`: Configuration options for the NetworkPolicy feature. * `provider`: The selected network policy provider. Possible values: * PROVIDER_UNSPECIFIED * CALICO * `enabled`: Whether network policy is enabled on the cluster. * `default_max_pods_constraint`: The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. * `max_pods_per_node`: Constraint enforced on the max num of pods per node. * `ip_allocation_policy`: Configuration for controlling how IPs are allocated in the cluster * `use_ip_aliases`: Whether alias IPs will be used for pod IPs in the cluster * `create_subnetwork`: Whether a new subnetwork will be created automatically for the cluster * `subnetwork_name`: A custom subnetwork name to be used if createSubnetwork is true. If this field is empty, then an automatic name will be chosen for the new subnetwork. * `cluster_secondary_range_name`: The name of the secondary range to be used for the cluster CIDR block. The secondary range will be used for pod IP addresses. This must be an existing secondary range associated with the cluster subnetwork * `services_secondary_range_name`: The name of the secondary range to be used as for the services CIDR block. The secondary range will be used for service ClusterIPs. This must be an existing secondary range associated with the cluster subnetwork. * `cluster_ipv4_cidr_block`: The IP address range for the cluster pod IPs. If this field is set, then cluster.cluster_ipv4_cidr must be left blank. This field is only applicable when useIpAliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. * `node_ipv4_cidr_block`: The IP address range of the instance IPs in this cluster. This is applicable only if createSubnetwork is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. * `services_ipv4_cidr_block`: The IP address range of the services IPs in this cluster. If blank, a range will be automatically chosen with the default size. This field is only applicable when useIpAliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. * `tpu_ipv4_cidr_block`: The IP address range of the Cloud TPUs in this cluster. If unspecified, a range will be automatically chosen with the default size. This field is only applicable when useIpAliases is true. If unspecified, the range will use the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. * `endpoint`: The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at https://username:password@endpoint/ See the masterAuth property of this resource for username and password information. * `initial_cluster_version`: The software version of the master endpoint and kubelets used in the cluster when it was first created. The version can be upgraded over time. * `current_master_version`: The current software version of the master endpoint. * `current_node_version`: The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. * `create_time`: The time the cluster was created, in RFC3339 text format. * `status`: The current status of this cluster. Possible values: * STATUS_UNSPECIFIED * PROVISIONING * RUNNING * RECONCILING * STOPPING * ERROR * DEGRADED * `status_message`: Additional information about the current status of this cluster, if available. * `node_ipv4_cidr_size`: The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range. * `services_ipv4_cidr`: The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in the last /16 from the container CIDR. * `current_node_count`: The number of nodes currently in the cluster. * `expire_time`: The time the cluster will be automatically deleted in RFC3339 text format. * `conditions`: Which conditions caused the current cluster state. * `code`: Machine-friendly representation of the condition * `message`: Human-friendly representation of the condition * `master_authorized_networks_config`: Configuration for controlling how IPs are allocated in the cluster * `enabled`: Whether or not master authorized networks is enabled. * `cidr_blocks`: Define up to 50 external networks that could access Kubernetes master through HTTPS. * `display_name`: Optional field used to identify cidr blocks * `cidr_block`: Block specified in CIDR notation * `node_pools`: Node pools belonging to this cluster * `name`: Name of the node pool * `binary_authorization`: Configuration for the BinaryAuthorization feature. * `enabled`: If enabled, all container images will be validated by Binary Authorization. * `release_channel`: ReleaseChannel indicates which release channel a cluster is subscribed to. Release channels are arranged in order of risk and frequency of updates. * `channel`: Which release channel the cluster is subscribed to. Possible values: * UNSPECIFIED * RAPID * REGULAR * STABLE * `shielded_nodes`: Shielded Nodes configuration. * `enabled`: Whether Shielded Nodes features are enabled on all nodes in this cluster. * `network_config`: Network configurations * `enable_intra_node_visibility`: Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network. * `network`: The relative name of the Google Compute Engine network to which the cluster is connected. Example: projects/my-project/global/networks/my-network * `subnetwork`: The relative name of the Google Compute Engine subnetwork to which the cluster is connected. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet * `default_snat_status`: Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when defaultSnatStatus is disabled. * `enable_kubernetes_alpha`: Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1alpha1) and features that may not be production ready in the kubernetes version of the master and nodes. * `location`: The location where the cluster is deployed ## GCP permissions Ensure the [Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_container_clusters.md ================================================ +++ title = "google_container_clusters resource" draft = false [menu.gcp] title = "google_container_clusters" identifier = "inspec/resources/gcp/google_container_clusters resource" parent = "inspec/resources/gcp" +++ Use the `google_container_clusters` InSpec audit resource to to test a Google Cloud Cluster resource. ## Examples ```ruby describe google_container_clusters(project: 'chef-gcp-inspec', location: 'europe-west2-a') do its('cluster_names') { should include 'gcp-inspec-kube-cluster' } end ``` ### Test that there are no more than a specified number of clusters available for the project in a particular zone describe google_container_clusters(project: 'chef-inspec-gcp', location: 'europe-west2-a') do its('count') { should be <= 5} end ### Test that an expected cluster is available for the project describe google_container_clusters(project: 'chef-inspec-gcp', location: 'europe-west2-a') do its('cluster_names') { should include "my-cluster" } end ### Test whether any clusters are in status "STOPPING" describe google_container_clusters(project: 'chef-inspec-gcp', location: 'europe-west2-a') do its('cluster_statuses') { should_not include "STOPPING" } end ### Test that a subset of all clusters matching "kube*" are "RUNNING" google_container_clusters(project: gcp_project_id).where(cluster_name: /^kube/).cluster_names.each do |cluster_name| describe google_container_cluster(project: 'chef-inspec-gcp', location: 'europe-west2-a', name: cluster_name) do it { should exist } its('status') { should eq 'RUNNING' } end end ## Properties Properties that can be accessed from the `google_container_clusters` resource: See [google_container_cluster](google_container_cluster) for more detailed information. * `cluster_names`: an array of `google_container_cluster` name * `descriptions`: an array of `google_container_cluster` description * `initial_node_counts`: an array of `google_container_cluster` initial_node_count * `node_configs`: an array of `google_container_cluster` node_config * `master_auths`: an array of `google_container_cluster` master_auth * `logging_services`: an array of `google_container_cluster` logging_service * `monitoring_services`: an array of `google_container_cluster` monitoring_service * `cluster_networks`: an array of `google_container_cluster` network * `database_encryptions`: an array of `google_container_cluster` database_encryption * `private_cluster_configs`: an array of `google_container_cluster` private_cluster_config * `cluster_ipv4_cidrs`: an array of `google_container_cluster` cluster_ipv4_cidr * `enable_tpus`: an array of `google_container_cluster` enable_tpu * `tpu_ipv4_cidr_blocks`: an array of `google_container_cluster` tpu_ipv4_cidr_block * `addons_configs`: an array of `google_container_cluster` addons_config * `subnetworks`: an array of `google_container_cluster` subnetwork * `locations`: an array of `google_container_cluster` locations * `resource_labels`: an array of `google_container_cluster` resource_labels * `label_fingerprints`: an array of `google_container_cluster` label_fingerprint * `legacy_abacs`: an array of `google_container_cluster` legacy_abac * `network_policies`: an array of `google_container_cluster` network_policy * `default_max_pods_constraints`: an array of `google_container_cluster` default_max_pods_constraint * `ip_allocation_policies`: an array of `google_container_cluster` ip_allocation_policy * `endpoints`: an array of `google_container_cluster` endpoint * `initial_cluster_versions`: an array of `google_container_cluster` initial_cluster_version * `current_master_versions`: an array of `google_container_cluster` current_master_version * `current_node_versions`: an array of `google_container_cluster` current_node_version * `create_times`: an array of `google_container_cluster` create_time * `cluster_statuses`: an array of `google_container_cluster` status * `status_messages`: an array of `google_container_cluster` status_message * `node_ipv4_cidr_sizes`: an array of `google_container_cluster` node_ipv4_cidr_size * `services_ipv4_cidrs`: an array of `google_container_cluster` services_ipv4_cidr * `current_node_counts`: an array of `google_container_cluster` current_node_count * `expire_times`: an array of `google_container_cluster` expire_time * `conditions`: an array of `google_container_cluster` conditions * `master_authorized_networks_configs`: an array of `google_container_cluster` master_authorized_networks_config * `node_pools`: an array of `google_container_cluster` node_pools * `binary_authorizations`: an array of `google_container_cluster` binary_authorization * `release_channels`: an array of `google_container_cluster` release_channel * `shielded_nodes`: an array of `google_container_cluster` shielded_nodes * `network_configs`: an array of `google_container_cluster` network_config * `enable_kubernetes_alphas`: an array of `google_container_cluster` enable_kubernetes_alpha * `locations`: an array of `google_container_cluster` location ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_container_node_pool.md ================================================ +++ title = "google_container_node_pool resource" draft = false [menu.gcp] title = "google_container_node_pool" identifier = "inspec/resources/gcp/google_container_node_pool resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_container_node_pool` is used to test a Google NodePool resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_container_node_pool(project: 'chef-gcp-inspec', location: 'europe-west2-a', cluster_name: 'gcp-inspec-kube-cluster', nodepool_name: 'inspec-gcp-regional-node-pool') do it { should exist } its('initial_node_count') { should eq '1'} end describe google_container_node_pool(project: 'chef-gcp-inspec', location: 'europe-west2-a', cluster_name: 'gcp-inspec-kube-cluster', nodepool_name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP container node pool is in a particular state e.g. "RUNNING" describe google_container_node_pool(project: 'chef-inspec-gcp', locations: 'europe-west2-a', cluster_name: 'inspec-gcp-kube-cluster', nodepool_name: 'inspec-gcp-kube-node-pool') do its('status') { should eq 'RUNNING' } end ### Test GCP container node pool disk size in GB is as expected describe google_container_node_pool(project: 'chef-inspec-gcp', locations: 'europe-west2-a', cluster_name: 'inspec-gcp-kube-cluster', nodepool_name: 'inspec-gcp-kube-node-pool') do its('config.disk_size_gb'){should eq 100} end ### Test GCP container node pool machine type is as expected describe google_container_node_pool(project: 'chef-inspec-gcp', locations: 'europe-west2-a', cluster_name: 'inspec-gcp-kube-cluster', nodepool_name: 'inspec-gcp-kube-node-pool') do its('config.machine_type'){should eq "n1-standard-1"} end ### Test GCP container node pool node image type is as expected describe google_container_node_pool(project: 'chef-inspec-gcp', locations: 'europe-west2-a', cluster_name: 'inspec-gcp-kube-cluster', nodepool_name: 'inspec-gcp-kube-node-pool') do its('config.image_type'){should eq "COS"} end ### Test GCP container node pool initial node count is as expected describe google_container_node_pool(project: 'chef-inspec-gcp', locations: 'europe-west2-a', cluster_name: 'inspec-gcp-kube-cluster', nodepool_name: 'inspec-gcp-kube-node-pool') do its('initial_node_count'){should eq 3} end ## Properties Properties that can be accessed from the `google_container_node_pool` resource: * `name`: The name of the node pool. * `config`: The node configuration of the pool. * `machine_type`: The name of a Google Compute Engine machine type (e.g. n1-standard-1). If unspecified, the default machine type is n1-standard-1. * `disk_size_gb`: Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. * `oauth_scopes`: The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: https://www.googleapis.com/auth/compute is required for mounting persistent storage on your nodes. https://www.googleapis.com/auth/devstorage.read_only is required for communicating with gcr.io (the Google Container Registry). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added. * `service_account`: The Google Cloud Platform Service Account to be used by the node VMs. If no Service Account is specified, the "default" service account is used. * `metadata`: The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * `image_type`: The image type to use for this node. Note that for a given image type, the latest version of it will be used. * `labels`: The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that Kubernetes may apply to the node. In case of conflict in label keys, the applied set may differ depending on the Kubernetes version -- it's best to assume the behavior is undefined and conflicts should be avoided. For more information, including usage and the valid values, see: http://kubernetes.io/v1.1/docs/user-guide/labels.html An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * `local_ssd_count`: The number of local SSD disks to be attached to the node. The limit for this value is dependant upon the maximum number of disks available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits for more information. * `tags`: The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035. * `preemptible`: Whether the nodes are created as preemptible VM instances. See: https://cloud.google.com/compute/docs/instances/preemptible for more information about preemptible VM instances. * `accelerators`: A list of hardware accelerators to be attached to each node * `accelerator_count`: The number of the accelerator cards exposed to an instance. * `accelerator_type`: The accelerator type resource name * `disk_type`: Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') If unspecified, the default disk type is 'pd-standard' * `min_cpu_platform`: Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform * `taints`: List of kubernetes taints to be applied to each node. * `key`: Key for taint * `value`: Value for taint * `effect`: Effect for taint * `shielded_instance_config`: Shielded Instance options. * `enable_secure_boot`: Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. * `enable_integrity_monitoring`: Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. * `workload_meta_config`: WorkloadMetadataConfig defines the metadata configuration to expose to workloads on the node pool. * `mode`: Mode is the configuration for how to expose metadata to workloads running on the node pool. Possible values: * GCE_METADATA * GKE_METADATA * `initial_node_count`: The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. * `status`: Status of nodes in this pool instance * `status_message`: Additional information about the current status of this node pool instance * `version`: The version of the Kubernetes of this node. * `autoscaling`: Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present. * `enabled`: Is autoscaling enabled for this node pool. * `min_node_count`: Minimum number of nodes in the NodePool. Must be >= 1 and <= maxNodeCount. * `max_node_count`: Maximum number of nodes in the NodePool. Must be >= minNodeCount. There has to enough quota to scale up the cluster. * `management`: Management configuration for this NodePool. * `auto_upgrade`: A flag that specifies whether node auto-upgrade is enabled for the node pool. If enabled, node auto-upgrade helps keep the nodes in your node pool up to date with the latest release version of Kubernetes. * `auto_repair`: A flag that specifies whether the node auto-repair is enabled for the node pool. If enabled, the nodes in this node pool will be monitored and, if they fail health checks too many times, an automatic repair action will be triggered. * `upgrade_options`: Specifies the Auto Upgrade knobs for the node pool. * `auto_upgrade_start_time`: This field is set when upgrades are about to commence with the approximate start time for the upgrades, in RFC3339 text format. * `description`: This field is set when upgrades are about to commence with the description of the upgrade. * `max_pods_constraint`: The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. * `max_pods_per_node`: Constraint enforced on the max num of pods per node. * `conditions`: Which conditions caused the current node pool state. * `code`: Machine-friendly representation of the condition Possible values: * UNKNOWN * GCE_STOCKOUT * GKE_SERVICE_ACCOUNT_DELETED * GCE_QUOTA_EXCEEDED * SET_BY_OPERATOR * `pod_ipv4_cidr_size`: The pod CIDR block size per node in this node pool. * `cluster`: The cluster this node pool belongs to. * `location`: The location where the node pool is deployed ## GCP permissions Ensure the [Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_container_node_pools.md ================================================ +++ title = "google_container_node_pools resource" draft = false [menu.gcp] title = "google_container_node_pools" identifier = "inspec/resources/gcp/google_container_node_pools resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_container_node_pools` is used to test a Google NodePool resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_container_node_pools(project: 'chef-gcp-inspec', location: 'europe-west2-a', cluster_name: 'gcp-inspec-kube-cluster') do its('initial_node_counts') { should include '1'} end ``` ### Test that there are no more than a specified number of node pools available for the project describe google_container_node_pools(project: 'chef-inspec-gcp') do its('count') { should be <= 10} end ### Test that an expected node pool is available for the project describe google_container_node_pools(project: 'chef-inspec-gcp') do its('node_pool_names') { should include "us-east1-b" } end ### Test that a subset of all node pools matching "mypool*" are "UP" google_container_node_pools(project: 'chef-inspec-gcp', location: 'europe-west2-a', cluster_name: 'inspec-gcp-cluster').where(node_pool_name: /^mypool/).node_pool_names.each do |node_pool_name| describe google_container_node_pool(project: 'chef-inspec-gcp', location: 'europe-west2-a', cluster_name: 'inspec-gcp-cluster', nodepool_name: node_pool_name) do it { should exist } its('status') { should eq 'RUNNING' } end end ## Properties Properties that can be accessed from the `google_container_node_pools` resource: See [google_container_node_pool](google_container_node_pool) for more detailed information. * `node_pool_names`: an array of `google_container_node_pool` name * `configs`: an array of `google_container_node_pool` config * `initial_node_counts`: an array of `google_container_node_pool` initial_node_count * `node_pool_statuses`: an array of `google_container_node_pool` status * `status_messages`: an array of `google_container_node_pool` status_message * `versions`: an array of `google_container_node_pool` version * `autoscalings`: an array of `google_container_node_pool` autoscaling * `managements`: an array of `google_container_node_pool` management * `max_pods_constraints`: an array of `google_container_node_pool` max_pods_constraint * `conditions`: an array of `google_container_node_pool` conditions * `pod_ipv4_cidr_sizes`: an array of `google_container_node_pool` pod_ipv4_cidr_size * `clusters`: an array of `google_container_node_pool` cluster * `locations`: an array of `google_container_node_pool` location ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_container_regional_cluster.md ================================================ +++ title = "google_container_regional_cluster resource" draft = false [menu.gcp] title = "google_container_regional_cluster" identifier = "inspec/resources/gcp/google_container_regional_cluster resource" parent = "inspec/resources/gcp" +++ Use the `google_container_regional_cluster` InSpec audit resource to to test a Google Cloud RegionalCluster resource. ## Examples ```ruby describe google_container_regional_cluster(project: 'chef-gcp-inspec', location: 'europe-west2', name: 'inspec-gcp-regional-cluster') do it { should exist } its('initial_node_count') { should eq '1'} its('location') { should eq 'europe-west2'} end describe google_container_regional_cluster(project: 'chef-gcp-inspec', location: 'europe-west2', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_container_regional_cluster` resource: * `name`: The name of this cluster. The name must be unique within this project and location, and can be up to 40 characters. Must be Lowercase letters, numbers, and hyphens only. Must start with a letter. Must end with a number or a letter. * `description`: An optional description of this cluster. * `initial_node_count`: The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "nodeConfig") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. This field has been deprecated. Please use nodePool.initial_node_count instead. * `node_config`: Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "initialNodeCount") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. For responses, this field will be populated with the node configuration of the first node pool. If unspecified, the defaults are used. * `machine_type`: The name of a Google Compute Engine machine type (e.g. n1-standard-1). If unspecified, the default machine type is n1-standard-1. * `disk_size_gb`: Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. * `oauth_scopes`: The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: https://www.googleapis.com/auth/compute is required for mounting persistent storage on your nodes. https://www.googleapis.com/auth/devstorage.read_only is required for communicating with gcr.io (the Google Container Registry). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added. * `service_account`: The Google Cloud Platform Service Account to be used by the node VMs. If no Service Account is specified, the "default" service account is used. * `metadata`: The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * `image_type`: The image type to use for this node. Note that for a given image type, the latest version of it will be used. * `labels`: The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that Kubernetes may apply to the node. In case of conflict in label keys, the applied set may differ depending on the Kubernetes version -- it's best to assume the behavior is undefined and conflicts should be avoided. For more information, including usage and the valid values, see: http://kubernetes.io/v1.1/docs/user-guide/labels.html An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * `local_ssd_count`: The number of local SSD disks to be attached to the node. The limit for this value is dependant upon the maximum number of disks available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits for more information. * `tags`: The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035. * `preemptible`: Whether the nodes are created as preemptible VM instances. See: https://cloud.google.com/compute/docs/instances/preemptible for more information about preemptible VM instances. * `accelerators`: A list of hardware accelerators to be attached to each node. See https://cloud.google.com/compute/docs/gpus for more information about support for GPUs. * `accelerator_count`: The number of accelerator cards exposed to an instance. * `accelerator_type`: The accelerator type resource name * `disk_type`: Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') If unspecified, the default disk type is 'pd-standard' * `min_cpu_platform`: Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform. * `taints`: List of kubernetes taints to be applied to each node. For more information, including usage and the valid values, see: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ * `key`: Key for taint * `value`: Value for taint * `effect`: Effect for taint * `master_auth`: The authentication information for accessing the master endpoint. * `username`: The username to use for HTTP basic authentication to the master endpoint. * `password`: The password to use for HTTP basic authentication to the master endpoint. Because the master endpoint is open to the Internet, you should create a strong password with a minimum of 16 characters. * `client_certificate_config`: Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, a client certificate is issued. * `issue_client_certificate`: Issue a client certificate. * `cluster_ca_certificate`: Base64-encoded public certificate that is the root of trust for the cluster. * `client_certificate`: Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. * `client_key`: Base64-encoded private key used by clients to authenticate to the cluster endpoint. * `logging_service`: The logging service the cluster should use to write logs. Currently available options: logging.googleapis.com - the Google Cloud Logging service. none - no logs will be exported from the cluster. if left as an empty string,logging.googleapis.com will be used. * `monitoring_service`: The monitoring service the cluster should use to write metrics. Currently available options: monitoring.googleapis.com - the Google Cloud Monitoring service. none - no metrics will be exported from the cluster. if left as an empty string, monitoring.googleapis.com will be used. * `network`: The name of the Google Compute Engine network to which the cluster is connected. If left unspecified, the default network will be used. * `private_cluster_config`: Configuration for a private cluster. * `enable_private_nodes`: Whether nodes have internal IP addresses only. If enabled, all nodes are given only RFC 1918 private addresses and communicate with the master via private networking. * `enable_private_endpoint`: Whether the master's internal IP address is used as the cluster endpoint. * `master_ipv4_cidr_block`: The IP range in CIDR notation to use for the hosted master network. This range will be used for assigning internal IP addresses to the master or set of masters, as well as the ILB VIP. This range must not overlap with any other ranges in use within the cluster's network. * `private_endpoint`: The internal IP address of this cluster's master endpoint. * `public_endpoint`: The external IP address of this cluster's master endpoint. * `cluster_ipv4_cidr`: The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8. * `enable_tpu`: (Optional) Whether to enable Cloud TPU resources in this cluster. See the official documentation - https://cloud.google.com/tpu/docs/kubernetes-engine-setup * `tpu_ipv4_cidr_block`: The IP address range of the Cloud TPUs in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). * `addons_config`: Configurations for the various addons available to run in the cluster. * `http_load_balancing`: Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. * `disabled`: Whether the HTTP Load Balancing controller is enabled in the cluster. When enabled, it runs a small pod in the cluster that manages the load balancers. * `horizontal_pod_autoscaling`: Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. * `disabled`: Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. When enabled, it ensures that a Heapster pod is running in the cluster, which is also used by the Cloud Monitoring service. * `kubernetes_dashboard`: Configuration for the Kubernetes Dashboard. This addon is deprecated, and will be disabled in 1.15. It is recommended to use the Cloud Console to manage and monitor your Kubernetes clusters, workloads and applications. * `disabled`: Whether the Kubernetes Dashboard is enabled for this cluster. * `network_policy_config`: Configuration for NetworkPolicy. This only tracks whether the addon is enabled or not on the Master, it does not track whether network policy is enabled for the nodes. * `disabled`: Whether NetworkPolicy is enabled for this cluster. * `subnetwork`: The name of the Google Compute Engine subnetwork to which the cluster is connected. * `locations`: The list of Google Compute Engine zones in which the cluster's nodes should be located. * `resource_labels`: The resource labels for the cluster to use to annotate any related Google Compute Engine resources. * `label_fingerprint`: The fingerprint of the set of labels for this cluster. * `legacy_abac`: Configuration for the legacy ABAC authorization mode. * `enabled`: Whether the ABAC authorizer is enabled for this cluster. When enabled, identities in the system, including service accounts, nodes, and controllers, will have statically granted permissions beyond those provided by the RBAC configuration or IAM. * `network_policy`: Configuration options for the NetworkPolicy feature. * `provider`: The selected network policy provider. * `enabled`: Whether network policy is enabled on the cluster. * `default_max_pods_constraint`: The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. * `max_pods_per_node`: Constraint enforced on the max num of pods per node. * `ip_allocation_policy`: Configuration for controlling how IPs are allocated in the cluster * `use_ip_aliases`: Whether alias IPs will be used for pod IPs in the cluster * `create_subnetwork`: Whether a new subnetwork will be created automatically for the cluster * `subnetwork_name`: A custom subnetwork name to be used if createSubnetwork is true. If this field is empty, then an automatic name will be chosen for the new subnetwork. * `cluster_secondary_range_name`: The name of the secondary range to be used for the cluster CIDR block. The secondary range will be used for pod IP addresses. This must be an existing secondary range associated with the cluster subnetwork * `services_secondary_range_name`: The name of the secondary range to be used as for the services CIDR block. The secondary range will be used for service ClusterIPs. This must be an existing secondary range associated with the cluster subnetwork. * `cluster_ipv4_cidr_block`: The IP address range for the cluster pod IPs. If this field is set, then cluster.cluster_ipv4_cidr must be left blank. This field is only applicable when useIpAliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. * `node_ipv4_cidr_block`: The IP address range of the instance IPs in this cluster. This is applicable only if createSubnetwork is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. * `services_ipv4_cidr_block`: The IP address range of the services IPs in this cluster. If blank, a range will be automatically chosen with the default size. This field is only applicable when useIpAliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. * `tpu_ipv4_cidr_block`: The IP address range of the Cloud TPUs in this cluster. If unspecified, a range will be automatically chosen with the default size. This field is only applicable when useIpAliases is true. If unspecified, the range will use the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. * `endpoint`: The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at https://username:password@endpoint/ See the masterAuth property of this resource for username and password information. * `initial_cluster_version`: The software version of the master endpoint and kubelets used in the cluster when it was first created. The version can be upgraded over time. * `current_master_version`: The current software version of the master endpoint. * `current_node_version`: The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. * `create_time`: The time the cluster was created, in RFC3339 text format. * `status`: The current status of this cluster. * `status_message`: Additional information about the current status of this cluster, if available. * `node_ipv4_cidr_size`: The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range. * `services_ipv4_cidr`: The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in the last /16 from the container CIDR. * `current_node_count`: The number of nodes currently in the cluster. * `expire_time`: The time the cluster will be automatically deleted in RFC3339 text format. * `conditions`: Which conditions caused the current cluster state. * `code`: Machine-friendly representation of the condition * `message`: Human-friendly representation of the condition * `master_authorized_networks_config`: Configuration for controlling how IPs are allocated in the cluster * `enabled`: Whether or not master authorized networks is enabled. * `cidr_blocks`: Define up to 50 external networks that could access Kubernetes master through HTTPS. * `display_name`: Optional field used to identify cidr blocks * `cidr_block`: Block specified in CIDR notation * `location`: The location where the cluster is deployed ## GCP permissions Ensure the [Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_container_regional_clusters.md ================================================ +++ title = "google_container_regional_clusters resource" draft = false [menu.gcp] title = "google_container_regional_clusters" identifier = "inspec/resources/gcp/google_container_regional_clusters resource" parent = "inspec/resources/gcp" +++ Use the `google_container_regional_clusters` InSpec audit resource to to test a Google Cloud RegionalCluster resource. ## Examples ```ruby describe google_container_regional_clusters(project: 'chef-gcp-inspec', location: 'europe-west2') do its('count') { should be >= 1 } its('names') { should include 'inspec-gcp-regional-cluster' } its('initial_node_counts') { should include '1'} end ``` ## Properties Properties that can be accessed from the `google_container_regional_clusters` resource: See [google_container_regional_cluster](google_container_regional_cluster) for more detailed information. * `names`: an array of `google_container_regional_cluster` name * `descriptions`: an array of `google_container_regional_cluster` description * `initial_node_counts`: an array of `google_container_regional_cluster` initial_node_count * `node_configs`: an array of `google_container_regional_cluster` node_config * `master_auths`: an array of `google_container_regional_cluster` master_auth * `logging_services`: an array of `google_container_regional_cluster` logging_service * `monitoring_services`: an array of `google_container_regional_cluster` monitoring_service * `networks`: an array of `google_container_regional_cluster` network * `private_cluster_configs`: an array of `google_container_regional_cluster` private_cluster_config * `cluster_ipv4_cidrs`: an array of `google_container_regional_cluster` cluster_ipv4_cidr * `enable_tpus`: an array of `google_container_regional_cluster` enable_tpu * `tpu_ipv4_cidr_blocks`: an array of `google_container_regional_cluster` tpu_ipv4_cidr_block * `addons_configs`: an array of `google_container_regional_cluster` addons_config * `subnetworks`: an array of `google_container_regional_cluster` subnetwork * `locations`: an array of `google_container_regional_cluster` locations * `resource_labels`: an array of `google_container_regional_cluster` resource_labels * `label_fingerprints`: an array of `google_container_regional_cluster` label_fingerprint * `legacy_abacs`: an array of `google_container_regional_cluster` legacy_abac * `network_policies`: an array of `google_container_regional_cluster` network_policy * `default_max_pods_constraints`: an array of `google_container_regional_cluster` default_max_pods_constraint * `ip_allocation_policies`: an array of `google_container_regional_cluster` ip_allocation_policy * `endpoints`: an array of `google_container_regional_cluster` endpoint * `initial_cluster_versions`: an array of `google_container_regional_cluster` initial_cluster_version * `current_master_versions`: an array of `google_container_regional_cluster` current_master_version * `current_node_versions`: an array of `google_container_regional_cluster` current_node_version * `create_times`: an array of `google_container_regional_cluster` create_time * `statuses`: an array of `google_container_regional_cluster` status * `status_messages`: an array of `google_container_regional_cluster` status_message * `node_ipv4_cidr_sizes`: an array of `google_container_regional_cluster` node_ipv4_cidr_size * `services_ipv4_cidrs`: an array of `google_container_regional_cluster` services_ipv4_cidr * `current_node_counts`: an array of `google_container_regional_cluster` current_node_count * `expire_times`: an array of `google_container_regional_cluster` expire_time * `conditions`: an array of `google_container_regional_cluster` conditions * `master_authorized_networks_configs`: an array of `google_container_regional_cluster` master_authorized_networks_config * `locations`: an array of `google_container_regional_cluster` location ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_container_regional_node_pool.md ================================================ +++ title = "google_container_regional_node_pool resource" draft = false [menu.gcp] title = "google_container_regional_node_pool" identifier = "inspec/resources/gcp/google_container_regional_node_pool resource" parent = "inspec/resources/gcp" +++ Use the `google_container_regional_node_pool` InSpec audit resource to to test a Google Cloud RegionalNodePool resource. ## Examples ```ruby describe google_container_regional_node_pool(project: 'chef-gcp-inspec', location: 'europe-west2', cluster: 'inspec-gcp-regional-cluster', name: 'inspec-gcp-regional-node-pool') do it { should exist } its('initial_node_count') { should eq '1'} end describe google_container_regional_node_pool(project: 'chef-gcp-inspec', location: 'europe-west2', cluster: 'inspec-gcp-regional-cluster', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_container_regional_node_pool` resource: * `name`: The name of the node pool. * `config`: The node configuration of the pool. * `machine_type`: The name of a Google Compute Engine machine type (e.g. n1-standard-1). If unspecified, the default machine type is n1-standard-1. * `disk_size_gb`: Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. * `oauth_scopes`: The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: https://www.googleapis.com/auth/compute is required for mounting persistent storage on your nodes. https://www.googleapis.com/auth/devstorage.read_only is required for communicating with gcr.io (the Google Container Registry). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added. * `service_account`: The Google Cloud Platform Service Account to be used by the node VMs. If no Service Account is specified, the "default" service account is used. * `metadata`: The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * `image_type`: The image type to use for this node. Note that for a given image type, the latest version of it will be used. * `labels`: The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that Kubernetes may apply to the node. In case of conflict in label keys, the applied set may differ depending on the Kubernetes version -- it's best to assume the behavior is undefined and conflicts should be avoided. For more information, including usage and the valid values, see: http://kubernetes.io/v1.1/docs/user-guide/labels.html An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * `local_ssd_count`: The number of local SSD disks to be attached to the node. The limit for this value is dependant upon the maximum number of disks available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits for more information. * `tags`: The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035. * `preemptible`: Whether the nodes are created as preemptible VM instances. See: https://cloud.google.com/compute/docs/instances/preemptible for more information about preemptible VM instances. * `accelerators`: A list of hardware accelerators to be attached to each node * `accelerator_count`: The number of the accelerator cards exposed to an instance. * `accelerator_type`: The accelerator type resource name * `disk_type`: Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') If unspecified, the default disk type is 'pd-standard' * `min_cpu_platform`: Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform * `taints`: List of kubernetes taints to be applied to each node. * `key`: Key for taint * `value`: Value for taint * `effect`: Effect for taint * `initial_node_count`: The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. * `status`: Status of nodes in this pool instance * `status_message`: Additional information about the current status of this node pool instance * `version`: The version of the Kubernetes of this node. * `autoscaling`: Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present. * `enabled`: Is autoscaling enabled for this node pool. * `min_node_count`: Minimum number of nodes in the NodePool. Must be >= 1 and <= maxNodeCount. * `max_node_count`: Maximum number of nodes in the NodePool. Must be >= minNodeCount. There has to enough quota to scale up the cluster. * `management`: Management configuration for this NodePool. * `auto_upgrade`: A flag that specifies whether node auto-upgrade is enabled for the node pool. If enabled, node auto-upgrade helps keep the nodes in your node pool up to date with the latest release version of Kubernetes. * `auto_repair`: A flag that specifies whether the node auto-repair is enabled for the node pool. If enabled, the nodes in this node pool will be monitored and, if they fail health checks too many times, an automatic repair action will be triggered. * `upgrade_options`: Specifies the Auto Upgrade knobs for the node pool. * `auto_upgrade_start_time`: This field is set when upgrades are about to commence with the approximate start time for the upgrades, in RFC3339 text format. * `description`: This field is set when upgrades are about to commence with the description of the upgrade. * `max_pods_constraint`: The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. * `max_pods_per_node`: Constraint enforced on the max num of pods per node. * `conditions`: Which conditions caused the current node pool state. * `code`: Machine-friendly representation of the condition * `pod_ipv4_cidr_size`: The pod CIDR block size per node in this node pool. * `cluster`: The cluster this node pool belongs to. * `location`: The location where the node pool is deployed ## GCP permissions Ensure the [Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_container_regional_node_pools.md ================================================ +++ title = "google_container_regional_node_pools resource" draft = false [menu.gcp] title = "google_container_regional_node_pools" identifier = "inspec/resources/gcp/google_container_regional_node_pools resource" parent = "inspec/resources/gcp" +++ Use the `google_container_regional_node_pools` InSpec audit resource to to test a Google Cloud RegionalNodePool resource. ## Examples ```ruby describe google_container_regional_node_pools(project: 'chef-gcp-inspec', location: 'europe-west2', cluster: 'inspec-gcp-regional-cluster') do its('initial_node_counts') { should include '1'} end ``` ## Properties Properties that can be accessed from the `google_container_regional_node_pools` resource: See [google_container_regional_node_pool](google_container_regional_node_pool) for more detailed information. * `names`: an array of `google_container_regional_node_pool` name * `configs`: an array of `google_container_regional_node_pool` config * `initial_node_counts`: an array of `google_container_regional_node_pool` initial_node_count * `statuses`: an array of `google_container_regional_node_pool` status * `status_messages`: an array of `google_container_regional_node_pool` status_message * `versions`: an array of `google_container_regional_node_pool` version * `autoscalings`: an array of `google_container_regional_node_pool` autoscaling * `managements`: an array of `google_container_regional_node_pool` management * `max_pods_constraints`: an array of `google_container_regional_node_pool` max_pods_constraint * `conditions`: an array of `google_container_regional_node_pool` conditions * `pod_ipv4_cidr_sizes`: an array of `google_container_regional_node_pool` pod_ipv4_cidr_size * `clusters`: an array of `google_container_regional_node_pool` cluster * `locations`: an array of `google_container_regional_node_pool` location ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_container_server_config.md ================================================ +++ title = "google_container_server_config resource" draft = false [menu.gcp] title = "google_container_server_config" identifier = "inspec/resources/gcp/google_container_server_config resource" parent = "inspec/resources/gcp" +++ Use the `google_container_server_config` InSpec audit resource to to test a Google Cloud ServerConfig resource. ## Examples ```ruby describe google_container_server_config(project: 'chef-gcp-inspec', location: 'europe-west2-a') do its('valid_master_versions') { should include '1.21.5-gke.1802'} end ``` ## Properties Properties that can be accessed from the `google_container_server_config` resource: * `default_cluster_version`: Version of Kubernetes the service deploys by default. * `default_image_type`: Default image type. * `valid_image_types`: List of valid image types. * `valid_node_versions`: List of valid node upgrade target versions, in descending order. * `valid_master_versions`: List of valid master versions, in descending order. * `channels`: List of release channel configurations. * `channel`: The release channel this configuration applies to. Possible values: * UNSPECIFIED * RAPID * REGULAR * STABLE * `default_version`: The default version for newly created clusters on the channel. * `valid_versions`: List of valid versions for the channel. * `location`: The name of the Google Compute Engine location to return ServerConfig for. ## GCP permissions Ensure the [Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_data_fusion_instance.md ================================================ +++ title = "google_data_fusion_instance resource" draft = false [menu.gcp] title = "google_data_fusion_instance" identifier = "inspec/resources/gcp/google_data_fusion_instance resource" parent = "inspec/resources/gcp" +++ Use the `google_data_fusion_instance` InSpec audit resource to test the properties of a Google Cloud Instance resource. ## Examples ```ruby describe google_data_fusion_instance(name: 'projects/*/locations/*/instances/inspec-instance') do it { should exist } its('name') { should cmp 'inspec-instance' } its('description') { should cmp 'value_description' } its('type') { should cmp 'value_type' } its('create_time') { should cmp 'value_create_time' } its('update_time') { should cmp 'value_update_time' } its('state') { should cmp 'value_state' } its('state_message') { should cmp 'value_state_message' } its('service_endpoint') { should cmp 'value_service_endpoint' } its('zone') { should cmp 'value_zone' } its('version') { should cmp 'value_version' } its('service_account') { should cmp 'value_service_account' } its('display_name') { should cmp 'value_display_name' } its('api_endpoint') { should cmp 'value_api_endpoint' } its('gcs_bucket') { should cmp 'value_gcs_bucket' } its('p4service_account') { should cmp 'value_p4service_account' } its('tenant_project_id') { should cmp 'value_tenant_project_id' } its('dataproc_service_account') { should cmp 'value_dataproc_service_account' } its('workforce_identity_service_endpoint') { should cmp 'value_workforce_identity_service_endpoint' } its('patch_revision') { should cmp 'value_patch_revision' } end describe google_data_fusion_instance(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_data_fusion_instance` resource: ## Properties Properties that can be accessed from the `google_data_fusion_instance` resource: * `name`: Output only. The name of this instance is in the form of projects/{project}/locations/{location}/instances/{instance}. * `description`: A description of this instance. * `type`: Required. Instance type. Possible values: * TYPE_UNSPECIFIED * BASIC * ENTERPRISE * DEVELOPER * `enable_stackdriver_logging`: Option to enable Stackdriver Logging. * `enable_stackdriver_monitoring`: Option to enable Stackdriver Monitoring. * `private_instance`: Specifies whether the Data Fusion instance should be private. If set to true, all Data Fusion nodes will have private IP addresses and will not be able to access the public internet. * `network_config`: Network configuration for a Data Fusion instance. These configurations are used for peering with the customer network. Configurations are optional when a public Data Fusion instance is to be created. However, providing these configurations allows several benefits, such as reduced network latency while accessing the customer resources from managed Data Fusion instance nodes, as well as access to the customer on-prem resources. * `network`: Optional. Name of the network in the customer project with which the Tenant Project will be peered for executing pipelines. In case of shared VPC where the network resides in another host project the network should specified in the form of projects/{host-project-id}/global/networks/{network}. This is only required for connectivity type VPC_PEERING. * `ip_allocation`: Optional. The IP range in CIDR notation to use for the managed Data Fusion instance nodes. This range must not overlap with any other ranges used in the Data Fusion instance network. This is required only when using connection type VPC_PEERING. Format: a.b.c.d/22 Example: 192.168.0.0/22 * `connection_type`: Optional. Type of connection for establishing private IP connectivity between the Data Fusion customer project VPC and the corresponding tenant project from a predefined list of available connection modes. If this field is unspecified for a private instance, VPC peering is used. Possible values: * CONNECTION_TYPE_UNSPECIFIED * VPC_PEERING * PRIVATE_SERVICE_CONNECT_INTERFACES * `private_service_connect_config`: Configuration for using Private Service Connect to establish connectivity between the Data Fusion consumer project and the corresponding tenant project. * `network_attachment`: Required. The reference to the network attachment used to establish private connectivity. It will be of the form projects/{project-id}/regions/{region}/networkAttachments/{network-attachment-id}. * `unreachable_cidr_block`: Optional. Input only. The CIDR block to which the CDF instance can't route traffic to in the consumer project VPC. The size of this block should be at least /25. This range should not overlap with the primary address range of any subnetwork used by the network attachment. This range can be used for other purposes in the consumer VPC as long as there is no requirement for CDF to reach destinations using these addresses. If this value is not provided, the server chooses a non RFC 1918 address range. The format of this field is governed by RFC 4632. Example: 192.168.0.0/25 * `effective_unreachable_cidr_block`: Output only. The CIDR block to which the CDF instance can't route traffic to in the consumer project VPC. The size of this block is /25. The format of this field is governed by RFC 4632. Example: 240.0.0.0/25 * `labels`: The resource labels for instance to use to annotate any related underlying resources such as Compute Engine VMs. The character '=' is not allowed to be used within the labels. * `additional_properties`: * `options`: Map of additional options used to configure the behavior of Data Fusion instance. * `additional_properties`: * `create_time`: Output only. The time the instance was created. * `update_time`: Output only. The time the instance was last updated. * `state`: Output only. The current state of this Data Fusion instance. Possible values: * STATE_UNSPECIFIED * CREATING * ACTIVE * FAILED * DELETING * UPGRADING * RESTARTING * UPDATING * AUTO_UPDATING * AUTO_UPGRADING * DISABLED * `state_message`: Output only. Additional information about the current state of this Data Fusion instance if available. * `service_endpoint`: Output only. Endpoint on which the Data Fusion UI is accessible. * `zone`: Name of the zone in which the Data Fusion instance will be created. Only DEVELOPER instances use this field. * `version`: Current version of the Data Fusion. Only specifiable in Update. * `service_account`: Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID. * `display_name`: Display name for an instance. * `available_version`: Output only. Available versions that the instance can be upgraded to using UpdateInstanceRequest. * `version_number`: The version number of the Data Fusion instance, such as '6.0.1.0'. * `default_version`: Whether this is currently the default version for Cloud Data Fusion * `available_features`: Represents a list of available feature names for a given version. * `type`: Type represents the release availability of the version Possible values: * TYPE_UNSPECIFIED * TYPE_PREVIEW * TYPE_GENERAL_AVAILABILITY * `api_endpoint`: Output only. Endpoint on which the REST APIs is accessible. * `gcs_bucket`: Output only. Cloud Storage bucket generated by Data Fusion in the customer project. * `accelerators`: Output only. List of accelerators enabled for this CDF instance. * `accelerator_type`: Optional. The type of an accelator for a Cloud Data Fusion instance. Possible values: * ACCELERATOR_TYPE_UNSPECIFIED * CDC * HEALTHCARE * CCAI_INSIGHTS * CLOUDSEARCH * `state`: Output only. The state of the accelerator. Possible values: * STATE_UNSPECIFIED * ENABLED * DISABLED * UNKNOWN * `p4_service_account`: Output only. Service agent for the customer project. * `tenant_project_id`: Output only. The name of the tenant project. * `dataproc_service_account`: User-managed service account to set on Dataproc when Cloud Data Fusion creates Dataproc to run data processing pipelines. This allows users to have fine-grained access control on Dataproc's accesses to cloud resources. * `enable_rbac`: Option to enable granular role-based access control. * `crypto_key_config`: The crypto key configuration. This field is used by the Customer-managed encryption keys (CMEK) feature. * `key_reference`: The name of the key which is used to encrypt/decrypt customer data. For key in Cloud KMS, the key should be in the format of `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * `disabled_reason`: Output only. If the instance state is DISABLED, the reason for disabling the instance. * `event_publish_config`: Confirguration of PubSubEventWriter. * `enabled`: Required. Option to enable Event Publishing. * `topic`: Required. The resource name of the Pub/Sub topic. Format: projects/{project_id}/topics/{topic_id} * `enable_zone_separation`: Option to enable granular zone separation. * `satisfies_pzs`: Output only. Reserved for future use. * `workforce_identity_service_endpoint`: Output only. Endpoint on which the Data Fusion UI is accessible to third-party users * `patch_revision`: Optional. Current patch revision of the Data Fusion. * `dataplex_data_lineage_integration_enabled`: Optional. Option to enable the Dataplex Lineage Integration feature. * `maintenance_policy`: Maintenance policy of the instance. * `maintenance_window`: Maintenance window of the instance. * `recurring_time_window`: Represents an arbitrary window of time that recurs. * `window`: Represents an arbitrary window of time. * `start_time`: Required. The start time of the time window provided in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. Example: "2024-01-01T12:04:06-04:00" * `end_time`: Required. The end time of the time window provided in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. The end time should take place after the start time. Example: "2024-01-02T12:04:06-06:00" * `recurrence`: Required. An RRULE with format [RFC-5545](https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how this window reccurs. They go on for the span of time between the start and end time. The only supported FREQ value is "WEEKLY". To have something repeat every weekday, use: "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR". This specifies how frequently the window starts. To have a 9 am - 5 pm UTC-4 window every weekday, use something like: ``` start time = 2019-01-01T09:00:00-0400 end time = 2019-01-01T17:00:00-0400 recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR ``` * `maintenance_exclusion_window`: Represents an arbitrary window of time. * `start_time`: Required. The start time of the time window provided in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. Example: "2024-01-01T12:04:06-04:00" * `end_time`: Required. The end time of the time window provided in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. The end time should take place after the start time. Example: "2024-01-02T12:04:06-06:00" ## GCP permissions Ensure the [Cloud Data Fusion API](https://console.cloud.google.com/apis/library/datafusion.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_data_fusion_instances.md ================================================ +++ title = "google_data_fusion_instances resource" draft = false [menu.gcp] title = "google_data_fusion_instances" identifier = "inspec/resources/gcp/google_data_fusion_instances resource" parent = "inspec/resources/gcp" +++ Use the `google_data_fusion_instances` InSpec audit resource to test the properties of a Google Cloud Instance resource. ## Examples ```ruby describe google_data_fusion_instances(parent: 'projects/*/locations/*') do it { should exist } end ``` ## Parameters Parameters that can be accessed from the `google_data_fusion_instances` resource: See [google_data_fusion_instance](google_data_fusion_instance) for more detailed information. * `names`: an array of `google_data_fusion_instance` name * `descriptions`: an array of `google_data_fusion_instance` description * `types`: an array of `google_data_fusion_instance` type * `enable_stackdriver_loggings`: an array of `google_data_fusion_instance` enable_stackdriver_logging * `enable_stackdriver_monitorings`: an array of `google_data_fusion_instance` enable_stackdriver_monitoring * `private_instances`: an array of `google_data_fusion_instance` private_instance * `network_configs`: an array of `google_data_fusion_instance` network_config * `labels`: an array of `google_data_fusion_instance` labels * `options`: an array of `google_data_fusion_instance` options * `create_times`: an array of `google_data_fusion_instance` create_time * `update_times`: an array of `google_data_fusion_instance` update_time * `states`: an array of `google_data_fusion_instance` state * `state_messages`: an array of `google_data_fusion_instance` state_message * `service_endpoints`: an array of `google_data_fusion_instance` service_endpoint * `zones`: an array of `google_data_fusion_instance` zone * `versions`: an array of `google_data_fusion_instance` version * `service_accounts`: an array of `google_data_fusion_instance` service_account * `display_names`: an array of `google_data_fusion_instance` display_name * `available_versions`: an array of `google_data_fusion_instance` available_version * `api_endpoints`: an array of `google_data_fusion_instance` api_endpoint * `gcs_buckets`: an array of `google_data_fusion_instance` gcs_bucket * `accelerators`: an array of `google_data_fusion_instance` accelerators * `p4_service_accounts`: an array of `google_data_fusion_instance` p4_service_account * `tenant_project_ids`: an array of `google_data_fusion_instance` tenant_project_id * `dataproc_service_accounts`: an array of `google_data_fusion_instance` dataproc_service_account * `enable_rbacs`: an array of `google_data_fusion_instance` enable_rbac * `crypto_key_configs`: an array of `google_data_fusion_instance` crypto_key_config * `disabled_reasons`: an array of `google_data_fusion_instance` disabled_reason * `event_publish_configs`: an array of `google_data_fusion_instance` event_publish_config * `enable_zone_separations`: an array of `google_data_fusion_instance` enable_zone_separation * `satisfies_pzs`: an array of `google_data_fusion_instance` satisfies_pzs * `workforce_identity_service_endpoints`: an array of `google_data_fusion_instance` workforce_identity_service_endpoint * `patch_revisions`: an array of `google_data_fusion_instance` patch_revision * `dataplex_data_lineage_integration_enableds`: an array of `google_data_fusion_instance` dataplex_data_lineage_integration_enabled * `maintenance_policies`: an array of `google_data_fusion_instance` maintenance_policy ## Properties Properties that can be accessed from the `google_data_fusion_instances` resource: See [google_data_fusion_instance](google_data_fusion_instance) for more detailed information. * `names`: an array of `google_data_fusion_instance` name * `descriptions`: an array of `google_data_fusion_instance` description * `types`: an array of `google_data_fusion_instance` type * `enable_stackdriver_loggings`: an array of `google_data_fusion_instance` enable_stackdriver_logging * `enable_stackdriver_monitorings`: an array of `google_data_fusion_instance` enable_stackdriver_monitoring * `private_instances`: an array of `google_data_fusion_instance` private_instance * `network_configs`: an array of `google_data_fusion_instance` network_config * `labels`: an array of `google_data_fusion_instance` labels * `options`: an array of `google_data_fusion_instance` options * `create_times`: an array of `google_data_fusion_instance` create_time * `update_times`: an array of `google_data_fusion_instance` update_time * `states`: an array of `google_data_fusion_instance` state * `state_messages`: an array of `google_data_fusion_instance` state_message * `service_endpoints`: an array of `google_data_fusion_instance` service_endpoint * `zones`: an array of `google_data_fusion_instance` zone * `versions`: an array of `google_data_fusion_instance` version * `service_accounts`: an array of `google_data_fusion_instance` service_account * `display_names`: an array of `google_data_fusion_instance` display_name * `available_versions`: an array of `google_data_fusion_instance` available_version * `api_endpoints`: an array of `google_data_fusion_instance` api_endpoint * `gcs_buckets`: an array of `google_data_fusion_instance` gcs_bucket * `accelerators`: an array of `google_data_fusion_instance` accelerators * `p4_service_accounts`: an array of `google_data_fusion_instance` p4_service_account * `tenant_project_ids`: an array of `google_data_fusion_instance` tenant_project_id * `dataproc_service_accounts`: an array of `google_data_fusion_instance` dataproc_service_account * `enable_rbacs`: an array of `google_data_fusion_instance` enable_rbac * `crypto_key_configs`: an array of `google_data_fusion_instance` crypto_key_config * `disabled_reasons`: an array of `google_data_fusion_instance` disabled_reason * `event_publish_configs`: an array of `google_data_fusion_instance` event_publish_config * `enable_zone_separations`: an array of `google_data_fusion_instance` enable_zone_separation * `satisfies_pzs`: an array of `google_data_fusion_instance` satisfies_pzs * `workforce_identity_service_endpoints`: an array of `google_data_fusion_instance` workforce_identity_service_endpoint * `patch_revisions`: an array of `google_data_fusion_instance` patch_revision * `dataplex_data_lineage_integration_enableds`: an array of `google_data_fusion_instance` dataplex_data_lineage_integration_enabled * `maintenance_policies`: an array of `google_data_fusion_instance` maintenance_policy ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Data Fusion API](https://console.cloud.google.com/apis/library/datafusion.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataflow_project_location_job.md ================================================ +++ title = "google_dataflow_project_location_job resource" draft = false [menu.gcp] title = "google_dataflow_project_location_job" identifier = "inspec/resources/gcp/google_dataflow_project_location_job resource" parent = "inspec/resources/gcp" +++ Use the `google_dataflow_project_location_job` InSpec audit resource to to test a Google Cloud ProjectLocationJob resource. ## Examples ```ruby describe google_dataflow_project_location_job(job: 'value_job_id', location: 'value_location', project: 'value_project') do it { should exist } its('id') { should cmp 'value_id' } its('project_id') { should cmp 'value_projectid' } its('name') { should cmp 'value_name' } its('type') { should cmp 'value_type' } its('steps_location') { should cmp 'value_stepslocation' } its('current_state') { should cmp 'value_currentstate' } its('current_state_time') { should cmp 'value_currentstatetime' } its('requested_state') { should cmp 'value_requestedstate' } its('create_time') { should cmp 'value_createtime' } its('replace_job_id') { should cmp 'value_replacejobid' } its('client_request_id') { should cmp 'value_clientrequestid' } its('replaced_by_job_id') { should cmp 'value_replacedbyjobid' } its('location') { should cmp 'value_location' } its('start_time') { should cmp 'value_starttime' } its('created_from_snapshot_id') { should cmp 'value_createdfromsnapshotid' } end describe google_dataflow_project_location_job(job: 'value_job_id', location: 'value_location', projectId: 'value_project') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_dataflow_project_location_job` resource: * `id`: The unique ID of this job. This field is set by the Dataflow service when the job is created, and is immutable for the life of the job. * `project_id`: The ID of the Google Cloud project that the job belongs to. * `name`: The user-specified Dataflow job name. Only one active job with a given name can exist in a project within one region at any given time. Jobs in different regions can have the same name. If a caller attempts to create a job with the same name as an active job that already exists, the attempt returns the existing job. The name must match the regular expression `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?` * `type`: The type of Dataflow job. Possible values: * JOB_TYPE_UNKNOWN * JOB_TYPE_BATCH * JOB_TYPE_STREAMING * `environment`: Describes the environment in which a Dataflow Job runs. * `temp_storage_prefix`: The prefix of the resources the system should use for temporary storage. The system will append the suffix "/temp-{JOBNAME} to this resource prefix, where {JOBNAME} is the value of the job_name field. The resulting bucket and object prefix is used as the prefix of the resources used to store temporary data needed during the job execution. NOTE: This will override the value in taskrunner_settings. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} * `cluster_manager_api_service`: The type of cluster manager API to use. If unknown or unspecified, the service will attempt to choose a reasonable default. This should be in the form of the API service name, e.g. "compute.googleapis.com". * `experiments`: The list of experiments to enable. This field should be used for SDK related experiments and not for service related experiments. The proper field for service related experiments is service_options. * `service_options`: The list of service options to enable. This field should be used for service related experiments only. These experiments, when graduating to GA, should be replaced by dedicated fields or become default (i.e. always on). * `service_kms_key_name`: If set, contains the Cloud KMS key identifier used to encrypt data at rest, AKA a Customer Managed Encryption Key (CMEK). Format: projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY * `worker_pools`: The worker pools. At least one "harness" worker pool must be specified in order for the job to have workers. * `kind`: The kind of the worker pool; currently only `harness` and `shuffle` are supported. * `num_workers`: Number of Google Compute Engine workers in this pool needed to execute the job. If zero or unspecified, the service will attempt to choose a reasonable default. * `packages`: Packages to be installed on workers. * `name`: The name of the package. * `location`: The resource to read the package from. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket} bucket.storage.googleapis.com/ * `default_package_set`: The default package set to install. This allows the service to select a default set of packages which are useful to worker harnesses written in a particular language. Possible values: * DEFAULT_PACKAGE_SET_UNKNOWN * DEFAULT_PACKAGE_SET_NONE * DEFAULT_PACKAGE_SET_JAVA * DEFAULT_PACKAGE_SET_PYTHON * `machine_type`: Machine type (e.g. "n1-standard-1"). If empty or unspecified, the service will attempt to choose a reasonable default. * `teardown_policy`: Sets the policy for determining when to turndown worker pool. Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and `TEARDOWN_NEVER`. `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn down. If the workers are not torn down by the service, they will continue to run and use Google Compute Engine VM resources in the user's project until they are explicitly terminated by the user. Because of this, Google recommends using the `TEARDOWN_ALWAYS` policy except for small, manually supervised test jobs. If unknown or unspecified, the service will attempt to choose a reasonable default. Possible values: * TEARDOWN_POLICY_UNKNOWN * TEARDOWN_ALWAYS * TEARDOWN_ON_SUCCESS * TEARDOWN_NEVER * `disk_size_gb`: Size of root disk for VMs, in GB. If zero or unspecified, the service will attempt to choose a reasonable default. * `disk_type`: Type of root disk for VMs. If empty or unspecified, the service will attempt to choose a reasonable default. * `disk_source_image`: Fully qualified source image for disks. * `zone`: Zone to run the worker pools in. If empty or unspecified, the service will attempt to choose a reasonable default. * `taskrunner_settings`: Taskrunner configuration settings. * `task_user`: The UNIX user ID on the worker VM to use for tasks launched by taskrunner; e.g. "root". * `task_group`: The UNIX group ID on the worker VM to use for tasks launched by taskrunner; e.g. "wheel". * `oauth_scopes`: The OAuth2 scopes to be requested by the taskrunner in order to access the Cloud Dataflow API. * `base_url`: The base URL for the taskrunner to use when accessing Google Cloud APIs. When workers access Google Cloud APIs, they logically do so via relative URLs. If this field is specified, it supplies the base URL to use for resolving these relative URLs. The normative algorithm used is defined by RFC 1808, "Relative Uniform Resource Locators". If not specified, the default value is "http://www.googleapis.com/" * `dataflow_api_version`: The API version of endpoint, e.g. "v1b3" * `parallel_worker_settings`: Provides data to pass through to the worker harness. * `base_url`: The base URL for accessing Google Cloud APIs. When workers access Google Cloud APIs, they logically do so via relative URLs. If this field is specified, it supplies the base URL to use for resolving these relative URLs. The normative algorithm used is defined by RFC 1808, "Relative Uniform Resource Locators". If not specified, the default value is "http://www.googleapis.com/" * `reporting_enabled`: Whether to send work progress updates to the service. * `service_path`: The Cloud Dataflow service path relative to the root URL, for example, "dataflow/v1b3/projects". * `shuffle_service_path`: The Shuffle service path relative to the root URL, for example, "shuffle/v1beta1". * `worker_id`: The ID of the worker running this pipeline. * `temp_storage_prefix`: The prefix of the resources the system should use for temporary storage. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} * `base_task_dir`: The location on the worker for task-specific subdirectories. * `continue_on_exception`: Whether to continue taskrunner if an exception is hit. * `log_to_serialconsole`: Whether to send taskrunner log info to Google Compute Engine VM serial console. * `alsologtostderr`: Whether to also send taskrunner log info to stderr. * `log_upload_location`: Indicates where to put logs. If this is not specified, the logs will not be uploaded. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} * `log_dir`: The directory on the VM to store logs. * `temp_storage_prefix`: The prefix of the resources the taskrunner should use for temporary storage. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} * `harness_command`: The command to launch the worker harness. * `workflow_file_name`: The file to store the workflow in. * `commandlines_file_name`: The file to store preprocessing commands in. * `vm_id`: The ID string of the VM. * `language_hint`: The suggested backend language. * `streaming_worker_main_class`: The streaming worker main class name. * `on_host_maintenance`: The action to take on host maintenance, as defined by the Google Compute Engine API. * `data_disks`: Data disks that are used by a VM in this workflow. * `size_gb`: Size of disk in GB. If zero or unspecified, the service will attempt to choose a reasonable default. * `disk_type`: Disk storage type, as defined by Google Compute Engine. This must be a disk type appropriate to the project and zone in which the workers will run. If unknown or unspecified, the service will attempt to choose a reasonable default. For example, the standard persistent disk type is a resource name typically ending in "pd-standard". If SSD persistent disks are available, the resource name typically ends with "pd-ssd". The actual valid values are defined the Google Compute Engine API, not by the Cloud Dataflow API; consult the Google Compute Engine documentation for more information about determining the set of available disk types for a particular project and zone. Google Compute Engine Disk types are local to a particular project in a particular zone, and so the resource name will typically look something like this: compute.googleapis.com/projects/project-id/zones/zone/diskTypes/pd-standard * `mount_point`: Directory in a VM where disk is mounted. * `metadata`: Metadata to set on the Google Compute Engine VMs. * `additional_properties`: * `autoscaling_settings`: Settings for WorkerPool autoscaling. * `algorithm`: The algorithm to use for autoscaling. Possible values: * AUTOSCALING_ALGORITHM_UNKNOWN * AUTOSCALING_ALGORITHM_NONE * AUTOSCALING_ALGORITHM_BASIC * `max_num_workers`: The maximum number of workers to cap scaling at. * `pool_args`: Extra arguments for this worker pool. * `additional_properties`: Properties of the object. Contains field @type with type URL. * `network`: Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default". * `subnetwork`: Subnetwork to which VMs will be assigned, if desired. Expected to be of the form "regions/REGION/subnetworks/SUBNETWORK". * `worker_harness_container_image`: Required. Docker container image that executes the Cloud Dataflow worker harness, residing in Google Container Registry. Deprecated for the Fn API path. Use sdk_harness_container_images instead. * `num_threads_per_worker`: The number of threads per worker harness. If empty or unspecified, the service will choose a number of threads (according to the number of cores on the selected machine type for batch, or 1 by convention for streaming). * `ip_configuration`: Configuration for VM IPs. Possible values: * WORKER_IP_UNSPECIFIED * WORKER_IP_PUBLIC * WORKER_IP_PRIVATE * `sdk_harness_container_images`: Set of SDK harness containers needed to execute this pipeline. This will only be set in the Fn API path. For non-cross-language pipelines this should have only one entry. Cross-language pipelines will have two or more entries. * `container_image`: A docker container image that resides in Google Container Registry. * `use_single_core_per_container`: If true, recommends the Dataflow service to use only one core per SDK container instance with this image. If false (or unset) recommends using more than one core per SDK container instance with this image for efficiency. Note that Dataflow service may choose to override this property if needed. * `environment_id`: Environment ID for the Beam runner API proto Environment that corresponds to the current SDK Harness. * `capabilities`: The set of capabilities enumerated in the above Environment proto. See also [beam_runner_api.proto](https://github.com/apache/beam/blob/master/model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/beam_runner_api.proto) * `user_agent`: A description of the process that generated the request. * `additional_properties`: Properties of the object. * `version`: A structure describing which components and their versions of the service are required in order to run the job. * `additional_properties`: Properties of the object. * `dataset`: The dataset for the current project where various workflow related tables are stored. The supported resource type is: Google BigQuery: bigquery.googleapis.com/{dataset} * `sdk_pipeline_options`: The Cloud Dataflow SDK pipeline options specified by the user. These options are passed through the service and are used to recreate the SDK pipeline options on the worker in a language agnostic and platform independent way. * `additional_properties`: Properties of the object. * `internal_experiments`: Experimental settings. * `additional_properties`: Properties of the object. Contains field @type with type URL. * `service_account_email`: Identity to run virtual machines as. Defaults to the default account. * `flex_resource_scheduling_goal`: Which Flexible Resource Scheduling mode to run in. Possible values: * FLEXRS_UNSPECIFIED * FLEXRS_SPEED_OPTIMIZED * FLEXRS_COST_OPTIMIZED * `worker_region`: The Compute Engine region (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1". Mutually exclusive with worker_zone. If neither worker_region nor worker_zone is specified, default to the control plane's region. * `worker_zone`: The Compute Engine zone (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1-a". Mutually exclusive with worker_region. If neither worker_region nor worker_zone is specified, a zone in the control plane's region is chosen based on available capacity. * `shuffle_mode`: Output only. The shuffle mode used for the job. Possible values: * SHUFFLE_MODE_UNSPECIFIED * VM_BASED * SERVICE_BASED * `debug_options`: Describes any options that have an effect on the debugging of pipelines. * `enable_hot_key_logging`: When true, enables the logging of the literal hot key to the user's Cloud Logging. * `data_sampling`: Configuration options for sampling elements. * `behaviors`: List of given sampling behaviors to enable. For example, specifying behaviors = [ALWAYS_ON] samples in-flight elements but does not sample exceptions. Can be used to specify multiple behaviors like, behaviors = [ALWAYS_ON, EXCEPTIONS] for specifying periodic sampling and exception sampling. If DISABLED is in the list, then sampling will be disabled and ignore the other given behaviors. Ordering does not matter. * `use_streaming_engine_resource_based_billing`: Output only. Whether the job uses the Streaming Engine resource-based billing model. * `streaming_mode`: Optional. Specifies the Streaming Engine message processing guarantees. Reduces cost and latency but might result in duplicate messages committed to storage. Designed to run simple mapping streaming ETL jobs at the lowest cost. For example, Change Data Capture (CDC) to BigQuery is a canonical use case. Possible values: * STREAMING_MODE_UNSPECIFIED * STREAMING_MODE_EXACTLY_ONCE * STREAMING_MODE_AT_LEAST_ONCE * `steps`: Exactly one of step or steps_location should be specified. The top-level steps that constitute the entire job. Only retrieved with JOB_VIEW_ALL. * `kind`: The kind of step in the Cloud Dataflow job. * `name`: The name that identifies the step. This must be unique for each step with respect to all other steps in the Cloud Dataflow job. * `properties`: Named properties associated with the step. Each kind of predefined step has its own required set of properties. Must be provided on Create. Only retrieved with JOB_VIEW_ALL. * `additional_properties`: Properties of the object. * `steps_location`: The Cloud Storage location where the steps are stored. * `current_state`: The current state of the job. Jobs are created in the `JOB_STATE_STOPPED` state unless otherwise specified. A job in the `JOB_STATE_RUNNING` state may asynchronously enter a terminal state. After a job has reached a terminal state, no further state updates may be made. This field might be mutated by the Dataflow service; callers cannot mutate it. Possible values: * JOB_STATE_UNKNOWN * JOB_STATE_STOPPED * JOB_STATE_RUNNING * JOB_STATE_DONE * JOB_STATE_FAILED * JOB_STATE_CANCELLED * JOB_STATE_UPDATED * JOB_STATE_DRAINING * JOB_STATE_DRAINED * JOB_STATE_PENDING * JOB_STATE_CANCELLING * JOB_STATE_QUEUED * JOB_STATE_RESOURCE_CLEANING_UP * `current_state_time`: The timestamp associated with the current state. * `requested_state`: The job's requested state. Applies to `UpdateJob` requests. Set `requested_state` with `UpdateJob` requests to switch between the states `JOB_STATE_STOPPED` and `JOB_STATE_RUNNING`. You can also use `UpdateJob` requests to change a job's state from `JOB_STATE_RUNNING` to `JOB_STATE_CANCELLED`, `JOB_STATE_DONE`, or `JOB_STATE_DRAINED`. These states irrevocably terminate the job if it hasn't already reached a terminal state. This field has no effect on `CreateJob` requests. Possible values: * JOB_STATE_UNKNOWN * JOB_STATE_STOPPED * JOB_STATE_RUNNING * JOB_STATE_DONE * JOB_STATE_FAILED * JOB_STATE_CANCELLED * JOB_STATE_UPDATED * JOB_STATE_DRAINING * JOB_STATE_DRAINED * JOB_STATE_PENDING * JOB_STATE_CANCELLING * JOB_STATE_QUEUED * JOB_STATE_RESOURCE_CLEANING_UP * `execution_info`: Additional information about how a Cloud Dataflow job will be executed that isn't contained in the submitted job. * `stages`: A mapping from each stage to the information about that stage. * `additional_properties`: Contains information about how a particular google.dataflow.v1beta3.Step will be executed. * `create_time`: The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service. * `replace_job_id`: If this job is an update of an existing job, this field is the job ID of the job it replaced. When sending a `CreateJobRequest`, you can update a job by specifying it here. The job named here is stopped, and its intermediate state is transferred to this job. * `transform_name_mapping`: The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. * `additional_properties`: * `client_request_id`: The client's unique identifier of the job, re-used across retried attempts. If this field is set, the service will ensure its uniqueness. The request to create a job will fail if the service has knowledge of a previously submitted job with the same client's ID and job name. The caller may use this field to ensure idempotence of job creation across retried attempts to create a job. By default, the field is empty and, in that case, the service ignores it. * `replaced_by_job_id`: If another job is an update of this job (and thus, this job is in `JOB_STATE_UPDATED`), this field contains the ID of that job. * `temp_files`: A set of files the system should be aware of that are used for temporary storage. These temporary files will be removed on job completion. No duplicates are allowed. No file patterns are supported. The supported files are: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} * `labels`: User-defined labels for this job. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. * `additional_properties`: * `location`: The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job. * `pipeline_description`: A descriptive representation of submitted pipeline as well as the executed form. This data is provided by the Dataflow service for ease of visualizing the pipeline and interpreting Dataflow provided metrics. * `original_pipeline_transform`: Description of each transform in the pipeline and collections between them. * `kind`: Type of transform. Possible values: * UNKNOWN_KIND * PAR_DO_KIND * GROUP_BY_KEY_KIND * FLATTEN_KIND * READ_KIND * WRITE_KIND * CONSTANT_KIND * SINGLETON_KIND * SHUFFLE_KIND * `id`: SDK generated id of this transform instance. * `name`: User provided name for this transform instance. * `display_data`: Transform-specific display data. * `key`: The key identifying the display data. This is intended to be used as a label for the display data when viewed in a dax monitoring system. * `namespace`: The namespace for the key. This is usually a class name or programming language namespace (i.e. python module) which defines the display data. This allows a dax monitoring system to specially handle the data and perform custom rendering. * `str_value`: Contains value if the data is of string type. * `int64_value`: Contains value if the data is of int64 type. * `float_value`: Contains value if the data is of float type. * `java_class_value`: Contains value if the data is of java class type. * `timestamp_value`: Contains value if the data is of timestamp type. * `duration_value`: Contains value if the data is of duration type. * `bool_value`: Contains value if the data is of a boolean type. * `short_str_value`: A possible additional shorter value to display. For example a java_class_name_value of com.mypackage.MyDoFn will be stored with MyDoFn as the short_str_value and com.mypackage.MyDoFn as the java_class_name value. short_str_value can be displayed and java_class_name_value will be displayed as a tooltip. * `url`: An optional full URL. * `label`: An optional label to display in a dax UI for the element. * `output_collection_name`: User names for all collection outputs to this transform. * `input_collection_name`: User names for all collection inputs to this transform. * `execution_pipeline_stage`: Description of each stage of execution of the pipeline. * `name`: Dataflow service generated name for this stage. * `id`: Dataflow service generated id for this stage. * `kind`: Type of transform this stage is executing. Possible values: * UNKNOWN_KIND * PAR_DO_KIND * GROUP_BY_KEY_KIND * FLATTEN_KIND * READ_KIND * WRITE_KIND * CONSTANT_KIND * SINGLETON_KIND * SHUFFLE_KIND * `input_source`: Input sources for this stage. * `user_name`: Human-readable name for this source; may be user or system generated. * `name`: Dataflow service generated name for this source. * `original_transform_or_collection`: User name for the original user transform or collection with which this source is most closely associated. * `size_bytes`: Size of the source, if measurable. * `output_source`: Output sources for this stage. * `user_name`: Human-readable name for this source; may be user or system generated. * `name`: Dataflow service generated name for this source. * `original_transform_or_collection`: User name for the original user transform or collection with which this source is most closely associated. * `size_bytes`: Size of the source, if measurable. * `prerequisite_stage`: Other stages that must complete before this stage can run. * `component_transform`: Transforms that comprise this execution stage. * `user_name`: Human-readable name for this transform; may be user or system generated. * `name`: Dataflow service generated name for this source. * `original_transform`: User name for the original user transform with which this transform is most closely associated. * `component_source`: Collections produced and consumed by component transforms of this stage. * `user_name`: Human-readable name for this transform; may be user or system generated. * `name`: Dataflow service generated name for this source. * `original_transform_or_collection`: User name for the original user transform or collection with which this source is most closely associated. * `display_data`: Pipeline level display data. * `key`: The key identifying the display data. This is intended to be used as a label for the display data when viewed in a dax monitoring system. * `namespace`: The namespace for the key. This is usually a class name or programming language namespace (i.e. python module) which defines the display data. This allows a dax monitoring system to specially handle the data and perform custom rendering. * `str_value`: Contains value if the data is of string type. * `int64_value`: Contains value if the data is of int64 type. * `float_value`: Contains value if the data is of float type. * `java_class_value`: Contains value if the data is of java class type. * `timestamp_value`: Contains value if the data is of timestamp type. * `duration_value`: Contains value if the data is of duration type. * `bool_value`: Contains value if the data is of a boolean type. * `short_str_value`: A possible additional shorter value to display. For example a java_class_name_value of com.mypackage.MyDoFn will be stored with MyDoFn as the short_str_value and com.mypackage.MyDoFn as the java_class_name value. short_str_value can be displayed and java_class_name_value will be displayed as a tooltip. * `url`: An optional full URL. * `label`: An optional label to display in a dax UI for the element. * `step_names_hash`: A hash value of the submitted pipeline portable graph step names if exists. * `stage_states`: This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. * `execution_stage_name`: The name of the execution stage. * `execution_stage_state`: Executions stage states allow the same set of values as JobState. Possible values: * JOB_STATE_UNKNOWN * JOB_STATE_STOPPED * JOB_STATE_RUNNING * JOB_STATE_DONE * JOB_STATE_FAILED * JOB_STATE_CANCELLED * JOB_STATE_UPDATED * JOB_STATE_DRAINING * JOB_STATE_DRAINED * JOB_STATE_PENDING * JOB_STATE_CANCELLING * JOB_STATE_QUEUED * JOB_STATE_RESOURCE_CLEANING_UP * `current_state_time`: The time at which the stage transitioned to this state. * `job_metadata`: Metadata available primarily for filtering jobs. Will be included in the ListJob response and Job SUMMARY view. * `sdk_version`: The version of the SDK used to run the job. * `version`: The version of the SDK used to run the job. * `version_display_name`: A readable string describing the version of the SDK. * `sdk_support_status`: The support status for this SDK version. Possible values: * UNKNOWN * SUPPORTED * STALE * DEPRECATED * UNSUPPORTED * `bugs`: Output only. Known bugs found in this SDK version. * `type`: Output only. Describes the impact of this SDK bug. Possible values: * TYPE_UNSPECIFIED * GENERAL * PERFORMANCE * DATALOSS * `severity`: Output only. How severe the SDK bug is. Possible values: * SEVERITY_UNSPECIFIED * NOTICE * WARNING * SEVERE * `uri`: Output only. Link to more information on the bug. * `spanner_details`: Identification of a Spanner source used in the Dataflow job. * `project_id`: ProjectId accessed in the connection. * `instance_id`: InstanceId accessed in the connection. * `database_id`: DatabaseId accessed in the connection. * `bigquery_details`: Identification of a BigQuery source used in the Dataflow job. * `table`: Table accessed in the connection. * `dataset`: Dataset accessed in the connection. * `project_id`: Project accessed in the connection. * `query`: Query used to access data in the connection. * `big_table_details`: Identification of a Cloud Bigtable source used in the Dataflow job. * `project_id`: ProjectId accessed in the connection. * `instance_id`: InstanceId accessed in the connection. * `table_id`: TableId accessed in the connection. * `pubsub_details`: Identification of a Pub/Sub source used in the Dataflow job. * `topic`: Topic accessed in the connection. * `subscription`: Subscription used in the connection. * `file_details`: Identification of a File source used in the Dataflow job. * `file_pattern`: File Pattern used to access files by the connector. * `datastore_details`: Identification of a Datastore source used in the Dataflow job. * `namespace`: Namespace used in the connection. * `project_id`: ProjectId accessed in the connection. * `user_display_properties`: List of display properties to help UI filter jobs. * `additional_properties`: * `start_time`: The timestamp when the job was started (transitioned to JOB_STATE_PENDING). Flexible resource scheduling jobs are started with some delay after job creation, so start_time is unset before start and is updated when the job is started by the Cloud Dataflow service. For other jobs, start_time always equals to create_time and is immutable and set by the Cloud Dataflow service. * `created_from_snapshot_id`: If this is specified, the job's initial state is populated from the given snapshot. * `satisfies_pzs`: Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. * `runtime_updatable_params`: Additional job parameters that can only be updated during runtime using the projects.jobs.update method. These fields have no effect when specified during job creation. * `max_num_workers`: The maximum number of workers to cap autoscaling at. This field is currently only supported for Streaming Engine jobs. * `min_num_workers`: The minimum number of workers to scale down to. This field is currently only supported for Streaming Engine jobs. * `worker_utilization_hint`: Target worker utilization, compared against the aggregate utilization of the worker pool by autoscaler, to determine upscaling and downscaling when absent other constraints such as backlog. * `satisfies_pzi`: Output only. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. ## GCP permissions Ensure the [https://dataflow.googleapis.com/](https://console.cloud.google.com/apis/library/dataflow.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataflow_project_location_jobs.md ================================================ +++ title = "google_dataflow_project_location_jobs resource" draft = false [menu.gcp] title = "google_dataflow_project_location_jobs" identifier = "inspec/resources/gcp/google_dataflow_project_location_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_dataflow_project_location_jobs` InSpec audit resource to to test a Google Cloud ProjectLocationJob resource. ## Examples ```ruby describe google_dataflow_project_location_jobs(location: 'value_location', project: 'value_project') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_dataflow_project_location_jobs` resource: See [google_dataflow_project_location_job](google_dataflow_project_location_job) for more detailed information. * `ids`: an array of `google_dataflow_project_location_job` id * `project_ids`: an array of `google_dataflow_project_location_job` project_id * `names`: an array of `google_dataflow_project_location_job` name * `types`: an array of `google_dataflow_project_location_job` type * `environments`: an array of `google_dataflow_project_location_job` environment * `steps`: an array of `google_dataflow_project_location_job` steps * `steps_locations`: an array of `google_dataflow_project_location_job` steps_location * `current_states`: an array of `google_dataflow_project_location_job` current_state * `current_state_times`: an array of `google_dataflow_project_location_job` current_state_time * `requested_states`: an array of `google_dataflow_project_location_job` requested_state * `execution_infos`: an array of `google_dataflow_project_location_job` execution_info * `create_times`: an array of `google_dataflow_project_location_job` create_time * `replace_job_ids`: an array of `google_dataflow_project_location_job` replace_job_id * `transform_name_mappings`: an array of `google_dataflow_project_location_job` transform_name_mapping * `client_request_ids`: an array of `google_dataflow_project_location_job` client_request_id * `replaced_by_job_ids`: an array of `google_dataflow_project_location_job` replaced_by_job_id * `temp_files`: an array of `google_dataflow_project_location_job` temp_files * `labels`: an array of `google_dataflow_project_location_job` labels * `locations`: an array of `google_dataflow_project_location_job` location * `pipeline_descriptions`: an array of `google_dataflow_project_location_job` pipeline_description * `stage_states`: an array of `google_dataflow_project_location_job` stage_states * `job_metadata`: an array of `google_dataflow_project_location_job` job_metadata * `start_times`: an array of `google_dataflow_project_location_job` start_time * `created_from_snapshot_ids`: an array of `google_dataflow_project_location_job` created_from_snapshot_id * `satisfies_pzs`: an array of `google_dataflow_project_location_job` satisfies_pzs * `runtime_updatable_params`: an array of `google_dataflow_project_location_job` runtime_updatable_params * `satisfies_pzis`: an array of `google_dataflow_project_location_job` satisfies_pzi ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://dataflow.googleapis.com/](https://console.cloud.google.com/apis/library/dataflow.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_autoscaling_policies.md ================================================ +++ title = "google_dataproc_autoscaling_policies resource" draft = false [menu.gcp] title = "google_dataproc_autoscaling_policies" identifier = "inspec/resources/gcp/google_dataproc_autoscaling_policies resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_autoscaling_policies` InSpec audit resource to to test a Google Cloud ProjectRegionAutoscalingPolicy resource. ## Examples ```ruby describe google_dataproc_autoscaling_policies(parent: 'value_parent') do it { should exist } its('ids') { should include 'value_id' } its('names') { should include 'value_name' } end ``` ## Properties Properties that can be accessed from the `google_dataproc_autoscaling_policies` resource: See [google_dataproc_autoscaling_policy](google_dataproc_autoscaling_policy) for more detailed information. * `ids`: an array of `google_dataproc_autoscaling_policy` id * `names`: an array of `google_dataproc_autoscaling_policy` name * `basic_algorithms`: an array of `google_dataproc_autoscaling_policy` basic_algorithm * `worker_configs`: an array of `google_dataproc_autoscaling_policy` worker_config * `secondary_worker_configs`: an array of `google_dataproc_autoscaling_policy` secondary_worker_config * `labels`: an array of `google_dataproc_autoscaling_policy` labels ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_autoscaling_policy.md ================================================ +++ title = "google_dataproc_autoscaling_policy resource" draft = false [menu.gcp] title = "google_dataproc_autoscaling_policy" identifier = "inspec/resources/gcp/google_dataproc_autoscaling_policy resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_autoscaling_policy` InSpec audit resource to to test a Google Cloud ProjectRegionAutoscalingPolicy resource. ## Examples ```ruby describe google_dataproc_autoscaling_policy(name: 'value_name') do it { should exist } its('id') { should cmp 'value_id' } its('name') { should cmp 'value_name' } end describe google_dataproc_autoscaling_policy(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_autoscaling_policy` resource: ## Properties Properties that can be accessed from the `google_dataproc_autoscaling_policy` resource: * `id`: Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters. * `name`: Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} * `basic_algorithm`: Basic algorithm for autoscaling. * `yarn_config`: Basic autoscaling configurations for YARN. * `graceful_decommission_timeout`: Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d. * `scale_up_factor`: Required. Fraction of average YARN pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling). See How autoscaling works (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) for more information.Bounds: 0.0, 1.0. * `scale_down_factor`: Required. Fraction of average YARN pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job. See How autoscaling works (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) for more information.Bounds: 0.0, 1.0. * `scale_up_min_worker_fraction`: Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0. * `scale_down_min_worker_fraction`: Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0. * `spark_standalone_config`: Basic autoscaling configurations for Spark Standalone. * `graceful_decommission_timeout`: Required. Timeout for Spark graceful decommissioning of spark workers. Specifies the duration to wait for spark worker to complete spark decommissioning tasks before forcefully removing workers. Only applicable to downscaling operations.Bounds: 0s, 1d. * `scale_up_factor`: Required. Fraction of required workers to add to Spark Standalone clusters. A scale-up factor of 1.0 will result in scaling up so that there are no more required workers for the Spark Job (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling).Bounds: 0.0, 1.0. * `scale_down_factor`: Required. Fraction of required executors to remove from Spark Serverless clusters. A scale-down factor of 1.0 will result in scaling down so that there are no more executors for the Spark Job.(more aggressive scaling). A scale-down factor closer to 0 will result in a smaller magnitude of scaling donw (less aggressive scaling).Bounds: 0.0, 1.0. * `scale_up_min_worker_fraction`: Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0. * `scale_down_min_worker_fraction`: Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0. * `remove_only_idle_workers`: Optional. Remove only idle workers when scaling down cluster * `cooldown_period`: Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m. * `worker_config`: Configuration for the size bounds of an instance group, including its proportional size to other groups. * `min_instances`: Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0. * `max_instances`: Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0. * `weight`: Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers. * `secondary_worker_config`: Configuration for the size bounds of an instance group, including its proportional size to other groups. * `min_instances`: Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0. * `max_instances`: Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0. * `weight`: Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers. * `labels`: Optional. The labels to associate with this autoscaling policy. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling policy. * `additional_properties`: ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_batch.md ================================================ +++ title = "google_dataproc_batch resource" draft = false [menu.gcp] title = "google_dataproc_batch" identifier = "inspec/resources/gcp/google_dataproc_batch resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_batch` InSpec audit resource to test the properties of a Google Cloud Batch resource. ## Examples ```ruby describe google_dataproc_batch(name: 'projects/*/locations/*/batches/value_name') do it { should exist } its('name') { should cmp 'value_name' } its('uuid') { should cmp 'value_uuid' } its('create_time') { should cmp 'value_createtime' } its('state') { should cmp 'value_state' } its('state_message') { should cmp 'value_statemessage' } its('state_time') { should cmp 'value_statetime' } its('creator') { should cmp 'value_creator' } its('operation') { should cmp 'value_operation' } end describe google_dataproc_batch(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_batch` resource: ## Properties Properties that can be accessed from the `google_dataproc_batch` resource: * `name`: Output only. The resource name of the batch. * `uuid`: Output only. A batch UUID (Unique Universal Identifier). The service generates this value when it creates the batch. * `create_time`: Output only. The time when the batch was created. * `pyspark_batch`: A configuration for running an Apache PySpark (https://spark.apache.org/docs/latest/api/python/getting_started/quickstart.html) batch workload. * `main_python_file_uri`: Required. The HCFS URI of the main Python file to use as the Spark driver. Must be a .py file. * `args`: Optional. The arguments to pass to the driver. Do not include arguments that can be set as batch properties, such as --conf, since a collision can occur that causes an incorrect batch submission. * `python_file_uris`: Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip. * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the classpath of the Spark driver and tasks. * `file_uris`: Optional. HCFS URIs of files to be placed in the working directory of each executor. * `archive_uris`: Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. * `spark_batch`: A configuration for running an Apache Spark (https://spark.apache.org/) batch workload. * `main_jar_file_uri`: Optional. The HCFS URI of the jar file that contains the main class. * `main_class`: Optional. The name of the driver main class. The jar file that contains the class must be in the classpath or specified in jar_file_uris. * `args`: Optional. The arguments to pass to the driver. Do not include arguments that can be set as batch properties, such as --conf, since a collision can occur that causes an incorrect batch submission. * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the classpath of the Spark driver and tasks. * `file_uris`: Optional. HCFS URIs of files to be placed in the working directory of each executor. * `archive_uris`: Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. * `spark_r_batch`: A configuration for running an Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) batch workload. * `main_r_file_uri`: Required. The HCFS URI of the main R file to use as the driver. Must be a .R or .r file. * `args`: Optional. The arguments to pass to the Spark driver. Do not include arguments that can be set as batch properties, such as --conf, since a collision can occur that causes an incorrect batch submission. * `file_uris`: Optional. HCFS URIs of files to be placed in the working directory of each executor. * `archive_uris`: Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. * `spark_sql_batch`: A configuration for running Apache Spark SQL (https://spark.apache.org/sql/) queries as a batch workload. * `query_file_uri`: Required. The HCFS URI of the script that contains Spark SQL queries to execute. * `query_variables`: Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name="value";). * `additional_properties`: * `jar_file_uris`: Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. * `runtime_info`: Runtime information about workload execution. * `endpoints`: Output only. Map of remote access endpoints (such as web interfaces and APIs) to their URIs. * `additional_properties`: * `output_uri`: Output only. A URI pointing to the location of the stdout and stderr of the workload. * `diagnostic_output_uri`: Output only. A URI pointing to the location of the diagnostics tarball. * `approximate_usage`: Usage metrics represent approximate total resources consumed by a workload. * `milli_dcu_seconds`: Optional. DCU (Dataproc Compute Units) usage in (milliDCU x seconds) (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)). * `shuffle_storage_gb_seconds`: Optional. Shuffle storage usage in (GB x seconds) (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)). * `milli_accelerator_seconds`: Optional. Accelerator usage in (milliAccelerator x seconds) (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)). * `accelerator_type`: Optional. Accelerator type being used, if any * `current_usage`: The usage snapshot represents the resources consumed by a workload at a specified time. * `milli_dcu`: Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)). * `shuffle_storage_gb`: Optional. Shuffle Storage in gigabytes (GB). (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)) * `milli_dcu_premium`: Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at premium tier (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)). * `shuffle_storage_gb_premium`: Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)) * `milli_accelerator`: Optional. Milli (one-thousandth) accelerator. (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)) * `accelerator_type`: Optional. Accelerator type being used, if any * `snapshot_time`: Optional. The timestamp of the usage snapshot. * `state`: Output only. The state of the batch. Possible values: * STATE_UNSPECIFIED * PENDING * RUNNING * CANCELLING * CANCELLED * SUCCEEDED * FAILED * `state_message`: Output only. Batch state details, such as a failure description if the state is FAILED. * `state_time`: Output only. The time when the batch entered a current state. * `creator`: Output only. The email address of the user who created the batch. * `labels`: Optional. The labels to associate with this batch. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a batch. * `additional_properties`: * `runtime_config`: Runtime configuration for a workload. * `version`: Optional. Version of the batch runtime. * `container_image`: Optional. Optional custom container image for the job runtime environment. If not specified, a default container image will be used. * `properties`: Optional. A mapping of property names to values, which are used to configure workload execution. * `additional_properties`: * `repository_config`: Configuration for dependency repositories * `pypi_repository_config`: Configuration for PyPi repository * `pypi_repository`: Optional. PyPi repository address * `environment_config`: Environment configuration for a workload. * `execution_config`: Execution configuration for a workload. * `service_account`: Optional. Service account that used to execute workload. * `network_uri`: Optional. Network URI to connect workload to. * `subnetwork_uri`: Optional. Subnetwork URI to connect workload to. * `network_tags`: Optional. Tags used for network traffic control. * `kms_key`: Optional. The Cloud KMS key to use for encryption. * `idle_ttl`: Optional. Applies to sessions only. The duration to keep the session alive while it's idling. Exceeding this threshold causes the session to terminate. This field cannot be set on a batch workload. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). Defaults to 1 hour if not set. If both ttl and idle_ttl are specified for an interactive session, the conditions are treated as OR conditions: the workload will be terminated when it has been idle for idle_ttl or when ttl has been exceeded, whichever occurs first. * `ttl`: Optional. The duration after which the workload will be terminated, specified as the JSON representation for Duration (https://protobuf.dev/programming-guides/proto3/#json). When the workload exceeds this duration, it will be unconditionally terminated without waiting for ongoing work to finish. If ttl is not specified for a batch workload, the workload will be allowed to run until it exits naturally (or run forever without exiting). If ttl is not specified for an interactive session, it defaults to 24 hours. If ttl is not specified for a batch that uses 2.1+ runtime version, it defaults to 4 hours. Minimum value is 10 minutes; maximum value is 14 days. If both ttl and idle_ttl are specified (for an interactive session), the conditions are treated as OR conditions: the workload will be terminated when it has been idle for idle_ttl or when ttl has been exceeded, whichever occurs first. * `staging_bucket`: Optional. A Cloud Storage bucket used to stage workload dependencies, config files, and store workload output and other ephemeral data, such as Spark history files. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location according to the region where your workload is running, and then create and manage project-level, per-location staging and temporary buckets. This field requires a Cloud Storage bucket name, not a gs://... URI to a Cloud Storage bucket. * `peripherals_config`: Auxiliary services configuration for a workload. * `metastore_service`: Optional. Resource name of an existing Dataproc Metastore service.Example: projects/[project_id]/locations/[region]/services/[service_id] * `spark_history_server_config`: Spark History Server configuration for the workload. * `dataproc_cluster`: Optional. Resource name of an existing Dataproc Cluster to act as a Spark History Server for the workload.Example: projects/[project_id]/regions/[region]/clusters/[cluster_name] * `operation`: Output only. The resource name of the operation associated with this batch. * `state_history`: Output only. Historical state information for the batch. * `state`: Output only. The state of the batch at this point in history. Possible values: * STATE_UNSPECIFIED * PENDING * RUNNING * CANCELLING * CANCELLED * SUCCEEDED * FAILED * `state_message`: Output only. Details about the state at this point in history. * `state_start_time`: Output only. The time when the batch entered the historical state. ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_batches.md ================================================ +++ title = "google_dataproc_batches resource" draft = false [menu.gcp] title = "google_dataproc_batches" identifier = "inspec/resources/gcp/google_dataproc_batches resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_batches` InSpec audit resource to test the properties of a Google Cloud Batch resource. ## Examples ```ruby describe google_dataproc_batches(parent: 'projects/*/locations/*') do it { should exist } its('names') { should include 'value_name' } its('uuids') { should include 'value_uuid' } its('create_times') { should include 'value_createtime' } its('states') { should include 'value_state' } its('state_messages') { should include 'value_statemessage' } its('state_times') { should include 'value_statetime' } its('creators') { should include 'value_creator' } its('operations') { should include 'value_operation' } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_batches` resource: See [google_dataproc_batch](google_dataproc_batch) for more detailed information. * `names`: an array of `google_dataproc_batch` name * `uuids`: an array of `google_dataproc_batch` uuid * `create_times`: an array of `google_dataproc_batch` create_time * `pyspark_batches`: an array of `google_dataproc_batch` pyspark_batch * `spark_batches`: an array of `google_dataproc_batch` spark_batch * `spark_r_batches`: an array of `google_dataproc_batch` spark_r_batch * `spark_sql_batches`: an array of `google_dataproc_batch` spark_sql_batch * `runtime_infos`: an array of `google_dataproc_batch` runtime_info * `states`: an array of `google_dataproc_batch` state * `state_messages`: an array of `google_dataproc_batch` state_message * `state_times`: an array of `google_dataproc_batch` state_time * `creators`: an array of `google_dataproc_batch` creator * `labels`: an array of `google_dataproc_batch` labels * `runtime_configs`: an array of `google_dataproc_batch` runtime_config * `environment_configs`: an array of `google_dataproc_batch` environment_config * `operations`: an array of `google_dataproc_batch` operation * `state_histories`: an array of `google_dataproc_batch` state_history ## Properties Properties that can be accessed from the `google_dataproc_batches` resource: See [google_dataproc_batch](google_dataproc_batch) for more detailed information. * `names`: an array of `google_dataproc_batch` name * `uuids`: an array of `google_dataproc_batch` uuid * `create_times`: an array of `google_dataproc_batch` create_time * `pyspark_batches`: an array of `google_dataproc_batch` pyspark_batch * `spark_batches`: an array of `google_dataproc_batch` spark_batch * `spark_r_batches`: an array of `google_dataproc_batch` spark_r_batch * `spark_sql_batches`: an array of `google_dataproc_batch` spark_sql_batch * `runtime_infos`: an array of `google_dataproc_batch` runtime_info * `states`: an array of `google_dataproc_batch` state * `state_messages`: an array of `google_dataproc_batch` state_message * `state_times`: an array of `google_dataproc_batch` state_time * `creators`: an array of `google_dataproc_batch` creator * `labels`: an array of `google_dataproc_batch` labels * `runtime_configs`: an array of `google_dataproc_batch` runtime_config * `environment_configs`: an array of `google_dataproc_batch` environment_config * `operations`: an array of `google_dataproc_batch` operation * `state_histories`: an array of `google_dataproc_batch` state_history ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_cluster.md ================================================ +++ title = "google_dataproc_cluster resource" draft = false [menu.gcp] title = "google_dataproc_cluster" identifier = "inspec/resources/gcp/google_dataproc_cluster resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_dataproc_cluster` is used to test a Google Cluster resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_dataproc_cluster(project: 'chef-gcp-inspec', region: 'europe-west2', cluster_name: 'inspec-dataproc-cluster') do it { should exist } its('labels') { should include('label' => 'value') } its('config.master_config.num_instances') { should cmp '1' } its('config.worker_config.num_instances') { should cmp '2' } its('config.master_config.machine_type_uri') { should match 'n1-standard-1' } its('config.worker_config.machine_type_uri') { should match 'n1-standard-1' } its('config.software_config.properties') { should include('dataproc:dataproc.allow.zero.workers' => 'true') } end describe google_dataproc_cluster(project: 'chef-gcp-inspec', region: 'europe-west2', cluster_name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_dataproc_cluster` resource: * `cluster_name`: The name of the cluster, unique within the project and region. * `labels`: Labels to apply to this cluster. A list of key->value pairs. * `config`: Configuration for the cluster * `config_bucket`: The Cloud Storage staging bucket used to stage files, such as Hadoop jars, between client machines and the cluster. * `gce_cluster_config`: Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster. * `zone_uri`: The zone where the Compute Engine cluster will be located * `network_uri`: The Compute Engine network to be used for machine communications * `subnetwork_uri`: The Compute Engine subnetwork to be used for machine communications * `internal_ip_only`: If true, all instances int he cluster will only have internal IP addresses * `service_account_scopes`: The URIs of service account scopes to be included in Compute Engine instances The following base set of scopes is always included: https://www.googleapis.com/auth/cloud.useraccounts.readonly https://www.googleapis.com/auth/devstorage.read_write https://www.googleapis.com/auth/logging.write * `tags`: The Compute Engine tags to add to all instances * `metadata`: The map of metadata entries to add to all instances * `master_config`: The config settings for Compute Engine resources in an instance group, such as a master or worker group. * `num_instances`: The number of VM instances in the instance group. For master instance groups, must be set to 1. * `instance_names`: The list of instance names. * `image_uri`: The Compute Engine image resource used for cluster instances. * `machine_type_uri`: The Compute Engine machine type used for cluster instances * `disk_config`: Disk option config settings * `boot_disk_type`: Type of the boot disk. Valid values are "pd-ssd" or "pd-standard" * `boot_disk_size_gb`: Size in GB of the boot disk. * `num_local_ssds`: Number of attached SSDs, from 0 to 4. * `is_preemptible`: Specifies if this instance group contains preemptible instances. * `managed_group_config`: The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups. * `instance_template_name`: The name of the Instance Template used for the Managed Instance Group. * `instance_group_manager_name`: The name of the Instance Group Manager for this group * `worker_config`: The config settings for Compute Engine resources in an instance group, such as a master or worker group. * `num_instances`: The number of VM instances in the instance group. For master instance groups, must be set to 1. * `instance_names`: The list of instance names. * `image_uri`: The Compute Engine image resource used for cluster instances. * `machine_type_uri`: The Compute Engine machine type used for cluster instances * `disk_config`: Disk option config settings * `boot_disk_type`: Type of the boot disk. Valid values are "pd-ssd" or "pd-standard" * `boot_disk_size_gb`: Size in GB of the boot disk. * `num_local_ssds`: Number of attached SSDs, from 0 to 4. * `is_preemptible`: Specifies if this instance group contains preemptible instances. * `managed_group_config`: The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups. * `instance_template_name`: The name of the Instance Template used for the Managed Instance Group. * `instance_group_manager_name`: The name of the Instance Group Manager for this group * `secondary_worker_config`: The config settings for Compute Engine resources in an instance group, such as a master or worker group. * `num_instances`: The number of VM instances in the instance group. For master instance groups, must be set to 1. * `instance_names`: The list of instance names. * `image_uri`: The Compute Engine image resource used for cluster instances. * `machine_type_uri`: The Compute Engine machine type used for cluster instances * `disk_config`: Disk option config settings * `boot_disk_type`: Type of the boot disk. Valid values are "pd-ssd" or "pd-standard" * `boot_disk_size_gb`: Size in GB of the boot disk. * `num_local_ssds`: Number of attached SSDs, from 0 to 4. * `is_preemptible`: Specifies if this instance group contains preemptible instances. * `managed_group_config`: The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups. * `instance_template_name`: The name of the Instance Template used for the Managed Instance Group. * `instance_group_manager_name`: The name of the Instance Group Manager for this group * `software_config`: Specifies the selection and config of software inside the cluster * `image_version`: The version of software inside the cluster. It must be one of the supported Cloud Dataproc Versions, such as "1.2" (including a subminor version, such as "1.2.29"), or the "preview" version. * `properties`: The properties to set on daemon config files. Property keys are specified in the prefix:property format, for example `core:hadoop.tmp.dir` * `optional_components`: The set of optional components to activate on the cluster. Possible values include: COMPONENT_UNSPECIFIED, ANACONDA, HIVE_WEBHCAT, JUPYTER, ZEPPELIN, HBASE, SOLR, and RANGER Possible values: * COMPONENT_UNSPECIFIED * ANACONDA * HBASE * RANGER * SOLR * HIVE_WEBHCAT * JUPYTER * ZEPPELIN * `initialization_actions`: Specifies an executable to run on a fully configured node and a timeout period for executable completion. * `executable_file`: Cloud Storage URI of the executable file * `execution_timeout`: Amount of time executable has to complete * `encryption_config`: Encryption settings for the cluster. * `gce_pd_kms_key_name`: The Cloud KMS key name to use for PD disk encryption for all instances in the cluster. * `security_config`: Kerberos config holder. * `kerberos_config`: Kerberos related configuration. * `enable_kerberos`: Flag to indicate whether to Kerberize the cluster. * `rootprincipal_password_uri`: The cloud Storage URI of a KMS encrypted file containing the root principal password. * `kms_key_uri`: The uri of the KMS key used to encrypt various sensitive files. * `keystore_uri`: The Cloud Storage URI of the keystore file used for SSL encryption. * `truststore_uri`: The Cloud Storage URI of a KMS encrypted file containing the password to the user provided keystore. * `key_password_uri`: The Cloud Storage URI of a KMS encrypted file containing the password to the user provided key. * `truststore_password_uri`: The Cloud Storage URI of a KMS encrypted file containing the password to the user provided truststore. * `cross_realm_trust_realm`: The remote realm the Dataproc on-cluster KDC will trust, should the user enable cross realm trust. * `cross_realm_trust_admin_server`: The admin server (IP or hostname) for the remote trusted realm in a cross realm trust relationship. * `cross_realm_trust_shared_password_uri`: The Cloud Storage URI of a KMS encrypted file containing the shared password between the on-cluster Kerberos realm and the remote trusted realm, in a cross realm trust relationship. * `kdc_db_key_uri`: The Cloud Storage URI of a KMS encrypted file containing the master key of the KDC database. * `tgt_lifetime_hours`: The lifetime of the ticket granting ticket, in hours. * `realm`: The name of the on-cluster Kerberos realm. * `region`: The region in which the cluster and associated nodes will be created in. * `project_id`: The Google Cloud Platform project ID that the cluster belongs to. * `virtual_cluster_config`: Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster (https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified. * `status`: Output only. Cluster status. * `status_history`: Output only. The previous cluster status. * `cluster_uuid`: Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster. * `metrics`: Output only. Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release. ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_clusters.md ================================================ +++ title = "google_dataproc_clusters resource" draft = false [menu.gcp] title = "google_dataproc_clusters" identifier = "inspec/resources/gcp/google_dataproc_clusters resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_dataproc_clusters` is used to test a Google Cluster resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_dataproc_clusters(project: 'chef-gcp-inspec', region: 'europe-west2') do its('count') { should be >= 1 } its('cluster_names') { should include 'inspec-dataproc-cluster' } end ``` ## Properties Properties that can be accessed from the `google_dataproc_clusters` resource: See [google_dataproc_cluster](google_dataproc_cluster) for more detailed information. * `cluster_names`: an array of `google_dataproc_cluster` cluster_name * `labels`: an array of `google_dataproc_cluster` labels * `configs`: an array of `google_dataproc_cluster` config * `regions`: an array of `google_dataproc_cluster` region * `project_ids`: an array of `google_dataproc_cluster` project_id * `virtual_cluster_configs`: an array of `google_dataproc_cluster` virtual_cluster_config * `statuses`: an array of `google_dataproc_cluster` status * `status_histories`: an array of `google_dataproc_cluster` status_history * `cluster_uuids`: an array of `google_dataproc_cluster` cluster_uuid * `metrics`: an array of `google_dataproc_cluster` metrics ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_job.md ================================================ +++ title = "google_dataproc_job resource" draft = false [menu.gcp] title = "google_dataproc_job" identifier = "inspec/resources/gcp/google_dataproc_job resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_job` InSpec audit resource to to test a Google Cloud Job resource. ## Examples ```ruby describe google_dataproc_job(job_id: 'value_job_id', project_id: 'value_project_id', region: ' value_region') do it { should exist } its('driver_output_resource_uri') { should cmp 'value_driveroutputresourceuri' } its('driver_control_files_uri') { should cmp 'value_drivercontrolfilesuri' } its('job_uuid') { should cmp 'value_jobuuid' } end describe google_dataproc_job(job_id: 'doesnotexist', project_id: 'value_project_id', region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_dataproc_job` resource: * `reference`: Encapsulates the full scoping used to reference a job. * `project_id`: Optional. The ID of the Google Cloud Platform project that the job belongs to. If specified, must match the request project ID. * `job_id`: Optional. The job ID, which must be unique within the project.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.If not specified by the caller, the job ID will be provided by the server. * `placement`: Dataproc job config. * `cluster_name`: Required. The name of the cluster where the job will be submitted. * `cluster_uuid`: Output only. A cluster UUID generated by the Dataproc service when the job is submitted. * `cluster_labels`: Optional. Cluster labels to identify a cluster where the job will be submitted. * `additional_properties`: * `hadoop_job`: A Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). * `main_jar_file_uri`: The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' * `main_class`: The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris. * `args`: Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision might occur that causes an incorrect job submission. * `jar_file_uris`: Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks. * `file_uris`: Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks. * `archive_uris`: Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip. * `properties`: Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code. * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `spark_job`: A Dataproc job for running Apache Spark (https://spark.apache.org/) applications on YARN. * `main_jar_file_uri`: The HCFS URI of the jar file that contains the main class. * `main_class`: The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in SparkJob.jar_file_uris. * `args`: Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission. * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks. * `file_uris`: Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks. * `archive_uris`: Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. * `properties`: Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `pyspark_job`: A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. * `main_python_file_uri`: Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file. * `args`: Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission. * `python_file_uris`: Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip. * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks. * `file_uris`: Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks. * `archive_uris`: Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. * `properties`: Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `hive_job`: A Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. * `query_file_uri`: The HCFS URI of the script that contains Hive queries. * `query_list`: A list of queries to run on a cluster. * `queries`: Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } * `continue_on_failure`: Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries. * `script_variables`: Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name="value";). * `additional_properties`: * `properties`: Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code. * `additional_properties`: * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs. * `pig_job`: A Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. * `query_file_uri`: The HCFS URI of the script that contains the Pig queries. * `query_list`: A list of queries to run on a cluster. * `queries`: Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } * `continue_on_failure`: Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries. * `script_variables`: Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]). * `additional_properties`: * `properties`: Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code. * `additional_properties`: * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `spark_r_job`: A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) applications on YARN. * `main_r_file_uri`: Required. The HCFS URI of the main R file to use as the driver. Must be a .R file. * `args`: Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission. * `file_uris`: Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks. * `archive_uris`: Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. * `properties`: Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `spark_sql_job`: A Dataproc job for running Apache Spark SQL (https://spark.apache.org/sql/) queries. * `query_file_uri`: The HCFS URI of the script that contains SQL queries. * `query_list`: A list of queries to run on a cluster. * `queries`: Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } * `script_variables`: Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name="value";). * `additional_properties`: * `properties`: Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Dataproc API might be overwritten. * `additional_properties`: * `jar_file_uris`: Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `presto_job`: A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster. * `query_file_uri`: The HCFS URI of the script that contains SQL queries. * `query_list`: A list of queries to run on a cluster. * `queries`: Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } * `continue_on_failure`: Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries. * `output_format`: Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats * `client_tags`: Optional. Presto client tags to attach to this query * `properties`: Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `trino_job`: A Dataproc job for running Trino (https://trino.io/) queries. IMPORTANT: The Dataproc Trino Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/trino) must be enabled when the cluster is created to submit a Trino job to the cluster. * `query_file_uri`: The HCFS URI of the script that contains SQL queries. * `query_list`: A list of queries to run on a cluster. * `queries`: Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } * `continue_on_failure`: Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries. * `output_format`: Optional. The format in which query output will be displayed. See the Trino documentation for supported output formats * `client_tags`: Optional. Trino client tags to attach to this query * `properties`: Optional. A mapping of property names to values. Used to set Trino session properties (https://trino.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Trino CLI * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `flink_job`: A Dataproc job for running Apache Flink applications on YARN. * `main_jar_file_uri`: The HCFS URI of the jar file that contains the main class. * `main_class`: The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jarFileUris. * `args`: Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision might occur that causes an incorrect job submission. * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Flink driver and tasks. * `savepoint_uri`: Optional. HCFS URI of the savepoint, which contains the last saved progress for starting the current job. * `properties`: Optional. A mapping of property names to values, used to configure Flink. Properties that conflict with values set by the Dataproc API might beoverwritten. Can include properties set in/etc/flink/conf/flink-defaults.conf and classes in user code. * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `status`: Dataproc job status. * `state`: Output only. A state message specifying the overall job state. Possible values: * STATE_UNSPECIFIED * PENDING * SETUP_DONE * RUNNING * CANCEL_PENDING * CANCEL_STARTED * CANCELLED * DONE * ERROR * ATTEMPT_FAILURE * `details`: Optional. Output only. Job state details, such as an error description if the state is ERROR. * `state_start_time`: Output only. The time when this state was entered. * `substate`: Output only. Additional state information, which includes status reported by the agent. Possible values: * UNSPECIFIED * SUBMITTED * QUEUED * STALE_STATUS * `status_history`: Output only. The previous job status. * `state`: Output only. A state message specifying the overall job state. Possible values: * STATE_UNSPECIFIED * PENDING * SETUP_DONE * RUNNING * CANCEL_PENDING * CANCEL_STARTED * CANCELLED * DONE * ERROR * ATTEMPT_FAILURE * `details`: Optional. Output only. Job state details, such as an error description if the state is ERROR. * `state_start_time`: Output only. The time when this state was entered. * `substate`: Output only. Additional state information, which includes status reported by the agent. Possible values: * UNSPECIFIED * SUBMITTED * QUEUED * STALE_STATUS * `yarn_applications`: Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It might be changed before final release. * `name`: Required. The application name. * `state`: Required. The application state. Possible values: * STATE_UNSPECIFIED * NEW * NEW_SAVING * SUBMITTED * ACCEPTED * RUNNING * FINISHED * FAILED * KILLED * `progress`: Required. The numerical progress of the application, from 1 to 100. * `tracking_url`: Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access. * `driver_output_resource_uri`: Output only. A URI pointing to the location of the stdout of the job's driver program. * `driver_control_files_uri`: Output only. If present, the location of miscellaneous control files which can be used as part of job setup and handling. If not present, control files might be placed in the same location as driver_output_uri. * `labels`: Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job. * `additional_properties`: * `scheduling`: Job scheduling options. * `max_failures_per_hour`: Optional. Maximum number of times per hour a driver can be restarted as a result of driver exiting with non-zero code before job is reported failed.A job might be reported as thrashing if the driver exits with a non-zero code four times within a 10-minute window.Maximum value is 10.Note: This restartable job option is not supported in Dataproc workflow templates (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). * `max_failures_total`: Optional. Maximum total number of times a driver can be restarted as a result of the driver exiting with a non-zero code. After the maximum number is reached, the job will be reported as failed.Maximum value is 240.Note: Currently, this restartable job option is not supported in Dataproc workflow templates (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). * `job_uuid`: Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that might be reused over time. * `done`: Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled. * `driver_scheduling_config`: Driver scheduling configuration. * `memory_mb`: Required. The amount of memory in MB the driver is requesting. * `vcores`: Required. The number of vCPUs the driver is requesting. ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_jobs.md ================================================ +++ title = "google_dataproc_jobs resource" draft = false [menu.gcp] title = "google_dataproc_jobs" identifier = "inspec/resources/gcp/google_dataproc_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_jobs` InSpec audit resource to to test a Google Cloud Job resource. ## Examples ```ruby describe google_dataproc_jobs(project_id: 'value_project_id', region: 'value_region') do it { should exist } its('driver_output_resource_uris') { should include 'value_driveroutputresourceuri' } its('driver_control_files_uris') { should include 'value_drivercontrolfilesuri' } its('job_uuids') { should include 'value_jobuuid' } end ``` ## Properties Properties that can be accessed from the `google_dataproc_jobs` resource: See [google_dataproc_job](google_dataproc_job) for more detailed information. * `references`: an array of `google_dataproc_job` reference * `placements`: an array of `google_dataproc_job` placement * `hadoop_jobs`: an array of `google_dataproc_job` hadoop_job * `spark_jobs`: an array of `google_dataproc_job` spark_job * `pyspark_jobs`: an array of `google_dataproc_job` pyspark_job * `hive_jobs`: an array of `google_dataproc_job` hive_job * `pig_jobs`: an array of `google_dataproc_job` pig_job * `spark_r_jobs`: an array of `google_dataproc_job` spark_r_job * `spark_sql_jobs`: an array of `google_dataproc_job` spark_sql_job * `presto_jobs`: an array of `google_dataproc_job` presto_job * `trino_jobs`: an array of `google_dataproc_job` trino_job * `flink_jobs`: an array of `google_dataproc_job` flink_job * `statuses`: an array of `google_dataproc_job` status * `status_histories`: an array of `google_dataproc_job` status_history * `yarn_applications`: an array of `google_dataproc_job` yarn_applications * `driver_output_resource_uris`: an array of `google_dataproc_job` driver_output_resource_uri * `driver_control_files_uris`: an array of `google_dataproc_job` driver_control_files_uri * `labels`: an array of `google_dataproc_job` labels * `schedulings`: an array of `google_dataproc_job` scheduling * `job_uuids`: an array of `google_dataproc_job` job_uuid * `dones`: an array of `google_dataproc_job` done * `driver_scheduling_configs`: an array of `google_dataproc_job` driver_scheduling_config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_metastore_federation.md ================================================ +++ title = "google_dataproc_metastore_federation resource" draft = false [menu.gcp] title = "google_dataproc_metastore_federation" identifier = "inspec/resources/gcp/google_dataproc_metastore_federation resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_metastore_federation` InSpec audit resource to test the properties of a Google Cloud Federation resource. ## Examples ```ruby describe google_dataproc_metastore_federation(name: 'value_name') do it { should exist } its('name') { should cmp 'value_name' } its('create_time') { should cmp 'value_createtime' } its('update_time') { should cmp 'value_updatetime' } its('version') { should cmp 'value_version' } its('endpoint_uri') { should cmp 'value_endpointuri' } its('state') { should cmp 'value_state' } its('state_message') { should cmp 'value_statemessage' } its('uid') { should cmp 'value_uid' } end describe google_dataproc_metastore_federation(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_metastore_federation` resource: ## Properties Properties that can be accessed from the `google_dataproc_metastore_federation` resource: * `name`: Immutable. The relative resource name of the federation, of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}`. * `create_time`: Output only. The time when the metastore federation was created. * `update_time`: Output only. The time when the metastore federation was last updated. * `labels`: User-defined labels for the metastore federation. * `additional_properties`: * `version`: Immutable. The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version. * `backend_metastores`: A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number. * `additional_properties`: Represents a backend metastore for the federation. * `endpoint_uri`: Output only. The federation endpoint. * `state`: Output only. The current state of the federation. Possible values: * STATE_UNSPECIFIED * CREATING * ACTIVE * UPDATING * DELETING * ERROR * `state_message`: Output only. Additional information about the current state of the metastore federation, if available. * `uid`: Output only. The globally unique resource identifier of the metastore federation. ## GCP permissions Ensure the [Dataproc Metastore API](https://console.cloud.google.com/apis/library/metastore.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_metastore_federations.md ================================================ +++ title = "google_dataproc_metastore_federations resource" draft = false [menu.gcp] title = "google_dataproc_metastore_federations" identifier = "inspec/resources/gcp/google_dataproc_metastore_federations resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_metastore_federations` InSpec audit resource to test the properties of a Google Cloud Federation resource. ## Examples ```ruby describe google_dataproc_metastore_federations(parent: 'value_parent') do it { should exist } its('names') { should include 'value_name' } its('create_times') { should include 'value_createtime' } its('update_times') { should include 'value_updatetime' } its('versions') { should include 'value_version' } its('endpoint_uris') { should include 'value_endpointuri' } its('states') { should include 'value_state' } its('state_messages') { should include 'value_statemessage' } its('uids') { should include 'value_uid' } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_metastore_federations` resource: See [google_dataproc_metastore_federation](google_dataproc_metastore_federation) for more detailed information. * `names`: an array of `google_dataproc_metastore_federation` name * `create_times`: an array of `google_dataproc_metastore_federation` create_time * `update_times`: an array of `google_dataproc_metastore_federation` update_time * `labels`: an array of `google_dataproc_metastore_federation` labels * `versions`: an array of `google_dataproc_metastore_federation` version * `backend_metastores`: an array of `google_dataproc_metastore_federation` backend_metastores * `endpoint_uris`: an array of `google_dataproc_metastore_federation` endpoint_uri * `states`: an array of `google_dataproc_metastore_federation` state * `state_messages`: an array of `google_dataproc_metastore_federation` state_message * `uids`: an array of `google_dataproc_metastore_federation` uid ## Properties Properties that can be accessed from the `google_dataproc_metastore_federations` resource: See [google_dataproc_metastore_federation](google_dataproc_metastore_federation) for more detailed information. * `names`: an array of `google_dataproc_metastore_federation` name * `create_times`: an array of `google_dataproc_metastore_federation` create_time * `update_times`: an array of `google_dataproc_metastore_federation` update_time * `labels`: an array of `google_dataproc_metastore_federation` labels * `versions`: an array of `google_dataproc_metastore_federation` version * `backend_metastores`: an array of `google_dataproc_metastore_federation` backend_metastores * `endpoint_uris`: an array of `google_dataproc_metastore_federation` endpoint_uri * `states`: an array of `google_dataproc_metastore_federation` state * `state_messages`: an array of `google_dataproc_metastore_federation` state_message * `uids`: an array of `google_dataproc_metastore_federation` uid ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Dataproc Metastore API](https://console.cloud.google.com/apis/library/metastore.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_metastore_service.md ================================================ +++ title = "google_dataproc_metastore_service resource" draft = false [menu.gcp] title = "google_dataproc_metastore_service" identifier = "inspec/resources/gcp/google_dataproc_metastore_service resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_metastore_service` InSpec audit resource to test the properties of a Google Cloud Service resource. ## Examples ```ruby describe google_dataproc_metastore_service(name: 'value_name') do it { should exist } its('name') { should cmp 'value_name' } its('create_time') { should cmp 'value_createtime' } its('update_time') { should cmp 'value_updatetime' } its('network') { should cmp 'value_network' } its('endpoint_uri') { should cmp 'value_endpointuri' } its('state') { should cmp 'value_state' } its('state_message') { should cmp 'value_statemessage' } its('artifact_gcs_uri') { should cmp 'value_artifactgcsuri' } its('tier') { should cmp 'value_tier' } its('uid') { should cmp 'value_uid' } its('release_channel') { should cmp 'value_releasechannel' } its('database_type') { should cmp 'value_databasetype' } end describe google_dataproc_metastore_service(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_metastore_service` resource: ## Properties Properties that can be accessed from the `google_dataproc_metastore_service` resource: * `hive_metastore_config`: Specifies configuration information specific to running Hive metastore software as the metastore service. * `version`: Immutable. The Hive metastore schema version. * `config_overrides`: A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig. * `additional_properties`: * `kerberos_config`: Configuration information for a Kerberos principal. * `keytab`: A securely stored value. * `cloud_secret`: The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}. * `principal`: A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format. * `krb5_config_gcs_uri`: A Cloud Storage URI that specifies the path to a krb5.conf file. It is of the form gs://{bucket_name}/path/to/krb5.conf, although the file does not need to be named krb5.conf explicitly. * `endpoint_protocol`: The protocol to use for the metastore service endpoint. If unspecified, defaults to THRIFT. Possible values: * ENDPOINT_PROTOCOL_UNSPECIFIED * THRIFT * GRPC * `auxiliary_versions`: A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen. * `additional_properties`: Configuration information for the auxiliary service versions. * `name`: Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}. * `create_time`: Output only. The time when the metastore service was created. * `update_time`: Output only. The time when the metastore service was last updated. * `labels`: User-defined labels for the metastore service. * `additional_properties`: * `network`: Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}. * `endpoint_uri`: Output only. The URI of the endpoint used to access the metastore service. * `port`: The TCP port at which the metastore service is reached. Default: 9083. * `state`: Output only. The current state of the metastore service. Possible values: * STATE_UNSPECIFIED * CREATING * ACTIVE * SUSPENDING * SUSPENDED * UPDATING * DELETING * ERROR * MIGRATING * `state_message`: Output only. Additional information about the current state of the metastore service, if available. * `artifact_gcs_uri`: Output only. A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored. * `tier`: The tier of the service. Possible values: * TIER_UNSPECIFIED * DEVELOPER * ENTERPRISE * `metadata_integration`: Specifies how metastore metadata should be integrated with external services. * `data_catalog_config`: Specifies how metastore metadata should be integrated with the Data Catalog service. * `enabled`: Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog. * `dataplex_config`: Specifies how metastore metadata should be integrated with the Dataplex service. * `lake_resources`: A reference to the Lake resources that this metastore service is attached to. The key is the lake resource name. Example: projects/{project_number}/locations/{location_id}/lakes/{lake_id}. * `additional_properties`: Represents a Lake resource * `maintenance_window`: Maintenance window. This specifies when Dataproc Metastore may perform system maintenance operation to the service. * `hour_of_day`: The hour of day (0-23) when the window starts. * `day_of_week`: The day of week, when the window starts. Possible values: * DAY_OF_WEEK_UNSPECIFIED * MONDAY * TUESDAY * WEDNESDAY * THURSDAY * FRIDAY * SATURDAY * SUNDAY * `uid`: Output only. The globally unique resource identifier of the metastore service. * `metadata_management_activity`: The metadata management activities of the metastore service. * `metadata_exports`: Output only. The latest metadata exports of the metastore service. * `destination_gcs_uri`: Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated. * `start_time`: Output only. The time when the export started. * `end_time`: Output only. The time when the export ended. * `state`: Output only. The current state of the export. Possible values: * STATE_UNSPECIFIED * RUNNING * SUCCEEDED * FAILED * CANCELLED * `database_dump_type`: Output only. The type of the database dump. Possible values: * TYPE_UNSPECIFIED * MYSQL * AVRO * `restores`: Output only. The latest restores of the metastore service. * `start_time`: Output only. The time when the restore started. * `end_time`: Output only. The time when the restore ended. * `state`: Output only. The current state of the restore. Possible values: * STATE_UNSPECIFIED * RUNNING * SUCCEEDED * FAILED * CANCELLED * `backup`: Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}. * `type`: Output only. The type of restore. Possible values: * RESTORE_TYPE_UNSPECIFIED * FULL * METADATA_ONLY * `details`: Output only. The restore details containing the revision of the service to be restored to, in format of JSON. * `backup_location`: Optional. A Cloud Storage URI specifying where the backup artifacts are stored, in the format gs:///. * `release_channel`: Immutable. The release channel of the service. If unspecified, defaults to STABLE. Possible values: * RELEASE_CHANNEL_UNSPECIFIED * CANARY * STABLE * `encryption_config`: Encryption settings for the service. * `kms_key`: The fully qualified customer provided Cloud KMS key name to use for customer data encryption, in the following format:projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}. * `network_config`: Network configuration for the Dataproc Metastore service. * `consumers`: Immutable. The consumer-side network configuration for the Dataproc Metastore instance. * `subnetwork`: Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id} * `endpoint_uri`: Output only. The URI of the endpoint used to access the metastore service. * `endpoint_location`: Output only. The location of the endpoint URI. Format: projects/{project}/locations/{location}. * `custom_routes_enabled`: Enables custom routes to be imported and exported for the Dataproc Metastore service's peered VPC network. * `database_type`: Immutable. The database type that the Metastore service stores its data. Possible values: * DATABASE_TYPE_UNSPECIFIED * MYSQL * SPANNER * `telemetry_config`: Telemetry Configuration for the Dataproc Metastore service. * `log_format`: The output format of the Dataproc Metastore service's logs. Possible values: * LOG_FORMAT_UNSPECIFIED * LEGACY * JSON * `scaling_config`: Represents the scaling configuration of a metastore service. * `instance_size`: An enum of readable instance sizes, with each instance size mapping to a float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1)) Possible values: * INSTANCE_SIZE_UNSPECIFIED * EXTRA_SMALL * SMALL * MEDIUM * LARGE * EXTRA_LARGE * `scaling_factor`: Scaling factor, increments of 0.1 for values less than 1.0, and increments of 1.0 for values greater than 1.0. * `autoscaling_config`: Represents the autoscaling configuration of a metastore service. * `autoscaling_factor`: Output only. The scaling factor of a service with autoscaling enabled. * `autoscaling_enabled`: Optional. Whether or not autoscaling is enabled for this service. * `limit_config`: Represents the autoscaling limit configuration of a metastore service. * `max_scaling_factor`: Optional. The highest scaling factor that the service should be autoscaled to. * `min_scaling_factor`: Optional. The lowest scaling factor that the service should be autoscaled to. * `scheduled_backup`: This specifies the configuration of scheduled backup. * `enabled`: Optional. Defines whether the scheduled backup is enabled. The default value is false. * `cron_schedule`: Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups. * `time_zone`: Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC. * `next_scheduled_time`: Output only. The time when the next backups execution is scheduled to start. * `backup_location`: Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it. * `latest_backup`: The details of the latest scheduled backup. * `backup_id`: Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress. * `start_time`: Output only. The time when the backup was started. * `state`: Output only. The current state of the backup. Possible values: * STATE_UNSPECIFIED * IN_PROGRESS * SUCCEEDED * FAILED * `duration`: Output only. The duration of the backup completion. * `deletion_protection`: Optional. Indicates if the dataproc metastore should be protected against accidental deletions. ## GCP permissions Ensure the [Dataproc Metastore API](https://console.cloud.google.com/apis/library/metastore.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_metastore_service_backup.md ================================================ +++ title = "google_dataproc_metastore_service_backup resource" draft = false [menu.gcp] title = "google_dataproc_metastore_service_backup" identifier = "inspec/resources/gcp/google_dataproc_metastore_service_backup resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_metastore_service_backup` InSpec audit resource to test the properties of a Google Cloud ServiceBackup resource. ## Examples ```ruby describe google_dataproc_metastore_service_backup(name: 'value_name') do it { should exist } its('name') { should cmp 'value_name' } its('create_time') { should cmp 'value_createtime' } its('end_time') { should cmp 'value_endtime' } its('state') { should cmp 'value_state' } its('description') { should cmp 'value_description' } end describe google_dataproc_metastore_service_backup(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_metastore_service_backup` resource: ## Properties Properties that can be accessed from the `google_dataproc_metastore_service_backup` resource: * `name`: Immutable. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id} * `create_time`: Output only. The time when the backup was started. * `end_time`: Output only. The time when the backup finished creating. * `state`: Output only. The current state of the backup. Possible values: * STATE_UNSPECIFIED * CREATING * DELETING * ACTIVE * FAILED * RESTORING * `service_revision`: A managed metastore service that serves metadata queries. * `hive_metastore_config`: Specifies configuration information specific to running Hive metastore software as the metastore service. * `version`: Immutable. The Hive metastore schema version. * `config_overrides`: A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig. * `additional_properties`: * `kerberos_config`: Configuration information for a Kerberos principal. * `keytab`: A securely stored value. * `cloud_secret`: The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}. * `principal`: A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format. * `krb5_config_gcs_uri`: A Cloud Storage URI that specifies the path to a krb5.conf file. It is of the form gs://{bucket_name}/path/to/krb5.conf, although the file does not need to be named krb5.conf explicitly. * `endpoint_protocol`: The protocol to use for the metastore service endpoint. If unspecified, defaults to THRIFT. Possible values: * ENDPOINT_PROTOCOL_UNSPECIFIED * THRIFT * GRPC * `auxiliary_versions`: A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen. * `additional_properties`: Configuration information for the auxiliary service versions. * `name`: Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}. * `create_time`: Output only. The time when the metastore service was created. * `update_time`: Output only. The time when the metastore service was last updated. * `labels`: User-defined labels for the metastore service. * `additional_properties`: * `network`: Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}. * `endpoint_uri`: Output only. The URI of the endpoint used to access the metastore service. * `port`: The TCP port at which the metastore service is reached. Default: 9083. * `state`: Output only. The current state of the metastore service. Possible values: * STATE_UNSPECIFIED * CREATING * ACTIVE * SUSPENDING * SUSPENDED * UPDATING * DELETING * ERROR * MIGRATING * `state_message`: Output only. Additional information about the current state of the metastore service, if available. * `artifact_gcs_uri`: Output only. A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored. * `tier`: The tier of the service. Possible values: * TIER_UNSPECIFIED * DEVELOPER * ENTERPRISE * `metadata_integration`: Specifies how metastore metadata should be integrated with external services. * `data_catalog_config`: Specifies how metastore metadata should be integrated with the Data Catalog service. * `enabled`: Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog. * `dataplex_config`: Specifies how metastore metadata should be integrated with the Dataplex service. * `lake_resources`: A reference to the Lake resources that this metastore service is attached to. The key is the lake resource name. Example: projects/{project_number}/locations/{location_id}/lakes/{lake_id}. * `additional_properties`: Represents a Lake resource * `maintenance_window`: Maintenance window. This specifies when Dataproc Metastore may perform system maintenance operation to the service. * `hour_of_day`: The hour of day (0-23) when the window starts. * `day_of_week`: The day of week, when the window starts. Possible values: * DAY_OF_WEEK_UNSPECIFIED * MONDAY * TUESDAY * WEDNESDAY * THURSDAY * FRIDAY * SATURDAY * SUNDAY * `uid`: Output only. The globally unique resource identifier of the metastore service. * `metadata_management_activity`: The metadata management activities of the metastore service. * `metadata_exports`: Output only. The latest metadata exports of the metastore service. * `destination_gcs_uri`: Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated. * `start_time`: Output only. The time when the export started. * `end_time`: Output only. The time when the export ended. * `state`: Output only. The current state of the export. Possible values: * STATE_UNSPECIFIED * RUNNING * SUCCEEDED * FAILED * CANCELLED * `database_dump_type`: Output only. The type of the database dump. Possible values: * TYPE_UNSPECIFIED * MYSQL * AVRO * `restores`: Output only. The latest restores of the metastore service. * `start_time`: Output only. The time when the restore started. * `end_time`: Output only. The time when the restore ended. * `state`: Output only. The current state of the restore. Possible values: * STATE_UNSPECIFIED * RUNNING * SUCCEEDED * FAILED * CANCELLED * `backup`: Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}. * `type`: Output only. The type of restore. Possible values: * RESTORE_TYPE_UNSPECIFIED * FULL * METADATA_ONLY * `details`: Output only. The restore details containing the revision of the service to be restored to, in format of JSON. * `backup_location`: Optional. A Cloud Storage URI specifying where the backup artifacts are stored, in the format gs:///. * `release_channel`: Immutable. The release channel of the service. If unspecified, defaults to STABLE. Possible values: * RELEASE_CHANNEL_UNSPECIFIED * CANARY * STABLE * `encryption_config`: Encryption settings for the service. * `kms_key`: The fully qualified customer provided Cloud KMS key name to use for customer data encryption, in the following format:projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}. * `network_config`: Network configuration for the Dataproc Metastore service. * `consumers`: Immutable. The consumer-side network configuration for the Dataproc Metastore instance. * `subnetwork`: Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id} * `endpoint_uri`: Output only. The URI of the endpoint used to access the metastore service. * `endpoint_location`: Output only. The location of the endpoint URI. Format: projects/{project}/locations/{location}. * `custom_routes_enabled`: Enables custom routes to be imported and exported for the Dataproc Metastore service's peered VPC network. * `database_type`: Immutable. The database type that the Metastore service stores its data. Possible values: * DATABASE_TYPE_UNSPECIFIED * MYSQL * SPANNER * `telemetry_config`: Telemetry Configuration for the Dataproc Metastore service. * `log_format`: The output format of the Dataproc Metastore service's logs. Possible values: * LOG_FORMAT_UNSPECIFIED * LEGACY * JSON * `scaling_config`: Represents the scaling configuration of a metastore service. * `instance_size`: An enum of readable instance sizes, with each instance size mapping to a float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1)) Possible values: * INSTANCE_SIZE_UNSPECIFIED * EXTRA_SMALL * SMALL * MEDIUM * LARGE * EXTRA_LARGE * `scaling_factor`: Scaling factor, increments of 0.1 for values less than 1.0, and increments of 1.0 for values greater than 1.0. * `autoscaling_config`: Represents the autoscaling configuration of a metastore service. * `autoscaling_factor`: Output only. The scaling factor of a service with autoscaling enabled. * `autoscaling_enabled`: Optional. Whether or not autoscaling is enabled for this service. * `limit_config`: Represents the autoscaling limit configuration of a metastore service. * `max_scaling_factor`: Optional. The highest scaling factor that the service should be autoscaled to. * `min_scaling_factor`: Optional. The lowest scaling factor that the service should be autoscaled to. * `scheduled_backup`: This specifies the configuration of scheduled backup. * `enabled`: Optional. Defines whether the scheduled backup is enabled. The default value is false. * `cron_schedule`: Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups. * `time_zone`: Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC. * `next_scheduled_time`: Output only. The time when the next backups execution is scheduled to start. * `backup_location`: Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it. * `latest_backup`: The details of the latest scheduled backup. * `backup_id`: Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress. * `start_time`: Output only. The time when the backup was started. * `state`: Output only. The current state of the backup. Possible values: * STATE_UNSPECIFIED * IN_PROGRESS * SUCCEEDED * FAILED * `duration`: Output only. The duration of the backup completion. * `deletion_protection`: Optional. Indicates if the dataproc metastore should be protected against accidental deletions. * `description`: The description of the backup. * `restoring_services`: Output only. Services that are restoring from the backup. ## GCP permissions Ensure the [Dataproc Metastore API](https://console.cloud.google.com/apis/library/metastore.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_metastore_service_backups.md ================================================ +++ title = "google_dataproc_metastore_service_backups resource" draft = false [menu.gcp] title = "google_dataproc_metastore_service_backups" identifier = "inspec/resources/gcp/google_dataproc_metastore_service_backups resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_metastore_service_backups` InSpec audit resource to test the properties of a Google Cloud ServiceBackup resource. ## Examples ```ruby describe google_dataproc_metastore_service_backups(parent: ' value_parent') do it { should exist } its('names') { should include 'value_name' } its('create_times') { should include 'value_createtime' } its('end_times') { should include 'value_endtime' } its('states') { should include 'value_state' } its('descriptions') { should include 'value_description' } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_metastore_service_backups` resource: See [google_dataproc_metastore_service_backup](google_dataproc_metastore_service_backup) for more detailed information. * `names`: an array of `google_dataproc_metastore_service_backup` name * `create_times`: an array of `google_dataproc_metastore_service_backup` create_time * `end_times`: an array of `google_dataproc_metastore_service_backup` end_time * `states`: an array of `google_dataproc_metastore_service_backup` state * `service_revisions`: an array of `google_dataproc_metastore_service_backup` service_revision * `descriptions`: an array of `google_dataproc_metastore_service_backup` description * `restoring_services`: an array of `google_dataproc_metastore_service_backup` restoring_services ## Properties Properties that can be accessed from the `google_dataproc_metastore_service_backups` resource: See [google_dataproc_metastore_service_backup](google_dataproc_metastore_service_backup) for more detailed information. * `names`: an array of `google_dataproc_metastore_service_backup` name * `create_times`: an array of `google_dataproc_metastore_service_backup` create_time * `end_times`: an array of `google_dataproc_metastore_service_backup` end_time * `states`: an array of `google_dataproc_metastore_service_backup` state * `service_revisions`: an array of `google_dataproc_metastore_service_backup` service_revision * `descriptions`: an array of `google_dataproc_metastore_service_backup` description * `restoring_services`: an array of `google_dataproc_metastore_service_backup` restoring_services ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Dataproc Metastore API](https://console.cloud.google.com/apis/library/metastore.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_metastore_services.md ================================================ +++ title = "google_dataproc_metastore_services resource" draft = false [menu.gcp] title = "google_dataproc_metastore_services" identifier = "inspec/resources/gcp/google_dataproc_metastore_services resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_metastore_services` InSpec audit resource to test the properties of a Google Cloud Service resource. ## Examples ```ruby describe google_dataproc_metastore_services(parent: ' value_parent') do it { should exist } its('names') { should include 'value_name' } its('create_times') { should include 'value_createtime' } its('update_times') { should include 'value_updatetime' } its('networks') { should include 'value_network' } its('endpoint_uris') { should include 'value_endpointuri' } its('states') { should include 'value_state' } its('state_messages') { should include 'value_statemessage' } its('artifact_gcs_uris') { should include 'value_artifactgcsuri' } its('tiers') { should include 'value_tier' } its('uids') { should include 'value_uid' } its('release_channels') { should include 'value_releasechannel' } its('database_types') { should include 'value_databasetype' } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_metastore_services` resource: See [google_dataproc_metastore_service](google_dataproc_metastore_service) for more detailed information. * `hive_metastore_configs`: an array of `google_dataproc_metastore_service` hive_metastore_config * `names`: an array of `google_dataproc_metastore_service` name * `create_times`: an array of `google_dataproc_metastore_service` create_time * `update_times`: an array of `google_dataproc_metastore_service` update_time * `labels`: an array of `google_dataproc_metastore_service` labels * `networks`: an array of `google_dataproc_metastore_service` network * `endpoint_uris`: an array of `google_dataproc_metastore_service` endpoint_uri * `ports`: an array of `google_dataproc_metastore_service` port * `states`: an array of `google_dataproc_metastore_service` state * `state_messages`: an array of `google_dataproc_metastore_service` state_message * `artifact_gcs_uris`: an array of `google_dataproc_metastore_service` artifact_gcs_uri * `tiers`: an array of `google_dataproc_metastore_service` tier * `metadata_integrations`: an array of `google_dataproc_metastore_service` metadata_integration * `maintenance_windows`: an array of `google_dataproc_metastore_service` maintenance_window * `uids`: an array of `google_dataproc_metastore_service` uid * `metadata_management_activities`: an array of `google_dataproc_metastore_service` metadata_management_activity * `release_channels`: an array of `google_dataproc_metastore_service` release_channel * `encryption_configs`: an array of `google_dataproc_metastore_service` encryption_config * `network_configs`: an array of `google_dataproc_metastore_service` network_config * `database_types`: an array of `google_dataproc_metastore_service` database_type * `telemetry_configs`: an array of `google_dataproc_metastore_service` telemetry_config * `scaling_configs`: an array of `google_dataproc_metastore_service` scaling_config * `scheduled_backups`: an array of `google_dataproc_metastore_service` scheduled_backup * `deletion_protections`: an array of `google_dataproc_metastore_service` deletion_protection ## Properties Properties that can be accessed from the `google_dataproc_metastore_services` resource: See [google_dataproc_metastore_service](google_dataproc_metastore_service) for more detailed information. * `hive_metastore_configs`: an array of `google_dataproc_metastore_service` hive_metastore_config * `names`: an array of `google_dataproc_metastore_service` name * `create_times`: an array of `google_dataproc_metastore_service` create_time * `update_times`: an array of `google_dataproc_metastore_service` update_time * `labels`: an array of `google_dataproc_metastore_service` labels * `networks`: an array of `google_dataproc_metastore_service` network * `endpoint_uris`: an array of `google_dataproc_metastore_service` endpoint_uri * `ports`: an array of `google_dataproc_metastore_service` port * `states`: an array of `google_dataproc_metastore_service` state * `state_messages`: an array of `google_dataproc_metastore_service` state_message * `artifact_gcs_uris`: an array of `google_dataproc_metastore_service` artifact_gcs_uri * `tiers`: an array of `google_dataproc_metastore_service` tier * `metadata_integrations`: an array of `google_dataproc_metastore_service` metadata_integration * `maintenance_windows`: an array of `google_dataproc_metastore_service` maintenance_window * `uids`: an array of `google_dataproc_metastore_service` uid * `metadata_management_activities`: an array of `google_dataproc_metastore_service` metadata_management_activity * `release_channels`: an array of `google_dataproc_metastore_service` release_channel * `encryption_configs`: an array of `google_dataproc_metastore_service` encryption_config * `network_configs`: an array of `google_dataproc_metastore_service` network_config * `database_types`: an array of `google_dataproc_metastore_service` database_type * `telemetry_configs`: an array of `google_dataproc_metastore_service` telemetry_config * `scaling_configs`: an array of `google_dataproc_metastore_service` scaling_config * `scheduled_backups`: an array of `google_dataproc_metastore_service` scheduled_backup * `deletion_protections`: an array of `google_dataproc_metastore_service` deletion_protection ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Dataproc Metastore API](https://console.cloud.google.com/apis/library/metastore.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_session.md ================================================ +++ title = "google_dataproc_session resource" draft = false [menu.gcp] title = "google_dataproc_session" identifier = "inspec/resources/gcp/google_dataproc_session resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_session` InSpec audit resource to test the properties of a Google Cloud Session resource. ## Examples ```ruby describe google_dataproc_session(name: ' value_name') do it { should exist } its('name') { should cmp 'value_name' } its('uuid') { should cmp 'value_uuid' } its('create_time') { should cmp 'value_createtime' } its('state') { should cmp 'value_state' } its('state_message') { should cmp 'value_statemessage' } its('state_time') { should cmp 'value_statetime' } its('creator') { should cmp 'value_creator' } its('user') { should cmp 'value_user' } its('session_template') { should cmp 'value_sessiontemplate' } end describe google_dataproc_session(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_session` resource: ## Properties Properties that can be accessed from the `google_dataproc_session` resource: * `name`: Required. The resource name of the session. * `uuid`: Output only. A session UUID (Unique Universal Identifier). The service generates this value when it creates the session. * `create_time`: Output only. The time when the session was created. * `jupyter_session`: Jupyter configuration for an interactive session. * `kernel`: Optional. Kernel Possible values: * KERNEL_UNSPECIFIED * PYTHON * SCALA * `display_name`: Optional. Display name, shown in the Jupyter kernelspec card. * `runtime_info`: Runtime information about workload execution. * `endpoints`: Output only. Map of remote access endpoints (such as web interfaces and APIs) to their URIs. * `additional_properties`: * `output_uri`: Output only. A URI pointing to the location of the stdout and stderr of the workload. * `diagnostic_output_uri`: Output only. A URI pointing to the location of the diagnostics tarball. * `approximate_usage`: Usage metrics represent approximate total resources consumed by a workload. * `milli_dcu_seconds`: Optional. DCU (Dataproc Compute Units) usage in (milliDCU x seconds) (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)). * `shuffle_storage_gb_seconds`: Optional. Shuffle storage usage in (GB x seconds) (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)). * `milli_accelerator_seconds`: Optional. Accelerator usage in (milliAccelerator x seconds) (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)). * `accelerator_type`: Optional. Accelerator type being used, if any * `current_usage`: The usage snapshot represents the resources consumed by a workload at a specified time. * `milli_dcu`: Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)). * `shuffle_storage_gb`: Optional. Shuffle Storage in gigabytes (GB). (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)) * `milli_dcu_premium`: Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at premium tier (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)). * `shuffle_storage_gb_premium`: Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)) * `milli_accelerator`: Optional. Milli (one-thousandth) accelerator. (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)) * `accelerator_type`: Optional. Accelerator type being used, if any * `snapshot_time`: Optional. The timestamp of the usage snapshot. * `state`: Output only. A state of the session. Possible values: * STATE_UNSPECIFIED * CREATING * ACTIVE * TERMINATING * TERMINATED * FAILED * `state_message`: Output only. Session state details, such as the failure description if the state is FAILED. * `state_time`: Output only. The time when the session entered the current state. * `creator`: Output only. The email address of the user who created the session. * `labels`: Optional. The labels to associate with the session. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a session. * `additional_properties`: * `runtime_config`: Runtime configuration for a workload. * `version`: Optional. Version of the batch runtime. * `container_image`: Optional. Optional custom container image for the job runtime environment. If not specified, a default container image will be used. * `properties`: Optional. A mapping of property names to values, which are used to configure workload execution. * `additional_properties`: * `repository_config`: Configuration for dependency repositories * `pypi_repository_config`: Configuration for PyPi repository * `pypi_repository`: Optional. PyPi repository address * `environment_config`: Environment configuration for a workload. * `execution_config`: Execution configuration for a workload. * `service_account`: Optional. Service account that used to execute workload. * `network_uri`: Optional. Network URI to connect workload to. * `subnetwork_uri`: Optional. Subnetwork URI to connect workload to. * `network_tags`: Optional. Tags used for network traffic control. * `kms_key`: Optional. The Cloud KMS key to use for encryption. * `idle_ttl`: Optional. Applies to sessions only. The duration to keep the session alive while it's idling. Exceeding this threshold causes the session to terminate. This field cannot be set on a batch workload. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). Defaults to 1 hour if not set. If both ttl and idle_ttl are specified for an interactive session, the conditions are treated as OR conditions: the workload will be terminated when it has been idle for idle_ttl or when ttl has been exceeded, whichever occurs first. * `ttl`: Optional. The duration after which the workload will be terminated, specified as the JSON representation for Duration (https://protobuf.dev/programming-guides/proto3/#json). When the workload exceeds this duration, it will be unconditionally terminated without waiting for ongoing work to finish. If ttl is not specified for a batch workload, the workload will be allowed to run until it exits naturally (or run forever without exiting). If ttl is not specified for an interactive session, it defaults to 24 hours. If ttl is not specified for a batch that uses 2.1+ runtime version, it defaults to 4 hours. Minimum value is 10 minutes; maximum value is 14 days. If both ttl and idle_ttl are specified (for an interactive session), the conditions are treated as OR conditions: the workload will be terminated when it has been idle for idle_ttl or when ttl has been exceeded, whichever occurs first. * `staging_bucket`: Optional. A Cloud Storage bucket used to stage workload dependencies, config files, and store workload output and other ephemeral data, such as Spark history files. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location according to the region where your workload is running, and then create and manage project-level, per-location staging and temporary buckets. This field requires a Cloud Storage bucket name, not a gs://... URI to a Cloud Storage bucket. * `peripherals_config`: Auxiliary services configuration for a workload. * `metastore_service`: Optional. Resource name of an existing Dataproc Metastore service.Example: projects/[project_id]/locations/[region]/services/[service_id] * `spark_history_server_config`: Spark History Server configuration for the workload. * `dataproc_cluster`: Optional. Resource name of an existing Dataproc Cluster to act as a Spark History Server for the workload.Example: projects/[project_id]/regions/[region]/clusters/[cluster_name] * `user`: Optional. The email address of the user who owns the session. * `state_history`: Output only. Historical state information for the session. * `state`: Output only. The state of the session at this point in the session history. Possible values: * STATE_UNSPECIFIED * CREATING * ACTIVE * TERMINATING * TERMINATED * FAILED * `state_message`: Output only. Details about the state at this point in the session history. * `state_start_time`: Output only. The time when the session entered the historical state. * `session_template`: Optional. The session template used by the session.Only resource names, including project ID and location, are valid.Example: * https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id] * projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]The template must be in the same project and Dataproc region as the session. ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_sessions.md ================================================ +++ title = "google_dataproc_sessions resource" draft = false [menu.gcp] title = "google_dataproc_sessions" identifier = "inspec/resources/gcp/google_dataproc_sessions resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_sessions` InSpec audit resource to test the properties of a Google Cloud Session resource. ## Examples ```ruby describe google_dataproc_sessions(parent: ' value_parent') do it { should exist } end ``` ## Parameters Parameters that can be accessed from the `google_dataproc_sessions` resource: See [google_dataproc_session](google_dataproc_session) for more detailed information. * `names`: an array of `google_dataproc_session` name * `uuids`: an array of `google_dataproc_session` uuid * `create_times`: an array of `google_dataproc_session` create_time * `jupyter_sessions`: an array of `google_dataproc_session` jupyter_session * `runtime_infos`: an array of `google_dataproc_session` runtime_info * `states`: an array of `google_dataproc_session` state * `state_messages`: an array of `google_dataproc_session` state_message * `state_times`: an array of `google_dataproc_session` state_time * `creators`: an array of `google_dataproc_session` creator * `labels`: an array of `google_dataproc_session` labels * `runtime_configs`: an array of `google_dataproc_session` runtime_config * `environment_configs`: an array of `google_dataproc_session` environment_config * `users`: an array of `google_dataproc_session` user * `state_histories`: an array of `google_dataproc_session` state_history * `session_templates`: an array of `google_dataproc_session` session_template ## Properties Properties that can be accessed from the `google_dataproc_sessions` resource: See [google_dataproc_session](google_dataproc_session) for more detailed information. * `names`: an array of `google_dataproc_session` name * `uuids`: an array of `google_dataproc_session` uuid * `create_times`: an array of `google_dataproc_session` create_time * `jupyter_sessions`: an array of `google_dataproc_session` jupyter_session * `runtime_infos`: an array of `google_dataproc_session` runtime_info * `states`: an array of `google_dataproc_session` state * `state_messages`: an array of `google_dataproc_session` state_message * `state_times`: an array of `google_dataproc_session` state_time * `creators`: an array of `google_dataproc_session` creator * `labels`: an array of `google_dataproc_session` labels * `runtime_configs`: an array of `google_dataproc_session` runtime_config * `environment_configs`: an array of `google_dataproc_session` environment_config * `users`: an array of `google_dataproc_session` user * `state_histories`: an array of `google_dataproc_session` state_history * `session_templates`: an array of `google_dataproc_session` session_template ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_workflow_template.md ================================================ +++ title = "google_dataproc_workflow_template resource" draft = false [menu.gcp] title = "google_dataproc_workflow_template" identifier = "inspec/resources/gcp/google_dataproc_workflow_template resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_workflow_template` InSpec audit resource to to test a Google Cloud WorkflowTemplate resource. ## Examples ```ruby describe google_dataproc_workflow_template(name: 'value_name') do it { should exist } its('id') { should cmp 'value_id' } its('name') { should cmp 'value_name' } its('create_time') { should cmp 'value_createtime' } its('update_time') { should cmp 'value_updatetime' } its('dag_timeout') { should cmp 'value_dagtimeout' } end describe google_dataproc_workflow_template(name: "does_not_exit") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_dataproc_workflow_template` resource: * `id`: * `name`: Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id} For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id} * `version`: Optional. Used to perform a consistent read-modify-write.This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request. * `create_time`: Output only. The time template was created. * `update_time`: Output only. The time template was last updated. * `labels`: Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be associated with a template. * `additional_properties`: * `placement`: Specifies workflow execution target.Either managed_cluster or cluster_selector is required. * `managed_cluster`: Cluster that is managed by the workflow. * `cluster_name`: Required. The cluster name prefix. A unique cluster name will be formed by appending a random suffix.The name must contain only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must begin with a letter. Cannot begin or end with hyphen. Must consist of between 2 and 35 characters. * `config`: The cluster config. * `config_bucket`: Optional. A Cloud Storage bucket used to stage job dependencies, config files, and job driver console output. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Dataproc staging and temp buckets (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). This field requires a Cloud Storage bucket name, not a gs://... URI to a Cloud Storage bucket. * `temp_bucket`: Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data, such as Spark and MapReduce history files. If you do not specify a temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster's temp bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket. The default bucket has a TTL of 90 days, but you can use any TTL (or none) if you specify a bucket (see Dataproc staging and temp buckets (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). This field requires a Cloud Storage bucket name, not a gs://... URI to a Cloud Storage bucket. * `gce_cluster_config`: Common config settings for resources of Compute Engine cluster instances, applicable to all instances in the cluster. * `zone_uri`: Optional. The Compute Engine zone where the Dataproc cluster will be located. If omitted, the service will pick a zone in the cluster's Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone] projects/[project_id]/zones/[zone] [zone] * `network_uri`: Optional. The Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using Subnetworks (https://cloud.google.com/compute/docs/subnetworks) for more information).A full URL, partial URI, or short name are valid. Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default projects/[project_id]/global/networks/default default * `subnetwork_uri`: Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/regions/[region]/subnetworks/sub0 projects/[project_id]/regions/[region]/subnetworks/sub0 sub0 * `internal_ip_only`: Optional. This setting applies to subnetwork-enabled networks. It is set to true by default in clusters created with image versions 2.2.x.When set to true: All cluster VMs have internal IP addresses. Google Private Access (https://cloud.google.com/vpc/docs/private-google-access) must be enabled to access Dataproc and other Google Cloud APIs. Off-cluster dependencies must be configured to be accessible without external IP addresses.When set to false: Cluster VMs are not restricted to internal IP addresses. Ephemeral external IP addresses are assigned to each cluster VM. * `private_ipv6_google_access`: Optional. The type of IPv6 access for a cluster. Possible values: * PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED * INHERIT_FROM_SUBNETWORK * OUTBOUND * BIDIRECTIONAL * `service_account`: Optional. The Dataproc service account (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc) (also see VM Data Plane identity (https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) used by Dataproc cluster VM instances to access Google Cloud Platform services.If not specified, the Compute Engine default service account (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. * `service_account_scopes`: Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included: https://www.googleapis.com/auth/cloud.useraccounts.readonly https://www.googleapis.com/auth/devstorage.read_write https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided: https://www.googleapis.com/auth/bigquery https://www.googleapis.com/auth/bigtable.admin.table https://www.googleapis.com/auth/bigtable.data https://www.googleapis.com/auth/devstorage.full_control * `tags`: The Compute Engine tags to add to all instances (see Tagging instances (https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). * `metadata`: Optional. The Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). * `additional_properties`: * `reservation_affinity`: Reservation Affinity for consuming Zonal reservation. * `consume_reservation_type`: Optional. Type of reservation to consume Possible values: * TYPE_UNSPECIFIED * NO_RESERVATION * ANY_RESERVATION * SPECIFIC_RESERVATION * `key`: Optional. Corresponds to the label key of reservation resource. * `values`: Optional. Corresponds to the label values of reservation resource. * `node_group_affinity`: Node Group Affinity for clusters using sole-tenant node groups. The Dataproc NodeGroupAffinity resource is not related to the Dataproc NodeGroup resource. * `node_group_uri`: Required. The URI of a sole-tenant node group resource (https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups) that the cluster will be created on.A full URL, partial URI, or node group name are valid. Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/nodeGroups/node-group-1 projects/[project_id]/zones/[zone]/nodeGroups/node-group-1 node-group-1 * `shielded_instance_config`: Shielded Instance Config for clusters using Compute Engine Shielded VMs (https://cloud.google.com/security/shielded-cloud/shielded-vm). * `enable_secure_boot`: Optional. Defines whether instances have Secure Boot enabled. * `enable_vtpm`: Optional. Defines whether instances have the vTPM enabled. * `enable_integrity_monitoring`: Optional. Defines whether instances have integrity monitoring enabled. * `confidential_instance_config`: Confidential Instance Config for clusters using Confidential VMs (https://cloud.google.com/compute/confidential-vm/docs) * `enable_confidential_compute`: Optional. Defines whether the instance should have confidential compute enabled. * `master_config`: The config settings for Compute Engine resources in an instance group, such as a master or worker group. * `num_instances`: Optional. The number of VM instances in the instance group. For HA cluster master_config groups, must be set to 3. For standard cluster master_config groups, must be set to 1. * `instance_names`: Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group. * `instance_references`: Output only. List of references to Compute Engine instances. * `instance_name`: The user-friendly name of the Compute Engine instance. * `instance_id`: The unique identifier of the Compute Engine instance. * `public_key`: The public RSA key used for sharing data with this instance. * `public_ecies_key`: The public ECIES key used for sharing data with this instance. * `image_uri`: Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples: https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id] projects/[project_id]/global/images/[image-id] image-idImage family examples. Dataproc will use the most recent image from the family: https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name] projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default. * `machine_type_uri`: Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2 projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2 n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2. * `disk_config`: Specifies the config of disk options for a group of VM instances. * `boot_disk_type`: Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive), "pd-ssd" (Persistent Disk Solid State Drive), or "pd-standard" (Persistent Disk Hard Disk Drive). See Disk types (https://cloud.google.com/compute/docs/disks#disk-types). * `boot_disk_size_gb`: Optional. Size in GB of the boot disk (default is 500GB). * `num_local_ssds`: Optional. Number of attached SSDs, from 0 to 8 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.Note: Local SSD options may vary by machine type and number of vCPUs selected. * `local_ssd_interface`: Optional. Interface type of local SSDs (default is "scsi"). Valid values: "scsi" (Small Computer System Interface), "nvme" (Non-Volatile Memory Express). See local SSD performance (https://cloud.google.com/compute/docs/disks/local-ssd#performance). * `is_preemptible`: Output only. Specifies that this instance group contains preemptible instances. * `preemptibility`: Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE. Possible values: * PREEMPTIBILITY_UNSPECIFIED * NON_PREEMPTIBLE * PREEMPTIBLE * SPOT * `managed_group_config`: Specifies the resources used to actively manage an instance group. * `instance_template_name`: Output only. The name of the Instance Template used for the Managed Instance Group. * `instance_group_manager_name`: Output only. The name of the Instance Group Manager for this group. * `instance_group_manager_uri`: Output only. The partial URI to the instance group manager for this group. E.g. projects/my-project/regions/us-central1/instanceGroupManagers/my-igm. * `accelerators`: Optional. The Compute Engine accelerator configuration for these instances. * `accelerator_type_uri`: Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4 projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4 nvidia-tesla-t4Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-t4. * `accelerator_count`: The number of the accelerator cards of this type exposed to this instance. * `min_cpu_platform`: Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -> Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). * `min_num_instances`: Optional. The minimum number of primary worker instances to create. If min_num_instances is set, cluster creation will succeed if the number of primary workers created is at least equal to the min_num_instances number.Example: Cluster creation request with num_instances = 5 and min_num_instances = 3: If 4 VMs are created and 1 instance fails, the failed VM is deleted. The cluster is resized to 4 instances and placed in a RUNNING state. If 2 instances are created and 3 instances fail, the cluster in placed in an ERROR state. The failed VMs are not deleted. * `instance_flexibility_policy`: Instance flexibility Policy allowing a mixture of VM shapes and provisioning models. * `instance_selection_list`: Optional. List of instance selection options that the group will use when creating new VMs. * `machine_types`: Optional. Full machine-type names, e.g. "n1-standard-16". * `rank`: Optional. Preference of this instance selection. Lower number means higher preference. Dataproc will first try to create a VM based on the machine-type with priority rank and fallback to next rank based on availability. Machine types and instance selections with the same priority have the same preference. * `instance_selection_results`: Output only. A list of instance selection results in the group. * `machine_type`: Output only. Full machine-type names, e.g. "n1-standard-16". * `vm_count`: Output only. Number of VM provisioned with the machine_type. * `startup_config`: Configuration to handle the startup of instances during cluster create and update process. * `required_registration_fraction`: Optional. The config setting to enable cluster creation/ updation to be successful only after required_registration_fraction of instances are up and running. This configuration is applicable to only secondary workers for now. The cluster will fail if required_registration_fraction of instances are not available. This will include instance creation, agent registration, and service registration (if enabled). * `worker_config`: The config settings for Compute Engine resources in an instance group, such as a master or worker group. * `num_instances`: Optional. The number of VM instances in the instance group. For HA cluster master_config groups, must be set to 3. For standard cluster master_config groups, must be set to 1. * `instance_names`: Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group. * `instance_references`: Output only. List of references to Compute Engine instances. * `instance_name`: The user-friendly name of the Compute Engine instance. * `instance_id`: The unique identifier of the Compute Engine instance. * `public_key`: The public RSA key used for sharing data with this instance. * `public_ecies_key`: The public ECIES key used for sharing data with this instance. * `image_uri`: Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples: https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id] projects/[project_id]/global/images/[image-id] image-idImage family examples. Dataproc will use the most recent image from the family: https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name] projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default. * `machine_type_uri`: Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2 projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2 n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2. * `disk_config`: Specifies the config of disk options for a group of VM instances. * `boot_disk_type`: Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive), "pd-ssd" (Persistent Disk Solid State Drive), or "pd-standard" (Persistent Disk Hard Disk Drive). See Disk types (https://cloud.google.com/compute/docs/disks#disk-types). * `boot_disk_size_gb`: Optional. Size in GB of the boot disk (default is 500GB). * `num_local_ssds`: Optional. Number of attached SSDs, from 0 to 8 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.Note: Local SSD options may vary by machine type and number of vCPUs selected. * `local_ssd_interface`: Optional. Interface type of local SSDs (default is "scsi"). Valid values: "scsi" (Small Computer System Interface), "nvme" (Non-Volatile Memory Express). See local SSD performance (https://cloud.google.com/compute/docs/disks/local-ssd#performance). * `is_preemptible`: Output only. Specifies that this instance group contains preemptible instances. * `preemptibility`: Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE. Possible values: * PREEMPTIBILITY_UNSPECIFIED * NON_PREEMPTIBLE * PREEMPTIBLE * SPOT * `managed_group_config`: Specifies the resources used to actively manage an instance group. * `instance_template_name`: Output only. The name of the Instance Template used for the Managed Instance Group. * `instance_group_manager_name`: Output only. The name of the Instance Group Manager for this group. * `instance_group_manager_uri`: Output only. The partial URI to the instance group manager for this group. E.g. projects/my-project/regions/us-central1/instanceGroupManagers/my-igm. * `accelerators`: Optional. The Compute Engine accelerator configuration for these instances. * `accelerator_type_uri`: Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4 projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4 nvidia-tesla-t4Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-t4. * `accelerator_count`: The number of the accelerator cards of this type exposed to this instance. * `min_cpu_platform`: Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -> Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). * `min_num_instances`: Optional. The minimum number of primary worker instances to create. If min_num_instances is set, cluster creation will succeed if the number of primary workers created is at least equal to the min_num_instances number.Example: Cluster creation request with num_instances = 5 and min_num_instances = 3: If 4 VMs are created and 1 instance fails, the failed VM is deleted. The cluster is resized to 4 instances and placed in a RUNNING state. If 2 instances are created and 3 instances fail, the cluster in placed in an ERROR state. The failed VMs are not deleted. * `instance_flexibility_policy`: Instance flexibility Policy allowing a mixture of VM shapes and provisioning models. * `instance_selection_list`: Optional. List of instance selection options that the group will use when creating new VMs. * `machine_types`: Optional. Full machine-type names, e.g. "n1-standard-16". * `rank`: Optional. Preference of this instance selection. Lower number means higher preference. Dataproc will first try to create a VM based on the machine-type with priority rank and fallback to next rank based on availability. Machine types and instance selections with the same priority have the same preference. * `instance_selection_results`: Output only. A list of instance selection results in the group. * `machine_type`: Output only. Full machine-type names, e.g. "n1-standard-16". * `vm_count`: Output only. Number of VM provisioned with the machine_type. * `startup_config`: Configuration to handle the startup of instances during cluster create and update process. * `required_registration_fraction`: Optional. The config setting to enable cluster creation/ updation to be successful only after required_registration_fraction of instances are up and running. This configuration is applicable to only secondary workers for now. The cluster will fail if required_registration_fraction of instances are not available. This will include instance creation, agent registration, and service registration (if enabled). * `secondary_worker_config`: The config settings for Compute Engine resources in an instance group, such as a master or worker group. * `num_instances`: Optional. The number of VM instances in the instance group. For HA cluster master_config groups, must be set to 3. For standard cluster master_config groups, must be set to 1. * `instance_names`: Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group. * `instance_references`: Output only. List of references to Compute Engine instances. * `instance_name`: The user-friendly name of the Compute Engine instance. * `instance_id`: The unique identifier of the Compute Engine instance. * `public_key`: The public RSA key used for sharing data with this instance. * `public_ecies_key`: The public ECIES key used for sharing data with this instance. * `image_uri`: Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples: https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id] projects/[project_id]/global/images/[image-id] image-idImage family examples. Dataproc will use the most recent image from the family: https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name] projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default. * `machine_type_uri`: Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2 projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2 n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2. * `disk_config`: Specifies the config of disk options for a group of VM instances. * `boot_disk_type`: Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive), "pd-ssd" (Persistent Disk Solid State Drive), or "pd-standard" (Persistent Disk Hard Disk Drive). See Disk types (https://cloud.google.com/compute/docs/disks#disk-types). * `boot_disk_size_gb`: Optional. Size in GB of the boot disk (default is 500GB). * `num_local_ssds`: Optional. Number of attached SSDs, from 0 to 8 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.Note: Local SSD options may vary by machine type and number of vCPUs selected. * `local_ssd_interface`: Optional. Interface type of local SSDs (default is "scsi"). Valid values: "scsi" (Small Computer System Interface), "nvme" (Non-Volatile Memory Express). See local SSD performance (https://cloud.google.com/compute/docs/disks/local-ssd#performance). * `is_preemptible`: Output only. Specifies that this instance group contains preemptible instances. * `preemptibility`: Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE. Possible values: * PREEMPTIBILITY_UNSPECIFIED * NON_PREEMPTIBLE * PREEMPTIBLE * SPOT * `managed_group_config`: Specifies the resources used to actively manage an instance group. * `instance_template_name`: Output only. The name of the Instance Template used for the Managed Instance Group. * `instance_group_manager_name`: Output only. The name of the Instance Group Manager for this group. * `instance_group_manager_uri`: Output only. The partial URI to the instance group manager for this group. E.g. projects/my-project/regions/us-central1/instanceGroupManagers/my-igm. * `accelerators`: Optional. The Compute Engine accelerator configuration for these instances. * `accelerator_type_uri`: Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4 projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4 nvidia-tesla-t4Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-t4. * `accelerator_count`: The number of the accelerator cards of this type exposed to this instance. * `min_cpu_platform`: Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -> Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). * `min_num_instances`: Optional. The minimum number of primary worker instances to create. If min_num_instances is set, cluster creation will succeed if the number of primary workers created is at least equal to the min_num_instances number.Example: Cluster creation request with num_instances = 5 and min_num_instances = 3: If 4 VMs are created and 1 instance fails, the failed VM is deleted. The cluster is resized to 4 instances and placed in a RUNNING state. If 2 instances are created and 3 instances fail, the cluster in placed in an ERROR state. The failed VMs are not deleted. * `instance_flexibility_policy`: Instance flexibility Policy allowing a mixture of VM shapes and provisioning models. * `instance_selection_list`: Optional. List of instance selection options that the group will use when creating new VMs. * `machine_types`: Optional. Full machine-type names, e.g. "n1-standard-16". * `rank`: Optional. Preference of this instance selection. Lower number means higher preference. Dataproc will first try to create a VM based on the machine-type with priority rank and fallback to next rank based on availability. Machine types and instance selections with the same priority have the same preference. * `instance_selection_results`: Output only. A list of instance selection results in the group. * `machine_type`: Output only. Full machine-type names, e.g. "n1-standard-16". * `vm_count`: Output only. Number of VM provisioned with the machine_type. * `startup_config`: Configuration to handle the startup of instances during cluster create and update process. * `required_registration_fraction`: Optional. The config setting to enable cluster creation/ updation to be successful only after required_registration_fraction of instances are up and running. This configuration is applicable to only secondary workers for now. The cluster will fail if required_registration_fraction of instances are not available. This will include instance creation, agent registration, and service registration (if enabled). * `software_config`: Specifies the selection and config of software inside the cluster. * `image_version`: Optional. The version of software inside the cluster. It must be one of the supported Dataproc Versions (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions), such as "1.2" (including a subminor version, such as "1.2.29"), or the "preview" version (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). If unspecified, it defaults to the latest Debian version. * `properties`: Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, for example core:hadoop.tmp.dir. The following are supported prefixes and their mappings: capacity-scheduler: capacity-scheduler.xml core: core-site.xml distcp: distcp-default.xml hdfs: hdfs-site.xml hive: hive-site.xml mapred: mapred-site.xml pig: pig.properties spark: spark-defaults.conf yarn: yarn-site.xmlFor more information, see Cluster properties (https://cloud.google.com/dataproc/docs/concepts/cluster-properties). * `additional_properties`: * `optional_components`: Optional. The set of components to activate on the cluster. * `initialization_actions`: Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget): ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) if [[ "${ROLE}" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi * `executable_file`: Required. Cloud Storage URI of executable file. * `execution_timeout`: Optional. Amount of time executable has to complete. Default is 10 minutes (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period. * `encryption_config`: Encryption settings for the cluster. * `gce_pd_kms_key_name`: Optional. The Cloud KMS key resource name to use for persistent disk encryption for all instances in the cluster. See Use CMEK with cluster data (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) for more information. * `kms_key`: Optional. The Cloud KMS key resource name to use for cluster persistent disk and job argument encryption. See Use CMEK with cluster data (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) for more information.When this key resource name is provided, the following job arguments of the following job types submitted to the cluster are encrypted using CMEK: FlinkJob args (https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) HadoopJob args (https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) SparkJob args (https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) SparkRJob args (https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) PySparkJob args (https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) SparkSqlJob (https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) scriptVariables and queryList.queries HiveJob (https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) scriptVariables and queryList.queries PigJob (https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) scriptVariables and queryList.queries PrestoJob (https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) scriptVariables and queryList.queries * `autoscaling_config`: Autoscaling Policy config associated with the cluster. * `policy_uri`: Optional. The autoscaling policy used by the cluster.Only resource names including projectid and location (region) are valid. Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id] projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be in the same project and Dataproc region. * `security_config`: Security related configuration, including encryption, Kerberos, etc. * `kerberos_config`: Specifies Kerberos related configuration. * `enable_kerberos`: Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set this field to true to enable Kerberos on a cluster. * `root_principal_password_uri`: Optional. The Cloud Storage URI of a KMS encrypted file containing the root principal password. * `kms_key_uri`: Optional. The URI of the KMS key used to encrypt sensitive files. * `keystore_uri`: Optional. The Cloud Storage URI of the keystore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate. * `truststore_uri`: Optional. The Cloud Storage URI of the truststore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate. * `keystore_password_uri`: Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided keystore. For the self-signed certificate, this password is generated by Dataproc. * `key_password_uri`: Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided key. For the self-signed certificate, this password is generated by Dataproc. * `truststore_password_uri`: Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided truststore. For the self-signed certificate, this password is generated by Dataproc. * `cross_realm_trust_realm`: Optional. The remote realm the Dataproc on-cluster KDC will trust, should the user enable cross realm trust. * `cross_realm_trust_kdc`: Optional. The KDC (IP or hostname) for the remote trusted realm in a cross realm trust relationship. * `cross_realm_trust_admin_server`: Optional. The admin server (IP or hostname) for the remote trusted realm in a cross realm trust relationship. * `cross_realm_trust_shared_password_uri`: Optional. The Cloud Storage URI of a KMS encrypted file containing the shared password between the on-cluster Kerberos realm and the remote trusted realm, in a cross realm trust relationship. * `kdc_db_key_uri`: Optional. The Cloud Storage URI of a KMS encrypted file containing the master key of the KDC database. * `tgt_lifetime_hours`: Optional. The lifetime of the ticket granting ticket, in hours. If not specified, or user specifies 0, then default value 10 will be used. * `realm`: Optional. The name of the on-cluster Kerberos realm. If not specified, the uppercased domain of hostnames will be the realm. * `identity_config`: Identity related configuration, including service account based secure multi-tenancy user mappings. * `user_service_account_mapping`: Required. Map of user to service account. * `additional_properties`: * `lifecycle_config`: Specifies the cluster auto-delete schedule configuration. * `idle_delete_ttl`: Optional. The duration to keep the cluster alive while idling (when no jobs are running). Passing this threshold will cause the cluster to be deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). * `auto_delete_time`: Optional. The time when cluster will be auto-deleted (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)). * `auto_delete_ttl`: Optional. The lifetime duration of cluster. The cluster will be auto-deleted at the end of this period. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). * `idle_start_time`: Output only. The time when cluster became idle (most recent job finished) and became eligible for deletion due to idleness (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)). * `endpoint_config`: Endpoint config for this cluster * `http_ports`: Output only. The map of port descriptions to URLs. Will only be populated if enable_http_port_access is true. * `additional_properties`: * `enable_http_port_access`: Optional. If true, enable http access to specific ports on the cluster from external sources. Defaults to false. * `metastore_config`: Specifies a Metastore configuration. * `dataproc_metastore_service`: Required. Resource name of an existing Dataproc Metastore service.Example: projects/[project_id]/locations/[dataproc_region]/services/[service-name] * `gke_cluster_config`: The cluster's GKE config. * `namespaced_gke_deployment_target`: Deprecated. Used only for the deprecated beta. A full, namespace-isolated deployment target for an existing GKE cluster. * `target_gke_cluster`: Optional. The target GKE cluster to deploy to. Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}' * `cluster_namespace`: Optional. A namespace within the GKE cluster to deploy into. * `gke_cluster_target`: Optional. A target GKE cluster to deploy to. It must be in the same project and region as the Dataproc cluster (the GKE cluster can be zonal or regional). Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}' * `node_pool_target`: Optional. GKE node pools where workloads will be scheduled. At least one node pool must be assigned the DEFAULT GkeNodePoolTarget.Role. If a GkeNodePoolTarget is not specified, Dataproc constructs a DEFAULT GkeNodePoolTarget. Each role can be given to only one GkeNodePoolTarget. All node pools must have the same location settings. * `node_pool`: Required. The target GKE node pool. Format: 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}' * `roles`: Required. The roles associated with the GKE node pool. * `node_pool_config`: The configuration of a GKE node pool used by a Dataproc-on-GKE cluster (https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster). * `config`: Parameters that describe cluster nodes. * `machine_type`: Optional. The name of a Compute Engine machine type (https://cloud.google.com/compute/docs/machine-types). * `local_ssd_count`: Optional. The number of local SSD disks to attach to the node, which is limited by the maximum number of disks allowable per zone (see Adding Local SSDs (https://cloud.google.com/compute/docs/disks/local-ssd)). * `preemptible`: Optional. Whether the nodes are created as legacy preemptible VM instances (https://cloud.google.com/compute/docs/instances/preemptible). Also see Spot VMs, preemptible VM instances without a maximum lifetime. Legacy and Spot preemptible nodes cannot be used in a node pool with the CONTROLLER role or in the DEFAULT node pool if the CONTROLLER role is not assigned (the DEFAULT node pool will assume the CONTROLLER role). * `accelerators`: Optional. A list of hardware accelerators (https://cloud.google.com/compute/docs/gpus) to attach to each node. * `accelerator_count`: The number of accelerator cards exposed to an instance. * `accelerator_type`: The accelerator type resource namename (see GPUs on Compute Engine). * `gpu_partition_size`: Size of partitions to create on the GPU. Valid values are described in the NVIDIA mig user guide (https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). * `min_cpu_platform`: Optional. Minimum CPU platform (https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) to be used by this instance. The instance may be scheduled on the specified or a newer CPU platform. Specify the friendly names of CPU platforms, such as "Intel Haswell"` or Intel Sandy Bridge". * `boot_disk_kms_key`: Optional. The Customer Managed Encryption Key (CMEK) (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek) used to encrypt the boot disk attached to each node in the node pool. Specify the key using the following format: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} * `spot`: Optional. Whether the nodes are created as Spot VM instances (https://cloud.google.com/compute/docs/instances/spot). Spot VMs are the latest update to legacy preemptible VMs. Spot VMs do not have a maximum lifetime. Legacy and Spot preemptible nodes cannot be used in a node pool with the CONTROLLER role or in the DEFAULT node pool if the CONTROLLER role is not assigned (the DEFAULT node pool will assume the CONTROLLER role). * `locations`: Optional. The list of Compute Engine zones (https://cloud.google.com/compute/docs/zones#available) where node pool nodes associated with a Dataproc on GKE virtual cluster will be located.Note: All node pools associated with a virtual cluster must be located in the same region as the virtual cluster, and they must be located in the same zone within that region.If a location is not specified during node pool creation, Dataproc on GKE will choose the zone. * `autoscaling`: GkeNodePoolAutoscaling contains information the cluster autoscaler needs to adjust the size of the node pool to the current cluster usage. * `min_node_count`: The minimum number of nodes in the node pool. Must be >= 0 and <= max_node_count. * `max_node_count`: The maximum number of nodes in the node pool. Must be >= min_node_count, and must be > 0. Note: Quota must be sufficient to scale up the cluster. * `dataproc_metric_config`: Dataproc metric config. * `metrics`: Required. Metrics sources to enable. * `metric_source`: Required. A standard set of metrics is collected unless metricOverrides are specified for the metric source (see Custom metrics (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics) for more information). Possible values: * METRIC_SOURCE_UNSPECIFIED * MONITORING_AGENT_DEFAULTS * HDFS * SPARK * YARN * SPARK_HISTORY_SERVER * HIVESERVER2 * HIVEMETASTORE * FLINK * `metric_overrides`: Optional. Specify one or more Custom metrics (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics) to collect for the metric course (for the SPARK metric source (any Spark metric (https://spark.apache.org/docs/latest/monitoring.html#metrics) can be specified).Provide metrics in the following format: METRIC_SOURCE: INSTANCE:GROUP:METRIC Use camelcase as appropriate.Examples: yarn:ResourceManager:QueueMetrics:AppsCompleted spark:driver:DAGScheduler:job.allJobs sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed hiveserver2:JVM:Memory:NonHeapMemoryUsage.used Notes: Only the specified overridden metrics are collected for the metric source. For example, if one or more spark:executive metrics are listed as metric overrides, other SPARK metrics are not collected. The collection of the metrics for other enabled custom metric sources is unaffected. For example, if both SPARK andd YARN metric sources are enabled, and overrides are provided for Spark metrics only, all YARN metrics are collected. * `auxiliary_node_groups`: Optional. The node group settings. * `node_group`: Dataproc Node Group. The Dataproc NodeGroup resource is not related to the Dataproc NodeGroupAffinity resource. * `name`: The Node group resource name (https://aip.dev/122). * `roles`: Required. Node group roles. * `node_group_config`: The config settings for Compute Engine resources in an instance group, such as a master or worker group. * `num_instances`: Optional. The number of VM instances in the instance group. For HA cluster master_config groups, must be set to 3. For standard cluster master_config groups, must be set to 1. * `instance_names`: Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group. * `instance_references`: Output only. List of references to Compute Engine instances. * `instance_name`: The user-friendly name of the Compute Engine instance. * `instance_id`: The unique identifier of the Compute Engine instance. * `public_key`: The public RSA key used for sharing data with this instance. * `public_ecies_key`: The public ECIES key used for sharing data with this instance. * `image_uri`: Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples: https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id] projects/[project_id]/global/images/[image-id] image-idImage family examples. Dataproc will use the most recent image from the family: https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name] projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default. * `machine_type_uri`: Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2 projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2 n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2. * `disk_config`: Specifies the config of disk options for a group of VM instances. * `boot_disk_type`: Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive), "pd-ssd" (Persistent Disk Solid State Drive), or "pd-standard" (Persistent Disk Hard Disk Drive). See Disk types (https://cloud.google.com/compute/docs/disks#disk-types). * `boot_disk_size_gb`: Optional. Size in GB of the boot disk (default is 500GB). * `num_local_ssds`: Optional. Number of attached SSDs, from 0 to 8 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.Note: Local SSD options may vary by machine type and number of vCPUs selected. * `local_ssd_interface`: Optional. Interface type of local SSDs (default is "scsi"). Valid values: "scsi" (Small Computer System Interface), "nvme" (Non-Volatile Memory Express). See local SSD performance (https://cloud.google.com/compute/docs/disks/local-ssd#performance). * `is_preemptible`: Output only. Specifies that this instance group contains preemptible instances. * `preemptibility`: Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE. Possible values: * PREEMPTIBILITY_UNSPECIFIED * NON_PREEMPTIBLE * PREEMPTIBLE * SPOT * `managed_group_config`: Specifies the resources used to actively manage an instance group. * `instance_template_name`: Output only. The name of the Instance Template used for the Managed Instance Group. * `instance_group_manager_name`: Output only. The name of the Instance Group Manager for this group. * `instance_group_manager_uri`: Output only. The partial URI to the instance group manager for this group. E.g. projects/my-project/regions/us-central1/instanceGroupManagers/my-igm. * `accelerators`: Optional. The Compute Engine accelerator configuration for these instances. * `accelerator_type_uri`: Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).Examples: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4 projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4 nvidia-tesla-t4Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-t4. * `accelerator_count`: The number of the accelerator cards of this type exposed to this instance. * `min_cpu_platform`: Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -> Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). * `min_num_instances`: Optional. The minimum number of primary worker instances to create. If min_num_instances is set, cluster creation will succeed if the number of primary workers created is at least equal to the min_num_instances number.Example: Cluster creation request with num_instances = 5 and min_num_instances = 3: If 4 VMs are created and 1 instance fails, the failed VM is deleted. The cluster is resized to 4 instances and placed in a RUNNING state. If 2 instances are created and 3 instances fail, the cluster in placed in an ERROR state. The failed VMs are not deleted. * `instance_flexibility_policy`: Instance flexibility Policy allowing a mixture of VM shapes and provisioning models. * `instance_selection_list`: Optional. List of instance selection options that the group will use when creating new VMs. * `machine_types`: Optional. Full machine-type names, e.g. "n1-standard-16". * `rank`: Optional. Preference of this instance selection. Lower number means higher preference. Dataproc will first try to create a VM based on the machine-type with priority rank and fallback to next rank based on availability. Machine types and instance selections with the same priority have the same preference. * `instance_selection_results`: Output only. A list of instance selection results in the group. * `machine_type`: Output only. Full machine-type names, e.g. "n1-standard-16". * `vm_count`: Output only. Number of VM provisioned with the machine_type. * `startup_config`: Configuration to handle the startup of instances during cluster create and update process. * `required_registration_fraction`: Optional. The config setting to enable cluster creation/ updation to be successful only after required_registration_fraction of instances are up and running. This configuration is applicable to only secondary workers for now. The cluster will fail if required_registration_fraction of instances are not available. This will include instance creation, agent registration, and service registration (if enabled). * `labels`: Optional. Node group labels. Label keys must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). The node group must have no more than 32 labelsn. * `additional_properties`: * `node_group_id`: Optional. A node group ID. Generated if not specified.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 characters. * `labels`: Optional. The labels to associate with this cluster.Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 32 labels can be associated with a given cluster. * `additional_properties`: * `cluster_selector`: A selector that chooses target cluster for jobs based on metadata. * `zone`: Optional. The zone where workflow process executes. This parameter does not affect the selection of the cluster.If unspecified, the zone of the first cluster matching the selector is used. * `cluster_labels`: Required. The cluster labels. Cluster must have all labels to match. * `additional_properties`: * `jobs`: Required. The Directed Acyclic Graph of Jobs to submit. * `step_id`: Required. The step id. The id must be unique among all jobs within the template.The step id is used as prefix for job id, as job goog-dataproc-workflow-step-id label, and in prerequisiteStepIds field from other steps.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters. * `hadoop_job`: A Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). * `main_jar_file_uri`: The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' * `main_class`: The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris. * `args`: Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision might occur that causes an incorrect job submission. * `jar_file_uris`: Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks. * `file_uris`: Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks. * `archive_uris`: Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip. * `properties`: Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code. * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `spark_job`: A Dataproc job for running Apache Spark (https://spark.apache.org/) applications on YARN. * `main_jar_file_uri`: The HCFS URI of the jar file that contains the main class. * `main_class`: The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in SparkJob.jar_file_uris. * `args`: Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission. * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks. * `file_uris`: Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks. * `archive_uris`: Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. * `properties`: Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `pyspark_job`: A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. * `main_python_file_uri`: Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file. * `args`: Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission. * `python_file_uris`: Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip. * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks. * `file_uris`: Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks. * `archive_uris`: Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. * `properties`: Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `hive_job`: A Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. * `query_file_uri`: The HCFS URI of the script that contains Hive queries. * `query_list`: A list of queries to run on a cluster. * `queries`: Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } * `continue_on_failure`: Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries. * `script_variables`: Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name="value";). * `additional_properties`: * `properties`: Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code. * `additional_properties`: * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs. * `pig_job`: A Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. * `query_file_uri`: The HCFS URI of the script that contains the Pig queries. * `query_list`: A list of queries to run on a cluster. * `queries`: Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } * `continue_on_failure`: Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries. * `script_variables`: Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]). * `additional_properties`: * `properties`: Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code. * `additional_properties`: * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `spark_r_job`: A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) applications on YARN. * `main_r_file_uri`: Required. The HCFS URI of the main R file to use as the driver. Must be a .R file. * `args`: Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission. * `file_uris`: Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks. * `archive_uris`: Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. * `properties`: Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `spark_sql_job`: A Dataproc job for running Apache Spark SQL (https://spark.apache.org/sql/) queries. * `query_file_uri`: The HCFS URI of the script that contains SQL queries. * `query_list`: A list of queries to run on a cluster. * `queries`: Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } * `script_variables`: Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name="value";). * `additional_properties`: * `properties`: Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Dataproc API might be overwritten. * `additional_properties`: * `jar_file_uris`: Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `presto_job`: A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster. * `query_file_uri`: The HCFS URI of the script that contains SQL queries. * `query_list`: A list of queries to run on a cluster. * `queries`: Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } * `continue_on_failure`: Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries. * `output_format`: Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats * `client_tags`: Optional. Presto client tags to attach to this query * `properties`: Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `trino_job`: A Dataproc job for running Trino (https://trino.io/) queries. IMPORTANT: The Dataproc Trino Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/trino) must be enabled when the cluster is created to submit a Trino job to the cluster. * `query_file_uri`: The HCFS URI of the script that contains SQL queries. * `query_list`: A list of queries to run on a cluster. * `queries`: Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } * `continue_on_failure`: Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries. * `output_format`: Optional. The format in which query output will be displayed. See the Trino documentation for supported output formats * `client_tags`: Optional. Trino client tags to attach to this query * `properties`: Optional. A mapping of property names to values. Used to set Trino session properties (https://trino.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Trino CLI * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `flink_job`: A Dataproc job for running Apache Flink applications on YARN. * `main_jar_file_uri`: The HCFS URI of the jar file that contains the main class. * `main_class`: The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jarFileUris. * `args`: Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision might occur that causes an incorrect job submission. * `jar_file_uris`: Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Flink driver and tasks. * `savepoint_uri`: Optional. HCFS URI of the savepoint, which contains the last saved progress for starting the current job. * `properties`: Optional. A mapping of property names to values, used to configure Flink. Properties that conflict with values set by the Dataproc API might beoverwritten. Can include properties set in/etc/flink/conf/flink-defaults.conf and classes in user code. * `additional_properties`: * `logging_config`: The runtime logging config of the job. * `driver_log_levels`: The per-package log levels for the driver. This can include "root" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' * `additional_properties`: * `labels`: Optional. The labels to associate with this job.Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: \p{Ll}\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 32 labels can be associated with a given job. * `additional_properties`: * `scheduling`: Job scheduling options. * `max_failures_per_hour`: Optional. Maximum number of times per hour a driver can be restarted as a result of driver exiting with non-zero code before job is reported failed.A job might be reported as thrashing if the driver exits with a non-zero code four times within a 10-minute window.Maximum value is 10.Note: This restartable job option is not supported in Dataproc workflow templates (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). * `max_failures_total`: Optional. Maximum total number of times a driver can be restarted as a result of the driver exiting with a non-zero code. After the maximum number is reached, the job will be reported as failed.Maximum value is 240.Note: Currently, this restartable job option is not supported in Dataproc workflow templates (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). * `prerequisite_step_ids`: Optional. The optional list of prerequisite job step_ids. If not specified, the job will start at the beginning of workflow. * `parameters`: Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated. * `name`: Required. Parameter name. The parameter name is used as the key, and paired with the parameter value, which are passed to the template when the template is instantiated. The name must contain only capital letters (A-Z), numbers (0-9), and underscores (_), and must not start with a number. The maximum length is 40 characters. * `fields`: Required. Paths to all fields that the parameter replaces. A field is allowed to appear in at most one parameter's list of field paths.A field path is similar in syntax to a google.protobuf.FieldMask. For example, a field path that references the zone field of a workflow template's cluster selector would be specified as placement.clusterSelector.zone.Also, field paths can reference fields using the following syntax: Values in maps can be referenced by key: labels'key' placement.clusterSelector.clusterLabels'key' placement.managedCluster.labels'key' placement.clusterSelector.clusterLabels'key' jobs'step-id'.labels'key' Jobs in the jobs list can be referenced by step-id: jobs'step-id'.hadoopJob.mainJarFileUri jobs'step-id'.hiveJob.queryFileUri jobs'step-id'.pySparkJob.mainPythonFileUri jobs'step-id'.hadoopJob.jarFileUris0 jobs'step-id'.hadoopJob.archiveUris0 jobs'step-id'.hadoopJob.fileUris0 jobs'step-id'.pySparkJob.pythonFileUris0 Items in repeated fields can be referenced by a zero-based index: jobs'step-id'.sparkJob.args0 Other examples: jobs'step-id'.hadoopJob.properties'key' jobs'step-id'.hadoopJob.args0 jobs'step-id'.hiveJob.scriptVariables'key' jobs'step-id'.hadoopJob.mainJarFileUri placement.clusterSelector.zoneIt may not be possible to parameterize maps and repeated fields in their entirety since only individual map values and individual items in repeated fields can be referenced. For example, the following field paths are invalid: placement.clusterSelector.clusterLabels jobs'step-id'.sparkJob.args * `description`: Optional. Brief description of the parameter. Must not exceed 1024 characters. * `validation`: Configuration for parameter validation. * `regex`: Validation based on regular expressions. * `regexes`: Required. RE2 regular expressions used to validate the parameter's value. The value must match the regex in its entirety (substring matches are not sufficient). * `values`: Validation based on a list of allowed values. * `values`: Required. List of allowed values for the parameter. * `dag_timeout`: Optional. Timeout duration for the DAG of jobs, expressed in seconds (see JSON representation of duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). The timeout duration must be from 10 minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running on a managed cluster, the cluster is deleted. * `encryption_config`: Encryption settings for encrypting workflow template job arguments. * `kms_key`: Optional. The Cloud KMS key name to use for encrypting workflow template job arguments.When this this key is provided, the following workflow template job arguments (https://cloud.google.com/dataproc/docs/concepts/workflows/use-workflows#adding_jobs_to_a_template), if present, are CMEK encrypted (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_workflow_template_data): FlinkJob args (https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) HadoopJob args (https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) SparkJob args (https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) SparkRJob args (https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) PySparkJob args (https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) SparkSqlJob (https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) scriptVariables and queryList.queries HiveJob (https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) scriptVariables and queryList.queries PigJob (https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) scriptVariables and queryList.queries PrestoJob (https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) scriptVariables and queryList.queries ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dataproc_workflow_templates.md ================================================ +++ title = "google_dataproc_workflow_templates resource" draft = false [menu.gcp] title = "google_dataproc_workflow_templates" identifier = "inspec/resources/gcp/google_dataproc_workflow_templates resource" parent = "inspec/resources/gcp" +++ Use the `google_dataproc_workflow_templates` InSpec audit resource to to test a Google Cloud WorkflowTemplates resource. ## Examples ```ruby describe google_dataproc_workflow_templates(parent: 'value_parent') do it { should exist } its('ids') { should include 'value_id' } its('names') { should include 'value_name' } its('create_times') { should include 'value_createtime' } its('update_times') { should include 'value_updatetime' } its('dag_timeouts') { should include 'value_dagtimeout' } end ``` ## Parameters * `parent`: The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{projectId}/regions/{region} For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{projectId}/locations/{location} ## Properties Properties that can be accessed from the `google_dataproc_workflow_templates` resource: See [google_dataproc_project_location_workflow_template](google_dataproc_project_location_workflow_template) for more detailed information. * `ids`: an array of `google_dataproc_project_location_workflow_template` id * `names`: an array of `google_dataproc_project_location_workflow_template` name * `versions`: an array of `google_dataproc_project_location_workflow_template` version * `create_times`: an array of `google_dataproc_project_location_workflow_template` create_time * `update_times`: an array of `google_dataproc_project_location_workflow_template` update_time * `labels`: an array of `google_dataproc_project_location_workflow_template` labels * `placements`: an array of `google_dataproc_project_location_workflow_template` placement * `jobs`: an array of `google_dataproc_project_location_workflow_template` jobs * `parameters`: an array of `google_dataproc_project_location_workflow_template` parameters * `dag_timeouts`: an array of `google_dataproc_project_location_workflow_template` dag_timeout * `encryption_configs`: an array of `google_dataproc_project_location_workflow_template` encryption_config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dlp_dt.md ================================================ +++ title = "google_dlp_dt resource" draft = false [menu.gcp] title = "google_dlp_dt" identifier = "inspec/resources/gcp/google_dlp_dt resource" parent = "inspec/resources/gcp" +++ Use the `google_dlp_dt` InSpec audit resource to to test a Google Cloud DT resource. ## Examples ```ruby describe google_dlp_dts(parent: "projects/#{'chef-gcp-inspec'}/locations/#{''}") do it { should exist } its('display_names') { should include '' } end ``` ## Properties Properties that can be accessed from the `google_dlp_dt` resource: * `name`: The resource name of the template. Set by the server. * `description`: A description of the template. * `display_name`: User set display name of the template. * `config`: deidentifyConfig - Configuration of the deidentify template * `info_type_tf`: infoTypeTransformations - Specifies free-text based transformations to be applied to the dataset. * `tf`: transformations - Transformation for each infoType. Cannot specify more than one for a given infoType. * `info_types`: InfoTypes to apply the transformation to. Leaving this empty will apply the transformation to apply to all findings that correspond to infoTypes that were requested in InspectConfig. * `name`: Name of the information type. * `primitive_tf`: Primitive transformation to apply to the infoType. * `replace_config`: Replace each input value with a given value. * `new_value`: Replace each input value with a given value. * `integer_value`: An integer value. * `float_value`: A float value. * `string_value`: A string value. * `boolean_value`: A boolean value. * `timestamp_value`: A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `time_value`: Represents a time of day. * `hours`: Hours of day in 24 hour format. Should be from 0 to 23. * `minutes`: Minutes of hour of day. Must be from 0 to 59. * `seconds`: Seconds of minutes of the time. Must normally be from 0 to 59. * `nanos`: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. * `date_value`: Represents a whole or partial calendar date. * `year`: Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year. * `month`: Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day. * `day`: Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. * `day_of_week_value`: Represents a day of the week. Possible values: * MONDAY * TUESDAY * WEDNESDAY * THURSDAY * FRIDAY * SATURDAY * SUNDAY * `replace_with_info_type_config`: Replace each matching finding with the name of the info type. * `character_mask_config`: Partially mask a string by replacing a given number of characters with a fixed character. Masking can start from the beginning or end of the string. * `masking_character`: Character to use to mask the sensitive values—for example, * for an alphabetic string such as a name, or 0 for a numeric string such as ZIP code or credit card number. This string must have a length of 1. If not supplied, this value defaults to * for strings, and 0 for digits. * `number_to_mask`: Number of characters to mask. If not set, all matching chars will be masked. Skipped characters do not count towards this tally. * `reverse_order`: Mask characters in reverse order. For example, if masking_character is 0, number_to_mask is 14, and reverse_order is `false`, then the input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. * `characters_to_ignore`: Characters to skip when doing de-identification of a value. These will be left alone and skipped. * `characters_to_skip`: Characters to not transform when masking. * `common_characters_to_ignore`: Common characters to not transform when masking. Useful to avoid removing punctuation. Possible values: * NUMERIC * ALPHA_UPPER_CASE * ALPHA_LOWER_CASE * PUNCTUATION * WHITESPACE * `crypto_deterministic_config`: Pseudonymization method that generates deterministic encryption for the given input. Outputs a base64 encoded representation of the encrypted output. Uses AES-SIV based on the RFC [https://tools.ietf.org/html/rfc5297](https://tools.ietf.org/html/rfc5297). * `crypto_key`: The key used by the encryption function. * `transient`: Transient crypto key * `name`: Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). * `unwrapped`: Unwrapped crypto key * `key`: A 128/192/256 bit key. A base64-encoded string. * `kms_wrapped`: Kms wrapped key * `wrapped_key`: The wrapped data crypto key. A base64-encoded string. * `crypto_key_name`: The resource name of the KMS CryptoKey to use for unwrapping. * `surrogate_info_type`: The custom info type to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it with the name of the custom info type followed by the number of characters comprising the surrogate. The following scheme defines the format: {info type name}({surrogate character count}):{surrogate} For example, if the name of custom info type is 'MY\_TOKEN\_INFO\_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY\_TOKEN\_INFO\_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom info type 'Surrogate'. This facilitates reversal of the surrogate when it occurs in free text. Note: For record transformations where the entire cell in a table is being transformed, surrogates are not mandatory. Surrogates are used to denote the location of the token and are necessary for re-identification in free form text. In order for inspection to work properly, the name of this info type must not occur naturally anywhere in your data; otherwise, inspection may either * reverse a surrogate that does not correspond to an actual identifier * be unable to parse the surrogate and result in an error Therefore, choose your custom info type name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY\_TOKEN\_TYPE. * `name`: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at [https://cloud.google.com/dlp/docs/infotypes-reference](https://cloud.google.com/dlp/docs/infotypes-reference) when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`. * `context`: A context may be used for higher security and maintaining referential integrity such that the same identifier in two different contexts will be given a distinct surrogate. The context is appended to plaintext value being encrypted. On decryption the provided context is validated against the value used during encryption. If a context was provided during encryption, same context must be provided during decryption as well. If the context is not set, plaintext would be used as is for encryption. If the context is set but: 1. there is no record present when transforming a given value or 2. the field is not present when transforming a given value, plaintext would be used as is for encryption. Note that case (1) is expected when an `InfoTypeTransformation` is applied to both structured and non-structured `ContentItem`s. * `name`: Name describing the field. * `crypto_replace_ffx_fpe_config`: Replaces an identifier with a surrogate using Format Preserving Encryption (FPE) with the FFX mode of operation; however when used in the `content.reidentify` API method, it serves the opposite function by reversing the surrogate back into the original identifier. The identifier must be encoded as ASCII. For a given crypto key and context, the same identifier will be replaced with the same surrogate. Identifiers must be at least two characters long. In the case that the identifier is the empty string, it will be skipped. See [https://cloud.google.com/dlp/docs/pseudonymization](https://cloud.google.com/dlp/docs/pseudonymization) to learn more. Note: We recommend using CryptoDeterministicConfig for all use cases which do not require preserving the input alphabet space and size, plus warrant referential integrity. * `crypto_key`: The key used by the encryption algorithm. * `transient`: Transient crypto key * `name`: Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). * `unwrapped`: Unwrapped crypto key * `key`: A 128/192/256 bit key. A base64-encoded string. * `kms_wrapped`: Kms wrapped key * `wrapped_key`: The wrapped data crypto key. A base64-encoded string. * `crypto_key_name`: The resource name of the KMS CryptoKey to use for unwrapping. * `context`: The 'tweak', a context may be used for higher security since the same identifier in two different contexts won't be given the same surrogate. If the context is not set, a default tweak will be used. If the context is set but: 1. there is no record present when transforming a given value or 2. the field is not present when transforming a given value, a default tweak will be used. Note that case (1) is expected when an `InfoTypeTransformation` is applied to both structured and non-structured `ContentItem`s. Currently, the referenced field may be of value type integer or string. The tweak is constructed as a sequence of bytes in big endian byte order such that: * a 64 bit integer is encoded followed by a single byte of value 1 * a string is encoded in UTF-8 format followed by a single byte of value 2 * `name`: Name describing the field. * `surrogate_info_type`: The custom infoType to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it with the name of the custom infoType followed by the number of characters comprising the surrogate. The following scheme defines the format: info\_type\_name(surrogate\_character\_count):surrogate For example, if the name of custom infoType is 'MY\_TOKEN\_INFO\_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY\_TOKEN\_INFO\_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom infoType [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype). This facilitates reversal of the surrogate when it occurs in free text. In order for inspection to work properly, the name of this infoType must not occur naturally anywhere in your data; otherwise, inspection may find a surrogate that does not correspond to an actual identifier. Therefore, choose your custom infoType name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY\_TOKEN\_TYPE * `name`: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at [https://cloud.google.com/dlp/docs/infotypes-reference](https://cloud.google.com/dlp/docs/infotypes-reference) when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`. * `common_alphabet`: Common alphabets. Possible values: * FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED * NUMERIC * HEXADECIMAL * UPPER_CASE_ALPHA_NUMERIC * ALPHA_NUMERIC * `custom_alphabet`: This is supported by mapping these to the alphanumeric characters that the FFX mode natively supports. This happens before/after encryption/decryption. Each character listed must appear only once. Number of characters must be in the range \[2, 95\]. This must be encoded as ASCII. The order of characters does not matter. The full list of allowed characters is: ``0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ~`!@#$%^&*()_-+={[}]|:;"'<,>.?/`` * `radix`: The native way to select the alphabet. Must be in the range \[2, 95\]. * `parent`: The parent of the template in any of the following formats: * `projects/{{project}}` * `projects/{{project}}/locations/{{location}}` * `organizations/{{organization_id}}` * `organizations/{{organization_id}}/locations/{{location}}` ## GCP permissions ================================================ FILE: docs-chef-io/content/google_dlp_dts.md ================================================ +++ title = "google_dlp_dts resource" draft = false [menu.gcp] title = "google_dlp_dts" identifier = "inspec/resources/gcp/google_dlp_dts resource" parent = "inspec/resources/gcp" +++ Use the `google_dlp_dts` InSpec audit resource to to test a Google Cloud DT resource. ## Examples ```ruby describe google_dlp_dt(parent: "projects/#{'chef-gcp-inspec'}/locations/#{''}", name: '') do it { should exist } its('display_name') { should cmp '' } end describe google_dlp_dt(parent: "projects/#{'chef-gcp-inspec'}/locations/#{''}", name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_dlp_dts` resource: See [google_dlp_dt](google_dlp_dt) for more detailed information. * `names`: an array of `google_dlp_dt` name * `descriptions`: an array of `google_dlp_dt` description * `display_names`: an array of `google_dlp_dt` display_name * `configs`: an array of `google_dlp_dt` config * `parents`: an array of `google_dlp_dt` parent ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_dlp_inspect_template.md ================================================ +++ title = "google_dlp_inspect_template resource" draft = false [menu.gcp] title = "google_dlp_inspect_template" identifier = "inspec/resources/gcp/google_dlp_inspect_template resource" parent = "inspec/resources/gcp" +++ Use the `google_dlp_inspect_template` InSpec audit resource to to test a Google Cloud InspectTemplate resource. ## Examples ```ruby describe google_dlp_inspect_template(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}", name: 'i-inspec-gcp-dlp') do it { should exist } its('name') { should cmp 'i-inspec-gcp-dlp' } its('type') { should cmp 'INSPECT_JOB' } its('state') { should cmp 'ACTIVE' } its('inspectDetails.requestedOptions.snapshotInspectTemplate') { should cmp '' } end describe google_dlp_inspect_template(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}", name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_dlp_inspect_template` resource: * `name`: The resource name of the inspect template. Set by the server. * `description`: A description of the inspect template. * `display_name`: User set display name of the inspect template. * `inspect_config`: The core content of the template. * `exclude_info_types`: When true, excludes type information of the findings. * `include_quote`: When true, a contextual quote from the data that triggered a finding is included in the response. * `min_likelihood`: Only returns findings equal or above this threshold. See https://cloud.google.com/dlp/docs/likelihood for more info Possible values: * VERY_UNLIKELY * UNLIKELY * POSSIBLE * LIKELY * VERY_LIKELY * `limits`: Configuration to control the number of findings returned. * `max_findings_per_item`: Max number of findings that will be returned for each item scanned. The maximum returned is 2000. * `max_findings_per_request`: Max number of findings that will be returned per request/job. The maximum returned is 2000. * `max_findings_per_info_type`: Configuration of findings limit given for specified infoTypes. * `info_type`: Type of information the findings limit applies to. Only one limit per infoType should be provided. If InfoTypeLimit does not have an infoType, the DLP API applies the limit against all infoTypes that are found but not specified in another InfoTypeLimit. * `name`: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. * `max_findings`: Max findings limit for the given infoType. * `info_types`: Restricts what infoTypes to look for. The values must correspond to InfoType values returned by infoTypes.list or listed at https://cloud.google.com/dlp/docs/infotypes-reference. When no InfoTypes or CustomInfoTypes are specified in a request, the system may automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. * `name`: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. * `content_options`: List of options defining data content to scan. If empty, text, images, and other content will be included. * `rule_set`: Set of rules to apply to the findings for this InspectConfig. Exclusion rules, contained in the set are executed in the end, other rules are executed in the order they are specified for each info type. * `info_types`: List of infoTypes this rule set is applied to. * `name`: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. * `rules`: Set of rules to be applied to infoTypes. The rules are applied in order. * `hotword_rule`: Hotword-based detection rule. * `hotword_regex`: Regular expression pattern defining what qualifies as a hotword. * `pattern`: Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub. * `group_indexes`: The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. * `proximity`: Proximity of the finding within which the entire hotword must reside. The total length of the window cannot exceed 1000 characters. Note that the finding itself will be included in the window, so that hotwords may be used to match substrings of the finding itself. For example, the certainty of a phone number regex `(\d{3}) \d{3}-\d{4}` could be adjusted upwards if the area code is known to be the local area code of a company office using the hotword regex `(xxx)`, where `xxx` is the area code in question. * `window_before`: Number of characters before the finding to consider. Either this or window_after must be specified * `window_after`: Number of characters after the finding to consider. Either this or window_before must be specified * `likelihood_adjustment`: Likelihood adjustment to apply to all matching findings. * `fixed_likelihood`: Set the likelihood of a finding to a fixed value. Either this or relative_likelihood can be set. Possible values: * VERY_UNLIKELY * UNLIKELY * POSSIBLE * LIKELY * VERY_LIKELY * `relative_likelihood`: Increase or decrease the likelihood by the specified number of levels. For example, if a finding would be POSSIBLE without the detection rule and relativeLikelihood is 1, then it is upgraded to LIKELY, while a value of -1 would downgrade it to UNLIKELY. Likelihood may never drop below VERY_UNLIKELY or exceed VERY_LIKELY, so applying an adjustment of 1 followed by an adjustment of -1 when base likelihood is VERY_LIKELY will result in a final likelihood of LIKELY. Either this or fixed_likelihood can be set. * `exclusion_rule`: The rule that specifies conditions when findings of infoTypes specified in InspectionRuleSet are removed from results. * `matching_type`: How the rule is applied. See the documentation for more information: https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#MatchingType Possible values: * MATCHING_TYPE_FULL_MATCH * MATCHING_TYPE_PARTIAL_MATCH * MATCHING_TYPE_INVERSE_MATCH * `dictionary`: Dictionary which defines the rule. * `word_list`: List of words or phrases to search for. * `words`: Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. * `cloud_storage_path`: Newline-delimited file of words in Cloud Storage. Only a single file is accepted. * `path`: A url representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` * `regex`: Regular expression which defines the rule. * `pattern`: Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub. * `group_indexes`: The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. * `exclude_info_types`: Set of infoTypes for which findings would affect this rule. * `info_types`: If a finding is matched by any of the infoType detectors listed here, the finding will be excluded from the scan results. * `name`: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. * `custom_info_types`: Custom info types to be used. See https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. * `info_type`: CustomInfoType can either be a new infoType, or an extension of built-in infoType, when the name matches one of existing infoTypes and that infoType is specified in `info_types` field. Specifying the latter adds findings to the one detected by the system. If built-in info type is not specified in `info_types` list then the name is treated as a custom info type. * `name`: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. * `likelihood`: Likelihood to return for this CustomInfoType. This base value can be altered by a detection rule if the finding meets the criteria specified by the rule. Possible values: * VERY_UNLIKELY * UNLIKELY * POSSIBLE * LIKELY * VERY_LIKELY * `exclusion_type`: If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding to be returned. It still can be used for rules matching. Possible values: * EXCLUSION_TYPE_EXCLUDE * `regex`: Regular expression which defines the rule. * `pattern`: Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub. * `group_indexes`: The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. * `dictionary`: Dictionary which defines the rule. * `word_list`: List of words or phrases to search for. * `words`: Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. * `cloud_storage_path`: Newline-delimited file of words in Cloud Storage. Only a single file is accepted. * `path`: A url representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` * `stored_type`: A reference to a StoredInfoType to use with scanning. * `name`: Resource name of the requested StoredInfoType, for example `organizations/433245324/storedInfoTypes/432452342` or `projects/project-id/storedInfoTypes/432452342`. * `parent`: The parent of the inspect template in any of the following formats: * `projects/{{project}}` * `projects/{{project}}/locations/{{location}}` * `organizations/{{organization_id}}` * `organizations/{{organization_id}}/locations/{{location}}` ## GCP permissions ================================================ FILE: docs-chef-io/content/google_dlp_inspect_templates.md ================================================ +++ title = "google_dlp_inspect_templates resource" draft = false [menu.gcp] title = "google_dlp_inspect_templates" identifier = "inspec/resources/gcp/google_dlp_inspect_templates resource" parent = "inspec/resources/gcp" +++ Use the `google_dlp_inspect_templates` InSpec audit resource to to test a Google Cloud InspectTemplate resource. ## Examples ```ruby describe google_dlp_inspect_templates(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}") do it { should exist } its('names') { should include 'i-inspec-gcp-dlp' } its('types') { should include 'INSPECT_JOB' } its('states') { should include 'ACTIVE' } end ``` ## Properties Properties that can be accessed from the `google_dlp_inspect_templates` resource: See [google_dlp_inspect_template](google_dlp_inspect_template) for more detailed information. * `names`: an array of `google_dlp_inspect_template` name * `descriptions`: an array of `google_dlp_inspect_template` description * `display_names`: an array of `google_dlp_inspect_template` display_name * `inspect_configs`: an array of `google_dlp_inspect_template` inspect_config * `parents`: an array of `google_dlp_inspect_template` parent ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_dlp_job.md ================================================ +++ title = "google_dlp_job resource" draft = false [menu.gcp] title = "google_dlp_job" identifier = "inspec/resources/gcp/google_dlp_job resource" parent = "inspec/resources/gcp" +++ Use the `google_dlp_job` InSpec audit resource to to test a Google Cloud Job resource. ## Examples ```ruby describe google_dlp_job(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}", name: 'i-inspec-gcp-dlp') do it { should exist } its('name') { should cmp 'i-inspec-gcp-dlp' } its('type') { should cmp 'INSPECT_JOB' } its('state') { should cmp 'ACTIVE' } its('inspectDetails.requestedOptions.snapshotInspectTemplate') { should cmp '' } end describe google_dlp_job(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}", name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_dlp_job` resource: * `name`: The resource name of the template. Set by the server. * `type`: An enum to represent the various types of DLP jobs. Possible values: * DLP_JOB_TYPE_UNSPECIFIED * INSPECT_JOB * RISK_ANALYSIS_JOB * `state`: Possible states of a job. New items may be added. Possible values: * JOB_STATE_UNSPECIFIED * PENDING * RUNNING * DONE * CANCELED * FAILED * ACTIVE * `create_time`: Time when the job started. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `start_time`: Time when the job was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `end_time`: Time when the job started. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `job_trigger_name`: If created by a job trigger, the resource name of the trigger that instantiated the job. * `errors`: Details information about an error encountered during job execution or the results of an unsuccessful activation of the JobTrigger. * `details`: Specifies free-text based transformations to be applied to the dataset. * `status`: The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field "type" contains a URI identifying the type. Example: { "id": 1234, "type": "types.example.com/standard/id" }. * `type`: type of field * `field1`: name of field * `act_det`: actionDetails - Details information about an error encountered during job execution or the results of an unsuccessful activation of the JobTrigger. * `dt_det`: DeIdentifyDetails - Specifies free-text based transformations to be applied to the dataset. * `de_stats`: deidentifyStats - Specifies free-text based transformations to be applied to the dataset. * `transformed_bytes`: Total size in bytes that were transformed in some way. * `transformation_count`: Number of successfully applied transformations. * `transformation_error_count`: Number of errors encountered while trying to apply transformations. * `req_opt`: requestedOptions The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. * `snapshot_dt`: snapshotDeidentifyTemplate Snapshot of the state of the DeidentifyTemplate from the Deidentify action at the time this job was run. * `name`: The status code, which should be an enum value of google.rpc.Code. * `display_name`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `description`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `create_time`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `update_time`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `config`: deidentifyConfig The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. * `tf_error_handling`: transformationErrorHandling The status code, which should be an enum value of google.rpc.Code. * `snapshot_structured_dt`: snapshotStructuredDeidentifyTemplate Snapshot of the state of the structured DeidentifyTemplate from the Deidentify action at the time this job was run. * `name`: The status code, which should be an enum value of google.rpc.Code. * `display_name`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `description`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `create_time`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `update_time`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `deidentify_config`: The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. * `tf_error_handling`: transformationErrorHandling The status code, which should be an enum value of google.rpc.Code. * `snapshot_img_rt`: snapshotImageRedactTemplate Snapshot of the state of the image transformation DeidentifyTemplate from the Deidentify action at the time this job was run. * `name`: Output only. The template name. The template will have one of the following formats: projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID OR organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID * `display_name`: Display name (max 256 chars). * `description`: Short description (max 256 chars). * `create_time`: Output only. The creation timestamp of an inspectTemplate. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `update_time`: Output only. The creation timestamp of an inspectTemplate. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `dt_con`: deidentifyConfig The configuration that controls how the data will change. * `tf_error_handling`: transformationErrorHandling How to handle transformation errors during de-identification. A transformation error occurs when the requested transformation is incompatible with the data. For example, trying to de-identify an IP address using a DateShift transformation would result in a transformation error, since date info cannot be extracted from an IP address. Information about any incompatible transformations, and how they were handled, is returned in the response as part of the TransformationOverviews. * `info_type_tf`: infoTypeTransformations Treat the dataset as free-form text and apply the same free text transformation everywhere. * `tf`: transformations A type of transformation that will scan unstructured text and apply various PrimitiveTransformations to each finding, where the transformation is applied to only values that were identified as a specific infoType. * `info_types`: InfoTypes to apply the transformation to. An empty list will cause this transformation to apply to all findings that correspond to infoTypes that were requested in InspectConfig. * `name`: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern [A-Za-z0-9$_-]{1,64}. * `version`: Optional version name for this InfoType. * `sensitivity_score`: Score is calculated from of all elements in the data profile. A higher level means the data is more sensitive. * `score`: Various sensitivity score levels for resources. Enums **SENSITIVITY_SCORE_UNSPECIFIED** - Unused. **SENSITIVITY_LOW** - No sensitive information detected. The resource isn't publicly accessible. **SENSITIVITY_MODERATE** - Medium risk. Contains personally identifiable information (PII), potentially sensitive data, or fields with free-text data that are at a higher risk of having intermittent sensitive data. Consider limiting access. **SENSITIVITY_HIGH** - High risk. Sensitive personally identifiable information (SPII) can be present. Exfiltration of data can lead to user data loss. Re-identification of users might be possible. Consider limiting usage and or removing SPII. Possible values: * SENSITIVITY_SCORE_UNSPECIFIED * SENSITIVITY_LOW * SENSITIVITY_MODERATE * SENSITIVITY_HIGH * `rec_tf`: recordTransformations - Treat the dataset as free-form text and apply the same free text transformation everywhere. * `field_tf`: The transformation to apply to the field. * `fields`: InfoTypes to apply the transformation to. An empty list will cause this transformation to apply to all findings that correspond to infoTypes that were requested in InspectConfig. * `name`: Name describing the field. * `con`: condition A condition for determining whether a transformation should be applied to a field. * `exps`: expressions Only apply the transformation if the condition evaluates to true for the given RecordCondition. The conditions are allowed to reference fields that are not used in the actual transformation.Example Use Cases: Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range. Redact a field if the date of birth field is greater than 85. * `logical_operator`: The operator to apply to the result of conditions. Default and currently only supported value is AND. Enums **LOGICAL_OPERATOR_UNSPECIFIED** - Unused **AND** - Conditional AND Possible values: * LOGICAL_OPERATOR_UNSPECIFIED * AND * `con`: Conditions to apply to the expression. * `cond`: A collection of conditions. * `field`: Designated field in the BigQuery table. * `name`: Name describing the field. * `operator`: Operators available for comparing the value of fields. Enums **RELATIONAL_OPERATOR_UNSPECIFIED** Unused **EQUAL_TO** Equal. Attempts to match even with incompatible types. **NOT_EQUAL_TO** Not equal to. Attempts to match even with incompatible types. **GREATER_THAN** Greater than. **LESS_THAN** Less than. **GREATER_THAN_OR_EQUALS** Greater than or equals. **LESS_THAN_OR_EQUALS** Less than or equals. **EXISTS** Exists Possible values: * RELATIONAL_OPERATOR_UNSPECIFIED * EQUAL_TO * NOT_EQUAL_TO * GREATER_THAN * LESS_THAN * GREATER_THAN_OR_EQUALS * LESS_THAN_OR_EQUALS * EXISTS * `new_val`: newValue Replace each input value with a given value. * `integer_value`: An integer value. * `float_value`: A float value. * `string_value`: A string value. * `boolean_value`: A boolean value. * `timestamp_value`: A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `time_val`: Represents a time of day. * `hours`: Hours of day in 24 hour format. Should be from 0 to 23. * `minutes`: Minutes of hour of day. Must be from 0 to 59. * `seconds`: Seconds of minutes of the time. Must normally be from 0 to 59. * `nanos`: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. * `date_val`: dateValue Represents a whole or partial calendar date. * `year`: Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year. * `month`: Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day. * `day`: Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. * `day_of_week_val`: datOfWeekValue Represents a day of the week. Possible values: * MONDAY * TUESDAY * WEDNESDAY * THURSDAY * FRIDAY * SATURDAY * SUNDAY * `rec_sup`: recordSuppressions - The transformation to apply to the field. * `con`: A condition for determining whether a transformation should be applied to a field. * `exp`: expressions Only apply the transformation if the condition evaluates to true for the given RecordCondition. The conditions are allowed to reference fields that are not used in the actual transformation.Example Use Cases: Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range. Redact a field if the date of birth field is greater than 85. * `logical_operator`: The operator to apply to the result of conditions. Default and currently only supported value is AND. Enums **LOGICAL_OPERATOR_UNSPECIFIED** - Unused **AND** - Conditional AND Possible values: * LOGICAL_OPERATOR_UNSPECIFIED * AND * `con`: Conditions to apply to the expression. * `con`: A collection of conditions. * `field`: Designated field in the BigQuery table. * `name`: Name describing the field. * `operator`: Operators available for comparing the value of fields. Enums **RELATIONAL_OPERATOR_UNSPECIFIED** Unused **EQUAL_TO** Equal. Attempts to match even with incompatible types. **NOT_EQUAL_TO** Not equal to. Attempts to match even with incompatible types. **GREATER_THAN** Greater than. **LESS_THAN** Less than. **GREATER_THAN_OR_EQUALS** Greater than or equals. **LESS_THAN_OR_EQUALS** Less than or equals. **EXISTS** Exists Possible values: * RELATIONAL_OPERATOR_UNSPECIFIED * EQUAL_TO * NOT_EQUAL_TO * GREATER_THAN * LESS_THAN * GREATER_THAN_OR_EQUALS * LESS_THAN_OR_EQUALS * EXISTS * `new_val`: newValue Replace each input value with a given value. * `integer_val`: An integer value. * `float_val`: A float value. * `string_val`: A string value. * `boolean_val`: A boolean value. * `timestamp_val`: A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `time_val`: timeValue Represents a time of day. * `hours`: Hours of day in 24 hour format. Should be from 0 to 23. * `minutes`: Minutes of hour of day. Must be from 0 to 59. * `seconds`: Seconds of minutes of the time. Must normally be from 0 to 59. * `nanos`: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. * `date_val`: dateValue Represents a whole or partial calendar date. * `year`: Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year. * `month`: Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day. * `day`: Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. * `day_of_week_val`: dayOfWeekValue Represents a day of the week. Possible values: * MONDAY * TUESDAY * WEDNESDAY * THURSDAY * FRIDAY * SATURDAY * SUNDAY * `image_tf`: ImageTransformations Treat the dataset as free-form text and apply the same free text transformation everywhere. * `redaction_color`: Treat the dataset as free-form text and apply the same free text transformation everywhere. * `red`: red color * `green`: green color * `blue`: blue color * `selected_info_types`: Restricts what infoTypes to look for. The values must correspond to InfoType values returned by infoTypes.list or listed at https://cloud.google.com/dlp/docs/infotypes-reference. When no InfoTypes or CustomInfoTypes are specified in a request, the system may automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. * `name`: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. * `all_info_types`: Restricts what infoTypes to look for. The values must correspond to InfoType values returned by infoTypes.list or listed at https://cloud.google.com/dlp/docs/infotypes-reference. When no InfoTypes or CustomInfoTypes are specified in a request, the system may automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. * `name`: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. * `all_text`: Apply to all text. * `red`: red color * `green`: green color * `blue`: blue color * `deidentify_stats`: Specifies free-text based transformations to be applied to the dataset. * `requested_options`: The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field "type" contains a URI identifying the type. Example: { "id": 1234, "type": "types.example.com/standard/id" }. * `type`: type of field * `field1`: name of field * `risk_details`: Result of a risk analysis operation request. * `inspect_details`: Results from inspecting a data source. * `parent`: The parent of the template in any of the following formats: * `projects/{{project}}` * `projects/{{project}}/locations/{{location}}` * `organizations/{{organization_id}}` * `organizations/{{organization_id}}/locations/{{location}}` ## GCP permissions ================================================ FILE: docs-chef-io/content/google_dlp_job_trigger.md ================================================ +++ title = "google_dlp_job_trigger resource" draft = false [menu.gcp] title = "google_dlp_job_trigger" identifier = "inspec/resources/gcp/google_dlp_job_trigger resource" parent = "inspec/resources/gcp" +++ Use the `google_dlp_job_trigger` InSpec audit resource to to test a Google Cloud JobTrigger resource. ## Examples ```ruby describe google_dlp_job_trigger(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}",name: 'name1') do it { should exist } its('name') { should cmp 'name1' } its('display_name') { should cmp 'dp' } its('description') { should cmp 'description' } its('status') { should cmp 'HEALTHY' } end describe google_dlp_job_trigger(parent: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_dlp_job_trigger` resource: * `name`: The resource name of the job trigger.Set by the server. * `description`: A description of the job trigger. * `display_name`: User set display name of the job trigger. * `last_run_time`: The timestamp of the last time this trigger executed. * `status`: Whether the trigger is currently active. Possible values: * PAUSED * HEALTHY * CANCELLED * `triggers`: What event needs to occur for a new job to be started. * `schedule`: Schedule for triggered jobs * `recurrence_period_duration`: With this option a job is started a regular periodic basis. For example: every day (86400 seconds). A scheduled start time will be skipped if the previous execution has not ended when its scheduled time occurs. This value must be set to a time duration greater than or equal to 1 day and can be no longer than 60 days. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". * `inspect_job`: Controls what and how to inspect for findings. * `inspect_template_name`: The name of the template to run when this job is triggered. * `storage_config`: Information on where to inspect * `timespan_config`: Information on where to inspect * `start_time`: Exclude files or rows older than this value. * `end_time`: Exclude files or rows newer than this value. If set to zero, no upper time limit is applied. * `enable_auto_population_of_timespan_config`: When the job is started by a JobTrigger we will automatically figure out a valid startTime to avoid scanning files that have not been modified since the last time the JobTrigger executed. This will be based on the time of the execution of the last run of the JobTrigger. * `timestamp_field`: Information on where to inspect * `name`: Specification of the field containing the timestamp of scanned items. Used for data sources like Datastore and BigQuery. For BigQuery: Required to filter out rows based on the given start and end times. If not specified and the table was modified between the given start and end times, the entire table will be scanned. The valid data types of the timestamp field are: INTEGER, DATE, TIMESTAMP, or DATETIME BigQuery column. For Datastore. Valid data types of the timestamp field are: TIMESTAMP. Datastore entity will be scanned if the timestamp property does not exist or its value is empty or invalid. * `datastore_options`: Options defining a data set within Google Cloud Datastore. * `partition_id`: Datastore partition ID. A partition ID identifies a grouping of entities. The grouping is always by project and namespace, however the namespace ID may be empty. * `project_id`: The ID of the project to which the entities belong. * `namespace_id`: If not empty, the ID of the namespace to which the entities belong. * `kind`: A representation of a Datastore kind. * `name`: The name of the Datastore kind. * `cloud_storage_options`: Options defining a file or a set of files within a Google Cloud Storage bucket. * `file_set`: Set of files to scan. * `url`: The Cloud Storage url of the file(s) to scan, in the format `gs:///`. Trailing wildcard in the path is allowed. If the url ends in a trailing slash, the bucket or directory represented by the url will be scanned non-recursively (content in sub-directories will not be scanned). This means that `gs://mybucket/` is equivalent to `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to `gs://mybucket/directory/*`. * `regex_file_set`: The regex-filtered set of files to scan. * `bucket_name`: The name of a Cloud Storage bucket. * `include_regex`: A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in excludeRegex. Leaving this field empty will match all files by default (this is equivalent to including .* in the list) * `exclude_regex`: A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. * `bytes_limit_per_file`: Max number of bytes to scan from a file. If a scanned file's size is bigger than this value then the rest of the bytes are omitted. * `bytes_limit_per_file_percent`: Max percentage of bytes to scan from a file. The rest are omitted. The number of bytes scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. * `files_limit_percent`: Limits the number of files to scan to this percentage of the input FileSet. Number of files scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. * `file_types`: List of file type groups to include in the scan. If empty, all files are scanned and available data format processors are applied. In addition, the binary content of the selected files is always scanned as well. Images are scanned only as binary if the specified region does not support image inspection and no fileTypes were specified. * `sample_method`: How to sample bytes if not all bytes are scanned. Meaningful only when used in conjunction with bytesLimitPerFile. If not specified, scanning would start from the top. Possible values: * TOP * RANDOM_START * `big_query_options`: Options defining BigQuery table and row identifiers. * `table_reference`: Set of files to scan. * `project_id`: The Google Cloud Platform project ID of the project containing the table. * `dataset_id`: The dataset ID of the table. * `table_id`: The name of the table. * `actions`: A task to execute on the completion of a job. * `save_findings`: Schedule for triggered jobs * `output_config`: Information on where to store output * `table`: Information on the location of the target BigQuery Table. * `project_id`: The Google Cloud Platform project ID of the project containing the table. * `dataset_id`: Dataset ID of the table. * `table_id`: Name of the table. If is not set a new one will be generated for you with the following format: `dlp_googleapis_yyyy_mm_dd_[dlp_job_id]`. Pacific timezone will be used for generating the date details. * `output_schema`: Schema used for writing the findings for Inspect jobs. This field is only used for Inspect and must be unspecified for Risk jobs. Columns are derived from the Finding object. If appending to an existing table, any columns from the predefined schema that are missing will be added. No columns in the existing table will be deleted. If unspecified, then all available columns will be used for a new table or an (existing) table with no schema, and no changes will be made to an existing table that has a schema. Only for use with external storage. Possible values: * BASIC_COLUMNS * GCS_COLUMNS * DATASTORE_COLUMNS * BIG_QUERY_COLUMNS * ALL_COLUMNS * `parent`: The parent of the trigger, either in the format `projects/{{project}}` or `projects/{{project}}/locations/{{location}}` ## GCP permissions ================================================ FILE: docs-chef-io/content/google_dlp_job_triggers.md ================================================ +++ title = "google_dlp_job_triggers resource" draft = false [menu.gcp] title = "google_dlp_job_triggers" identifier = "inspec/resources/gcp/google_dlp_job_triggers resource" parent = "inspec/resources/gcp" +++ Use the `google_dlp_job_triggers` InSpec audit resource to to test a Google Cloud JobTrigger resource. ## Examples ```ruby describe google_dlp_job_triggers(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}") do it { should exist } its('names') { should include 'name1' } its('display_name') { should include 'dp' } its('descriptions') { should include 'description' } its('status') { should include 'HEALTHY' } end ``` ## Properties Properties that can be accessed from the `google_dlp_job_triggers` resource: See [google_dlp_job_trigger](google_dlp_job_trigger) for more detailed information. * `names`: an array of `google_dlp_job_trigger` name * `descriptions`: an array of `google_dlp_job_trigger` description * `display_names`: an array of `google_dlp_job_trigger` display_name * `last_run_times`: an array of `google_dlp_job_trigger` last_run_time * `statuses`: an array of `google_dlp_job_trigger` status * `triggers`: an array of `google_dlp_job_trigger` triggers * `inspect_jobs`: an array of `google_dlp_job_trigger` inspect_job * `parents`: an array of `google_dlp_job_trigger` parent ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_dlp_jobs.md ================================================ +++ title = "google_dlp_jobs resource" draft = false [menu.gcp] title = "google_dlp_jobs" identifier = "inspec/resources/gcp/google_dlp_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_dlp_jobs` InSpec audit resource to to test a Google Cloud Job resource. ## Examples ```ruby describe google_dlp_jobs(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}") do it { should exist } its('names') { should include 'i-inspec-gcp-dlp' } its('types') { should include 'INSPECT_JOB' } its('states') { should include 'ACTIVE' } end ``` ## Properties Properties that can be accessed from the `google_dlp_jobs` resource: See [google_dlp_job](google_dlp_job) for more detailed information. * `names`: an array of `google_dlp_job` name * `types`: an array of `google_dlp_job` type * `states`: an array of `google_dlp_job` state * `create_times`: an array of `google_dlp_job` create_time * `start_times`: an array of `google_dlp_job` start_time * `end_times`: an array of `google_dlp_job` end_time * `job_trigger_names`: an array of `google_dlp_job` job_trigger_name * `errors`: an array of `google_dlp_job` errors * `act_dets`: an array of `google_dlp_job` act_det * `risk_details`: an array of `google_dlp_job` risk_details * `inspect_details`: an array of `google_dlp_job` inspect_details * `parents`: an array of `google_dlp_job` parent ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_dlp_stored_info_type.md ================================================ +++ title = "google_dlp_stored_info_type resource" draft = false [menu.gcp] title = "google_dlp_stored_info_type" identifier = "inspec/resources/gcp/google_dlp_stored_info_type resource" parent = "inspec/resources/gcp" +++ Use the `google_dlp_stored_info_type` InSpec audit resource to to test a Google Cloud StoredInfoType resource. ## Examples ```ruby describe google_dlp_stored_info_type(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}",name: '') do it { should exist } its('name') { should cmp 'i-inspec-gcp-dlp' } its('type') { should cmp 'INSPECT_JOB' } its('state') { should cmp 'ACTIVE' } end describe google_dlp_stored_info_type(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}", name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_dlp_stored_info_type` resource: * `name`: The resource name of the info type. Set by the server. * `description`: A description of the info type. * `display_name`: User set display name of the info type. * `regex`: Regular expression which defines the rule. * `pattern`: Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub. * `group_indexes`: The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. * `dictionary`: Dictionary which defines the rule. * `word_list`: List of words or phrases to search for. * `words`: Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. * `cloud_storage_path`: Newline-delimited file of words in Cloud Storage. Only a single file is accepted. * `path`: A url representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` * `large_custom_dictionary`: Dictionary which defines the rule. * `output_path`: Location to store dictionary artifacts in Google Cloud Storage. These files will only be accessible by project owners and the DLP API. If any of these artifacts are modified, the dictionary is considered invalid and can no longer be used. * `path`: A url representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` * `cloud_storage_file_set`: Set of files containing newline-delimited lists of dictionary phrases. * `url`: The url, in the format `gs:///`. Trailing wildcard in the path is allowed. * `big_query_field`: Field in a BigQuery table where each cell represents a dictionary phrase. * `table`: Field in a BigQuery table where each cell represents a dictionary phrase. * `project_id`: The Google Cloud Platform project ID of the project containing the table. * `dataset_id`: The dataset ID of the table. * `table_id`: The name of the table. * `field`: Designated field in the BigQuery table. * `name`: Name describing the field. * `parent`: The parent of the info type in any of the following formats: * `projects/{{project}}` * `projects/{{project}}/locations/{{location}}` * `organizations/{{organization_id}}` * `organizations/{{organization_id}}/locations/{{location}}` ## GCP permissions ================================================ FILE: docs-chef-io/content/google_dlp_stored_info_types.md ================================================ +++ title = "google_dlp_stored_info_types resource" draft = false [menu.gcp] title = "google_dlp_stored_info_types" identifier = "inspec/resources/gcp/google_dlp_stored_info_types resource" parent = "inspec/resources/gcp" +++ Use the `google_dlp_stored_info_types` InSpec audit resource to to test a Google Cloud StoredInfoType resource. ## Examples ```ruby describe google_dlp_stored_info_types(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}") do it { should exist } its('names') { should include 'i-inspec-gcp-dlp' } end ``` ## Properties Properties that can be accessed from the `google_dlp_stored_info_types` resource: See [google_dlp_stored_info_type](google_dlp_stored_info_type) for more detailed information. * `names`: an array of `google_dlp_stored_info_type` name * `descriptions`: an array of `google_dlp_stored_info_type` description * `display_names`: an array of `google_dlp_stored_info_type` display_name * `regexes`: an array of `google_dlp_stored_info_type` regex * `dictionaries`: an array of `google_dlp_stored_info_type` dictionary * `large_custom_dictionaries`: an array of `google_dlp_stored_info_type` large_custom_dictionary * `parents`: an array of `google_dlp_stored_info_type` parent ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_dns_managed_zone.md ================================================ +++ title = "google_dns_managed_zone resource" draft = false [menu.gcp] title = "google_dns_managed_zone" identifier = "inspec/resources/gcp/google_dns_managed_zone resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_dns_managed_zone` is used to test a Google ManagedZone resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_dns_managed_zone(project: 'chef-gcp-inspec', zone: 'example-zone') do it { should exist } its('dns_name') { should cmp 'dns-zone-name.com.' } its('description') { should cmp 'example description' } its('zone_signing_key_algorithm') { should cmp 'rsasha256' } its('key_signing_key_algorithm') { should cmp 'rsasha512' } end describe google_dns_managed_zone(project: 'chef-gcp-inspec', zone: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP compute zone exists describe google_dns_managed_zone(project: 'chef-inspec-gcp', zone: 'zone-name') do it { should exist } end ### Test that a GCP DNS managed zone has the expected DNS name describe google_dns_managed_zone(project: 'chef-inspec-gcp', zone: 'zone-name') do its('dns_name') { should match 'mydomain.com' } end ### Test that a GCP DNS managed zone has expected name server describe google_dns_managed_zone(project: 'chef-inspec-gcp', zone: 'zone-name') do its('name_servers') { should include 'ns-cloud-d1.googledomains.com.' } end ## Properties Properties that can be accessed from the `google_dns_managed_zone` resource: * `description`: A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function. * `dns_name`: The DNS name of this managed zone, for instance "example.com.". * `dnssec_config`: DNSSEC configuration * `kind`: Identifies what kind of resource this is * `non_existence`: Specifies the mechanism used to provide authenticated denial-of-existence responses. non_existence can only be updated when the state is `off`. Possible values: * nsec * nsec3 * `state`: Specifies whether DNSSEC is enabled, and what mode it is in Possible values: * off * on * transfer * `default_key_specs`: Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. If you provide a spec for keySigning or zoneSigning, you must also provide one for the other. default_key_specs can only be updated when the state is `off`. * `algorithm`: String mnemonic specifying the DNSSEC algorithm of this key Possible values: * ecdsap256sha256 * ecdsap384sha384 * rsasha1 * rsasha256 * rsasha512 * `key_length`: Length of the keys in bits * `key_type`: Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets. Possible values: * keySigning * zoneSigning * `kind`: Identifies what kind of resource this is * `id`: Unique identifier for the resource; defined by the server. * `name`: User assigned name for this resource. Must be unique within the project. * `name_servers`: Delegate your managed_zone to these virtual name servers; defined by the server * `name_server_set`: Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users will leave this field unset. * `creation_time`: The time that this resource was created on the server. This is in RFC3339 text format. * `labels`: A set of key/value label pairs to assign to this ManagedZone. * `visibility`: The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Possible values: * private * public * `private_visibility_config`: For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. * `networks`: The list of VPC networks that can see this zone. * `network_url`: The fully qualified URL of the VPC network to bind to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}` * `forwarding_config`: The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. * `target_name_servers`: List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given. * `ipv4_address`: IPv4 address of a target name server. * `forwarding_path`: Forwarding path for this TargetNameServer. If unset or `default` Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to `private`, Cloud DNS will always send queries through VPC for this target Possible values: * default * private * `peering_config`: The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. * `target_network`: The network with which to peer. * `network_url`: The fully qualified URL of the VPC network to forward queries to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}` * `reverse_lookup`: (Beta only) Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under `private_visibility_config`. * `service_directory_config`: (Beta only) The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. * `namespace`: The namespace associated with the zone. * `namespace_url`: The fully qualified URL of the service directory namespace that should be associated with the zone. Ignored for `public` visibility zones. ## GCP permissions Ensure the [Google Cloud DNS API](https://console.cloud.google.com/apis/library/dns.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dns_managed_zones.md ================================================ +++ title = "google_dns_managed_zones resource" draft = false [menu.gcp] title = "google_dns_managed_zones" identifier = "inspec/resources/gcp/google_dns_managed_zones resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_dns_managed_zones` is used to test a Google ManagedZone resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_dns_managed_zones(project: 'chef-gcp-inspec') do it { should exist } its('zone_names') { should include 'example-zone' } its('zone_dns_names') { should include 'dns-zone-name.com.' } end ``` ### Test that there are no more than a specified number of zones available for the project describe google_dns_managed_zones(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test that an expected, named managed zone is available for the project describe google_dns_managed_zones(project: 'chef-inspec-gcp') do its('zone_names') { should include "zone-name" } end ### Test that a subset of all zones matching "myzone*" exist google_dns_managed_zones(project: 'chef-inspec-gcp').where(zone_name: /^myzone/).zone_names.each do |zone_name| describe google_dns_managed_zone(project: 'chef-inspec-gcp', zone: zone_name) do it { should exist } end end ## Properties Properties that can be accessed from the `google_dns_managed_zones` resource: See [google_dns_managed_zone](google_dns_managed_zone) for more detailed information. * `descriptions`: an array of `google_dns_managed_zone` description * `zone_dns_names`: an array of `google_dns_managed_zone` dns_name * `dnssec_configs`: an array of `google_dns_managed_zone` dnssec_config * `zone_ids`: an array of `google_dns_managed_zone` id * `zone_names`: an array of `google_dns_managed_zone` name * `name_servers`: an array of `google_dns_managed_zone` name_servers * `name_server_sets`: an array of `google_dns_managed_zone` name_server_set * `creation_times`: an array of `google_dns_managed_zone` creation_time * `labels`: an array of `google_dns_managed_zone` labels * `visibilities`: an array of `google_dns_managed_zone` visibility * `private_visibility_configs`: an array of `google_dns_managed_zone` private_visibility_config * `forwarding_configs`: an array of `google_dns_managed_zone` forwarding_config * `peering_configs`: an array of `google_dns_managed_zone` peering_config * `reverse_lookups`: (Beta only) an array of `google_dns_managed_zone` reverse_lookup * `service_directory_configs`: (Beta only) an array of `google_dns_managed_zone` service_directory_config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Google Cloud DNS API](https://console.cloud.google.com/apis/library/dns.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dns_resource_record_set.md ================================================ +++ title = "google_dns_resource_record_set resource" draft = false [menu.gcp] title = "google_dns_resource_record_set" identifier = "inspec/resources/gcp/google_dns_resource_record_set resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_dns_resource_record_set` is used to test a Google ResourceRecordSet resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_dns_resource_record_set(project: 'chef-gcp-inspec', name: 'backend.my.domain.com.', type: 'A', managed_zone: 'inspec-gcp-managed-zone') do it { should exist } its('type') { should eq 'A' } its('ttl') { should eq '300' } its('target') { should include '8.8.8.8' } its('target') { should include '8.8.4.4' } end ``` ## Properties Properties that can be accessed from the `google_dns_resource_record_set` resource: * `name`: For example, www.example.com. * `type`: One of valid DNS resource types. Possible values: * A * AAAA * CAA * CNAME * MX * NAPTR * NS * PTR * SOA * SPF * SRV * TLSA * TXT * `ttl`: Number of seconds that this ResourceRecordSet can be cached by resolvers. * `target`: As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) * `managed_zone`: Identifies the managed zone addressed by this request. ## GCP permissions Ensure the [Google Cloud DNS API](https://console.cloud.google.com/apis/library/dns.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_dns_resource_record_sets.md ================================================ +++ title = "google_dns_resource_record_sets resource" draft = false [menu.gcp] title = "google_dns_resource_record_sets" identifier = "inspec/resources/gcp/google_dns_resource_record_sets resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_dns_resource_record_sets` is used to test a Google ResourceRecordSet resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_dns_resource_record_sets(project: 'chef-gcp-inspec', name: 'backend.my.domain.com.', managed_zone: 'inspec-gcp-managed-zone') do its('count') { should eq 3 } its('types') { should include 'A' } its('ttls') { should include '300' } its('targets.flatten') { should include '8.8.8.8' } its('targets.flatten') { should include '8.8.4.4' } end ``` ## Properties Properties that can be accessed from the `google_dns_resource_record_sets` resource: See [google_dns_resource_record_set](google_dns_resource_record_set) for more detailed information. * `names`: an array of `google_dns_resource_record_set` name * `types`: an array of `google_dns_resource_record_set` type * `ttls`: an array of `google_dns_resource_record_set` ttl * `targets`: an array of `google_dns_resource_record_set` target * `managed_zones`: an array of `google_dns_resource_record_set` managed_zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Google Cloud DNS API](https://console.cloud.google.com/apis/library/dns.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_filestore_instance.md ================================================ +++ title = "google_filestore_instance resource" draft = false [menu.gcp] title = "google_filestore_instance" identifier = "inspec/resources/gcp/google_filestore_instance resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_filestore_instance` is used to test a Google Instance resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_filestore_instance(project: 'chef-gcp-inspec', zone: 'us-central1-b', name: 'inspecgcp') do it { should exist } its('tier') { should cmp 'PREMIUM' } its('file_shares.count') { should cmp 1 } its('file_shares.first.capacity_gb') { should cmp '2660' } its('file_shares.first.name') { should cmp 'inspecgcp' } its('networks.count') { should cmp 1 } its('networks.first.network') { should cmp 'default' } its('networks.first.modes') { should include 'MODE_IPV4' } end describe google_filestore_instance(project: 'chef-gcp-inspec', zone: 'us-central1-b', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_filestore_instance` resource: * `name`: The resource name of the instance. * `description`: A description of the instance. * `create_time`: Creation timestamp in RFC3339 text format. * `tier`: The service tier of the instance. Possible values: * TIER_UNSPECIFIED * STANDARD * PREMIUM * BASIC_HDD * BASIC_SSD * HIGH_SCALE_SSD * `labels`: Resource labels to represent user-provided metadata. * `file_shares`: File system shares on the instance. For this version, only a single file share is supported. * `name`: The name of the fileshare (16 characters or less) * `capacity_gb`: File share capacity in GiB. This must be at least 1024 GiB for the standard tier, or 2560 GiB for the premium tier. * `nfs_export_options`: (Beta only) Nfs Export Options. There is a limit of 10 export options per file share. * `ip_ranges`: List of either IPv4 addresses, or ranges in CIDR notation which may mount the file share. Overlapping IP ranges are not allowed, both within and across NfsExportOptions. An error will be returned. The limit is 64 IP ranges/addresses for each FileShareConfig among all NfsExportOptions. * `access_mode`: Either READ_ONLY, for allowing only read requests on the exported directory, or READ_WRITE, for allowing both read and write requests. The default is READ_WRITE. Possible values: * READ_ONLY * READ_WRITE * `squash_mode`: Either NO_ROOT_SQUASH, for allowing root access on the exported directory, or ROOT_SQUASH, for not allowing root access. The default is NO_ROOT_SQUASH. Possible values: * NO_ROOT_SQUASH * ROOT_SQUASH * `anon_uid`: An integer representing the anonymous user id with a default value of 65534. Anon_uid may only be set with squashMode of ROOT_SQUASH. An error will be returned if this field is specified for other squashMode settings. * `anon_gid`: An integer representing the anonymous group id with a default value of 65534. Anon_gid may only be set with squashMode of ROOT_SQUASH. An error will be returned if this field is specified for other squashMode settings. * `networks`: VPC networks to which the instance is connected. For this version, only a single network is supported. * `network`: The name of the GCE VPC network to which the instance is connected. * `modes`: IP versions for which the instance has IP addresses assigned. * `reserved_ip_range`: A /29 CIDR block that identifies the range of IP addresses reserved for this instance. * `ip_addresses`: A list of IPv4 or IPv6 addresses. * `etag`: Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other. * `zone`: The name of the Filestore zone of the instance. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_filestore_instances.md ================================================ +++ title = "google_filestore_instances resource" draft = false [menu.gcp] title = "google_filestore_instances" identifier = "inspec/resources/gcp/google_filestore_instances resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_filestore_instances` is used to test a Google Instance resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_filestore_instances(project: 'chef-gcp-inspec', zone: 'us-central1-b') do its('tiers') { should include 'PREMIUM' } end ``` ## Properties Properties that can be accessed from the `google_filestore_instances` resource: See [google_filestore_instance](google_filestore_instance) for more detailed information. * `names`: an array of `google_filestore_instance` name * `descriptions`: an array of `google_filestore_instance` description * `create_times`: an array of `google_filestore_instance` create_time * `tiers`: an array of `google_filestore_instance` tier * `labels`: an array of `google_filestore_instance` labels * `file_shares`: an array of `google_filestore_instance` file_shares * `networks`: an array of `google_filestore_instance` networks * `etags`: an array of `google_filestore_instance` etag * `zones`: an array of `google_filestore_instance` zone ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_iam_custom_role.md ================================================ +++ title = "google_iam_custom_role resource" draft = false [menu.gcp] title = "google_iam_custom_role" identifier = "inspec/resources/gcp/google_iam_custom_role resource" parent = "inspec/resources/gcp" +++ Use the `google_iam_custom_role` InSpec audit resource to to test a Google Cloud CustomRole resource. ## Examples ```ruby describe google_iam_custom_role(project: 'chef-gcp-inspec', name: 'admin-role') do it { should exist } its('stage') { should eq 'GA' } its('included_permissions') { should eq ["iam.roles.list"] } end describe google_iam_custom_role(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_iam_custom_role` resource: * `name`: The name of the role. * `title`: A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. * `description`: Human-readable description for the role * `included_permissions`: Names of permissions this role grants when bound in an IAM policy. * `stage`: The current launch stage of the role. * `deleted`: The current deleted state of the role ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_iam_custom_roles.md ================================================ +++ title = "google_iam_custom_roles resource" draft = false [menu.gcp] title = "google_iam_custom_roles" identifier = "inspec/resources/gcp/google_iam_custom_roles resource" parent = "inspec/resources/gcp" +++ Use the `google_iam_custom_roles` InSpec audit resource to to test a Google Cloud CustomRole resource. ## Examples ```ruby describe google_iam_custom_roles(project: 'chef-gcp-inspec') do its('names') { should include "projects/project-id/roles/role-id" } end ``` ## Properties Properties that can be accessed from the `google_iam_custom_roles` resource: See [google_iam_custom_role](google_iam_custom_role) for more detailed information. * `names`: an array of `google_iam_custom_role` name * `titles`: an array of `google_iam_custom_role` title * `descriptions`: an array of `google_iam_custom_role` description * `included_permissions`: an array of `google_iam_custom_role` included_permissions * `stages`: an array of `google_iam_custom_role` stage * `deleteds`: an array of `google_iam_custom_role` deleted ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_iam_organization_custom_role.md ================================================ +++ title = "google_iam_organization_custom_role resource" draft = false [menu.gcp] title = "google_iam_organization_custom_role" identifier = "inspec/resources/gcp/google_iam_organization_custom_role resource" parent = "inspec/resources/gcp" +++ Use the `google_iam_organization_custom_role` InSpec audit resource to to test a Google Cloud OrganizationCustomRole resource. ## Examples ```ruby describe google_iam_organization_custom_role(org_id: '12345', name: 'org-role') do it { should exist } its('stage') { should eq 'GA' } its('included_permissions') { should eq ["iam.roles.list"] } end describe google_iam_organization_custom_role(org_id: '12345', name: 'org-role', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_iam_organization_custom_role` resource: * `name`: The name of the role. * `title`: A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. * `description`: Human-readable description for the role * `included_permissions`: Names of permissions this role grants when bound in an IAM policy. * `stage`: The current launch stage of the role. Possible values: * ALPHA * BETA * GA * DEPRECATED * DISABLED * EAP * `deleted`: The current deleted state of the role ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_iam_organization_custom_roles.md ================================================ +++ title = "google_iam_organization_custom_roles resource" draft = false [menu.gcp] title = "google_iam_organization_custom_roles" identifier = "inspec/resources/gcp/google_iam_organization_custom_roles resource" parent = "inspec/resources/gcp" +++ Use the `google_iam_organization_custom_roles` InSpec audit resource to to test a Google Cloud OrganizationCustomRole resource. ## Examples ```ruby describe google_iam_organization_custom_roles(org_id: '190694428152') do its('names') { should include "organizations/123456/roles/role-id" } end ``` ## Properties Properties that can be accessed from the `google_iam_organization_custom_roles` resource: See [google_iam_organization_custom_role](google_iam_organization_custom_role) for more detailed information. * `names`: an array of `google_iam_organization_custom_role` name * `titles`: an array of `google_iam_organization_custom_role` title * `descriptions`: an array of `google_iam_organization_custom_role` description * `included_permissions`: an array of `google_iam_organization_custom_role` included_permissions * `stages`: an array of `google_iam_organization_custom_role` stage * `deleteds`: an array of `google_iam_organization_custom_role` deleted ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_iam_service_account.md ================================================ +++ title = "google_iam_service_account resource" draft = false [menu.gcp] title = "google_iam_service_account" identifier = "inspec/resources/gcp/google_iam_service_account resource" parent = "inspec/resources/gcp" +++ Use the `google_iam_service_account` InSpec audit resource to to test a Google Cloud ServiceAccount resource. ## Examples ```ruby describe google_service_account(project: 'chef-gcp-inspec', name: "display-name@project-id.iam.gserviceaccount.com") do it { should exist } its('display_name') { should cmp '' } end describe google_service_account(project: 'chef-gcp-inspec', name: "nonexistent@project-id.iam.gserviceaccount.com") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_service_account` resource: * `name`: The name of the service account. * `project_id`: Id of the project that owns the service account. * `unique_id`: Unique and stable id of the service account * `email`: Email address of the service account. * `display_name`: User specified description of service account. * `oauth2_client_id`: OAuth2 client id for the service account. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_iam_service_account_key.md ================================================ +++ title = "google_iam_service_account_key resource" draft = false [menu.gcp] title = "google_iam_service_account_key" identifier = "inspec/resources/gcp/google_iam_service_account_key resource" parent = "inspec/resources/gcp" +++ Use the `google_iam_service_account_key` InSpec audit resource to to test a Google Cloud ServiceAccountKey resource. ## Examples ```ruby google_iam_service_account_keys(project: 'chef-gcp-inspec', service_account: "display-name@project-id.iam.gserviceaccount.com").key_names.each do |sa_key_name| describe end ``` ## Properties Properties that can be accessed from the `google_iam_service_account_key` resource: * `name`: The name of the key. * `private_key_type`: Output format for the service account key. * `key_algorithm`: Specifies the algorithm for the key. * `private_key_data`: Private key data. Base-64 encoded. * `public_key_data`: Public key data. Base-64 encoded. * `valid_after_time`: Key can only be used after this time. * `valid_before_time`: Key can only be used before this time. * `key_type`: Specifies the type of the key. Possible values include KEY_TYPE_UNSPECIFIED, USER_MANAGED and SYSTEM_MANAGED * `service_account`: The name of the serviceAccount. * `path`: The full name of the file that will hold the service account private key. The management of this file will depend on the value of sync_file parameter. File path must be absolute. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_iam_service_account_keys.md ================================================ +++ title = "google_iam_service_account_keys resource" draft = false [menu.gcp] title = "google_iam_service_account_keys" identifier = "inspec/resources/gcp/google_iam_service_account_keys resource" parent = "inspec/resources/gcp" +++ Use the `google_iam_service_account_keys` InSpec audit resource to to test a Google Cloud ServiceAccountKey resource. ## Examples ```ruby describe google_iam_service_account_keys(project: 'chef-gcp-inspec', service_account: "display-name@project-id.iam.gserviceaccount.com") do its('count') { should be <= 1000 } end ``` ## Properties Properties that can be accessed from the `google_iam_service_account_keys` resource: See [google_iam_service_account_key](google_iam_service_account_key) for more detailed information. * `key_names`: an array of `google_iam_service_account_key` name * `private_key_types`: an array of `google_iam_service_account_key` private_key_type * `key_algorithms`: an array of `google_iam_service_account_key` key_algorithm * `private_key_data`: an array of `google_iam_service_account_key` private_key_data * `public_key_data`: an array of `google_iam_service_account_key` public_key_data * `valid_after_times`: an array of `google_iam_service_account_key` valid_after_time * `valid_before_times`: an array of `google_iam_service_account_key` valid_before_time * `key_types`: an array of `google_iam_service_account_key` key_type * `service_accounts`: an array of `google_iam_service_account_key` service_account * `paths`: an array of `google_iam_service_account_key` path ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_iam_service_accounts.md ================================================ +++ title = "google_iam_service_accounts resource" draft = false [menu.gcp] title = "google_iam_service_accounts" identifier = "inspec/resources/gcp/google_iam_service_accounts resource" parent = "inspec/resources/gcp" +++ Use the `google_iam_service_accounts` InSpec audit resource to to test a Google Cloud ServiceAccount resource. ## Examples ```ruby describe google_iam_service_accounts(project: 'chef-gcp-inspec', name: "display-name@project-id.iam.gserviceaccount.com") do its('service_account_emails') { should include "display-name@project-id.iam.gserviceaccount.com" } its('count') { should be <= 1000 } end ``` ## Properties Properties that can be accessed from the `google_iam_service_accounts` resource: See [google_iam_service_account](google_iam_service_account) for more detailed information. * `service_account_names`: an array of `google_iam_service_account` name * `project_ids`: an array of `google_iam_service_account` project_id * `service_account_ids`: an array of `google_iam_service_account` unique_id * `service_account_emails`: an array of `google_iam_service_account` email * `service_account_display_names`: an array of `google_iam_service_account` display_name * `oauth2_client_ids`: an array of `google_iam_service_account` oauth2_client_id ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_crypto_key.md ================================================ +++ title = "google_kms_crypto_key resource" draft = false [menu.gcp] title = "google_kms_crypto_key" identifier = "inspec/resources/gcp/google_kms_crypto_key resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_crypto_key` InSpec audit resource to to test a Google Cloud CryptoKey resource. ## Examples ```ruby describe google_kms_crypto_key(project: 'chef-gcp-inspec', location: 'europe-west2', key_ring_name: 'kms-key-ring', name: 'kms-key') do it { should exist } its('crypto_key_name') { should cmp 'kms-key' } its('primary_state') { should eq "ENABLED" } its('purpose') { should eq "ENCRYPT_DECRYPT" } its('next_rotation_time') { should be > Time.now - 100000 } its('create_time') { should be > Time.now - 365*60*60*24*10 } end describe google_kms_crypto_key(project: 'chef-gcp-inspec', location: 'europe-west2', key_ring_name: 'kms-key-ring', name: "nonexistent") do it { should_not exist } end ``` ### Test that a GCP KMS crypto key was created recently describe google_kms_crypto_key(project: 'chef-inspec-gcp', location: 'us-east1', key_ring_name: 'key-ring', name: 'crypto-key') do its('create_time_date') { should be > Time.now - 365*60*60*24*10 } end ### Test when the next rotation time for a GCP KMS crypto key is scheduled describe google_kms_crypto_key(project: 'chef-inspec-gcp', location: 'us-east1', key_ring_name: 'key-ring', name: 'crypto-key') do its('next_rotation_time_date') { should be > Time.now - 100000 } end ### Check that the crypto key purpose is as expected describe google_kms_crypto_key(project: 'chef-inspec-gcp', location: 'us-east1', key_ring_name: 'key-ring', name: 'crypto-key') do its('purpose') { should eq "ENCRYPT_DECRYPT" } end ### Check that the crypto key primary is in "ENABLED" state describe google_kms_crypto_key(project: 'chef-inspec-gcp', location: 'us-east1', key_ring_name: 'key-ring', name: 'crypto-key') do its('primary_state') { should eq "ENABLED" } end ## Properties Properties that can be accessed from the `google_kms_crypto_key` resource: * `crypto_key_name`: The resource name for the CryptoKey. * `create_time`: The time that this resource was created on the server. This is in RFC3339 text format. * `labels`: Labels with user-defined metadata to apply to this resource. * `purpose`: The immutable purpose of this CryptoKey. See the [purpose reference](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKeyPurpose) for possible inputs. Possible values: * ENCRYPT_DECRYPT * ASYMMETRIC_SIGN * ASYMMETRIC_DECRYPT * `rotation_period`: Every time this period passes, generate a new CryptoKeyVersion and set it as the primary. The first rotation will take place after the specified period. The rotation period has the format of a decimal number with up to 9 fractional digits, followed by the letter `s` (seconds). It must be greater than a day (ie, 86400). * `version_template`: A template describing settings for new crypto key versions. * `algorithm`: The algorithm to use when creating a version based on this template. See the [algorithm reference](https://cloud.google.com/kms/docs/reference/rest/v1/CryptoKeyVersionAlgorithm) for possible inputs. * `protection_level`: The protection level to use when creating a version based on this template. Possible values: * SOFTWARE * HSM * `next_rotation_time`: The time when KMS will create a new version of this Crypto Key. * `key_ring`: The KeyRing that this key belongs to. Format: `'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}'`. * `skip_initial_version_creation`: If set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must use the `google_kms_key_ring_import_job` resource to import the CryptoKeyVersion. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_crypto_key_iam_binding.md ================================================ +++ title = "google_kms_crypto_key_iam_binding resource" draft = false [menu.gcp] title = "google_kms_crypto_key_iam_binding" identifier = "inspec/resources/gcp/google_kms_crypto_key_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_kms_crypto_key_iam_binding` is used to test a Google CryptoKey Iam Bindings ## Examples ```ruby describe google_kms_crypto_key_iam_binding(project: "project", location: "location", key_ring_name: "key_ring_name", crypto_key_name: "crypto_key_name", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_kms_crypto_key_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_crypto_key_iam_bindings.md ================================================ +++ title = "google_kms_crypto_key_iam_bindings resource" draft = false [menu.gcp] title = "google_kms_crypto_key_iam_bindings" identifier = "inspec/resources/gcp/google_kms_crypto_key_iam_bindings resource" parent = "inspec/resources/gcp" +++ # google\_kms\_crypto\_key\_iam\_bindings **This resource is deprecated. Please use google_kms_crypto_key_iam_policy instead** Use the `google_kms_crypto_key_iam_bindings` InSpec audit resource to test properties of all, or a filtered group of, GCP KMS Crypto Key IAM Bindings.
## Syntax A `google_kms_crypto_key_iam_bindings` resource block collects GCP KMS Crypto Key IAM Bindings then tests that group. describe google_kms_crypto_key_iam_bindings(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name') do it { should exist } end Use this InSpec resource to enumerate roles then test in-depth using `google_kms_key_ring_iam_binding`. google_kms_crypto_key_iam_bindings(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name').iam_binding_roles.each do |iam_binding_role| describe google_kms_crypto_key_iam_binding(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name', role: "roles/owner") do it { should exist } its('members') {should include 'user:someuser@domain.com' } end end
## Examples The following examples show how to use this InSpec audit resource. ### Test that there are no more than a specified number of IAM bindings roles available for the crypto key describe google_kms_crypto_key_iam_bindings(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name') do its('count') { should be <= 100} end ### Test that an expected IAM binding is available for the crypto key describe google_kms_crypto_key_iam_bindings(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name') do its('iam_binding_roles') { should include "roles/storage.admin" } end ### Test that a particular role does not exist using filtering of the plural resource describe google_kms_crypto_key_iam_bindings(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name').where(iam_binding_role: "roles/iam.securityReviewer") do it { should_not exist } end
## Filter criteria This resource supports the following filter criteria: `iam_binding_role`. This may be used with `where`, as a block or as a method. ## Properties * `iam_binding_roles` - an array of google_kms_crypto_key_iam_binding role strings e.g. `["roles/compute.admin", "roles/owner"]`
## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the project where the resource is located.s ================================================ FILE: docs-chef-io/content/google_kms_crypto_key_iam_policy.md ================================================ +++ title = "google_kms_crypto_key_iam_policy resource" draft = false [menu.gcp] title = "google_kms_crypto_key_iam_policy" identifier = "inspec/resources/gcp/google_kms_crypto_key_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_kms_crypto_key_iam_policy` is used to test a Google CryptoKey Iam Policy resource. ## Examples ```ruby describe google_kms_crypto_key_iam_policy(project: "project", location: "location", key_ring_name: "key_ring_name", crypto_key_name: "crypto_key_name") do it { should exist } end google_kms_crypto_key_iam_policy(project: "project", location: "location", key_ring_name: "key_ring_name", crypto_key_name: "crypto_key_name").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_kms_crypto_key_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_crypto_key_version.md ================================================ +++ title = "google_kms_crypto_key_version resource" draft = false [menu.gcp] title = "google_kms_crypto_key_version" identifier = "inspec/resources/gcp/google_kms_crypto_key_version resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_crypto_key_version` InSpec audit resource to to test a Google Cloud CryptoKeyVersion resource. ## Examples ```ruby describe google_kms_crypto_key_version(project: 'chef-gcp-inspec', location: 'europe-west2', key_ring: 'kms-key-ring', crypto_key: '', name: 'kms-key') do it { should exist } its('crypto_key_name') { should cmp 'kms-key' } its('primary_state') { should eq "ENABLED" } its('purpose') { should eq "ENCRYPT_DECRYPT" } its('next_rotation_time') { should be > Time.now - 100000 } its('create_time') { should be > Time.now - 365*60*60*24*10 } end describe google_kms_crypto_key_version(project: 'chef-gcp-inspec', location: 'europe-west2', key_ring: 'kms-key-ring', crypto_key: '', name: "nonexistent") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_kms_crypto_key_version` resource: * `name`: The resource name for the CryptoKey. * `create_time`: The time that this resource was created on the server. This is in RFC3339 text format. * `generate_time`: The time that this resource was created on the server. This is in RFC3339 text format. * `destroy_time`: The time that this resource was created on the server. This is in RFC3339 text format. * `destroy_event_time`: The time that this resource was created on the server. This is in RFC3339 text format. * `state`: The state of a CryptoKeyVersion, indicating if it can be used. Possible values: * CRYPTO_KEY_VERSION_STATE_UNSPECIFIED * PENDING_GENERATION * ENABLED * DISABLED * DESTROYED * DESTROY_SCHEDULED * PENDING_IMPORT * IMPORT_FAILED * `protection_level`: ProtectionLevel specifies how cryptographic operations are performed. For more information, see Protection levels. Possible values: * PROTECTION_LEVEL_UNSPECIFIED * SOFTWARE * HSM * EXTERNAL * EXTERNAL_VPC * `algorithm`: The algorithm of the CryptoKeyVersion, indicating what parameters must be used for each cryptographic operation. The GOOGLE_SYMMETRIC_ENCRYPTION algorithm is usable with CryptoKey.purpose ENCRYPT_DECRYPT. Algorithms beginning with "RSA_SIGN_" are usable with CryptoKey.purpose ASYMMETRIC_SIGN. The fields in the name after "RSA_SIGN_" correspond to the following parameters: padding algorithm, modulus bit length, and digest algorithm. For PSS, the salt length used is equal to the length of digest algorithm. For example, RSA_SIGN_PSS_2048_SHA256 will use PSS with a salt length of 256 bits or 32 bytes. Algorithms beginning with "RSA_DECRYPT_" are usable with CryptoKey.purpose ASYMMETRIC_DECRYPT. The fields in the name after "RSA_DECRYPT_" correspond to the following parameters: padding algorithm, modulus bit length, and digest algorithm. Algorithms beginning with "EC_SIGN_" are usable with CryptoKey.purpose ASYMMETRIC_SIGN. The fields in the name after "EC_SIGN_" correspond to the following parameters: elliptic curve, digest algorithm. Algorithms beginning with "HMAC_" are usable with CryptoKey.purpose MAC. The suffix following "HMAC_" corresponds to the hash algorithm being used (eg. SHA256). Possible values: * CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED * GOOGLE_SYMMETRIC_ENCRYPTION * RSA_SIGN_PSS_2048_SHA256 * RSA_SIGN_PSS_3072_SHA256 * RSA_SIGN_PSS_4096_SHA256 * RSA_SIGN_PSS_4096_SHA512 * RSA_SIGN_PKCS1_2048_SHA256 * RSA_SIGN_PKCS1_3072_SHA256 * RSA_SIGN_PKCS1_4096_SHA512 * RSA_SIGN_PKCS1_4096_SHA256 * RSA_SIGN_RAW_PKCS1_2048 * RSA_SIGN_RAW_PKCS1_3072 * RSA_SIGN_RAW_PKCS1_4096 * RSA_DECRYPT_OAEP_2048_SHA256 * RSA_DECRYPT_OAEP_3072_SHA256 * RSA_DECRYPT_OAEP_4096_SHA256 * RSA_DECRYPT_OAEP_4096_SHA512 * RSA_DECRYPT_OAEP_2048_SHA1 * RSA_DECRYPT_OAEP_3072_SHA1 * RSA_DECRYPT_OAEP_4096_SHA1 * EC_SIGN_P256_SHA256 * EC_SIGN_P384_SHA384 * EC_SIGN_SECP256K1_SHA256 * HMAC_SHA256 * EXTERNAL_SYMMETRIC_ENCRYPTION * `attestation`: Statement that was generated and signed by the key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of HSM. * `format`: The format of the attestation data. * `content`: The attestation data provided by the HSM when the key operation was performed. A base64-encoded string. * `import_job`: Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported. * `import_time`: The time that this resource was created on the server. This is in RFC3339 text format. * `import_failure_reason`: Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED. * `external_protection_level_options`: ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels. * `external_key_uri`: The URI for an external resource that this CryptoKeyVersion represents. * `ekm_connection_key_path`: The path to the external key material on the EKM when using EkmConnection e.g., "v0/my/key". Set this field instead of externalKeyUri when using an EkmConnection. * `reimport_eligible`: Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version. * `key_ring`: The KeyRing that this key belongs to. Format: `'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}'`. * `crypto_key`: The KeyRing that this key belongs to. Format: `'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{cryptoKey}}'`. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_crypto_key_versions.md ================================================ +++ title = "google_kms_crypto_key_versions resource" draft = false [menu.gcp] title = "google_kms_crypto_key_versions" identifier = "inspec/resources/gcp/google_kms_crypto_key_versions resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_crypto_key_versions` InSpec audit resource to to test a Google Cloud CryptoKeyVersion resource. ## Examples ```ruby describe google_kms_crypto_key_versions(project: 'chef-gcp-inspec', location: 'europe-west2', key_ring: 'kms-key-ring', crypto_key: '') do its('count') { should be >= 1 } its('crypto_key_names') { should include 'kms-key' } end ``` ## Properties Properties that can be accessed from the `google_kms_crypto_key_versions` resource: See [google_kms_crypto_key_version](google_kms_crypto_key_version) for more detailed information. * `names`: an array of `google_kms_crypto_key_version` name * `create_times`: an array of `google_kms_crypto_key_version` create_time * `generate_times`: an array of `google_kms_crypto_key_version` generate_time * `destroy_times`: an array of `google_kms_crypto_key_version` destroy_time * `destroy_event_times`: an array of `google_kms_crypto_key_version` destroy_event_time * `states`: an array of `google_kms_crypto_key_version` state * `protection_levels`: an array of `google_kms_crypto_key_version` protection_level * `algorithms`: an array of `google_kms_crypto_key_version` algorithm * `attestations`: an array of `google_kms_crypto_key_version` attestation * `import_jobs`: an array of `google_kms_crypto_key_version` import_job * `import_times`: an array of `google_kms_crypto_key_version` import_time * `import_failure_reasons`: an array of `google_kms_crypto_key_version` import_failure_reason * `external_protection_level_options`: an array of `google_kms_crypto_key_version` external_protection_level_options * `reimport_eligibles`: an array of `google_kms_crypto_key_version` reimport_eligible * `key_rings`: an array of `google_kms_crypto_key_version` key_ring * `crypto_keys`: an array of `google_kms_crypto_key_version` crypto_key ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_crypto_keys.md ================================================ +++ title = "google_kms_crypto_keys resource" draft = false [menu.gcp] title = "google_kms_crypto_keys" identifier = "inspec/resources/gcp/google_kms_crypto_keys resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_crypto_keys` InSpec audit resource to to test a Google Cloud CryptoKey resource. ## Examples ```ruby describe google_kms_crypto_keys(project: 'chef-gcp-inspec', location: 'europe-west2', key_ring_name: 'kms-key-ring') do its('count') { should be >= 1 } its('crypto_key_names') { should include 'kms-key' } end ``` ### Test that there are no more than a specified number of keys in the key ring describe google_kms_crypto_keys(project: 'chef-inspec-gcp', location: 'us-east1', key_ring_name: 'key-ring') do its('count') { should be <= 100} end ### Test that an expected key name is present in the key ring describe google_kms_crypto_keys(project: 'chef-inspec-gcp', location: 'us-east1', key_ring_name: 'key-ring') do its('crypto_key_names') { should include "my-crypto-key-name" } end ## Properties Properties that can be accessed from the `google_kms_crypto_keys` resource: See [google_kms_crypto_key](google_kms_crypto_key) for more detailed information. * `crypto_key_names`: an array of `google_kms_crypto_key` crypto_key_name * `create_times`: an array of `google_kms_crypto_key` create_time * `labels`: an array of `google_kms_crypto_key` labels * `purposes`: an array of `google_kms_crypto_key` purpose * `rotation_periods`: an array of `google_kms_crypto_key` rotation_period * `version_templates`: an array of `google_kms_crypto_key` version_template * `next_rotation_times`: an array of `google_kms_crypto_key` next_rotation_time * `key_rings`: an array of `google_kms_crypto_key` key_ring * `skip_initial_version_creations`: an array of `google_kms_crypto_key` skip_initial_version_creation ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_ekm_connection.md ================================================ +++ title = "google_kms_ekm_connection resource" draft = false [menu.gcp] title = "google_kms_ekm_connection" identifier = "inspec/resources/gcp/google_kms_ekm_connection resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_ekm_connection` InSpec audit resource to to test a Google Cloud EkmConnection resource. ## Examples ```ruby describe google_kms_ekm_connection(project: 'chef-gcp-inspec', location: 'europe-west2', name: '') do it { should exist } its('name') { should cmp '' } end describe google_kms_ekm_connection(project: 'chef-gcp-inspec', location: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_kms_ekm_connection` resource: * `name`: Resource name for the location, which may vary between implementations. For example: projects/example-project/locations/us-east1 * `create_time`: string (Timestamp format) Output only. The time at which the EkmConnection was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `service_resolvers`: object (ServiceResolver) A list of ServiceResolvers where the EKM can be reached. There should be one ServiceResolver per EKM replica. Currently, only a single ServiceResolver is supported. * `service_directory_service`: Required. The resource name of the Service Directory service pointing to an EKM replica, in the format projects/*/locations/*/namespaces/*/services/*. * `endpoint_filter`: Optional. The filter applied to the endpoints of the resolved service. If no filter is specified, all endpoints will be considered. An endpoint will be chosen arbitrarily from the filtered list for each request. For endpoint filter syntax and examples, see https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest. * `hostname`: Required. The hostname of the EKM replica used at TLS and HTTP layers. * `server_certificates`: A Certificate represents an X.509 certificate used to authenticate HTTPS connections to EKM replicas. * `raw_der`: Required. The raw certificate bytes in DER format. A base64-encoded string. * `parsed`: Output only. True if the certificate was parsed successfully. * `issuer`: Output only. The issuer distinguished name in RFC 2253 format. Only present if parsed is true. * `subject`: Output only. The subject distinguished name in RFC 2253 format. Only present if parsed is true. * `subject_alternative_dns_names`: Output only. The subject Alternative DNS names. Only present if parsed is true. * `not_before_time`: string (Timestamp format) Output only. The certificate is not valid before this time. Only present if parsed is true. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `not_after_time`: string (Timestamp format) Output only. The certificate is not valid after this time. Only present if parsed is true. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `serial_number`: Output only. The certificate serial number as a hex string. Only present if parsed is true. * `sha256_fingerprint`: Output only. The SHA-256 certificate fingerprint as a hex string. Only present if parsed is true. * `location`: Resource name for the location. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_ekm_connections.md ================================================ +++ title = "google_kms_ekm_connections resource" draft = false [menu.gcp] title = "google_kms_ekm_connections" identifier = "inspec/resources/gcp/google_kms_ekm_connections resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_ekm_connections` InSpec audit resource to to test a Google Cloud EkmConnection resource. ## Examples ```ruby describe google_kms_ekm_connections(project: 'chef-gcp-inspec', location: 'europe-west2') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_kms_ekm_connections` resource: See [google_kms_ekm_connection](google_kms_ekm_connection) for more detailed information. * `names`: an array of `google_kms_ekm_connection` name * `create_times`: an array of `google_kms_ekm_connection` create_time * `service_resolvers`: an array of `google_kms_ekm_connection` service_resolvers * `locations`: an array of `google_kms_ekm_connection` location ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_key_ring.md ================================================ +++ title = "google_kms_key_ring resource" draft = false [menu.gcp] title = "google_kms_key_ring" identifier = "inspec/resources/gcp/google_kms_key_ring resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_key_ring` InSpec audit resource to to test a Google Cloud KeyRing resource. ## Examples ```ruby describe google_kms_key_ring(project: 'chef-gcp-inspec', location: 'europe-west2', name: 'kms-key-ring') do it { should exist } its('create_time') { should be > Time.now - 365*60*60*24*10 } its('key_ring_name'){ should eq 'kms-key-ring' } its('key_ring_url'){ should match 'kms-key-ring' } end describe google_kms_key_ring(project: 'chef-gcp-inspec', location: 'europe-west2', name: "nonexistent") do it { should_not exist } end ``` ### Test that a GCP kms key ring exists describe google_kms_key_ring(project: 'chef-inspec-gcp', location: 'us-east1', name: 'key-ring-name') do it { should exist } end ### Test that a GCP kms key ring is in the expected state For any existing key ring, below should definitely be true! describe google_kms_key_ring(project: 'chef-inspec-gcp', location: 'us-east1', name: 'key-ring-name') do its('create_time_date') { should be > Time.now - 365*60*60*24*50 } end ## Properties Properties that can be accessed from the `google_kms_key_ring` resource: * `create_time`: The time that this resource was created on the server. This is in RFC3339 text format. * `key_ring_url`: The full resource name for the KeyRing * `location`: The location for the KeyRing. A full list of valid locations can be found by running `gcloud kms locations list`. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_key_ring_iam_binding.md ================================================ +++ title = "google_kms_key_ring_iam_binding resource" draft = false [menu.gcp] title = "google_kms_key_ring_iam_binding" identifier = "inspec/resources/gcp/google_kms_key_ring_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_kms_key_ring_iam_binding` is used to test a Google KeyRing Iam Bindings ## Examples ```ruby describe google_kms_key_ring_iam_binding(project: "project", location: "location", key_ring_name: "key_ring_name", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_kms_key_ring_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_key_ring_iam_bindings.md ================================================ +++ title = "google_kms_key_ring_iam_bindings resource" draft = false [menu.gcp] title = "google_kms_key_ring_iam_bindings" identifier = "inspec/resources/gcp/google_kms_key_ring_iam_bindings resource" parent = "inspec/resources/gcp" +++ # google\_kms\_key\_ring\_iam\_bindings **This resource is deprecated. Please use `google_kms_key_ring_iam_policy` instead** Use the `google_kms_key_ring_iam_bindings` InSpec audit resource to test properties of all, or a filtered group of, GCP KMS key ring IAM bindings.
## Syntax A `google_kms_key_ring_iam_bindings` resource block collects GCP KMS key ring IAM bindings then tests that group. describe google_kms_key_ring_iam_bindings(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring') do it { should exist } end Use this InSpec resource to enumerate roles then test in-depth using `google_kms_key_ring_iam_binding`. google_kms_key_ring_iam_bindings(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring').iam_binding_roles.each do |iam_binding_role| describe google_kms_key_ring_iam_binding(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring', role: "roles/owner") do it { should exist } its('members') {should include 'user:someuser@domain.com' } end end
## Examples The following examples show how to use this InSpec audit resource. ### Test that there are no more than a specified number of IAM bindings roles available for the key ring describe google_kms_key_ring_iam_bindings(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring') do its('count') { should be <= 100} end ### Test that an expected IAM binding is available for the key ring describe google_kms_key_ring_iam_bindings(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring') do its('iam_binding_roles') { should include "roles/storage.admin" } end ### Test that a particular role does not exist using filtering of the plural resource describe google_kms_key_ring_iam_bindings(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring').where(iam_binding_role: "roles/iam.securityReviewer") do it { should_not exist } end
## Filter criteria This resource supports the following filter criteria: `iam_binding_role`. This may be used with `where`, as a block or as a method. ## Properties * `iam_binding_roles` - an array of google_kms_key_ring_iam_binding role strings e.g. `["roles/compute.admin", "roles/owner"]`
## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the project where the resource is located.s ================================================ FILE: docs-chef-io/content/google_kms_key_ring_iam_policy.md ================================================ +++ title = "google_kms_key_ring_iam_policy resource" draft = false [menu.gcp] title = "google_kms_key_ring_iam_policy" identifier = "inspec/resources/gcp/google_kms_key_ring_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_kms_key_ring_iam_policy` is used to test a Google KeyRing Iam Policy resource. ## Examples ```ruby describe google_kms_key_ring_iam_policy(project: "project", location: "location", key_ring_name: "key_ring_name") do it { should exist } end google_kms_key_ring_iam_policy(project: "project", location: "location", key_ring_name: "key_ring_name").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_kms_key_ring_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_key_ring_import_job.md ================================================ +++ title = "google_kms_key_ring_import_job resource" draft = false [menu.gcp] title = "google_kms_key_ring_import_job" identifier = "inspec/resources/gcp/google_kms_key_ring_import_job resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_key_ring_import_job` InSpec audit resource to to test a Google Cloud KeyRingImportJob resource. ## Examples ```ruby describe google_kms_key_ring_import_job(project: 'chef-gcp-inspec', location: 'europe-west2', name: '') do it { should exist } end describe google_kms_key_ring_import_job(project: 'chef-gcp-inspec', location: 'nonexistent', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_kms_key_ring_import_job` resource: * `name`: The resource name for this ImportJob in the format projects/*/locations/*/keyRings/*/importJobs/*. * `import_method`: The wrapping method to be used for incoming key material. Possible values: * RSA_OAEP_3072_SHA1_AES_256 * RSA_OAEP_4096_SHA1_AES_256 * `protection_level`: The protection level of the ImportJob. This must match the protectionLevel of the versionTemplate on the CryptoKey you attempt to import into. Possible values: * SOFTWARE * HSM * EXTERNAL * `create_time`: The time that this resource was created on the server. This is in RFC3339 text format. * `generate_time`: The time that this resource was generated. This is in RFC3339 text format. * `expire_time`: The time at which this resource is scheduled for expiration and can no longer be used. This is in RFC3339 text format. * `expire_event_time`: The time this resource expired. Only present if state is EXPIRED. * `state`: The current state of the ImportJob, indicating if it can be used. * `public_key`: The public key with which to wrap key material prior to import. Only returned if state is `ACTIVE`. * `pem`: The public key, encoded in PEM format. For more information, see the RFC 7468 sections for General Considerations and Textual Encoding of Subject Public Key Info. * `attestation`: Statement that was generated and signed by the key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of HSM. * `format`: The format of the attestation data. * `content`: The attestation data provided by the HSM when the key operation was performed. A base64-encoded string. * `key_ring`: The KeyRing that this import job belongs to. Format: `'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}'`. * `import_job_id`: It must be unique within a KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63} ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_key_ring_import_jobs.md ================================================ +++ title = "google_kms_key_ring_import_jobs resource" draft = false [menu.gcp] title = "google_kms_key_ring_import_jobs" identifier = "inspec/resources/gcp/google_kms_key_ring_import_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_key_ring_import_jobs` InSpec audit resource to to test a Google Cloud KeyRingImportJob resource. ## Examples ```ruby describe google_kms_key_ring_import_job(project: 'chef-gcp-inspec', location: 'europe-west2') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_kms_key_ring_import_jobs` resource: See [google_kms_key_ring_import_job](google_kms_key_ring_import_job) for more detailed information. * `names`: an array of `google_kms_key_ring_import_job` name * `import_methods`: an array of `google_kms_key_ring_import_job` import_method * `protection_levels`: an array of `google_kms_key_ring_import_job` protection_level * `create_times`: an array of `google_kms_key_ring_import_job` create_time * `generate_times`: an array of `google_kms_key_ring_import_job` generate_time * `expire_times`: an array of `google_kms_key_ring_import_job` expire_time * `expire_event_times`: an array of `google_kms_key_ring_import_job` expire_event_time * `states`: an array of `google_kms_key_ring_import_job` state * `public_keys`: an array of `google_kms_key_ring_import_job` public_key * `attestations`: an array of `google_kms_key_ring_import_job` attestation * `key_rings`: an array of `google_kms_key_ring_import_job` key_ring * `import_job_ids`: an array of `google_kms_key_ring_import_job` import_job_id ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_key_rings.md ================================================ +++ title = "google_kms_key_rings resource" draft = false [menu.gcp] title = "google_kms_key_rings" identifier = "inspec/resources/gcp/google_kms_key_rings resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_key_rings` InSpec audit resource to to test a Google Cloud KeyRing resource. ## Examples ```ruby describe google_kms_key_rings(project: 'chef-gcp-inspec', location: 'europe-west2') do its('key_ring_names'){ should include 'kms-key-ring' } end describe.one do google_kms_key_rings(project: 'chef-gcp-inspec', location: 'europe-west2').key_ring_urls do |url| describe url do it { should match 'kms-key-ring' } end end end ``` ### Test that there are no more than a specified number of kms_key_rings available for the project describe google_kms_key_rings(project: 'chef-inspec-gcp', location: 'us-east1') do its('count') { should be <= 200} end ### Test that an expected kms_key_ring is available for the project describe google_kms_key_rings(project: 'chef-inspec-gcp', location: 'us-east1') do its('key_ring_names') { should include "a-named-key" } end ### Test that all KMS key rings were created in the past year describe google_kms_key_rings(project: gcp_project_id, location: 'us-east1').key_ring_names.each do |key_ring_name| describe google_kms_key_ring(project: 'chef-inspec-gcp', location: 'us-east1', 'name: key_ring_name) do it { should exist } its('create_time_date') { should be > Time.now - 365*60*60*24 } end end ## Properties Properties that can be accessed from the `google_kms_key_rings` resource: See [google_kms_key_ring](google_kms_key_ring) for more detailed information. * `create_times`: an array of `google_kms_key_ring` create_time * `key_ring_urls`: an array of `google_kms_key_ring` key_ring_url * `locations`: an array of `google_kms_key_ring` location ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_location.md ================================================ +++ title = "google_kms_location resource" draft = false [menu.gcp] title = "google_kms_location" identifier = "inspec/resources/gcp/google_kms_location resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_location` InSpec audit resource to to test a Google Cloud Location resource. ## Examples ```ruby describe google_kms_location(project: 'chef-gcp-inspec', location: 'europe-west2') do it { should exist } end describe google_kms_location(project: 'chef-gcp-inspec', location: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_kms_location` resource: * `name`: Resource name for the location, which may vary between implementations. For example: projects/example-project/locations/us-east1 * `location_id`: The canonical id for this location. For example: "us-east1". * `display_name`: The friendly name for this location, typically a nearby city name. For example, "Tokyo". * `location`: Resource name for the location. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_kms_locations.md ================================================ +++ title = "google_kms_locations resource" draft = false [menu.gcp] title = "google_kms_locations" identifier = "inspec/resources/gcp/google_kms_locations resource" parent = "inspec/resources/gcp" +++ Use the `google_kms_locations` InSpec audit resource to to test a Google Cloud Location resource. ## Examples ```ruby describe google_kms_locations(project: 'chef-gcp-inspec') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_kms_locations` resource: See [google_kms_location](google_kms_location) for more detailed information. * `names`: an array of `google_kms_location` name * `location_ids`: an array of `google_kms_location` location_id * `display_names`: an array of `google_kms_location` display_name * `locations`: an array of `google_kms_location` location ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Key Management Service (KMS) API](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_logging_folder_exclusion.md ================================================ +++ title = "google_logging_folder_exclusion resource" draft = false [menu.gcp] title = "google_logging_folder_exclusion" identifier = "inspec/resources/gcp/google_logging_folder_exclusion resource" parent = "inspec/resources/gcp" +++ Use the `google_logging_folder_exclusion` InSpec audit resource to to test a Google Cloud FolderExclusion resource. ## Examples ```ruby # Getting folder exclusions is complicated due to the name being generated by the server. # This can be drastically simplified if you have the name when writing the test describe.one do google_resourcemanager_folders(parent: 'organizations/12345').names.each do |folder_name| # name on a folder is in the form `folders/12345` google_logging_folder_exclusions(folder: folder_name.split('/')[1]).names.each do |exclusion_name| describe google_logging_folder_exclusion(folder: folder_name.split('/')[1], name: exclusion_name) do its('name'){ should cmp 'inspec-folder-exclusion' } its('description'){ should cmp 'My folder exclusion description' } its('filter'){ should cmp 'resource.type = gce_instance AND severity <= DEBUG' } end end end end ``` ## Properties Properties that can be accessed from the `google_logging_folder_exclusion` resource: * `folder`: Id of the folder that this exclusion applies to. * `name`: Name of the exclusion, specified by the server during create. * `description`: A user provided description of this exclusion. * `filter`: An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. * `disabled`: If set to true then this exclusion is disabled and it does not exclude any log entries. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_logging_folder_exclusions.md ================================================ +++ title = "google_logging_folder_exclusions resource" draft = false [menu.gcp] title = "google_logging_folder_exclusions" identifier = "inspec/resources/gcp/google_logging_folder_exclusions resource" parent = "inspec/resources/gcp" +++ Use the `google_logging_folder_exclusions` InSpec audit resource to to test a Google Cloud FolderExclusion resource. ## Examples ```ruby # Getting folder exclusions is complicated due to the name being generated by the server. # This can be drastically simplified if you have the name when writing the test describe.one do google_resourcemanager_folders(parent: 'organizations/12345').names.each do |name| # name on a folder is in the form `folders/12345` describe google_logging_folder_exclusions(folder: name.split('/')[1]) do its('names'){ should include 'inspec-folder-exclusion' } its('descriptions'){ should include 'My folder exclusion description' } its('filters'){ should include 'resource.type = gce_instance AND severity <= DEBUG' } end end end ``` ## Properties Properties that can be accessed from the `google_logging_folder_exclusions` resource: See [google_logging_folder_exclusion](google_logging_folder_exclusion) for more detailed information. * `folders`: an array of `google_logging_folder_exclusion` folder * `names`: an array of `google_logging_folder_exclusion` name * `descriptions`: an array of `google_logging_folder_exclusion` description * `filters`: an array of `google_logging_folder_exclusion` filter * `disableds`: an array of `google_logging_folder_exclusion` disabled ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_logging_folder_log_sink.md ================================================ +++ title = "google_logging_folder_log_sink resource" draft = false [menu.gcp] title = "google_logging_folder_log_sink" identifier = "inspec/resources/gcp/google_logging_folder_log_sink resource" parent = "inspec/resources/gcp" +++ Use the `google_logging_folder_log_sink` InSpec audit resource to to test a Google Cloud FolderLogSink resource. ## Examples ```ruby # Getting folder sinks is complicated due to the name being generated by the server. # This can be drastically simplified if you have the folder name when writing the test describe.one do google_resourcemanager_folders(parent: 'organizations/12345').names.each do |folder_name| # name on a folder is in the form `folders/12345` describe google_logging_folder_log_sink(folder: folder_name.split('/')[1], name: 'inspec-gcp-folder-sink') do it { should exist } its('filter') { should cmp 'resource.type = gce_instance AND severity >= ERROR' } end end end ``` ## Properties Properties that can be accessed from the `google_logging_folder_log_sink` resource: * `folder`: Id of the folder that this sink belongs to. * `name`: Name of the log sink. * `filter`: An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. * `destination`: The export destination. * `writer_identity`: An IAM identity—a service account or group—under which Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update based on the value of uniqueWriterIdentity in those methods. * `include_children`: If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_logging_folder_log_sinks.md ================================================ +++ title = "google_logging_folder_log_sinks resource" draft = false [menu.gcp] title = "google_logging_folder_log_sinks" identifier = "inspec/resources/gcp/google_logging_folder_log_sinks resource" parent = "inspec/resources/gcp" +++ Use the `google_logging_folder_log_sinks` InSpec audit resource to to test a Google Cloud FolderLogSink resource. ## Examples ```ruby # Getting folder sinks is complicated due to the name being generated by the server. # This can be drastically simplified if you have the folder name when writing the test describe.one do google_resourcemanager_folders(parent: 'organizations/12345').names.each do |folder_name| # name on a folder is in the form `folders/12345` describe google_logging_folder_log_sinks(folder: folder_name.split('/')[1]) do its('names') { should include 'inspec-gcp-folder-sink' } its('filters') { should include 'resource.type = gce_instance AND severity >= ERROR' } end end end ``` ## Properties Properties that can be accessed from the `google_logging_folder_log_sinks` resource: See [google_logging_folder_log_sink](google_logging_folder_log_sink) for more detailed information. * `folders`: an array of `google_logging_folder_log_sink` folder * `names`: an array of `google_logging_folder_log_sink` name * `filters`: an array of `google_logging_folder_log_sink` filter * `destinations`: an array of `google_logging_folder_log_sink` destination * `writer_identities`: an array of `google_logging_folder_log_sink` writer_identity * `include_children`: an array of `google_logging_folder_log_sink` include_children ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_logging_organization_log_sink.md ================================================ +++ title = "google_logging_organization_log_sink resource" draft = false [menu.gcp] title = "google_logging_organization_log_sink" identifier = "inspec/resources/gcp/google_logging_organization_log_sink resource" parent = "inspec/resources/gcp" +++ Use the `google_logging_organization_log_sink` InSpec audit resource to to test a Google Cloud OrganizationLogSink resource. ## Examples ```ruby describe google_logging_organization_log_sink(organization: '190694428152', name: 'inspec-gcp-org-sink') do it { should exist } its('filter') { should cmp 'resource.type = gce_instance' } end describe google_logging_organization_log_sink(organization: '190694428152', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_logging_organization_log_sink` resource: * `organization`: Id of the organization that this sink belongs to. * `name`: Name of the log sink. * `filter`: An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. * `destination`: The export destination. * `writer_identity`: An IAM identity—a service account or group—under which Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update based on the value of uniqueWriterIdentity in those methods. * `include_children`: If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_logging_organization_log_sinks.md ================================================ +++ title = "google_logging_organization_log_sinks resource" draft = false [menu.gcp] title = "google_logging_organization_log_sinks" identifier = "inspec/resources/gcp/google_logging_organization_log_sinks resource" parent = "inspec/resources/gcp" +++ Use the `google_logging_organization_log_sinks` InSpec audit resource to to test a Google Cloud OrganizationLogSink resource. ## Examples ```ruby describe google_logging_organization_log_sinks(organization: '190694428152') do its('names') { should include 'inspec-gcp-org-sink' } end ``` ## Properties Properties that can be accessed from the `google_logging_organization_log_sinks` resource: See [google_logging_organization_log_sink](google_logging_organization_log_sink) for more detailed information. * `organizations`: an array of `google_logging_organization_log_sink` organization * `names`: an array of `google_logging_organization_log_sink` name * `filters`: an array of `google_logging_organization_log_sink` filter * `destinations`: an array of `google_logging_organization_log_sink` destination * `writer_identities`: an array of `google_logging_organization_log_sink` writer_identity * `include_children`: an array of `google_logging_organization_log_sink` include_children ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_logging_project_exclusion.md ================================================ +++ title = "google_logging_project_exclusion resource" draft = false [menu.gcp] title = "google_logging_project_exclusion" identifier = "inspec/resources/gcp/google_logging_project_exclusion resource" parent = "inspec/resources/gcp" +++ Use the `google_logging_project_exclusion` InSpec audit resource to to test a Google Cloud ProjectExclusion resource. ## Examples ```ruby describe google_logging_project_exclusion(project: 'chef-gcp-inspec', name: 'inspec-project-exclusion') do it { should exist } its('description'){ should cmp 'My project exclusion description' } its('filter'){ should cmp 'resource.type = gce_instance AND severity <= DEBUG' } end describe google_logging_project_exclusion(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP project logging exclusion name is as expected describe google_logging_project_exclusion(project: 'chef-inspec-gcp', exclusion: 'exclusion-name-abcd') do its('name') { should eq 'exclusion-name-abcd' } end ### Test that a GCP project logging exclusion filter is set correctly describe google_logging_project_exclusion(project: 'chef-inspec-gcp', exclusion: 'exclusion-name-abcd') do its('filter') { should eq 'resource.type = gce_instance AND severity <= DEBUG' } end ### Test that a GCP project logging exclusion description is as expected describe google_logging_project_exclusion(project: 'chef-inspec-gcp', exclusion: 'exclusion-name-abcd') do its('description') { should eq 'Exclude GCE instance debug logs' } end ## Properties Properties that can be accessed from the `google_logging_project_exclusion` resource: * `project`: Id of the project that this exclusion applies to. * `name`: Name of the exclusion, specified by the server during create. * `description`: A user provided description of this exclusion. * `filter`: An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. * `disabled`: If set to true then this exclusion is disabled and it does not exclude any log entries. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_logging_project_exclusions.md ================================================ +++ title = "google_logging_project_exclusions resource" draft = false [menu.gcp] title = "google_logging_project_exclusions" identifier = "inspec/resources/gcp/google_logging_project_exclusions resource" parent = "inspec/resources/gcp" +++ Use the `google_logging_project_exclusions` InSpec audit resource to to test a Google Cloud ProjectExclusion resource. ## Examples ```ruby describe google_logging_project_exclusions(project: 'chef-gcp-inspec') do its('names'){ should include 'inspec-folder-exclusion' } end ``` ## Properties Properties that can be accessed from the `google_logging_project_exclusions` resource: See [google_logging_project_exclusion](google_logging_project_exclusion) for more detailed information. * `projects`: an array of `google_logging_project_exclusion` project * `names`: an array of `google_logging_project_exclusion` name * `descriptions`: an array of `google_logging_project_exclusion` description * `filters`: an array of `google_logging_project_exclusion` filter * `disableds`: an array of `google_logging_project_exclusion` disabled ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_logging_project_sink.md ================================================ +++ title = "google_logging_project_sink resource" draft = false [menu.gcp] title = "google_logging_project_sink" identifier = "inspec/resources/gcp/google_logging_project_sink resource" parent = "inspec/resources/gcp" +++ Use the `google_logging_project_sink` InSpec audit resource to to test a Google Cloud ProjectSink resource. ## Examples ```ruby describe google_logging_project_sink(project: 'chef-gcp-inspec', name: 'inspec-gcp-org-sink') do it { should exist } its('filter') { should cmp 'resource.type = gce_instance AND severity = DEBUG' } end describe google_logging_project_sink(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP project logging sink destination is correct describe google_logging_project_sink(project: 'chef-inspec-gcp', sink: 'sink-name-abcd') do its('destination') { should eq 'storage.googleapis.com/gcp-inspec-logging-bucket' } end ### Test that a GCP project logging sink filter is correct describe google_logging_project_sink(project: 'chef-inspec-gcp', sink: 'sink-name-abcd') do its('filter') { should eq "resource.type = gce_instance AND resource.labels.instance_id = \"12345678910123123\"" } end ### Test a GCP project logging sink output version format describe google_logging_project_sink(project: 'chef-inspec-gcp', sink: 'sink-name-abcd') do its('output_version_format') { should eq "V2" } end ### Test a GCP project logging sink writer identity is as expected describe google_logging_project_sink(project: 'chef-inspec-gcp', sink: 'sink-name-abcd') do its('writer_identity') { should eq "serviceAccount:my-logging-service-account.iam.gserviceaccount.com" } end ## Properties Properties that can be accessed from the `google_logging_project_sink` resource: * `project`: Id of the project that this sink belongs to. * `name`: Name of the log sink. * `filter`: An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. * `destination`: The export destination. * `writer_identity`: An IAM identity—a service account or group—under which Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update based on the value of uniqueWriterIdentity in those methods. * `include_children`: If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_logging_project_sinks.md ================================================ +++ title = "google_logging_project_sinks resource" draft = false [menu.gcp] title = "google_logging_project_sinks" identifier = "inspec/resources/gcp/google_logging_project_sinks resource" parent = "inspec/resources/gcp" +++ Use the `google_logging_project_sinks` InSpec audit resource to to test a Google Cloud ProjectSink resource. ## Examples ```ruby describe google_logging_project_sinks(project: 'chef-gcp-inspec') do its('names') { should include 'inspec-gcp-org-sink' } end ``` ### Test that there are no more than a specified number of sinks available for the project describe google_logging_project_sinks(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test that an expected sink name is available for the project describe google_logging_project_sinks(project: 'chef-inspec-gcp') do its('sink_names') { should include "my-sink" } end ### Test that an expected sink destination is available for the project describe google_logging_project_sinks(project: 'chef-inspec-gcp') do its('sink_destinations') { should include "storage.googleapis.com/a-logging-bucket" } end ### Test that a subset of all sinks matching "project*" have a particular writer identity google_logging_project_sinks(project: 'chef-inspec-gcp').where(sink_name: /project/).sink_names.each do |sink_name| describe google_logging_project_sink(project: 'chef-inspec-gcp', sink: sink_name) do its('writer_identity') { should eq "serviceAccount:my-logging-service-account.iam.gserviceaccount.com" } end end ## Properties Properties that can be accessed from the `google_logging_project_sinks` resource: See [google_logging_project_sink](google_logging_project_sink) for more detailed information. * `projects`: an array of `google_logging_project_sink` project * `names`: an array of `google_logging_project_sink` name * `filters`: an array of `google_logging_project_sink` filter * `destinations`: an array of `google_logging_project_sink` destination * `writer_identities`: an array of `google_logging_project_sink` writer_identity * `include_children`: an array of `google_logging_project_sink` include_children ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_memcache_instance.md ================================================ +++ title = "google_memcache_instance resource" draft = false [menu.gcp] title = "google_memcache_instance" identifier = "inspec/resources/gcp/google_memcache_instance resource" parent = "inspec/resources/gcp" +++ Use the `google_memcache_instance` InSpec audit resource to to test a Google Cloud Instance resource. ## Examples ```ruby describe google_memcache_instance(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'mem-instance') do it { should exist } its('node_count') { should cmp 1 } end describe google_memcache_instance(project: 'chef-gcp-inspec', region: 'europe-west2', name: "nonexistent") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_memcache_instance` resource: * `name`: (Beta only) The resource name of the instance. * `display_name`: (Beta only) A user-visible name for the instance. * `memcache_nodes`: (Beta only) Additional information about the instance state, if available. * `node_id`: (Beta only) Identifier of the Memcached node. The node id does not include project or location like the Memcached instance name. * `zone`: (Beta only) Location (GCP Zone) for the Memcached node. * `port`: (Beta only) The port number of the Memcached server on this node. * `host`: (Beta only) Hostname or IP address of the Memcached node used by the clients to connect to the Memcached server on this node. * `state`: (Beta only) Current state of the Memcached node. * `create_time`: (Beta only) Creation timestamp in RFC3339 text format. * `discovery_endpoint`: (Beta only) Endpoint for Discovery API * `labels`: (Beta only) Resource labels to represent user-provided metadata. * `memcache_full_version`: (Beta only) The full version of memcached server running on this instance. * `zones`: (Beta only) Zones where memcache nodes should be provisioned. If not provided, all zones will be used. * `authorized_network`: (Beta only) The full name of the GCE network to connect the instance to. If not provided, 'default' will be used. * `node_count`: (Beta only) Number of nodes in the memcache instance. * `memcache_version`: (Beta only) The major version of Memcached software. If not provided, latest supported version will be used. Currently the latest supported major version is MEMCACHE_1_5. The minor version will be automatically determined by our system based on the latest supported minor version. Possible values: * MEMCACHE_1_5 * `node_config`: (Beta only) Configuration for memcache nodes. * `cpu_count`: (Beta only) Number of CPUs per node. * `memory_size_mb`: (Beta only) Memory size in Mebibytes for each memcache node. * `parameters`: (Beta only) User-specified parameters for this memcache instance. * `id`: (Beta only) This is a unique ID associated with this set of parameters. * `params`: (Beta only) User-defined set of parameters to use in the memcache process. * `region`: (Beta only) The region of the Memcache instance. If it is not provided, the provider region is used. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_memcache_instances.md ================================================ +++ title = "google_memcache_instances resource" draft = false [menu.gcp] title = "google_memcache_instances" identifier = "inspec/resources/gcp/google_memcache_instances resource" parent = "inspec/resources/gcp" +++ Use the `google_memcache_instances` InSpec audit resource to to test a Google Cloud Instance resource. ## Examples ```ruby describe google_memcache_instances(project: 'chef-gcp-inspec', region: 'europe-west2') do its('count') { should be >= 1 } its('node_counts') { should include 1 } end ``` ## Properties Properties that can be accessed from the `google_memcache_instances` resource: See [google_memcache_instance](google_memcache_instance) for more detailed information. * `names`: (Beta only) an array of `google_memcache_instance` name * `display_names`: (Beta only) an array of `google_memcache_instance` display_name * `memcache_nodes`: (Beta only) an array of `google_memcache_instance` memcache_nodes * `create_times`: (Beta only) an array of `google_memcache_instance` create_time * `discovery_endpoints`: (Beta only) an array of `google_memcache_instance` discovery_endpoint * `labels`: (Beta only) an array of `google_memcache_instance` labels * `memcache_full_versions`: (Beta only) an array of `google_memcache_instance` memcache_full_version * `zones`: (Beta only) an array of `google_memcache_instance` zones * `authorized_networks`: (Beta only) an array of `google_memcache_instance` authorized_network * `node_counts`: (Beta only) an array of `google_memcache_instance` node_count * `memcache_versions`: (Beta only) an array of `google_memcache_instance` memcache_version * `node_configs`: (Beta only) an array of `google_memcache_instance` node_config * `parameters`: (Beta only) an array of `google_memcache_instance` parameters * `regions`: (Beta only) an array of `google_memcache_instance` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_ml_engine_model.md ================================================ +++ title = "google_ml_engine_model resource" draft = false [menu.gcp] title = "google_ml_engine_model" identifier = "inspec/resources/gcp/google_ml_engine_model resource" parent = "inspec/resources/gcp" +++ Use the `google_ml_engine_model` InSpec audit resource to to test a Google Cloud Model resource. ## Examples ```ruby describe google_ml_engine_model(project: 'chef-gcp-inspec', name: 'ml_model') do it { should exist } its('description') { should cmp 'My awesome ML model' } its('regions') { should include 'us-central1' } its('online_prediction_logging') { should cmp 'true' } its('online_prediction_console_logging') { should cmp 'true' } end describe google_ml_engine_model(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_ml_engine_model` resource: * `name`: The name specified for the model. * `description`: The description specified for the model when it was created. * `default_version`: The default version of the model. This version will be used to handle prediction requests that do not specify a version. * `name`: The name specified for the version when it was created. * `regions`: The list of regions where the model is going to be deployed. Currently only one region per model is supported * `online_prediction_logging`: If true, online prediction access logs are sent to StackDriver Logging. * `online_prediction_console_logging`: If true, online prediction nodes send stderr and stdout streams to Stackdriver Logging * `labels`: One or more labels that you can add, to organize your models. ## GCP permissions Ensure the [Cloud ML](https://console.cloud.google.com/apis/library/ml.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_ml_engine_models.md ================================================ +++ title = "google_ml_engine_models resource" draft = false [menu.gcp] title = "google_ml_engine_models" identifier = "inspec/resources/gcp/google_ml_engine_models resource" parent = "inspec/resources/gcp" +++ Use the `google_ml_engine_models` InSpec audit resource to to test a Google Cloud Model resource. ## Examples ```ruby describe google_ml_engine_models(project: 'chef-gcp-inspec') do its('descriptions') { should include 'My awesome ML model' } its('online_prediction_loggings') { should include 'true' } its('online_prediction_console_loggings') { should include 'true' } end ``` ## Properties Properties that can be accessed from the `google_ml_engine_models` resource: See [google_ml_engine_model](google_ml_engine_model) for more detailed information. * `names`: an array of `google_ml_engine_model` name * `descriptions`: an array of `google_ml_engine_model` description * `default_versions`: an array of `google_ml_engine_model` default_version * `regions`: an array of `google_ml_engine_model` regions * `online_prediction_loggings`: an array of `google_ml_engine_model` online_prediction_logging * `online_prediction_console_loggings`: an array of `google_ml_engine_model` online_prediction_console_logging * `labels`: an array of `google_ml_engine_model` labels ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud ML](https://console.cloud.google.com/apis/library/ml.googleapis.com) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_monitoring_group.md ================================================ +++ title = "google_monitoring_group resource" draft = false [menu.gcp] title = "google_monitoring_group" identifier = "inspec/resources/gcp/google_monitoring_group resource" parent = "inspec/resources/gcp" +++ Use the `google_monitoring_group` InSpec audit resource to test the properties of a Google Cloud Group resource. ## Examples ```ruby describe google_monitoring_group(name: 'projects/*/groups/value_group_id') do it { should exist } its('name') { should cmp 'value_name' } its('display_name') { should cmp 'value_displayname' } its('filter') { should cmp 'value_filter' } end describe google_monitoring_group(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_monitoring_group` resource: ## Properties Properties that can be accessed from the `google_monitoring_group` resource: * `name`: Output only. The name of this group. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique [GROUP_ID] that is generated automatically. * `display_name`: A user-assigned name for this group, used only for display purposes. * `parent_name`: The name of the group's parent, if it has one. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] For groups with no parent, parent_name is the empty string, "". * `filter`: The filter used to determine which monitored resources belong to this group. * `is_cluster`: If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters. ## GCP permissions Ensure the [Stackdriver Monitoring API](https://console.cloud.google.com/apis/library/monitoring.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_monitoring_groups.md ================================================ +++ title = "google_monitoring_groups resource" draft = false [menu.gcp] title = "google_monitoring_groups" identifier = "inspec/resources/gcp/google_monitoring_groups resource" parent = "inspec/resources/gcp" +++ Use the `google_monitoring_groups` InSpec audit resource to test the properties of a Google Cloud Group resource. ## Examples ```ruby describe google_monitoring_groups(name: 'projects/*') do it { should exist } its('names') { should include 'value_name' } its('display_names') { should include 'value_displayname' } its('filters') { should include 'value_filter' } end ``` ## Parameters Parameters that can be accessed from the `google_monitoring_groups` resource: See [google_monitoring_group](google_monitoring_group) for more detailed information. * `names`: an array of `google_monitoring_group` name * `display_names`: an array of `google_monitoring_group` display_name * `parent_names`: an array of `google_monitoring_group` parent_name * `filters`: an array of `google_monitoring_group` filter * `is_clusters`: an array of `google_monitoring_group` is_cluster ## Properties Properties that can be accessed from the `google_monitoring_groups` resource: See [google_monitoring_group](google_monitoring_group) for more detailed information. * `names`: an array of `google_monitoring_group` name * `display_names`: an array of `google_monitoring_group` display_name * `parent_names`: an array of `google_monitoring_group` parent_name * `filters`: an array of `google_monitoring_group` filter * `is_clusters`: an array of `google_monitoring_group` is_cluster ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Stackdriver Monitoring API](https://console.cloud.google.com/apis/library/monitoring.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_organization.md ================================================ +++ title = "google_organization resource" draft = false [menu.gcp] title = "google_organization" identifier = "inspec/resources/gcp/google_organization resource" parent = "inspec/resources/gcp" +++ Use the `google_organization` InSpec audit resource to to test a Google Cloud Organization resource. ## Examples ```ruby describe google_organization(name: "organizations/123456") do its('name') { should eq "organizations/123456" } its('lifecycle_state') { should cmp 'ACTIVE' } end ``` ### Test that a GCP organization has the expected name describe google_organization(name: 'organizations/1234') do its('name') { should eq 'organizations/1234' } end ### Test that a GCP organization has the expected lifecycle state e.g. "ACTIVE" describe google_organization(display_name: 'google.com') do its('lifecycle_state') { should eq "ACTIVE" } end ## Properties Properties that can be accessed from the `google_organization` resource: * `name`: The resource name of the organization. This is the organization's relative path in the API. Its format is "organizations/[organizationId]". For example, "organizations/1234". * `display_name`: A human-readable string that refers to the Organization in the GCP Console UI. This string is set by the server and cannot be changed. The string will be set to the primary domain (for example, "google.com") of the G Suite customer that owns the organization. * `lifecycle_state`: The lifecycle state of the folder. Updates to the lifecycleState must be performed via folders.delete and folders.undelete. Possible values: * LIFECYCLE_STATE_UNSPECIFIED * ACTIVE * DELETE_REQUESTED * `creation_time`: Timestamp when the Organization was created. Assigned by the server. * `owner`: The entity that owns the Organization * `directory_customer_id`: The G Suite customer id used in the Directory API ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_organization_iam_binding.md ================================================ +++ title = "google_organization_iam_binding resource" draft = false [menu.gcp] title = "google_organization_iam_binding" identifier = "inspec/resources/gcp/google_organization_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_organization_iam_binding` is used to test a Google Organization Iam Bindings ## Examples ```ruby describe google_organization_iam_binding(name: "name", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_organization_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_organization_iam_policy.md ================================================ +++ title = "google_organization_iam_policy resource" draft = false [menu.gcp] title = "google_organization_iam_policy" identifier = "inspec/resources/gcp/google_organization_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_organization_iam_policy` is used to test a Google Organization Iam Policy resource. ## Examples ```ruby describe google_organization_iam_policy(name: "name") do it { should exist } end google_organization_iam_policy(name: "name").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_organization_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_organization_policy.md ================================================ +++ title = "google_organization_policy resource" draft = false [menu.gcp] title = "google_organization_policy" identifier = "inspec/resources/gcp/google_organization_policy resource" parent = "inspec/resources/gcp" +++ # google\_organization\_policy **This resource is deprecated. Please use `google_orgpolicy_organization_policy` instead** Use the `google_organization_policy` InSpec audit resource to test constraints set on a GCP organization.
## Syntax Google organization policies can restrict certain GCP services. For more information see https://cloud.google.com/resource-manager/docs/organization-policy/understanding-constraints A `google_organization_policy` resource block declares the tests for a single GCP organization constraint identified by the pair of the `name` of the organization and the `constraint`: describe google_organization_policy(name: 'organizations/123456', constraint: 'constraints/compute.disableGuestAttributesAccess') do it { should exist } its('boolean_policy.enforced') { should be true } end
## Examples The following examples show how to use this InSpec audit resource. ### Test that a GCP organization has a specific constraint enforced describe google_organization_policy(name: 'organizations/123456', constraint: 'constraints/compute.disableGuestAttributesAccess') do it { should exist } its('boolean_policy.enforced') { should be true } end ### Test that a GCP organization has certain values allowed for a list constraint describe google_organization_policy(name: 'organizations/123456', constraint: 'constraints/someListConstraint') do it { should exist } its('list_policy.allowed_values') { should include 'included_val' } its('list_policy.allowed_values') { should_not include 'excluded' } its('list_policy.denied_values') { should include 'denied' } end
## Properties * `update_time`: The time stamp this policy was last updated. * `boolean_policy`: Only available for constraints that are boolean policies. * `enforced`: Boolean for if this policy is enforced. * `list_policy`: Available for list policies. * `allowed_values`: List of values allowed at this resource. * `denied_values`: List of values denied at this resource.
## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the project. ================================================ FILE: docs-chef-io/content/google_organizations.md ================================================ +++ title = "google_organizations resource" draft = false [menu.gcp] title = "google_organizations" identifier = "inspec/resources/gcp/google_organizations resource" parent = "inspec/resources/gcp" +++ Use the `google_organizations` InSpec audit resource to to test a Google Cloud Organization resource. ## Examples ```ruby describe google_organizations do its('names') { should include "organizations/123456" } end ``` ### Test that there are no more than a specified number of organizations available describe google_organizations do its('count') { should be <= 100} end ### Test that an expected organization name is available describe google_organizations do its('names') { should include "organization/1234" } end ### Test that an expected organization display name is available describe google_organizations do its('display_names') { should include "google.com" } end ### Test that all organizations are ACTIVE describe google_organizations do its('lifecycle_state'){ should eq 'ACTIVE' } end ### Test that a particular subset of ACTIVE organizations with display name 'goog*' exist google_organizations.where(display_name: /^goog/, lifecycle_state: 'ACTIVE').names.each do |name| describe google_organization(name: name) do it { should exist } end end ## Properties Properties that can be accessed from the `google_organizations` resource: See [google_organization](google_organization) for more detailed information. * `names`: an array of `google_organization` name * `display_names`: an array of `google_organization` display_name * `lifecycle_states`: an array of `google_organization` lifecycle_state * `creation_times`: an array of `google_organization` creation_time * `owners`: an array of `google_organization` owner ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_orgpolicy_folder_constraints.md ================================================ +++ title = "google_orgpolicy_folder_constraints resource" draft = false [menu.gcp] title = "google_orgpolicy_folder_constraints" identifier = "inspec/resources/gcp/google_orgpolicy_folder_constraints resource" parent = "inspec/resources/gcp" +++ Use the `google_orgpolicy_folder_constraints` InSpec audit resource to to test a Google Cloud FolderConstraint resource. ## Examples ```ruby describe google_orgpolicy_folder_constraints(parent: ' value_parent') do it { should exist } its('names') { should include 'value_name'} its('display_names') { should include 'value_displayName'} its('descriptions') { should include 'value_description'} its('constraint_defaults') { should include 'value_constraint_default'} its('list_constraints') { should include 'value_list_constraint'} end ``` ## Properties Properties that can be accessed from the `google_orgpolicy_folder_constraints` resource: * `display_names`: The human readable name. Mutable. * `descriptions`: Detailed description of what this constraint controls as well as how and where it is enforced. Mutable. * `constraint_defaults`: The evaluation behavior of this constraint in the absence of a policy. Possible values: * CONSTRAINT_DEFAULT_UNSPECIFIED * ALLOW * DENY * `supports_dry_runs`: Shows if dry run is supported for this constraint or not. * `names`: Immutable. The resource name of the constraint. Must be in one of the following forms: * `projects/{project_number}/constraints/{constraint_name}` * `folders/{folder_id}/constraints/{constraint_name}` * `organizations/{organization_id}/constraints/{constraint_name}` For example, "/projects/123/constraints/compute.disableSerialPortAccess". * `list_constraints`: A constraint that allows or disallows a list of string values, which are configured by an Organization Policy administrator with a policy. * `supports_under`: Indicates whether subtrees of the Resource Manager resource hierarchy can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"under:folders/123"` would match any resource under the 'folders/123' folder. * `supports_in`: Indicates whether values grouped into categories can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"in:Python"` would match any value in the 'Python' group. ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://orgpolicy.googleapis.com/](https://console.cloud.google.com/apis/library/orgpolicy.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_orgpolicy_folder_policies.md ================================================ +++ title = "google_orgpolicy_folder_policies resource" draft = false [menu.gcp] title = "google_orgpolicy_folder_policies" identifier = "inspec/resources/gcp/google_orgpolicy_folder_policies resource" parent = "inspec/resources/gcp" +++ Use the `google_orgpolicy_folder_policies` InSpec audit resource to to test a Google Cloud FolderPolicy resource. ## Examples ```ruby describe google_orgpolicy_folder_policies(parent: ' value_parent') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_orgpolicy_folder_policies` resource: See [google_orgpolicy_folder_policy](google_orgpolicy_folder_policy) for more detailed information. * `dry_run_specs`: an array of `google_orgpolicy_folder_policy` dry_run_spec * `specs`: an array of `google_orgpolicy_folder_policy` spec * `names`: an array of `google_orgpolicy_folder_policy` name * `alternates`: an array of `google_orgpolicy_folder_policy` alternate ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://orgpolicy.googleapis.com/](https://console.cloud.google.com/apis/library/orgpolicy.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_orgpolicy_folder_policy.md ================================================ +++ title = "google_orgpolicy_folder_policy resource" draft = false [menu.gcp] title = "google_orgpolicy_folder_policy" identifier = "inspec/resources/gcp/google_orgpolicy_folder_policy resource" parent = "inspec/resources/gcp" +++ Use the `google_orgpolicy_folder_policy` InSpec audit resource to to test a Google Cloud FolderPolicy resource. ## Examples ```ruby describe google_orgpolicy_folder_policy(parent: 'value_parent', name: ' value_name') do it { should exist } its('name') { should cmp 'value_name' } end describe google_orgpolicy_folder_policy(parent: 'value_parent', name: ' value_name') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_orgpolicy_folder_policy` resource: * `dry_run_spec`: Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. * `update_time`: Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy. * `rules`: In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence. * `condition`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `deny_all`: Setting this to true means that all values are denied. This field can be set only in policies for list constraints. * `allow_all`: Setting this to true means that all values are allowed. This field can be set only in policies for list constraints. * `enforce`: If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints. * `values`: A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. * `denied_values`: List of values denied at this resource. * `allowed_values`: List of values allowed at this resource. * `etag`: An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset. * `reset`: Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false. * `inherit_from_parent`: Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints. * `spec`: Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. * `update_time`: Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy. * `rules`: In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence. * `condition`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `deny_all`: Setting this to true means that all values are denied. This field can be set only in policies for list constraints. * `allow_all`: Setting this to true means that all values are allowed. This field can be set only in policies for list constraints. * `enforce`: If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints. * `values`: A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. * `denied_values`: List of values denied at this resource. * `allowed_values`: List of values allowed at this resource. * `etag`: An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset. * `reset`: Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false. * `inherit_from_parent`: Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints. * `name`: Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. * `alternate`: Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch. * `launch`: Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy. * `spec`: Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. * `update_time`: Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy. * `rules`: In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence. * `condition`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `deny_all`: Setting this to true means that all values are denied. This field can be set only in policies for list constraints. * `allow_all`: Setting this to true means that all values are allowed. This field can be set only in policies for list constraints. * `enforce`: If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints. * `values`: A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. * `denied_values`: List of values denied at this resource. * `allowed_values`: List of values allowed at this resource. * `etag`: An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset. * `reset`: Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false. * `inherit_from_parent`: Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints. ## GCP permissions Ensure the [https://orgpolicy.googleapis.com/](https://console.cloud.google.com/apis/library/orgpolicy.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_orgpolicy_organization_constraints.md ================================================ +++ title = "google_orgpolicy_organization_constraints resource" draft = false [menu.gcp] title = "google_orgpolicy_organization_constraints" identifier = "inspec/resources/gcp/google_orgpolicy_organization_constraints resource" parent = "inspec/resources/gcp" +++ Use the `google_orgpolicy_organization_constraints` InSpec audit resource to to test a Google Cloud OrganizationConstraint resource. ## Examples ```ruby describe google_orgpolicy_organization_constraints(parent: 'value_parent') do it { should exist } its('names') { should include 'value_name'} its('display_names') { should include 'value_displayName'} its('descriptions') { should include 'value_description'} its('constraint_defaults') { should include 'value_constraint_default'} its('list_constraints') { should include 'value_list_constraint'} end ``` ## Properties Properties that can be accessed from the `google_orgpolicy_organization_constraints` resource: * `display_names`: The human readable name. Mutable. * `descriptions`: Detailed description of what this constraint controls as well as how and where it is enforced. Mutable. * `constraint_defaults`: The evaluation behavior of this constraint in the absence of a policy. Possible values: * CONSTRAINT_DEFAULT_UNSPECIFIED * ALLOW * DENY * `supports_dry_runs`: Shows if dry run is supported for this constraint or not. * `names`: Immutable. The resource name of the constraint. Must be in one of the following forms: * `projects/{project_number}/constraints/{constraint_name}` * `folders/{folder_id}/constraints/{constraint_name}` * `organizations/{organization_id}/constraints/{constraint_name}` For example, "/projects/123/constraints/compute.disableSerialPortAccess". * `list_constraints`: A constraint that allows or disallows a list of string values, which are configured by an Organization Policy administrator with a policy. * `supports_under`: Indicates whether subtrees of the Resource Manager resource hierarchy can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"under:folders/123"` would match any resource under the 'folders/123' folder. * `supports_in`: Indicates whether values grouped into categories can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"in:Python"` would match any value in the 'Python' group. ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://orgpolicy.googleapis.com/](https://console.cloud.google.com/apis/library/orgpolicy.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_orgpolicy_organization_policies.md ================================================ +++ title = "google_orgpolicy_organization_policies resource" draft = false [menu.gcp] title = "google_orgpolicy_organization_policies" identifier = "inspec/resources/gcp/google_orgpolicy_organization_policies resource" parent = "inspec/resources/gcp" +++ Use the `google_orgpolicy_organization_policies` InSpec audit resource to to test a Google Cloud OrganizationPolicy resource. ## Examples ```ruby describe google_orgpolicy_organization_policies(parent: ' value_parent') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_orgpolicy_organization_policies` resource: See [google_orgpolicy_organization_policy](google_orgpolicy_organization_policy) for more detailed information. * `dry_run_specs`: an array of `google_orgpolicy_organization_policy` dry_run_spec * `specs`: an array of `google_orgpolicy_organization_policy` spec * `names`: an array of `google_orgpolicy_organization_policy` name * `alternates`: an array of `google_orgpolicy_organization_policy` alternate ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://orgpolicy.googleapis.com/](https://console.cloud.google.com/apis/library/orgpolicy.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_orgpolicy_organization_policy.md ================================================ +++ title = "google_orgpolicy_organization_policy resource" draft = false [menu.gcp] title = "google_orgpolicy_organization_policy" identifier = "inspec/resources/gcp/google_orgpolicy_organization_policy resource" parent = "inspec/resources/gcp" +++ Use the `google_orgpolicy_organization_policy` InSpec audit resource to to test a Google Cloud OrganizationPolicy resource. ## Examples ```ruby describe google_orgpolicy_organization_policy(parent: 'value_parent', name: ' value_name') do it { should exist } its('name') { should cmp 'value_name' } end describe google_orgpolicy_organization_policy(parent: 'value_parent', name: "does_not_exit") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_orgpolicy_organization_policy` resource: * `dry_run_spec`: Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. * `update_time`: Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy. * `rules`: In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence. * `condition`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `deny_all`: Setting this to true means that all values are denied. This field can be set only in policies for list constraints. * `allow_all`: Setting this to true means that all values are allowed. This field can be set only in policies for list constraints. * `enforce`: If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints. * `values`: A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. * `denied_values`: List of values denied at this resource. * `allowed_values`: List of values allowed at this resource. * `etag`: An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset. * `reset`: Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false. * `inherit_from_parent`: Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints. * `spec`: Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. * `update_time`: Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy. * `rules`: In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence. * `condition`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `deny_all`: Setting this to true means that all values are denied. This field can be set only in policies for list constraints. * `allow_all`: Setting this to true means that all values are allowed. This field can be set only in policies for list constraints. * `enforce`: If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints. * `values`: A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. * `denied_values`: List of values denied at this resource. * `allowed_values`: List of values allowed at this resource. * `etag`: An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset. * `reset`: Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false. * `inherit_from_parent`: Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints. * `name`: Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. * `alternate`: Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch. * `launch`: Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy. * `spec`: Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. * `update_time`: Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy. * `rules`: In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence. * `condition`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `deny_all`: Setting this to true means that all values are denied. This field can be set only in policies for list constraints. * `allow_all`: Setting this to true means that all values are allowed. This field can be set only in policies for list constraints. * `enforce`: If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints. * `values`: A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. * `denied_values`: List of values denied at this resource. * `allowed_values`: List of values allowed at this resource. * `etag`: An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset. * `reset`: Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false. * `inherit_from_parent`: Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints. ## GCP permissions Ensure the [https://orgpolicy.googleapis.com/](https://console.cloud.google.com/apis/library/orgpolicy.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_orgpolicy_project_constraints.md ================================================ +++ title = "google_orgpolicy_project_constraints resource" draft = false [menu.gcp] title = "google_orgpolicy_project_constraints" identifier = "inspec/resources/gcp/google_orgpolicy_project_constraints resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_orgpolicy_project_constraints` is used to test a Google Orgpolicy Project Constraint resource. ## Examples ```ruby describe google_orgpolicy_project_constraints(parent: 'projects/test') do it { should exist } its('names') { should include 'value_name'} its('display_names') { should include 'value_display_name'} its('descriptions') { should include 'value_description'} its('constraint_defaults') { should include value_constraint_default'} end ``` ## Properties Properties that can be accessed from the `google_orgpolicy_project_constraint` resource: * `display_names`: The human readable name. Mutable. * `descriptions`: Detailed description of what this constraint controls as well as how and where it is enforced. Mutable. * `constraint_defaults`: The evaluation behavior of this constraint in the absence of a policy. Possible values: * CONSTRAINT_DEFAULT_UNSPECIFIED * ALLOW * DENY * `supports_dry_runs`: Shows if dry run is supported for this constraint or not. * `names`: Immutable. The resource name of the constraint. Must be in one of the following forms: * `projects/{project_number}/constraints/{constraint_name}` * `folders/{folder_id}/constraints/{constraint_name}` * `organizations/{organization_id}/constraints/{constraint_name}` For example, "/projects/123/constraints/compute.disableSerialPortAccess". * `list_constraints`: A constraint that allows or disallows a list of string values, which are configured by an Organization Policy administrator with a policy. * `supports_under`: Indicates whether subtrees of the Resource Manager resource hierarchy can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"under:folders/123"` would match any resource under the 'folders/123' folder. * `supports_in`: Indicates whether values grouped into categories can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"in:Python"` would match any value in the 'Python' group. ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://orgpolicy.googleapis.com/](https://console.cloud.google.com/apis/library/orgpolicy.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_orgpolicy_project_policies.md ================================================ +++ title = "google_orgpolicy_project_policies resource" draft = false [menu.gcp] title = "google_orgpolicy_project_policies" identifier = "inspec/resources/gcp/google_orgpolicy_project_policies resource" parent = "inspec/resources/gcp" +++ Use the `google_orgpolicy_project_policies` InSpec audit resource to to test a Google Cloud ProjectPolicy resource. ## Examples ```ruby describe google_orgpolicy_project_policies(parent: 'value_parent') do it { should exist } its('names'){ should include value_name} end ``` ## Properties Properties that can be accessed from the `google_orgpolicy_project_policies` resource: See [google_orgpolicy_project_policy](google_orgpolicy_project_policy) for more detailed information. * `dry_run_specs`: an array of `google_orgpolicy_project_policy` dry_run_spec * `specs`: an array of `google_orgpolicy_project_policy` spec * `names`: an array of `google_orgpolicy_project_policy` name * `alternates`: an array of `google_orgpolicy_project_policy` alternate ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [None](https://console.cloud.google.com/apis/library/orgpolicy.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_orgpolicy_project_policy.md ================================================ +++ title = "google_orgpolicy_project_policy resource" draft = false [menu.gcp] title = "google_orgpolicy_project_policy" identifier = "inspec/resources/gcp/google_orgpolicy_project_policy resource" parent = "inspec/resources/gcp" +++ Use the `google_orgpolicy_project_policy` InSpec audit resource to to test a Google Cloud ProjectPolicy resource. ## Examples ```ruby describe google_orgpolicy_project_policy(parent: value_parent,name: 'value_name') do it { should exist } its('name'){ should cmp value_name} end describe google_orgpolicy_project_policy(parent: value_parent,name: "does_not_exit") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_orgpolicy_project_policy` resource: * `dry_run_spec`: Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. * `update_time`: Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy. * `rules`: In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence. * `condition`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `deny_all`: Setting this to true means that all values are denied. This field can be set only in policies for list constraints. * `allow_all`: Setting this to true means that all values are allowed. This field can be set only in policies for list constraints. * `enforce`: If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints. * `values`: A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. * `denied_values`: List of values denied at this resource. * `allowed_values`: List of values allowed at this resource. * `etag`: An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset. * `reset`: Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false. * `inherit_from_parent`: Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints. * `spec`: Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. * `update_time`: Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy. * `rules`: In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence. * `condition`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `deny_all`: Setting this to true means that all values are denied. This field can be set only in policies for list constraints. * `allow_all`: Setting this to true means that all values are allowed. This field can be set only in policies for list constraints. * `enforce`: If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints. * `values`: A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. * `denied_values`: List of values denied at this resource. * `allowed_values`: List of values allowed at this resource. * `etag`: An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset. * `reset`: Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false. * `inherit_from_parent`: Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints. * `name`: Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. * `alternate`: Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch. * `launch`: Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy. * `spec`: Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. * `update_time`: Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy. * `rules`: In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence. * `condition`: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. * `title`: Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. * `location`: Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `description`: Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. * `deny_all`: Setting this to true means that all values are denied. This field can be set only in policies for list constraints. * `allow_all`: Setting this to true means that all values are allowed. This field can be set only in policies for list constraints. * `enforce`: If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints. * `values`: A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. * `denied_values`: List of values denied at this resource. * `allowed_values`: List of values allowed at this resource. * `etag`: An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset. * `reset`: Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false. * `inherit_from_parent`: Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints. ## GCP permissions Ensure the [None](https://console.cloud.google.com/apis/library/orgpolicy.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project.md ================================================ +++ title = "google_project resource" draft = false [menu.gcp] title = "google_project" identifier = "inspec/resources/gcp/google_project resource" parent = "inspec/resources/gcp" +++ Use the `google_project` InSpec audit resource to to test a Google Cloud Project resource. ## Examples ```ruby describe google_project(project: 'chef-gcp-inspec') do it { should exist } its('project_id') { should cmp 'chef-gcp-inspec' } its('lifecycle_state') { should cmp 'ACTIVE' } end ``` ### Test that a GCP project has the expected project number describe google_project(project: 'chef-inspec-gcp') do its('project_number') { should eq 12345678 } end ### Test that a GCP project has the expected lifecycle state e.g. "ACTIVE" describe google_project(project: 'chef-inspec-gcp') do its('lifecycle_state') { should eq "ACTIVE" } end ### Validate that a GCP project has some arbitrary label with expected content (for example defined by regexp ) describe google_project(project: 'chef-inspec-gcp').label_value_by_key('season') do it {should match '^(winter|spring|summer|autumn)$' } end ## Properties Properties that can be accessed from the `google_project` resource: * `number`: Number uniquely identifying the project. * `lifecycle_state`: The Project lifecycle state. Possible values: * LIFECYCLE_STATE_UNSPECIFIED * ACTIVE * DELETE_REQUESTED * DELETE_IN_PROGRESS * `name`: The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. * `create_time`: Time of creation * `labels`: The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed * `parent`: A parent organization * `type`: Must be organization. * `id`: Id of the organization * `project_id`: The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project_alert_policies.md ================================================ +++ title = "google_project_alert_policies resource" draft = false [menu.gcp] title = "google_project_alert_policies" identifier = "inspec/resources/gcp/google_project_alert_policies resource" parent = "inspec/resources/gcp" +++ Use the `google_project_alert_policies` InSpec audit resource to to test a Google Cloud AlertPolicy resource. ## Examples ```ruby describe google_project_alert_policies(project: 'chef-gcp-inspec') do it { should exist } its('policy_display_names') { should include 'Display'} its('combiners') { should include 'OR'} end ``` ### Test that there are no more than a specified number of project alert policies available for the project describe google_project_alert_policies(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test that an expected policy name is available for the project describe google_project_alert_policies(project: 'chef-inspec-gcp') do its('policy_names') { should include 'projects/spaterson-project/alertPolicies/9271751234503117449' } end ### Test whether any expected policy display name is available for the project describe google_project_alert_policies(project: 'chef-inspec-gcp') do its('policy_display_names') { should_not include 'banned policy' } end ### Ensure no existing policies are inactive describe google_project_alert_policies(project: 'chef-inspec-gcp') do its('policy_enabled_states') { should_not include false } end ## Properties Properties that can be accessed from the `google_project_alert_policies` resource: See [google_project_alert_policy](google_project_alert_policy) for more detailed information. * `policy_names`: an array of `google_project_alert_policy` name * `policy_display_names`: an array of `google_project_alert_policy` display_name * `combiners`: an array of `google_project_alert_policy` combiner * `creation_records`: an array of `google_project_alert_policy` creation_record * `policy_enabled_states`: an array of `google_project_alert_policy` enabled * `conditions`: an array of `google_project_alert_policy` conditions * `notification_channels`: an array of `google_project_alert_policy` notification_channels * `user_labels`: an array of `google_project_alert_policy` user_labels * `documentations`: an array of `google_project_alert_policy` documentation ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Stackdriver Monitoring API](https://console.cloud.google.com/apis/library/monitoring.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project_alert_policy.md ================================================ +++ title = "google_project_alert_policy resource" draft = false [menu.gcp] title = "google_project_alert_policy" identifier = "inspec/resources/gcp/google_project_alert_policy resource" parent = "inspec/resources/gcp" +++ Use the `google_project_alert_policy` InSpec audit resource to to test a Google Cloud AlertPolicy resource. ## Examples ```ruby describe.one do google_project_alert_policies(project: 'chef-gcp-inspec').policy_names do |policy_name| describe google_project_alert_policy(project: 'chef-gcp-inspec', name: policy_name) do it { should exist } its('display_name') { should cmp 'Display'} its('combiner') { should cmp 'OR'} it { should be_enabled } end end end ``` ### Test that a GCP alert policy is enabled describe google_project_alert_policy(policy: 'spaterson', name: '9271751234503117449') do it { should be_enabled } end ### Test that a GCP compute alert policy display name is correct describe google_project_alert_policy(policy: 'spaterson-project', name: '9271751234503117449') do its('display_name') { should eq 'policy name' } end ## Properties Properties that can be accessed from the `google_project_alert_policy` resource: * `name`: The unique resource name for this policy. Its syntax is: projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] * `display_name`: A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters. * `combiner`: How to combine the results of multiple conditions to determine if an incident should be opened. Possible values: * AND * OR * AND_WITH_MATCHING_RESOURCE * `creation_record`: A read-only record of the creation of the alerting policy. If provided in a call to create or update, this field will be ignored. * `mutate_time`: When the change occurred. * `mutated_by`: The email address of the user making the change. * `enabled`: Whether or not the policy is enabled. The default is true. * `conditions`: A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. * `condition_absent`: A condition that checks that a time series continues to receive new data points. * `aggregations`: Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resources). Multiple aggregations are applied in the order specified. * `per_series_aligner`: The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross- time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned. Possible values: * ALIGN_NONE * ALIGN_DELTA * ALIGN_RATE * ALIGN_INTERPOLATE * ALIGN_NEXT_OLDER * ALIGN_MIN * ALIGN_MAX * ALIGN_MEAN * ALIGN_COUNT * ALIGN_SUM * ALIGN_STDDEV * ALIGN_COUNT_TRUE * ALIGN_COUNT_FALSE * ALIGN_FRACTION_TRUE * ALIGN_PERCENTILE_99 * ALIGN_PERCENTILE_95 * ALIGN_PERCENTILE_50 * ALIGN_PERCENTILE_05 * ALIGN_PERCENT_CHANGE * `group_by_fields`: The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored. * `alignment_period`: The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned. * `cross_series_reducer`: The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross- time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned. Possible values: * REDUCE_NONE * REDUCE_MEAN * REDUCE_MIN * REDUCE_MAX * REDUCE_SUM * REDUCE_STDDEV * REDUCE_COUNT * REDUCE_COUNT_TRUE * REDUCE_COUNT_FALSE * REDUCE_FRACTION_TRUE * REDUCE_PERCENTILE_99 * REDUCE_PERCENTILE_95 * REDUCE_PERCENTILE_50 * REDUCE_PERCENTILE_05 * `trigger`: The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations. * `percent`: The percentage of time series that must fail the predicate for the condition to be triggered. * `count`: The absolute number of time series that must fail the predicate for the condition to be triggered. * `duration`: The amount of time that a time series must fail to report new data to be considered failing. Currently, only values that are a multiple of a minute--e.g. 60s, 120s, or 300s --are supported. * `filter`: A filter that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length. * `name`: The unique resource name for this condition. Its syntax is: projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] [CONDITION_ID] is assigned by Stackdriver Monitoring when the condition is created as part of a new or updated alerting policy. * `condition_monitoring_query_language`: A Monitoring Query Language query that outputs a boolean stream * `query`: Monitoring Query Language query that outputs a boolean stream. * `duration`: The amount of time that a time series must violate the threshold to be considered failing. Currently, only values that are a multiple of a minute--e.g., 0, 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. When choosing a duration, it is useful to keep in mind the frequency of the underlying time series data (which may also be affected by any alignments specified in the aggregations field); a good duration is long enough so that a single outlier does not generate spurious alerts, but short enough that unhealthy states are detected and alerted on quickly. * `trigger`: The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations, or by the ratio, if denominator_filter and denominator_aggregations are specified. * `percent`: The percentage of time series that must fail the predicate for the condition to be triggered. * `count`: The absolute number of time series that must fail the predicate for the condition to be triggered. * `condition_threshold`: A condition that compares a time series against a threshold. * `threshold_value`: A value against which to compare the time series. * `denominator_filter`: A filter that identifies a time series that should be used as the denominator of a ratio that will be compared with the threshold. If a denominator_filter is specified, the time series specified by the filter field will be used as the numerator.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length. * `denominator_aggregations`: Specifies the alignment of data points in individual time series selected by denominatorFilter as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resources).When computing ratios, the aggregations and denominator_aggregations fields must use the same alignment period and produce time series that have the same periodicity and labels.This field is similar to the one in the MetricService.ListTimeSeries request. It is advisable to use the ListTimeSeries method when debugging this field. * `per_series_aligner`: The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross- time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned. Possible values: * ALIGN_NONE * ALIGN_DELTA * ALIGN_RATE * ALIGN_INTERPOLATE * ALIGN_NEXT_OLDER * ALIGN_MIN * ALIGN_MAX * ALIGN_MEAN * ALIGN_COUNT * ALIGN_SUM * ALIGN_STDDEV * ALIGN_COUNT_TRUE * ALIGN_COUNT_FALSE * ALIGN_FRACTION_TRUE * ALIGN_PERCENTILE_99 * ALIGN_PERCENTILE_95 * ALIGN_PERCENTILE_50 * ALIGN_PERCENTILE_05 * ALIGN_PERCENT_CHANGE * `group_by_fields`: The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored. * `alignment_period`: The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned. * `cross_series_reducer`: The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross- time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned. Possible values: * REDUCE_NONE * REDUCE_MEAN * REDUCE_MIN * REDUCE_MAX * REDUCE_SUM * REDUCE_STDDEV * REDUCE_COUNT * REDUCE_COUNT_TRUE * REDUCE_COUNT_FALSE * REDUCE_FRACTION_TRUE * REDUCE_PERCENTILE_99 * REDUCE_PERCENTILE_95 * REDUCE_PERCENTILE_50 * REDUCE_PERCENTILE_05 * `duration`: The amount of time that a time series must violate the threshold to be considered failing. Currently, only values that are a multiple of a minute--e.g., 0, 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. When choosing a duration, it is useful to keep in mind the frequency of the underlying time series data (which may also be affected by any alignments specified in the aggregations field); a good duration is long enough so that a single outlier does not generate spurious alerts, but short enough that unhealthy states are detected and alerted on quickly. * `comparison`: The comparison to apply between the time series (indicated by filter and aggregation) and the threshold (indicated by threshold_value). The comparison is applied on each time series, with the time series on the left-hand side and the threshold on the right-hand side. Only COMPARISON_LT and COMPARISON_GT are supported currently. Possible values: * COMPARISON_GT * COMPARISON_GE * COMPARISON_LT * COMPARISON_LE * COMPARISON_EQ * COMPARISON_NE * `trigger`: The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations, or by the ratio, if denominator_filter and denominator_aggregations are specified. * `percent`: The percentage of time series that must fail the predicate for the condition to be triggered. * `count`: The absolute number of time series that must fail the predicate for the condition to be triggered. * `aggregations`: Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resources). Multiple aggregations are applied in the order specified.This field is similar to the one in the MetricService.ListTimeSeries request. It is advisable to use the ListTimeSeries method when debugging this field. * `per_series_aligner`: The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross- time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned. Possible values: * ALIGN_NONE * ALIGN_DELTA * ALIGN_RATE * ALIGN_INTERPOLATE * ALIGN_NEXT_OLDER * ALIGN_MIN * ALIGN_MAX * ALIGN_MEAN * ALIGN_COUNT * ALIGN_SUM * ALIGN_STDDEV * ALIGN_COUNT_TRUE * ALIGN_COUNT_FALSE * ALIGN_FRACTION_TRUE * ALIGN_PERCENTILE_99 * ALIGN_PERCENTILE_95 * ALIGN_PERCENTILE_50 * ALIGN_PERCENTILE_05 * ALIGN_PERCENT_CHANGE * `group_by_fields`: The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored. * `alignment_period`: The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned. * `cross_series_reducer`: The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross- time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned. Possible values: * REDUCE_NONE * REDUCE_MEAN * REDUCE_MIN * REDUCE_MAX * REDUCE_SUM * REDUCE_STDDEV * REDUCE_COUNT * REDUCE_COUNT_TRUE * REDUCE_COUNT_FALSE * REDUCE_FRACTION_TRUE * REDUCE_PERCENTILE_99 * REDUCE_PERCENTILE_95 * REDUCE_PERCENTILE_50 * REDUCE_PERCENTILE_05 * `filter`: A filter that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length. * `display_name`: A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy. * `notification_channels`: Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the NotificationChannel objects that are returned from the notificationChannels.list method. The syntax of the entries in this field is `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]` * `user_labels`: This field is intended to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. * `documentation`: Documentation that is included with notifications and incidents related to this policy. Best practice is for the documentation to include information to help responders understand, mitigate, escalate, and correct the underlying problems detected by the alerting policy. Notification channels that have limited capacity might not show this documentation. * `content`: The text of the documentation, interpreted according to mimeType. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller. * `mime_type`: The format of the content field. Presently, only the value "text/markdown" is supported. ## GCP permissions Ensure the [Stackdriver Monitoring API](https://console.cloud.google.com/apis/library/monitoring.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project_alert_policy_condition.md ================================================ +++ title = "google_project_alert_policy_condition resource" draft = false [menu.gcp] title = "google_project_alert_policy_condition" identifier = "inspec/resources/gcp/google_project_alert_policy_condition resource" parent = "inspec/resources/gcp" +++ # google\_project\_alert\_policy\_condition Use the `google_project_alert_policy_condition` InSpec audit resource to test properties of a single GCP project alert policy condition.
## Syntax A `google_project_alert_policy_condition` resource block declares the tests for a single GCP project alert policy condition by name and filter. describe google_project_alert_policy_condition(name: 'projects/spaterson-project/alertPolicies/9271751234503117449', filter 'project=\"spaterson-project\"') do it { should exist } end
## Examples The following examples show how to use this InSpec audit resource. ### Test that a GCP project alert policy condition has a particular threshold value describe google_project_alert_policy_condition(name: 'projects/spaterson-project/alertPolicies/9271751234503117449', filter 'project=\"spaterson-project\"') do its('condition_threshold_value'){ should eq 0.001 } end ### Test that a GCP project alert policy condition has a particular aggregation alignment period describe google_project_alert_policy_condition(name: 'projects/spaterson-project/alertPolicies/9271751234503117449', filter 'project=\"spaterson-project\"') do its('aggregation_alignment_period'){ should eq '60s' } end
## Properties * `condition_threshold_value`, `aggregation_alignment_period`, `aggregation_per_series_aligner`, `aggregation_cross_series_reducer`
## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/api/logging.googleapis.com/) is enabled for the project. ================================================ FILE: docs-chef-io/content/google_project_iam_binding.md ================================================ +++ title = "google_project_iam_binding resource" draft = false [menu.gcp] title = "google_project_iam_binding" identifier = "inspec/resources/gcp/google_project_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_project_iam_binding` is used to test a Google Project Iam Bindings ## Examples ```ruby describe google_project_iam_binding(project: "project", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` This resource supports [IAM conditions](https://cloud.google.com/iam/docs/conditions-overview). Specifying a `condition` in the constructor matches only bindings with that condition. `condition` has three possible fields, `title`, `expression` and `description`. If any of these fields are unspecified they will not be matched. ``` describe google_project_iam_binding(project: "project", role: "roles/browser", condition: { title: "my title" }) do it { should exist } its('members.count'){ should cmp 1 } its('members') { should include 'user:testuser@example.com' } its('condition.title') {should cmp 'my title' } its('condition.expression') { should cmp "request.time < timestamp('2020-10-01T00:00:00.000Z')" } end ``` ## Properties Properties that can be accessed from the `google_project_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `condition`: Contains information about when this binding is to be applied. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `title`: An optional title for the expression, i.e. a short string describing its purpose. * `description`: An optional description of the expression. This is a longer text which describes the expression. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project_iam_bindings.md ================================================ +++ title = "google_project_iam_bindings resource" draft = false [menu.gcp] title = "google_project_iam_bindings" identifier = "inspec/resources/gcp/google_project_iam_bindings resource" parent = "inspec/resources/gcp" +++ # google\_project\_iam\_bindings **This resource is deprecated. Please use `google_project_iam_policy` instead** Use the `google_project_iam_bindings` InSpec audit resource to test properties of all, or a filtered group of, GCP project IAM bindings.
## Syntax A `google_project_iam_bindings` resource block collects GCP project IAM bindings then tests that group. describe google_project_iam_bindings(project: 'chef-inspec-gcp') do it { should exist } end Use this InSpec resource to enumerate roles then test in-depth using `google_project_iam_binding`. google_project_iam_bindings(project: 'chef-inspec-gcp').iam_binding_roles.each do |iam_binding_role| describe google_project_iam_binding(project: 'chef-inspec-gcp', role: iam_binding_role) do it { should exist } its('members') {should include 'user:someuser@domain.com' } end end
## Examples The following examples show how to use this InSpec audit resource. ### Test that there are no more than a specified number of IAM bindings roles available for the project describe google_project_iam_bindings(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test that an expected role is available for the project describe google_project_iam_bindings(project: 'chef-inspec-gcp') do its('iam_binding_roles') { should include "roles/storage.admin" } end ### Test that a particular role does not exist using filtering of the plural resource describe google_project_iam_bindings(project: 'chef-inspec-gcp').where(iam_binding_role: "roles/iam.securityReviewer") do it { should_not exist } end
## Filter criteria This resource supports the following filter criteria: `iam_binding_role`. This may be used with `where`, as a block or as a method. ## Properties * `iam_binding_roles` - an array of google_project_iam_binding role strings e.g. `["roles/compute.admin", "roles/owner"]`
## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the project. ================================================ FILE: docs-chef-io/content/google_project_iam_custom_role.md ================================================ +++ title = "google_project_iam_custom_role resource" draft = false [menu.gcp] title = "google_project_iam_custom_role" identifier = "inspec/resources/gcp/google_project_iam_custom_role resource" parent = "inspec/resources/gcp" +++ Use the `google_project_iam_custom_role` InSpec audit resource to to test a Google Cloud CustomRole resource. ## Examples ```ruby describe google_project_iam_custom_role(project: 'chef-gcp-inspec', name: 'admin-role') do it { should exist } its('stage') { should eq 'GA' } its('included_permissions') { should eq ["iam.roles.list"] } end describe google_project_iam_custom_role(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP project IAM custom role has the expected stage in the launch lifecycle describe google_project_iam_custom_role(project: 'chef-inspec-gcp', name: 'chef-inspec-gcp-role-abcd') do its('stage') { should eq "GA" } end ### Test that a GCP project IAM custom role has the expected included permissions describe google_project_iam_custom_role(project: 'chef-inspec-gcp', name: 'chef-inspec-gcp-role-abcd') do its('included_permissions') { should eq ["iam.roles.list"] } end ## Properties Properties that can be accessed from the `google_project_iam_custom_role` resource: * `name`: The name of the role. * `title`: A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. * `description`: Human-readable description for the role * `included_permissions`: Names of permissions this role grants when bound in an IAM policy. * `stage`: The current launch stage of the role. Possible values: * ALPHA * BETA * GA * DEPRECATED * DISABLED * EAP * `deleted`: The current deleted state of the role ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project_iam_custom_roles.md ================================================ +++ title = "google_project_iam_custom_roles resource" draft = false [menu.gcp] title = "google_project_iam_custom_roles" identifier = "inspec/resources/gcp/google_project_iam_custom_roles resource" parent = "inspec/resources/gcp" +++ Use the `google_project_iam_custom_roles` InSpec audit resource to to test a Google Cloud CustomRole resource. ## Examples ```ruby describe google_project_iam_custom_roles(project: 'chef-gcp-inspec') do its('names') { should include "projects/project-id/roles/role-id" } end ``` ## Properties Properties that can be accessed from the `google_project_iam_custom_roles` resource: See [google_project_iam_custom_role](google_project_iam_custom_role) for more detailed information. * `names`: an array of `google_project_iam_custom_role` name * `titles`: an array of `google_project_iam_custom_role` title * `descriptions`: an array of `google_project_iam_custom_role` description * `included_permissions`: an array of `google_project_iam_custom_role` included_permissions * `stages`: an array of `google_project_iam_custom_role` stage * `deleteds`: an array of `google_project_iam_custom_role` deleted ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project_iam_policy.md ================================================ +++ title = "google_project_iam_policy resource" draft = false [menu.gcp] title = "google_project_iam_policy" identifier = "inspec/resources/gcp/google_project_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_project_iam_policy` is used to test a Google Project Iam Policy resource. ## Examples ```ruby describe google_project_iam_policy(project: "project") do it { should exist } end google_project_iam_policy(project: "project").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` This resource supports [IAM conditions](https://cloud.google.com/iam/docs/conditions-overview). ## Properties Properties that can be accessed from the `google_project_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `condition`: Contains information about when this binding is to be applied. * `expression`: Textual representation of an expression in Common Expression Language syntax. * `title`: An optional title for the expression, i.e. a short string describing its purpose. * `description`: An optional description of the expression. This is a longer text which describes the expression. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project_logging_audit_config.md ================================================ +++ title = "google_project_logging_audit_config resource" draft = false [menu.gcp] title = "google_project_logging_audit_config" identifier = "inspec/resources/gcp/google_project_logging_audit_config resource" parent = "inspec/resources/gcp" +++ # google\_project\_logging\_audit\_config Use the `google_compute_zone` InSpec audit resource to test properties of a single GCP compute zone.
## Syntax A `google_project_logging_audit_config` resource block declares the tests for a single GCP zone by project and name. describe google_project_logging_audit_config(project: 'chef-inspec-gcp') do it { should exist } end
## Examples The following examples show how to use this InSpec audit resource. ### Test that a GCP project logging audit configuration has a default type defined describe google_project_logging_audit_config(project: 'chef-inspec-gcp') do its('default_types') { should include 'ADMIN_READ' } end ### Test that a GCP project logging audit configuration has default exempted members describe google_compute_zone(project: 'chef-inspec-gcp', zone: 'us-east1-b') do it { should_not have_default_exempted_members } end
## Properties * `default_types`, `default_exempted_members`
## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the project. ================================================ FILE: docs-chef-io/content/google_project_metric.md ================================================ +++ title = "google_project_metric resource" draft = false [menu.gcp] title = "google_project_metric" identifier = "inspec/resources/gcp/google_project_metric resource" parent = "inspec/resources/gcp" +++ Use the `google_project_metric` InSpec audit resource to to test a Google Cloud Metric resource. ## Examples ```ruby describe google_project_metric(project: 'chef-gcp-inspec', name: 'some/metric') do it { should exist } its('filter') { should cmp 'resource.type=gae_app AND severity>=ERROR' } its('metric_descriptor.metric_kind') { should cmp 'DELTA' } its('metric_descriptor.value_type') { should cmp 'INT64' } end describe google_project_metric(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ### Test that a GCP project metric exists describe google_project_metric(project: 'chef-inspec-gcp', metric: 'metric_name') do it { should exist } end ### Test that a GCP compute zone has an expected CPU platform describe google_project_metric(project: 'chef-inspec-gcp', metric: 'metric_name') do its('filter') { should eq "(protoPayload.serviceName=\"cloudresourcemanager.googleapis.com\")" } end ## Properties Properties that can be accessed from the `google_project_metric` resource: * `name`: The client-assigned metric identifier. Examples - "error_count", "nginx/requests". Metric identifiers are limited to 100 characters and can include only the following characters A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name. * `description`: A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. * `filter`: An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-filters) which is used to match log entries. * `metric_descriptor`: The metric descriptor associated with the logs-based metric. * `unit`: The unit in which the metric value is reported. It is only applicable if the valueType is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The supported units are a subset of [The Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html) standard * `value_type`: Whether the measurement is an integer, a floating-point number, etc. Some combinations of metricKind and valueType might not be supported. For counter metrics, set this to INT64. Possible values: * BOOL * INT64 * DOUBLE * STRING * DISTRIBUTION * MONEY * `metric_kind`: Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metricKind and valueType might not be supported. For counter metrics, set this to DELTA. Possible values: * DELTA * GAUGE * CUMULATIVE * `labels`: The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response_latencies metric type has a label for the HTTP response code, response_code, so you can look at latencies for successful responses or just for responses that failed. * `key`: The label key. * `description`: A human-readable description for the label. * `value_type`: The type of data that can be assigned to the label. Possible values: * BOOL * INT64 * STRING * `display_name`: A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example "Request count". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota. * `type`: The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. * `label_extractors`: A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the valueExtractor field. * `value_extractor`: A valueExtractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction - EXTRACT(field) or REGEXP_EXTRACT(field, regex). The argument are 1. field - The name of the log entry field from which the value is to be extracted. 2. regex - A regular expression using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group. * `bucket_options`: The bucketOptions are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values. * `linear_buckets`: Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket. * `num_finite_buckets`: Must be greater than 0. * `width`: Must be greater than 0. * `offset`: Lower bound of the first bucket. * `exponential_buckets`: Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket. * `num_finite_buckets`: Must be greater than 0. * `growth_factor`: Must be greater than 1. * `scale`: Must be greater than 0. * `explicit_buckets`: Specifies a set of buckets with arbitrary widths. * `bounds`: The values must be monotonically increasing. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project_metrics.md ================================================ +++ title = "google_project_metrics resource" draft = false [menu.gcp] title = "google_project_metrics" identifier = "inspec/resources/gcp/google_project_metrics resource" parent = "inspec/resources/gcp" +++ Use the `google_project_metrics` InSpec audit resource to to test a Google Cloud Metric resource. ## Examples ```ruby describe google_project_metrics(project: 'chef-gcp-inspec') do it { should exist } its('metric_filters') { should include 'resource.type=gae_app AND severity>=ERROR' } its('metric_names') { should include 'some/metric' } end describe.one do google_project_metrics(project: 'chef-gcp-inspec').metric_types.each do |metric_type| describe metric_type do it { should match 'some/metric' } end end end ``` ### Test that there are no more than a specified number of metrics available for the project describe google_project_metrics(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test that an expected metric name is available for the project describe google_project_metrics(project: 'chef-inspec-gcp') do its('metric_names') { should include "metric-name" } end ### Test that a subset of all metrics with name matching "*project*" have a particular writer identity google_project_metrics(project: 'chef-inspec-gcp').where(metric_name: /project/).metric_names.each do |metric_name| describe google_project_metric(project: 'chef-inspec-gcp', metric: metric_name) do its('filter') { should eq "(protoPayload.serviceName=\"cloudresourcemanager.googleapis.com\")" } end end ## Properties Properties that can be accessed from the `google_project_metrics` resource: See [google_project_metric](google_project_metric) for more detailed information. * `metric_names`: an array of `google_project_metric` name * `descriptions`: an array of `google_project_metric` description * `metric_filters`: an array of `google_project_metric` filter * `metric_descriptors`: an array of `google_project_metric` metric_descriptor * `label_extractors`: an array of `google_project_metric` label_extractors * `value_extractors`: an array of `google_project_metric` value_extractor * `bucket_options`: an array of `google_project_metric` bucket_options ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Stackdriver Logging API](https://console.cloud.google.com/apis/library/logging.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project_service.md ================================================ +++ title = "google_project_service resource" draft = false [menu.gcp] title = "google_project_service" identifier = "inspec/resources/gcp/google_project_service resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_project_service` is used to test a Google Service resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_project_service(project: 'chef-gcp-inspec', name: 'maps-android-backend.googleapis.com') do it { should exist } its('state') { should cmp "ENABLED" } end ``` ## Properties Properties that can be accessed from the `google_project_service` resource: * `name`: The resource name of the service * `parent`: The name of the parent of this service. For example 'projects/123' * `state`: Whether or not the service has been enabled for use by the consumer. Possible values: * STATE_UNSPECIFIED * DISABLED * ENABLED * `disable_dependent_services`: Indicates if dependent services should also be disabled. Can only be turned on if service is disabled. * `config`: The service configuration of the available service. * `name`: The DNS address at which this service is available. * `title`: The product title for this service * `apis`: The list of API interfaces exported by this service. * `name`: Name of the API * `version`: The version of the API ## GCP permissions Ensure the [Service Usage API](https://console.cloud.google.com/apis/library/serviceusage.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_project_services.md ================================================ +++ title = "google_project_services resource" draft = false [menu.gcp] title = "google_project_services" identifier = "inspec/resources/gcp/google_project_services resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_project_services` is used to test a Google Service resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe.one do google_project_services(project: 'chef-gcp-inspec').names.each do |name| describe name do it { should match 'maps-android-backend.googleapis.com' } end end end ``` ## Properties Properties that can be accessed from the `google_project_services` resource: See [google_project_service](google_project_service) for more detailed information. * `names`: an array of `google_project_service` name * `parents`: an array of `google_project_service` parent * `states`: an array of `google_project_service` state * `disable_dependent_services`: an array of `google_project_service` disable_dependent_services * `configs`: an array of `google_project_service` config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Service Usage API](https://console.cloud.google.com/apis/library/serviceusage.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_projects.md ================================================ +++ title = "google_projects resource" draft = false [menu.gcp] title = "google_projects" identifier = "inspec/resources/gcp/google_projects resource" parent = "inspec/resources/gcp" +++ Use the `google_projects` InSpec audit resource to to test a Google Cloud Project resource. ## Examples ```ruby describe google_projects() do its('count') { should be >= 1 } its('project_ids') { should include 'chef-gcp-inspec' } its('lifecycle_states') { should include 'ACTIVE' } end ``` ### Test that there are no more than a specified number of projects available for the project describe google_projects do its('count') { should be <= 100} end ### Test that an expected named project is available describe google_projects do its('project_names'){ should include "GCP Project Name" } end ### Test that an expected project identifier is available describe google_projects do its('project_ids'){ should include "gcp_project_id" } end ### Test that an expected project number is available describe google_projects do its('project_numbers'){ should include 1122334455 } end ### Test that a particular subset of projects with id 'prod*' are in ACTIVE lifecycle state google_projects.where(project_id: /^prod/).project_ids.each do |gcp_project_id| describe google_project(project: gcp_project_id) do it { should exist } its('lifecycle_state') { should eq "ACTIVE" } end end ### Test that a particular subset of ACTIVE projects with id 'prod*' exist google_projects.where(project_id: /^prod/, lifecycle_state: 'ACTIVE').project_ids.each do |gcp_project_id| describe google_project(project: gcp_project_id) do it { should exist } end end ## Properties Properties that can be accessed from the `google_projects` resource: See [google_project](google_project) for more detailed information. * `project_numbers`: an array of `google_project` number * `lifecycle_states`: an array of `google_project` lifecycle_state * `project_names`: an array of `google_project` name * `create_times`: an array of `google_project` create_time * `labels`: an array of `google_project` labels * `parents`: an array of `google_project` parent * `project_ids`: an array of `google_project` project_id ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_pubsub_subscription.md ================================================ +++ title = "google_pubsub_subscription resource" draft = false [menu.gcp] title = "google_pubsub_subscription" identifier = "inspec/resources/gcp/google_pubsub_subscription resource" parent = "inspec/resources/gcp" +++ Use the `google_pubsub_subscription` InSpec audit resource to to test a Google Cloud Subscription resource. ## Examples ```ruby describe google_pubsub_subscription(project: 'chef-gcp-inspec', name: 'inspec-gcp-subscription') do it { should exist } end describe google_pubsub_subscription(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_pubsub_subscription` resource: * `name`: Name of the subscription. * `topic`: A reference to a Topic resource. * `labels`: A set of key/value label pairs to assign to this Subscription. * `push_config`: If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods. * `oidc_token`: If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message. * `service_account_email`: Service account email to be used for generating the OIDC token. The caller (for subscriptions.create, subscriptions.patch, and subscriptions.modifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account. * `audience`: Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used. * `push_endpoint`: A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push". * `attributes`: Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the subscriptions.create call, it will default to the version of the API used to make such call. If not present during a subscriptions.modifyPushConfig call, its value will not be changed. subscriptions.get calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: - v1beta1: uses the push format defined in the v1beta1 Pub/Sub API. - v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API. * `ack_deadline_seconds`: This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call subscriptions.modifyAckDeadline with the corresponding ackId if using pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. * `message_retention_duration`: How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If retainAckedMessages is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a subscriptions.seek can be done. Defaults to 7 days. Cannot be more than 7 days (`"604800s"`) or less than 10 minutes (`"600s"`). A duration in seconds with up to nine fractional digits, terminated by 's'. Example: `"600.5s"`. * `retain_acked_messages`: Indicates whether to retain acknowledged messages. If `true`, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the messageRetentionDuration window. * `expiration_policy`: A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. If it is set but ttl is "", the resource never expires. The minimum allowed value for expirationPolicy.ttl is 1 day. * `ttl`: Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. If ttl is not set, the associated resource never expires. A duration in seconds with up to nine fractional digits, terminated by 's'. Example - "3.5s". * `filter`: The subscription only delivers the messages that match the filter. Pub/Sub automatically acknowledges the messages that don't match the filter. You can filter messages by their attributes. The maximum length of a filter is 256 bytes. After creating the subscription, you can't modify the filter. * `dead_letter_policy`: A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription. * `dead_letter_topic`: The name of the topic to which dead letter messages should be published. Format is `projects/{project}/topics/{topic}`. The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost. * `max_delivery_attempts`: The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used. * `retry_policy`: A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message * `minimum_backoff`: The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". * `maximum_backoff`: The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". * `enable_message_ordering`: If `true`, messages published with the same orderingKey in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. ## GCP permissions Ensure the [Cloud Pub/Sub API](https://console.cloud.google.com/apis/library/pubsub.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_pubsub_subscription_iam_binding.md ================================================ +++ title = "google_pubsub_subscription_iam_binding resource" draft = false [menu.gcp] title = "google_pubsub_subscription_iam_binding" identifier = "inspec/resources/gcp/google_pubsub_subscription_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_pubsub_subscription_iam_binding` is used to test a Google Subscription Iam Bindings ## Examples ```ruby describe google_pubsub_subscription_iam_binding(project: "project", name: "name", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_pubsub_subscription_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Cloud Pub/Sub API](https://console.cloud.google.com/apis/library/pubsub.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_pubsub_subscription_iam_policy.md ================================================ +++ title = "google_pubsub_subscription_iam_policy resource" draft = false [menu.gcp] title = "google_pubsub_subscription_iam_policy" identifier = "inspec/resources/gcp/google_pubsub_subscription_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_pubsub_subscription_iam_policy` is used to test a Google Subscription Iam Policy resource. ## Examples ```ruby describe google_pubsub_subscription_iam_policy(project: "project", name: "name") do it { should exist } end google_pubsub_subscription_iam_policy(project: "project", name: "name").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_pubsub_subscription_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Cloud Pub/Sub API](https://console.cloud.google.com/apis/library/pubsub.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_pubsub_subscriptions.md ================================================ +++ title = "google_pubsub_subscriptions resource" draft = false [menu.gcp] title = "google_pubsub_subscriptions" identifier = "inspec/resources/gcp/google_pubsub_subscriptions resource" parent = "inspec/resources/gcp" +++ Use the `google_pubsub_subscriptions` InSpec audit resource to to test a Google Cloud Subscription resource. ## Examples ```ruby describe google_pubsub_subscriptions(project: 'chef-gcp-inspec') do its('count') { should be >= 1 } end google_pubsub_subscriptions(project: 'chef-gcp-inspec').names.each do |subscription_name| describe google_pubsub_subscription(project: 'chef-gcp-inspec', name: subscription_name) do it { should exist } end end ``` ## Properties Properties that can be accessed from the `google_pubsub_subscriptions` resource: See [google_pubsub_subscription](google_pubsub_subscription) for more detailed information. * `names`: an array of `google_pubsub_subscription` name * `topics`: an array of `google_pubsub_subscription` topic * `labels`: an array of `google_pubsub_subscription` labels * `push_configs`: an array of `google_pubsub_subscription` push_config * `ack_deadline_seconds`: an array of `google_pubsub_subscription` ack_deadline_seconds * `message_retention_durations`: an array of `google_pubsub_subscription` message_retention_duration * `retain_acked_messages`: an array of `google_pubsub_subscription` retain_acked_messages * `expiration_policies`: an array of `google_pubsub_subscription` expiration_policy * `filters`: an array of `google_pubsub_subscription` filter * `dead_letter_policies`: an array of `google_pubsub_subscription` dead_letter_policy * `retry_policies`: an array of `google_pubsub_subscription` retry_policy * `enable_message_orderings`: an array of `google_pubsub_subscription` enable_message_ordering ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Pub/Sub API](https://console.cloud.google.com/apis/library/pubsub.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_pubsub_topic.md ================================================ +++ title = "google_pubsub_topic resource" draft = false [menu.gcp] title = "google_pubsub_topic" identifier = "inspec/resources/gcp/google_pubsub_topic resource" parent = "inspec/resources/gcp" +++ Use the `google_pubsub_topic` InSpec audit resource to to test a Google Cloud Topic resource. ## Examples ```ruby describe google_pubsub_topic(project: 'chef-gcp-inspec', name: 'inspec-gcp-topic') do it { should exist } end describe google_pubsub_topic(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_pubsub_topic` resource: * `name`: Name of the topic. * `kms_key_name`: The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. Your project's PubSub service account (`service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com`) must have `roles/cloudkms.cryptoKeyEncrypterDecrypter` to use this feature. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*` * `labels`: A set of key/value label pairs to assign to this Topic. * `message_storage_policy`: Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. * `allowed_persistence_regions`: A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration. ## GCP permissions Ensure the [Cloud Pub/Sub API](https://console.cloud.google.com/apis/library/pubsub.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_pubsub_topic_iam_binding.md ================================================ +++ title = "google_pubsub_topic_iam_binding resource" draft = false [menu.gcp] title = "google_pubsub_topic_iam_binding" identifier = "inspec/resources/gcp/google_pubsub_topic_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_pubsub_topic_iam_binding` is used to test a Google Topic Iam Bindings ## Examples ```ruby describe google_pubsub_topic_iam_binding(project: "project", name: "name", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_pubsub_topic_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Cloud Pub/Sub API](https://console.cloud.google.com/apis/library/pubsub.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_pubsub_topic_iam_policy.md ================================================ +++ title = "google_pubsub_topic_iam_policy resource" draft = false [menu.gcp] title = "google_pubsub_topic_iam_policy" identifier = "inspec/resources/gcp/google_pubsub_topic_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_pubsub_topic_iam_policy` is used to test a Google Topic Iam Policy resource. ## Examples ```ruby describe google_pubsub_topic_iam_policy(project: "project", name: "name") do it { should exist } end google_pubsub_topic_iam_policy(project: "project", name: "name").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_pubsub_topic_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Cloud Pub/Sub API](https://console.cloud.google.com/apis/library/pubsub.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_pubsub_topics.md ================================================ +++ title = "google_pubsub_topics resource" draft = false [menu.gcp] title = "google_pubsub_topics" identifier = "inspec/resources/gcp/google_pubsub_topics resource" parent = "inspec/resources/gcp" +++ Use the `google_pubsub_topics` InSpec audit resource to to test a Google Cloud Topic resource. ## Examples ```ruby describe google_pubsub_topics(project: 'chef-gcp-inspec') do it { should exist } its('names') { should include 'inspec-gcp-topic' } its('count') { should be >=1 } end describe.one do google_pubsub_topics(project: 'chef-gcp-inspec').names.each do |topic_name| describe google_pubsub_topic(project: 'chef-gcp-inspec', name: topic_name) do it { should exist } end end end ``` ## Properties Properties that can be accessed from the `google_pubsub_topics` resource: See [google_pubsub_topic](google_pubsub_topic) for more detailed information. * `names`: an array of `google_pubsub_topic` name * `kms_key_names`: an array of `google_pubsub_topic` kms_key_name * `labels`: an array of `google_pubsub_topic` labels * `message_storage_policies`: an array of `google_pubsub_topic` message_storage_policy ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Pub/Sub API](https://console.cloud.google.com/apis/library/pubsub.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_redis_instance.md ================================================ +++ title = "google_redis_instance resource" draft = false [menu.gcp] title = "google_redis_instance" identifier = "inspec/resources/gcp/google_redis_instance resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_redis_instance` is used to test a Google Instance resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_redis_instance(project: 'chef-gcp-inspec', region: 'us-central1', name: 'my-redis-cache') do it { should exist } its('tier') { should cmp 'STANDARD_HA' } its('memory_size_gb') { should cmp '1' } its('alternative_location_id') { should cmp 'us-central1-f' } its('redis_version') { should cmp 'REDIS_3_2' } its('display_name') { should cmp 'InSpec test instance' } its('reserved_ip_range') { should cmp '192.168.0.0/29' } its('labels') { should include('key' => 'value') } end describe google_redis_instance(project: 'chef-gcp-inspec', region: 'us-central1', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_redis_instance` resource: * `alternative_location_id`: Only applicable to STANDARD_HA tier which protects the instance against zonal failures by provisioning it across two zones. If provided, it must be a different zone from the one provided in [locationId]. * `auth_enabled`: Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. * `authorized_network`: The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. * `connect_mode`: The connection mode of the Redis instance. Possible values: * DIRECT_PEERING * PRIVATE_SERVICE_ACCESS * `create_time`: The time the instance was created in RFC3339 UTC "Zulu" format, accurate to nanoseconds. * `current_location_id`: The current zone where the Redis endpoint is placed. For Basic Tier instances, this will always be the same as the [locationId] provided by the user at creation time. For Standard Tier instances, this can be either [locationId] or [alternativeLocationId] and can change after a failover event. * `display_name`: An arbitrary and optional user-provided name for the instance. * `host`: Hostname or IP address of the exposed Redis endpoint used by clients to connect to the service. * `labels`: Resource labels to represent user provided metadata. * `redis_configs`: Redis configuration parameters, according to http://redis.io/topics/config. Please check Memorystore documentation for the list of supported parameters: https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs * `location_id`: The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId]. * `name`: The ID of the instance or a fully qualified identifier for the instance. * `memory_size_gb`: Redis memory size in GiB. * `port`: The port number of the exposed Redis endpoint. * `persistence_iam_identity`: Output only. Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is "serviceAccount:". The value may change over time for a given instance so should be checked before each import/export operation. * `redis_version`: The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: - REDIS_5_0 for Redis 5.0 compatibility - REDIS_4_0 for Redis 4.0 compatibility - REDIS_3_2 for Redis 3.2 compatibility * `reserved_ip_range`: The CIDR range of internal addresses that are reserved for this instance. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique and non-overlapping with existing subnets in an authorized network. * `tier`: The service tier of the instance. Must be one of these values: - BASIC: standalone instance - STANDARD_HA: highly available primary/replica instances Possible values: * BASIC * STANDARD_HA * `transit_encryption_mode`: (Beta only) The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. - SERVER_AUTHENTICATION: Client to Server traffic encryption enabled with server authentcation Possible values: * SERVER_AUTHENTICATION * DISABLED * `server_ca_certs`: (Beta only) List of server CA certificates for the instance. * `serial_number`: Serial number, as extracted from the certificate. * `cert`: Serial number, as extracted from the certificate. * `create_time`: The time when the certificate was created. * `expire_time`: The time when the certificate expires. * `sha1_fingerprint`: Sha1 Fingerprint of the certificate. * `region`: The name of the Redis region of the instance. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_redis_instances.md ================================================ +++ title = "google_redis_instances resource" draft = false [menu.gcp] title = "google_redis_instances" identifier = "inspec/resources/gcp/google_redis_instances resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_redis_instances` is used to test a Google Instance resource ## Beta Resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource. ## Examples ```ruby describe google_redis_instances(project: 'chef-gcp-inspec', region: 'us-central1') do its('tiers') { should include 'STANDARD_HA' } its('memory_size_gbs') { should include '1' } its('alternative_location_ids') { should include 'us-central1-f' } its('redis_versions') { should include 'REDIS_3_2' } its('display_names') { should include 'InSpec test instance' } its('reserved_ip_ranges') { should include '192.168.0.0/29' } end ``` ## Properties Properties that can be accessed from the `google_redis_instances` resource: See [google_redis_instance](google_redis_instance) for more detailed information. * `alternative_location_ids`: an array of `google_redis_instance` alternative_location_id * `auth_enableds`: an array of `google_redis_instance` auth_enabled * `authorized_networks`: an array of `google_redis_instance` authorized_network * `connect_modes`: an array of `google_redis_instance` connect_mode * `create_times`: an array of `google_redis_instance` create_time * `current_location_ids`: an array of `google_redis_instance` current_location_id * `display_names`: an array of `google_redis_instance` display_name * `hosts`: an array of `google_redis_instance` host * `labels`: an array of `google_redis_instance` labels * `redis_configs`: an array of `google_redis_instance` redis_configs * `location_ids`: an array of `google_redis_instance` location_id * `names`: an array of `google_redis_instance` name * `memory_size_gbs`: an array of `google_redis_instance` memory_size_gb * `ports`: an array of `google_redis_instance` port * `persistence_iam_identities`: an array of `google_redis_instance` persistence_iam_identity * `redis_versions`: an array of `google_redis_instance` redis_version * `reserved_ip_ranges`: an array of `google_redis_instance` reserved_ip_range * `tiers`: an array of `google_redis_instance` tier * `transit_encryption_modes`: (Beta only) an array of `google_redis_instance` transit_encryption_mode * `server_ca_certs`: (Beta only) an array of `google_redis_instance` server_ca_certs * `regions`: an array of `google_redis_instance` region ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_resourcemanager_folder.md ================================================ +++ title = "google_resourcemanager_folder resource" draft = false [menu.gcp] title = "google_resourcemanager_folder" identifier = "inspec/resources/gcp/google_resourcemanager_folder resource" parent = "inspec/resources/gcp" +++ Use the `google_resourcemanager_folder` InSpec audit resource to to test a Google Cloud Folder resource. ## Examples ```ruby describe.one do google_resourcemanager_folders(parent: 'organizations/12345').names.each do |name| describe google_resourcemanager_folder(name: name) do it { should exist } its('display_name') { should eq 'inspec-gcp-folder' } end end end ``` ## Properties Properties that can be accessed from the `google_resourcemanager_folder` resource: * `name`: The resource name of the Folder. Its format is folders/{folder_id}, for example: "folders/1234". * `lifecycle_state`: The lifecycle state of the folder. Updates to the lifecycleState must be performed via folders.delete and folders.undelete. Possible values: * LIFECYCLE_STATE_UNSPECIFIED * ACTIVE * DELETE_REQUESTED * `create_time`: Time of creation * `parent`: The Folder’s parent's resource name. Updates to the folder's parent must be performed via folders.move. * `display_name`: The folder’s display name. A folder’s display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: `[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?`. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_resourcemanager_folder_iam_binding.md ================================================ +++ title = "google_resourcemanager_folder_iam_binding resource" draft = false [menu.gcp] title = "google_resourcemanager_folder_iam_binding" identifier = "inspec/resources/gcp/google_resourcemanager_folder_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_resourcemanager_folder_iam_binding` is used to test a Google Folder Iam Bindings ## Examples ```ruby describe google_resourcemanager_folder_iam_binding(name: "name", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_resourcemanager_folder_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_resourcemanager_folder_iam_policy.md ================================================ +++ title = "google_resourcemanager_folder_iam_policy resource" draft = false [menu.gcp] title = "google_resourcemanager_folder_iam_policy" identifier = "inspec/resources/gcp/google_resourcemanager_folder_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_resourcemanager_folder_iam_policy` is used to test a Google Folder Iam Policy resource. ## Examples ```ruby describe google_resourcemanager_folder_iam_policy(name: "name") do it { should exist } end google_resourcemanager_folder_iam_policy(name: "name").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_resourcemanager_folder_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_resourcemanager_folders.md ================================================ +++ title = "google_resourcemanager_folders resource" draft = false [menu.gcp] title = "google_resourcemanager_folders" identifier = "inspec/resources/gcp/google_resourcemanager_folders resource" parent = "inspec/resources/gcp" +++ Use the `google_resourcemanager_folders` InSpec audit resource to to test a Google Cloud Folder resource. ## Examples ```ruby describe.one do google_resourcemanager_folders(parent: 'organizations/12345').display_names.each do |display_name| describe display_name do it { should eq 'inspec-gcp-folder' } end end end ``` ## Properties Properties that can be accessed from the `google_resourcemanager_folders` resource: See [google_resourcemanager_folder](google_resourcemanager_folder) for more detailed information. * `names`: an array of `google_resourcemanager_folder` name * `lifecycle_states`: an array of `google_resourcemanager_folder` lifecycle_state * `create_times`: an array of `google_resourcemanager_folder` create_time * `parents`: an array of `google_resourcemanager_folder` parent * `display_names`: an array of `google_resourcemanager_folder` display_name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_resourcemanager_organization_policy.md ================================================ +++ title = "google_resourcemanager_organization_policy resource" draft = false [menu.gcp] title = "google_resourcemanager_organization_policy" identifier = "inspec/resources/gcp/google_resourcemanager_organization_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_resourcemanager_organization_policy` is used to test organization policy constraints. More information can be found here [Organization Policy Constraints](https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints) ## Examples ```ruby describe google_resourcemanager_organization_policy(organization_name: "organizations/123456789", constraint: "constraints/compute.disableSerialPortAccess") do it { should exist } its('constraint') { should eq 'constraints/compute.disableSerialPortAccess' } its('boolean_policy.enforced') { should be true } end ``` ## Properties Properties that can be accessed from the `google_resourcemanager_organization_policy` resource: * `version`: The version of the policy. * `constraint`: The name of the constraint the policy is configuring. * `update_time`: The time stamp the policy was previously updated. * `list_policy`: List of values either allowed or disallowed * `allowed_values`: List of values allowed * `denied_values`: List of values denied * `boolean_policy`: Used to specify how a boolean policy will behave * `enforced`: If true then the policy is enforced. If false then any configuration is acceptable ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_resourcemanager_project_iam_binding.md ================================================ +++ title = "google_resourcemanager_project_iam_binding resource" draft = false [menu.gcp] title = "google_resourcemanager_project_iam_binding" identifier = "inspec/resources/gcp/google_resourcemanager_project_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_resourcemanager_project_iam_binding` is used to test a Google Project Iam Bindings ## Examples ```ruby describe google_resourcemanager_project_iam_binding(project_id: "projectId", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_resourcemanager_project_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_resourcemanager_project_iam_policy.md ================================================ +++ title = "google_resourcemanager_project_iam_policy resource" draft = false [menu.gcp] title = "google_resourcemanager_project_iam_policy" identifier = "inspec/resources/gcp/google_resourcemanager_project_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_resourcemanager_project_iam_policy` is used to test a Google Project Iam Policy resource. ## Examples ```ruby describe google_resourcemanager_project_iam_policy(project_id: "projectId") do it { should exist } end google_resourcemanager_project_iam_policy(project_id: "projectId").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_resourcemanager_project_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_run_job.md ================================================ +++ title = "google_run_job resource" draft = false [menu.gcp] title = "google_run_job" identifier = "inspec/resources/gcp/google_run_job resource" parent = "inspec/resources/gcp" +++ Use the `google_run_job` InSpec audit resource to test the properties of a Google Cloud Job resource. ## Examples ```ruby describe google_run_job(name: 'projects/{project}/locations/{location}/jobs/{value_name}') do it { should exist } its('name') { should cmp 'value_name' } its('uid') { should cmp 'value_uid' } its('generation') { should cmp 'value_generation' } its('create_time') { should cmp 'value_createtime' } its('update_time') { should cmp 'value_updatetime' } its('delete_time') { should cmp 'value_deletetime' } its('expire_time') { should cmp 'value_expiretime' } its('creator') { should cmp 'value_creator' } its('last_modifier') { should cmp 'value_lastmodifier' } its('client') { should cmp 'value_client' } its('client_version') { should cmp 'value_clientversion' } its('launch_stage') { should cmp 'value_launchstage' } its('observed_generation') { should cmp 'value_observedgeneration' } its('start_execution_token') { should cmp 'value_startexecutiontoken' } its('run_execution_token') { should cmp 'value_runexecutiontoken' } its('etag') { should cmp 'value_etag' } end describe google_run_job(name: "projects/{project}/locations/{location}/jobs/{does_not_exit}") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_run_job` resource: ## Properties Properties that can be accessed from the `google_run_job` resource: * `name`: The fully qualified name of this Job. Format: projects/{project}/locations/{location}/jobs/{job} * `uid`: Output only. Server assigned unique identifier for the Execution. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. * `generation`: Output only. A number that monotonically increases every time the user modifies the desired state. * `labels`: Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Job. * `additional_properties`: * `annotations`: Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected on new resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes annotations' namespacing, limits, and rules. * `additional_properties`: * `create_time`: Output only. The creation time. * `update_time`: Output only. The last-modified time. * `delete_time`: Output only. The deletion time. It is only populated as a response to a Delete request. * `expire_time`: Output only. For a deleted resource, the time after which it will be permamently deleted. * `creator`: Output only. Email address of the authenticated creator. * `last_modifier`: Output only. Email address of the last authenticated modifier. * `client`: Arbitrary identifier for the API client. * `client_version`: Arbitrary version identifier for the API client. * `launch_stage`: The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: * LAUNCH_STAGE_UNSPECIFIED * UNIMPLEMENTED * PRELAUNCH * EARLY_ACCESS * ALPHA * BETA * GA * DEPRECATED * `binary_authorization`: Settings for Binary Authorization feature. * `use_default`: Optional. If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled. * `policy`: Optional. The path to a binary authorization policy. Format: projects/{project}/platforms/cloudRun/{policy-name} * `breakglass_justification`: Optional. If present, indicates to use Breakglass using this justification. If use_default is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass * `template`: ExecutionTemplate describes the data an execution should have when created from a template. * `labels`: Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 ExecutionTemplate. * `additional_properties`: * `annotations`: Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 ExecutionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules. * `additional_properties`: * `parallelism`: Specifies the maximum desired number of tasks the execution should run at given time. Must be <= task_count. When the job is run, if this field is 0 or unset, the maximum possible value will be used for that execution. The actual number of tasks running in steady state will be less than this number when there are fewer tasks waiting to be completed remaining, i.e. when the work left to do is less than max parallelism. * `task_count`: Specifies the desired number of tasks the execution should run. Setting to 1 means that parallelism is limited to 1 and the success of that task signals the success of the execution. Defaults to 1. * `template`: TaskTemplate describes the data a task should have when created from a template. * `containers`: Holds the single container that defines the unit of execution for this task. * `name`: Name of the container specified as a DNS_LABEL (RFC 1123). * `image`: Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed. * `command`: Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. * `args`: Arguments to the entrypoint. The docker image's CMD is used if this is not provided. * `env`: List of environment variables to set in the container. * `name`: Required. Name of the environment variable. Must not exceed 32768 characters. * `value`: Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "", and the maximum length is 32768 bytes. * `value_source`: EnvVarSource represents a source for the value of an EnvVar. * `secret_key_ref`: SecretEnvVarSource represents a source for the value of an EnvVar. * `secret`: Required. The name of the secret in Cloud Secret Manager. Format: {secret_name} if the secret is in the same project. projects/{project}/secrets/{secret_name} if the secret is in a different project. * `version`: The Cloud Secret Manager secret version. Can be 'latest' for the latest version, an integer for a specific version, or a version alias. * `resources`: ResourceRequirements describes the compute resource requirements. * `limits`: Only `memory` and `cpu` keys in the map are supported. Notes: * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu. * For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits * `additional_properties`: * `cpu_idle`: Determines whether CPU is only allocated during requests (true by default). However, if ResourceRequirements is set, the caller must explicitly set this field to true to preserve the default behavior. * `startup_cpu_boost`: Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency. * `ports`: List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on. * `name`: If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c". * `container_port`: Port number the container listens on. This must be a valid TCP port number, 0 < container_port < 65536. * `volume_mounts`: Volume to mount into the container's filesystem. * `name`: Required. This must match the Name of a Volume. * `mount_path`: Required. Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be `/cloudsql`. All instances defined in the Volume will be available as `/cloudsql/[instance]`. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run * `working_dir`: Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. * `liveness_probe`: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. * `initial_delay_seconds`: Optional. Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. * `timeout_seconds`: Optional. Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. * `period_seconds`: Optional. How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds. * `failure_threshold`: Optional. Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. * `http_get`: HTTPGetAction describes an action based on HTTP Get requests. * `path`: Optional. Path to access on the HTTP server. Defaults to '/'. * `http_headers`: Optional. Custom headers to set in the request. HTTP allows repeated headers. * `name`: Required. The header field name * `value`: Optional. The header field value * `port`: Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `tcp_socket`: TCPSocketAction describes an action based on opening a socket * `port`: Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `grpc`: GRPCAction describes an action involving a GRPC port. * `port`: Optional. Port number of the gRPC service. Number must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `service`: Optional. Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this is not specified, the default behavior is defined by gRPC. * `startup_probe`: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. * `initial_delay_seconds`: Optional. Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. * `timeout_seconds`: Optional. Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. * `period_seconds`: Optional. How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds. * `failure_threshold`: Optional. Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. * `http_get`: HTTPGetAction describes an action based on HTTP Get requests. * `path`: Optional. Path to access on the HTTP server. Defaults to '/'. * `http_headers`: Optional. Custom headers to set in the request. HTTP allows repeated headers. * `name`: Required. The header field name * `value`: Optional. The header field value * `port`: Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `tcp_socket`: TCPSocketAction describes an action based on opening a socket * `port`: Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `grpc`: GRPCAction describes an action involving a GRPC port. * `port`: Optional. Port number of the gRPC service. Number must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `service`: Optional. Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this is not specified, the default behavior is defined by gRPC. * `depends_on`: Names of the containers that must start before this container. * `volumes`: Optional. A list of Volumes to make available to containers. * `name`: Required. Volume's name. * `secret`: The secret's value will be presented as the content of a file whose name is defined in the item path. If no items are defined, the name of the file is the secret. * `secret`: Required. The name of the secret in Cloud Secret Manager. Format: {secret} if the secret is in the same project. projects/{project}/secrets/{secret} if the secret is in a different project. * `items`: If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a path and a version. * `path`: Required. The relative path of the secret in the container. * `version`: The Cloud Secret Manager secret version. Can be 'latest' for the latest value, or an integer or a secret alias for a specific version. * `mode`: Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. * `default_mode`: Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. This might be in conflict with other options that affect the file mode, like fsGroup, and as a result, other mode bits could be set. * `cloud_sql_instance`: Represents a set of Cloud SQL instances. Each one will be available under /cloudsql/[instance]. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. * `instances`: The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance} * `empty_dir`: In memory (tmpfs) ephemeral storage. It is ephemeral in the sense that when the sandbox is taken down, the data is destroyed with it (it does not persist across sandbox runs). * `medium`: The medium on which the data is stored. Acceptable values today is only MEMORY or none. When none, the default will currently be backed by memory but could change over time. +optional Possible values: * MEDIUM_UNSPECIFIED * MEMORY * `size_limit`: Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers. The default is nil which means that the limit is undefined. More info: https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. Info in Kubernetes: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir * `nfs`: Represents an NFS mount. * `server`: Hostname or IP address of the NFS server * `path`: Path that is exported by the NFS server. * `read_only`: If true, the volume will be mounted as read only for all mounts. * `gcs`: Represents a volume backed by a Cloud Storage bucket using Cloud Storage FUSE. * `bucket`: Cloud Storage Bucket name. * `read_only`: If true, the volume will be mounted as read only for all mounts. * `max_retries`: Number of retries allowed per Task, before marking this Task failed. Defaults to 3. * `timeout`: Optional. Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout. Defaults to 600 seconds. * `service_account`: Optional. Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account. * `execution_environment`: Optional. The execution environment being used to host this Task. Possible values: * EXECUTION_ENVIRONMENT_UNSPECIFIED * EXECUTION_ENVIRONMENT_GEN1 * EXECUTION_ENVIRONMENT_GEN2 * `encryption_key`: A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek * `vpc_access`: VPC Access settings. For more information on sending traffic to a VPC network, visit https://cloud.google.com/run/docs/configuring/connecting-vpc. * `connector`: VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}, where {project} can be project id or number. For more information on sending traffic to a VPC network via a connector, visit https://cloud.google.com/run/docs/configuring/vpc-connectors. * `egress`: Optional. Traffic VPC egress settings. If not provided, it defaults to PRIVATE_RANGES_ONLY. Possible values: * VPC_EGRESS_UNSPECIFIED * ALL_TRAFFIC * PRIVATE_RANGES_ONLY * `network_interfaces`: Optional. Direct VPC egress settings. Currently only single network interface is supported. * `network`: Optional. The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork. * `subnetwork`: Optional. The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used. * `tags`: Optional. Network tags applied to this Cloud Run resource. * `observed_generation`: Output only. The generation of this Job. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. * `terminal_condition`: Defines a status condition for a resource. * `type`: type is used to communicate the status of the reconciliation process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting Types common to all resources include: * "Ready": True when the Resource is ready. * `state`: State of the condition. Possible values: * STATE_UNSPECIFIED * CONDITION_PENDING * CONDITION_RECONCILING * CONDITION_FAILED * CONDITION_SUCCEEDED * `message`: Human readable message indicating details about the current status. * `last_transition_time`: Last time the condition transitioned from one status to another. * `severity`: How to interpret failures of this condition, one of Error, Warning, Info Possible values: * SEVERITY_UNSPECIFIED * ERROR * WARNING * INFO * `reason`: Output only. A common (service-level) reason for this condition. Possible values: * COMMON_REASON_UNDEFINED * UNKNOWN * REVISION_FAILED * PROGRESS_DEADLINE_EXCEEDED * CONTAINER_MISSING * CONTAINER_PERMISSION_DENIED * CONTAINER_IMAGE_UNAUTHORIZED * CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED * ENCRYPTION_KEY_PERMISSION_DENIED * ENCRYPTION_KEY_CHECK_FAILED * SECRETS_ACCESS_CHECK_FAILED * WAITING_FOR_OPERATION * IMMEDIATE_RETRY * POSTPONED_RETRY * INTERNAL * `revision_reason`: Output only. A reason for the revision condition. Possible values: * REVISION_REASON_UNDEFINED * PENDING * RESERVE * RETIRED * RETIRING * RECREATING * HEALTH_CHECK_CONTAINER_ERROR * CUSTOMIZED_PATH_RESPONSE_PENDING * MIN_INSTANCES_NOT_PROVISIONED * ACTIVE_REVISION_LIMIT_REACHED * NO_DEPLOYMENT * HEALTH_CHECK_SKIPPED * MIN_INSTANCES_WARMING * `execution_reason`: Output only. A reason for the execution condition. Possible values: * EXECUTION_REASON_UNDEFINED * JOB_STATUS_SERVICE_POLLING_ERROR * NON_ZERO_EXIT_CODE * CANCELLED * CANCELLING * DELETED * `conditions`: Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Job does not reach its desired state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. * `type`: type is used to communicate the status of the reconciliation process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting Types common to all resources include: * "Ready": True when the Resource is ready. * `state`: State of the condition. Possible values: * STATE_UNSPECIFIED * CONDITION_PENDING * CONDITION_RECONCILING * CONDITION_FAILED * CONDITION_SUCCEEDED * `message`: Human readable message indicating details about the current status. * `last_transition_time`: Last time the condition transitioned from one status to another. * `severity`: How to interpret failures of this condition, one of Error, Warning, Info Possible values: * SEVERITY_UNSPECIFIED * ERROR * WARNING * INFO * `reason`: Output only. A common (service-level) reason for this condition. Possible values: * COMMON_REASON_UNDEFINED * UNKNOWN * REVISION_FAILED * PROGRESS_DEADLINE_EXCEEDED * CONTAINER_MISSING * CONTAINER_PERMISSION_DENIED * CONTAINER_IMAGE_UNAUTHORIZED * CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED * ENCRYPTION_KEY_PERMISSION_DENIED * ENCRYPTION_KEY_CHECK_FAILED * SECRETS_ACCESS_CHECK_FAILED * WAITING_FOR_OPERATION * IMMEDIATE_RETRY * POSTPONED_RETRY * INTERNAL * `revision_reason`: Output only. A reason for the revision condition. Possible values: * REVISION_REASON_UNDEFINED * PENDING * RESERVE * RETIRED * RETIRING * RECREATING * HEALTH_CHECK_CONTAINER_ERROR * CUSTOMIZED_PATH_RESPONSE_PENDING * MIN_INSTANCES_NOT_PROVISIONED * ACTIVE_REVISION_LIMIT_REACHED * NO_DEPLOYMENT * HEALTH_CHECK_SKIPPED * MIN_INSTANCES_WARMING * `execution_reason`: Output only. A reason for the execution condition. Possible values: * EXECUTION_REASON_UNDEFINED * JOB_STATUS_SERVICE_POLLING_ERROR * NON_ZERO_EXIT_CODE * CANCELLED * CANCELLING * DELETED * `execution_count`: Output only. Number of executions created for this job. * `latest_created_execution`: Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status. * `name`: Name of the execution. * `create_time`: Creation timestamp of the execution. * `completion_time`: Creation timestamp of the execution. * `delete_time`: The deletion time of the execution. It is only populated as a response to a Delete request. * `completion_status`: Status for the execution completion. Possible values: * COMPLETION_STATUS_UNSPECIFIED * EXECUTION_SUCCEEDED * EXECUTION_FAILED * EXECUTION_RUNNING * EXECUTION_PENDING * EXECUTION_CANCELLED * `reconciling`: Output only. Returns true if the Job is currently being acted upon by the system to bring it into the desired state. When a new Job is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Job to the desired state. This process is called reconciliation. While reconciliation is in process, `observed_generation` and `latest_succeeded_execution`, will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the state matches the Job, or there was an error, and reconciliation failed. This state can be found in `terminal_condition.state`. If reconciliation succeeded, the following fields will match: `observed_generation` and `generation`, `latest_succeeded_execution` and `latest_created_execution`. If reconciliation failed, `observed_generation` and `latest_succeeded_execution` will have the state of the last succeeded execution or empty for newly created Job. Additional information on the failure can be found in `terminal_condition` and `conditions`. * `satisfies_pzs`: Output only. Reserved for future use. * `start_execution_token`: A unique string used as a suffix creating a new execution. The Job will become ready when the execution is successfully started. The sum of job name and token length must be fewer than 63 characters. * `run_execution_token`: A unique string used as a suffix for creating a new execution. The Job will become ready when the execution is successfully completed. The sum of job name and token length must be fewer than 63 characters. * `etag`: Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. ## GCP permissions Ensure the [https://run.googleapis.com/](https://console.cloud.google.com/apis/library/run.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_run_jobs.md ================================================ +++ title = "google_run_jobs resource" draft = false [menu.gcp] title = "google_run_jobs" identifier = "inspec/resources/gcp/google_run_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_run_jobs` InSpec audit resource to test the properties of a Google Cloud Job resource. ## Examples ```ruby describe google_run_jobs(parent: 'projects/{project}/locations/{location}') do it { should exist } its('names') { should include 'value_name' } its('creators') { should include 'value_creator' } end ``` ## Parameters Parameters that can be accessed from the `google_run_jobs` resource: See [google_run_job](google_run_job) for more detailed information. * `names`: an array of `google_run_job` name * `uids`: an array of `google_run_job` uid * `generations`: an array of `google_run_job` generation * `labels`: an array of `google_run_job` labels * `annotations`: an array of `google_run_job` annotations * `create_times`: an array of `google_run_job` create_time * `update_times`: an array of `google_run_job` update_time * `delete_times`: an array of `google_run_job` delete_time * `expire_times`: an array of `google_run_job` expire_time * `creators`: an array of `google_run_job` creator * `last_modifiers`: an array of `google_run_job` last_modifier * `clients`: an array of `google_run_job` client * `client_versions`: an array of `google_run_job` client_version * `launch_stages`: an array of `google_run_job` launch_stage * `binary_authorizations`: an array of `google_run_job` binary_authorization * `templates`: an array of `google_run_job` template * `observed_generations`: an array of `google_run_job` observed_generation * `terminal_conditions`: an array of `google_run_job` terminal_condition * `conditions`: an array of `google_run_job` conditions * `execution_counts`: an array of `google_run_job` execution_count * `latest_created_executions`: an array of `google_run_job` latest_created_execution * `reconcilings`: an array of `google_run_job` reconciling * `satisfies_pzs`: an array of `google_run_job` satisfies_pzs * `start_execution_tokens`: an array of `google_run_job` start_execution_token * `run_execution_tokens`: an array of `google_run_job` run_execution_token * `etags`: an array of `google_run_job` etag ## Properties Properties that can be accessed from the `google_run_jobs` resource: See [google_run_job](google_run_job) for more detailed information. * `names`: an array of `google_run_job` name * `uids`: an array of `google_run_job` uid * `generations`: an array of `google_run_job` generation * `labels`: an array of `google_run_job` labels * `annotations`: an array of `google_run_job` annotations * `create_times`: an array of `google_run_job` create_time * `update_times`: an array of `google_run_job` update_time * `delete_times`: an array of `google_run_job` delete_time * `expire_times`: an array of `google_run_job` expire_time * `creators`: an array of `google_run_job` creator * `last_modifiers`: an array of `google_run_job` last_modifier * `clients`: an array of `google_run_job` client * `client_versions`: an array of `google_run_job` client_version * `launch_stages`: an array of `google_run_job` launch_stage * `binary_authorizations`: an array of `google_run_job` binary_authorization * `templates`: an array of `google_run_job` template * `observed_generations`: an array of `google_run_job` observed_generation * `terminal_conditions`: an array of `google_run_job` terminal_condition * `conditions`: an array of `google_run_job` conditions * `execution_counts`: an array of `google_run_job` execution_count * `latest_created_executions`: an array of `google_run_job` latest_created_execution * `reconcilings`: an array of `google_run_job` reconciling * `satisfies_pzs`: an array of `google_run_job` satisfies_pzs * `start_execution_tokens`: an array of `google_run_job` start_execution_token * `run_execution_tokens`: an array of `google_run_job` run_execution_token * `etags`: an array of `google_run_job` etag ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://run.googleapis.com/](https://console.cloud.google.com/apis/library/run.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_run_service.md ================================================ +++ title = "google_run_service resource" draft = false [menu.gcp] title = "google_run_service" identifier = "inspec/resources/gcp/google_run_service resource" parent = "inspec/resources/gcp" +++ Use the `google_run_service` InSpec audit resource to test the properties of a Google Cloud Service resource. ## Examples ```ruby describe google_run_service(name: 'value_name') do it { should exist } its('name') { should cmp value_name } its('uri') { should cmp value_uri } its('generation') { should cmp value_generation } its('create_time') { should cmp value_create_time } its('update_time') { should cmp value_update_time } its('creator') { should cmp value_creator } its('ingress') { should cmp value_ingress } end describe google_run_service(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters Parameters that can be accessed from the `google_run_service` resource: ## Properties Properties that can be accessed from the `google_run_service` resource: * `name`: The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service_id. Format: projects/{project}/locations/{location}/services/{service_id} * `description`: User-provided description of the Service. This field currently has a 512-character limit. * `uid`: Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. * `generation`: Output only. A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`. * `labels`: Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. * `additional_properties`: * `annotations`: Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. * `additional_properties`: * `create_time`: Output only. The creation time. * `update_time`: Output only. The last-modified time. * `delete_time`: Output only. The deletion time. It is only populated as a response to a Delete request. * `expire_time`: Output only. For a deleted resource, the time after which it will be permamently deleted. * `creator`: Output only. Email address of the authenticated creator. * `last_modifier`: Output only. Email address of the last authenticated modifier. * `client`: Arbitrary identifier for the API client. * `client_version`: Arbitrary version identifier for the API client. * `ingress`: Optional. Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: * INGRESS_TRAFFIC_UNSPECIFIED * INGRESS_TRAFFIC_ALL * INGRESS_TRAFFIC_INTERNAL_ONLY * INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER * INGRESS_TRAFFIC_NONE * `launch_stage`: Optional. The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: * LAUNCH_STAGE_UNSPECIFIED * UNIMPLEMENTED * PRELAUNCH * EARLY_ACCESS * ALPHA * BETA * GA * DEPRECATED * `binary_authorization`: Settings for Binary Authorization feature. * `use_default`: Optional. If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled. * `policy`: Optional. The path to a binary authorization policy. Format: projects/{project}/platforms/cloudRun/{policy-name} * `breakglass_justification`: Optional. If present, indicates to use Breakglass using this justification. If use_default is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass * `template`: RevisionTemplate describes the data a revision should have when created from a template. * `revision`: Optional. The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name. * `labels`: Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 RevisionTemplate. * `additional_properties`: * `annotations`: Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules. * `additional_properties`: * `scaling`: Settings for revision-level scaling settings. * `min_instance_count`: Optional. Minimum number of serving instances that this resource should have. * `max_instance_count`: Optional. Maximum number of serving instances that this resource should have. * `vpc_access`: VPC Access settings. For more information on sending traffic to a VPC network, visit https://cloud.google.com/run/docs/configuring/connecting-vpc. * `connector`: VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}, where {project} can be project id or number. For more information on sending traffic to a VPC network via a connector, visit https://cloud.google.com/run/docs/configuring/vpc-connectors. * `egress`: Optional. Traffic VPC egress settings. If not provided, it defaults to PRIVATE_RANGES_ONLY. Possible values: * VPC_EGRESS_UNSPECIFIED * ALL_TRAFFIC * PRIVATE_RANGES_ONLY * `network_interfaces`: Optional. Direct VPC egress settings. Currently only single network interface is supported. * `network`: Optional. The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork. * `subnetwork`: Optional. The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used. * `tags`: Optional. Network tags applied to this Cloud Run resource. * `timeout`: Optional. Max allowed time for an instance to respond to a request. * `service_account`: Optional. Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project's default service account. * `containers`: Holds the single container that defines the unit of execution for this Revision. * `name`: Name of the container specified as a DNS_LABEL (RFC 1123). * `image`: Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed. * `command`: Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. * `args`: Arguments to the entrypoint. The docker image's CMD is used if this is not provided. * `env`: List of environment variables to set in the container. * `name`: Required. Name of the environment variable. Must not exceed 32768 characters. * `value`: Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "", and the maximum length is 32768 bytes. * `value_source`: EnvVarSource represents a source for the value of an EnvVar. * `secret_key_ref`: SecretEnvVarSource represents a source for the value of an EnvVar. * `secret`: Required. The name of the secret in Cloud Secret Manager. Format: {secret_name} if the secret is in the same project. projects/{project}/secrets/{secret_name} if the secret is in a different project. * `version`: The Cloud Secret Manager secret version. Can be 'latest' for the latest version, an integer for a specific version, or a version alias. * `resources`: ResourceRequirements describes the compute resource requirements. * `limits`: Only `memory` and `cpu` keys in the map are supported. Notes: * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu. * For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits * `additional_properties`: * `cpu_idle`: Determines whether CPU is only allocated during requests (true by default). However, if ResourceRequirements is set, the caller must explicitly set this field to true to preserve the default behavior. * `startup_cpu_boost`: Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency. * `ports`: List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on. * `name`: If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c". * `container_port`: Port number the container listens on. This must be a valid TCP port number, 0 < container_port < 65536. * `volume_mounts`: Volume to mount into the container's filesystem. * `name`: Required. This must match the Name of a Volume. * `mount_path`: Required. Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be `/cloudsql`. All instances defined in the Volume will be available as `/cloudsql/[instance]`. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run * `working_dir`: Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. * `liveness_probe`: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. * `initial_delay_seconds`: Optional. Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. * `timeout_seconds`: Optional. Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. * `period_seconds`: Optional. How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds. * `failure_threshold`: Optional. Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. * `http_get`: HTTPGetAction describes an action based on HTTP Get requests. * `path`: Optional. Path to access on the HTTP server. Defaults to '/'. * `http_headers`: Optional. Custom headers to set in the request. HTTP allows repeated headers. * `name`: Required. The header field name * `value`: Optional. The header field value * `port`: Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `tcp_socket`: TCPSocketAction describes an action based on opening a socket * `port`: Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `grpc`: GRPCAction describes an action involving a GRPC port. * `port`: Optional. Port number of the gRPC service. Number must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `service`: Optional. Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this is not specified, the default behavior is defined by gRPC. * `startup_probe`: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. * `initial_delay_seconds`: Optional. Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. * `timeout_seconds`: Optional. Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. * `period_seconds`: Optional. How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds. * `failure_threshold`: Optional. Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. * `http_get`: HTTPGetAction describes an action based on HTTP Get requests. * `path`: Optional. Path to access on the HTTP server. Defaults to '/'. * `http_headers`: Optional. Custom headers to set in the request. HTTP allows repeated headers. * `name`: Required. The header field name * `value`: Optional. The header field value * `port`: Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `tcp_socket`: TCPSocketAction describes an action based on opening a socket * `port`: Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `grpc`: GRPCAction describes an action involving a GRPC port. * `port`: Optional. Port number of the gRPC service. Number must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. * `service`: Optional. Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this is not specified, the default behavior is defined by gRPC. * `depends_on`: Names of the containers that must start before this container. * `volumes`: Optional. A list of Volumes to make available to containers. * `name`: Required. Volume's name. * `secret`: The secret's value will be presented as the content of a file whose name is defined in the item path. If no items are defined, the name of the file is the secret. * `secret`: Required. The name of the secret in Cloud Secret Manager. Format: {secret} if the secret is in the same project. projects/{project}/secrets/{secret} if the secret is in a different project. * `items`: If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a path and a version. * `path`: Required. The relative path of the secret in the container. * `version`: The Cloud Secret Manager secret version. Can be 'latest' for the latest value, or an integer or a secret alias for a specific version. * `mode`: Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. * `default_mode`: Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. This might be in conflict with other options that affect the file mode, like fsGroup, and as a result, other mode bits could be set. * `cloud_sql_instance`: Represents a set of Cloud SQL instances. Each one will be available under /cloudsql/[instance]. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. * `instances`: The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance} * `empty_dir`: In memory (tmpfs) ephemeral storage. It is ephemeral in the sense that when the sandbox is taken down, the data is destroyed with it (it does not persist across sandbox runs). * `medium`: The medium on which the data is stored. Acceptable values today is only MEMORY or none. When none, the default will currently be backed by memory but could change over time. +optional Possible values: * MEDIUM_UNSPECIFIED * MEMORY * `size_limit`: Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers. The default is nil which means that the limit is undefined. More info: https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. Info in Kubernetes: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir * `nfs`: Represents an NFS mount. * `server`: Hostname or IP address of the NFS server * `path`: Path that is exported by the NFS server. * `read_only`: If true, the volume will be mounted as read only for all mounts. * `gcs`: Represents a volume backed by a Cloud Storage bucket using Cloud Storage FUSE. * `bucket`: Cloud Storage Bucket name. * `read_only`: If true, the volume will be mounted as read only for all mounts. * `execution_environment`: Optional. The sandbox environment to host this Revision. Possible values: * EXECUTION_ENVIRONMENT_UNSPECIFIED * EXECUTION_ENVIRONMENT_GEN1 * EXECUTION_ENVIRONMENT_GEN2 * `encryption_key`: A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek * `max_instance_request_concurrency`: Optional. Sets the maximum number of requests that each serving instance can receive. If not specified or 0, defaults to 80 when requested CPU >= 1 and defaults to 1 when requested CPU < 1. * `session_affinity`: Optional. Enable session affinity. * `health_check_disabled`: Optional. Disables health checking containers during deployment. * `node_selector`: Hardware constraints configuration. * `accelerator`: Required. GPU accelerator type to attach to an instance. * `traffic`: Optional. Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest `Ready` Revision. * `type`: The allocation type for this traffic target. Possible values: * TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED * TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST * TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION * `revision`: Revision to which to send this portion of traffic, if traffic allocation is by revision. * `percent`: Specifies percent of the traffic to this Revision. This defaults to zero if unspecified. * `tag`: Indicates a string to be part of the URI to exclusively reference this target. * `scaling`: Scaling settings applied at the service level rather than at the revision level. * `min_instance_count`: Optional. total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. (BETA) * `default_uri_disabled`: Optional. Disables public resolution of the default URI of this service. * `custom_audiences`: One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences. * `observed_generation`: Output only. The generation of this Service currently serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`. * `terminal_condition`: Defines a status condition for a resource. * `type`: type is used to communicate the status of the reconciliation process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting Types common to all resources include: * "Ready": True when the Resource is ready. * `state`: State of the condition. Possible values: * STATE_UNSPECIFIED * CONDITION_PENDING * CONDITION_RECONCILING * CONDITION_FAILED * CONDITION_SUCCEEDED * `message`: Human readable message indicating details about the current status. * `last_transition_time`: Last time the condition transitioned from one status to another. * `severity`: How to interpret failures of this condition, one of Error, Warning, Info Possible values: * SEVERITY_UNSPECIFIED * ERROR * WARNING * INFO * `reason`: Output only. A common (service-level) reason for this condition. Possible values: * COMMON_REASON_UNDEFINED * UNKNOWN * REVISION_FAILED * PROGRESS_DEADLINE_EXCEEDED * CONTAINER_MISSING * CONTAINER_PERMISSION_DENIED * CONTAINER_IMAGE_UNAUTHORIZED * CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED * ENCRYPTION_KEY_PERMISSION_DENIED * ENCRYPTION_KEY_CHECK_FAILED * SECRETS_ACCESS_CHECK_FAILED * WAITING_FOR_OPERATION * IMMEDIATE_RETRY * POSTPONED_RETRY * INTERNAL * `revision_reason`: Output only. A reason for the revision condition. Possible values: * REVISION_REASON_UNDEFINED * PENDING * RESERVE * RETIRED * RETIRING * RECREATING * HEALTH_CHECK_CONTAINER_ERROR * CUSTOMIZED_PATH_RESPONSE_PENDING * MIN_INSTANCES_NOT_PROVISIONED * ACTIVE_REVISION_LIMIT_REACHED * NO_DEPLOYMENT * HEALTH_CHECK_SKIPPED * MIN_INSTANCES_WARMING * `execution_reason`: Output only. A reason for the execution condition. Possible values: * EXECUTION_REASON_UNDEFINED * JOB_STATUS_SERVICE_POLLING_ERROR * NON_ZERO_EXIT_CODE * CANCELLED * CANCELLING * DELETED * `conditions`: Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. * `type`: type is used to communicate the status of the reconciliation process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting Types common to all resources include: * "Ready": True when the Resource is ready. * `state`: State of the condition. Possible values: * STATE_UNSPECIFIED * CONDITION_PENDING * CONDITION_RECONCILING * CONDITION_FAILED * CONDITION_SUCCEEDED * `message`: Human readable message indicating details about the current status. * `last_transition_time`: Last time the condition transitioned from one status to another. * `severity`: How to interpret failures of this condition, one of Error, Warning, Info Possible values: * SEVERITY_UNSPECIFIED * ERROR * WARNING * INFO * `reason`: Output only. A common (service-level) reason for this condition. Possible values: * COMMON_REASON_UNDEFINED * UNKNOWN * REVISION_FAILED * PROGRESS_DEADLINE_EXCEEDED * CONTAINER_MISSING * CONTAINER_PERMISSION_DENIED * CONTAINER_IMAGE_UNAUTHORIZED * CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED * ENCRYPTION_KEY_PERMISSION_DENIED * ENCRYPTION_KEY_CHECK_FAILED * SECRETS_ACCESS_CHECK_FAILED * WAITING_FOR_OPERATION * IMMEDIATE_RETRY * POSTPONED_RETRY * INTERNAL * `revision_reason`: Output only. A reason for the revision condition. Possible values: * REVISION_REASON_UNDEFINED * PENDING * RESERVE * RETIRED * RETIRING * RECREATING * HEALTH_CHECK_CONTAINER_ERROR * CUSTOMIZED_PATH_RESPONSE_PENDING * MIN_INSTANCES_NOT_PROVISIONED * ACTIVE_REVISION_LIMIT_REACHED * NO_DEPLOYMENT * HEALTH_CHECK_SKIPPED * MIN_INSTANCES_WARMING * `execution_reason`: Output only. A reason for the execution condition. Possible values: * EXECUTION_REASON_UNDEFINED * JOB_STATUS_SERVICE_POLLING_ERROR * NON_ZERO_EXIT_CODE * CANCELLED * CANCELLING * DELETED * `latest_ready_revision`: Output only. Name of the latest revision that is serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. * `latest_created_revision`: Output only. Name of the last created revision. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. * `traffic_statuses`: Output only. Detailed status information for corresponding traffic targets. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. * `type`: The allocation type for this traffic target. Possible values: * TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED * TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST * TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION * `revision`: Revision to which this traffic is sent. * `percent`: Specifies percent of the traffic to this Revision. * `tag`: Indicates the string used in the URI to exclusively reference this target. * `uri`: Displays the target URI. * `uri`: Output only. The main URI in which this Service is serving traffic. * `satisfies_pzs`: Output only. Reserved for future use. * `reconciling`: Output only. Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, `observed_generation`, `latest_ready_revison`, `traffic_statuses`, and `uri` will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in `terminal_condition.state`. If reconciliation succeeded, the following fields will match: `traffic` and `traffic_statuses`, `observed_generation` and `generation`, `latest_ready_revision` and `latest_created_revision`. If reconciliation failed, `traffic_statuses`, `observed_generation`, and `latest_ready_revision` will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in `terminal_condition` and `conditions`. * `etag`: Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. ## GCP permissions Ensure the [https://run.googleapis.com/](https://console.cloud.google.com/apis/library/run.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_run_services.md ================================================ +++ title = "google_run_services resource" draft = false [menu.gcp] title = "google_run_services" identifier = "inspec/resources/gcp/google_run_services resource" parent = "inspec/resources/gcp" +++ Use the `google_run_services` InSpec audit resource to test the properties of a Google Cloud Service resource. ## Examples ```ruby describe google_run_services(parent: 'value_parent') do it { should exist } its('names') { should include value_name } its('uris') { should include value_uri } its('generations') { should include value_generation } its('create_times') { should include value_create_time } its('update_times') { should include value_update_time } its('creators') { should include value_creator } its('ingresses') { should include value_ingress } end ``` ## Parameters Parameters that can be accessed from the `google_run_services` resource: See [google_run_service](google_run_service) for more detailed information. * `names`: an array of `google_run_service` name * `descriptions`: an array of `google_run_service` description * `uids`: an array of `google_run_service` uid * `generations`: an array of `google_run_service` generation * `labels`: an array of `google_run_service` labels * `annotations`: an array of `google_run_service` annotations * `create_times`: an array of `google_run_service` create_time * `update_times`: an array of `google_run_service` update_time * `delete_times`: an array of `google_run_service` delete_time * `expire_times`: an array of `google_run_service` expire_time * `creators`: an array of `google_run_service` creator * `last_modifiers`: an array of `google_run_service` last_modifier * `clients`: an array of `google_run_service` client * `client_versions`: an array of `google_run_service` client_version * `ingresses`: an array of `google_run_service` ingress * `launch_stages`: an array of `google_run_service` launch_stage * `binary_authorizations`: an array of `google_run_service` binary_authorization * `templates`: an array of `google_run_service` template * `traffics`: an array of `google_run_service` traffic * `scalings`: an array of `google_run_service` scaling * `default_uri_disableds`: an array of `google_run_service` default_uri_disabled * `custom_audiences`: an array of `google_run_service` custom_audiences * `observed_generations`: an array of `google_run_service` observed_generation * `terminal_conditions`: an array of `google_run_service` terminal_condition * `conditions`: an array of `google_run_service` conditions * `latest_ready_revisions`: an array of `google_run_service` latest_ready_revision * `latest_created_revisions`: an array of `google_run_service` latest_created_revision * `traffic_statuses`: an array of `google_run_service` traffic_statuses * `uris`: an array of `google_run_service` uri * `satisfies_pzs`: an array of `google_run_service` satisfies_pzs * `reconcilings`: an array of `google_run_service` reconciling * `etags`: an array of `google_run_service` etag ## Properties Properties that can be accessed from the `google_run_services` resource: See [google_run_service](google_run_service) for more detailed information. * `names`: an array of `google_run_service` name * `descriptions`: an array of `google_run_service` description * `uids`: an array of `google_run_service` uid * `generations`: an array of `google_run_service` generation * `labels`: an array of `google_run_service` labels * `annotations`: an array of `google_run_service` annotations * `create_times`: an array of `google_run_service` create_time * `update_times`: an array of `google_run_service` update_time * `delete_times`: an array of `google_run_service` delete_time * `expire_times`: an array of `google_run_service` expire_time * `creators`: an array of `google_run_service` creator * `last_modifiers`: an array of `google_run_service` last_modifier * `clients`: an array of `google_run_service` client * `client_versions`: an array of `google_run_service` client_version * `ingresses`: an array of `google_run_service` ingress * `launch_stages`: an array of `google_run_service` launch_stage * `binary_authorizations`: an array of `google_run_service` binary_authorization * `templates`: an array of `google_run_service` template * `traffics`: an array of `google_run_service` traffic * `scalings`: an array of `google_run_service` scaling * `default_uri_disableds`: an array of `google_run_service` default_uri_disabled * `custom_audiences`: an array of `google_run_service` custom_audiences * `observed_generations`: an array of `google_run_service` observed_generation * `terminal_conditions`: an array of `google_run_service` terminal_condition * `conditions`: an array of `google_run_service` conditions * `latest_ready_revisions`: an array of `google_run_service` latest_ready_revision * `latest_created_revisions`: an array of `google_run_service` latest_created_revision * `traffic_statuses`: an array of `google_run_service` traffic_statuses * `uris`: an array of `google_run_service` uri * `satisfies_pzs`: an array of `google_run_service` satisfies_pzs * `reconcilings`: an array of `google_run_service` reconciling * `etags`: an array of `google_run_service` etag ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://run.googleapis.com/](https://console.cloud.google.com/apis/library/run.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_runtime_config_config.md ================================================ +++ title = "google_runtime_config_config resource" draft = false [menu.gcp] title = "google_runtime_config_config" identifier = "inspec/resources/gcp/google_runtime_config_config resource" parent = "inspec/resources/gcp" +++ Use the `google_runtime_config_config` InSpec audit resource to to test a Google Cloud Config resource. ## Examples ```ruby describe google_runtime_config_config(project: 'chef-gcp-inspec', name: 'inspec-gcp-runtime-config') do it { should exist } its('description') { should cmp 'My runtime configurations' } end describe google_runtime_config_config(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_runtime_config_config` resource: * `description`: The description to associate with the runtime config. * `name`: The name of the runtime config. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_runtime_config_config_iam_binding.md ================================================ +++ title = "google_runtime_config_config_iam_binding resource" draft = false [menu.gcp] title = "google_runtime_config_config_iam_binding" identifier = "inspec/resources/gcp/google_runtime_config_config_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_runtime_config_config_iam_binding` is used to test a Google Config Iam Bindings ## Examples ```ruby describe google_runtime_config_config_iam_binding(project: "project", name: "name", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_runtime_config_config_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_runtime_config_config_iam_policy.md ================================================ +++ title = "google_runtime_config_config_iam_policy resource" draft = false [menu.gcp] title = "google_runtime_config_config_iam_policy" identifier = "inspec/resources/gcp/google_runtime_config_config_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_runtime_config_config_iam_policy` is used to test a Google Config Iam Policy resource. ## Examples ```ruby describe google_runtime_config_config_iam_policy(project: "project", name: "name") do it { should exist } end google_runtime_config_config_iam_policy(project: "project", name: "name").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_runtime_config_config_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_runtime_config_configs.md ================================================ +++ title = "google_runtime_config_configs resource" draft = false [menu.gcp] title = "google_runtime_config_configs" identifier = "inspec/resources/gcp/google_runtime_config_configs resource" parent = "inspec/resources/gcp" +++ Use the `google_runtime_config_configs` InSpec audit resource to to test a Google Cloud Config resource. ## Examples ```ruby describe google_runtime_config_configs(project: 'chef-gcp-inspec') do its('descriptions') { should include 'My runtime configurations' } end ``` ## Properties Properties that can be accessed from the `google_runtime_config_configs` resource: See [google_runtime_config_config](google_runtime_config_config) for more detailed information. * `descriptions`: an array of `google_runtime_config_config` description * `names`: an array of `google_runtime_config_config` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_runtime_config_variable.md ================================================ +++ title = "google_runtime_config_variable resource" draft = false [menu.gcp] title = "google_runtime_config_variable" identifier = "inspec/resources/gcp/google_runtime_config_variable resource" parent = "inspec/resources/gcp" +++ Use the `google_runtime_config_variable` InSpec audit resource to to test a Google Cloud Variable resource. ## Examples ```ruby describe google_runtime_config_variable(project: 'chef-gcp-inspec', config: 'inspec-gcp-runtime-config', name: 'prod-variables/hostname') do it { should exist } its('text') { should cmp 'example.com' } end describe google_runtime_config_variable(project: 'chef-gcp-inspec', config: 'inspec-gcp-runtime-config', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_runtime_config_variable` resource: * `value`: The binary value of the variable. Either this or `text` can be set. * `text`: The string value of the variable. Either this or `value` can be set. * `name`: The name of the variable resource. * `config`: The name of the runtime config that this variable belongs to. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_runtime_config_variables.md ================================================ +++ title = "google_runtime_config_variables resource" draft = false [menu.gcp] title = "google_runtime_config_variables" identifier = "inspec/resources/gcp/google_runtime_config_variables resource" parent = "inspec/resources/gcp" +++ Use the `google_runtime_config_variables` InSpec audit resource to to test a Google Cloud Variable resource. ## Examples ```ruby describe google_runtime_config_variables(project: 'chef-gcp-inspec', config: 'inspec-gcp-runtime-config') do its('texts') { should include 'example.com' } end ``` ## Properties Properties that can be accessed from the `google_runtime_config_variables` resource: See [google_runtime_config_variable](google_runtime_config_variable) for more detailed information. * `values`: an array of `google_runtime_config_variable` value * `texts`: an array of `google_runtime_config_variable` text * `names`: an array of `google_runtime_config_variable` name * `configs`: an array of `google_runtime_config_variable` config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_secret_manager_secret.md ================================================ +++ title = "google_secret_manager_secret resource" draft = false [menu.gcp] title = "google_secret_manager_secret" identifier = "inspec/resources/gcp/google_secret_manager_secret resource" parent = "inspec/resources/gcp" +++ Use the `google_secret_manager_secret` InSpec audit resource to to test a Google Cloud Secret resource. ## Examples ```ruby describe google_secret_manager_secret(name: ' value_name') do it { should exist } end describe google_secret_manager_secret(name: "does_not_exit") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_secret_manager_secret` resource: * `name`: The resource name of the Secret. Format: `projects/{{project}}/secrets/{{secret_id}}` * `create_time`: The time at which the Secret was created. * `labels`: The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * `replication`: The replication policy of the secret data attached to the Secret. It cannot be changed after the Secret has been created. * `automatic`: The Secret will automatically be replicated without any restrictions. * `user_managed`: The Secret will automatically be replicated without any restrictions. * `replicas`: The list of Replicas for this Secret. Cannot be empty. * `location`: The canonical IDs of the location to replicate data. For example: "us-east1". * `customer_managed_encryption`: Customer Managed Encryption for the secret. * `kms_key_name`: Describes the Cloud KMS encryption key that will be used to protect destination secret. * `topics`: A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. * `name`: The resource name of the Pub/Sub topic that will be published to, in the following format: projects/*/topics/*. For publication to succeed, the Secret Manager Service Agent service account must have pubsub.publisher permissions on the topic. * `expire_time`: Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `ttl`: The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". * `rotation`: The rotation time and period for a Secret. At `next_rotation_time`, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. `topics` must be set to configure rotation. * `next_rotation_time`: Timestamp in UTC at which the Secret is scheduled to rotate. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". * `rotation_period`: The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years). If rotationPeriod is set, `next_rotation_time` must be set. `next_rotation_time` will be advanced by this period when the service automatically sends rotation notifications. * `secret_id`: This must be unique within the project. ## GCP permissions Ensure the [Secret Manager API](https://console.cloud.google.com/apis/library/secretmanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_secret_manager_secrets.md ================================================ +++ title = "google_secret_manager_secrets resource" draft = false [menu.gcp] title = "google_secret_manager_secrets" identifier = "inspec/resources/gcp/google_secret_manager_secrets resource" parent = "inspec/resources/gcp" +++ Use the `google_secret_manager_secrets` InSpec audit resource to to test a Google Cloud Secret resource. ## Examples ```ruby describe google_secret_manager_secrets(parent: ' value_parent') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_secret_manager_secrets` resource: See [google_secret_manager_secret](google_secret_manager_secret) for more detailed information. * `names`: an array of `google_secret_manager_secret` name * `create_times`: an array of `google_secret_manager_secret` create_time * `labels`: an array of `google_secret_manager_secret` labels * `replications`: an array of `google_secret_manager_secret` replication * `topics`: an array of `google_secret_manager_secret` topics * `expire_times`: an array of `google_secret_manager_secret` expire_time * `ttls`: an array of `google_secret_manager_secret` ttl * `rotations`: an array of `google_secret_manager_secret` rotation * `secret_ids`: an array of `google_secret_manager_secret` secret_id ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Secret Manager API](https://console.cloud.google.com/apis/library/secretmanager.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_service_account.md ================================================ +++ title = "google_service_account resource" draft = false [menu.gcp] title = "google_service_account" identifier = "inspec/resources/gcp/google_service_account resource" parent = "inspec/resources/gcp" +++ Use the `google_service_account` InSpec audit resource to to test a Google Cloud ServiceAccount resource. ## Examples ```ruby describe google_service_account(project: 'chef-gcp-inspec', name: "display-name@project-id.iam.gserviceaccount.com") do it { should exist } its('display_name') { should cmp '' } end describe google_service_account(project: 'chef-gcp-inspec', name: "nonexistent@project-id.iam.gserviceaccount.com") do it { should_not exist } end ``` ### Test that a GCP project IAM service account has the expected unique identifier describe google_service_account(project: 'sample-project', name: 'sample-account@sample-project.iam.gserviceaccount.com') do its('unique_id') { should eq 12345678 } end ### Test that a GCP project IAM service account has the expected oauth2 client identifier describe google_service_account(project: 'sample-project', name: 'sample-account@sample-project.iam.gserviceaccount.com') do its('oauth2_client_id') { should eq 12345678 } end ### Test that a GCP project IAM service account does not have user managed keys describe google_service_account_keys(project: 'chef-gcp-inspec', service_account: "display-name@project-id.iam.gserviceaccount.com") do its('key_types') { should_not include 'USER_MANAGED' } end ## Properties Properties that can be accessed from the `google_service_account` resource: * `name`: The name of the service account. * `project_id`: Id of the project that owns the service account. * `unique_id`: Unique and stable id of the service account * `email`: Email address of the service account. * `display_name`: User specified description of service account. * `oauth2_client_id`: OAuth2 client id for the service account. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_service_account_key.md ================================================ +++ title = "google_service_account_key resource" draft = false [menu.gcp] title = "google_service_account_key" identifier = "inspec/resources/gcp/google_service_account_key resource" parent = "inspec/resources/gcp" +++ Use the `google_service_account_key` InSpec audit resource to to test a Google Cloud ServiceAccountKey resource. ## Examples ```ruby google_service_account_keys(project: 'chef-gcp-inspec', service_account: "display-name@project-id.iam.gserviceaccount.com").key_names.each do |sa_key_name| describe google_service_account_key(project: 'chef-gcp-inspec', service_account: "display-name@project-id.iam.gserviceaccount.com", name: sa_key_name.split('/').last) do it { should exist } its('key_type') { should_not cmp 'USER_MANAGED' } end end ``` ### Test that a GCP project IAM service account key has the expected key algorithm describe google_service_account_key(name: "projects/sample-project/serviceAccounts/test-sa@sample-project.iam.gserviceaccount.com/keys/c6bd986da9fac6d71178db41d1741cbe751a5080" ) do its('key_algorithm') { should eq "KEY_ALG_RSA_2048" } end ## Properties Properties that can be accessed from the `google_service_account_key` resource: * `name`: The name of the key. * `private_key_type`: Output format for the service account key. Possible values: * TYPE_UNSPECIFIED * TYPE_PKCS12_FILE * TYPE_GOOGLE_CREDENTIALS_FILE * `key_algorithm`: Specifies the algorithm for the key. Possible values: * KEY_ALG_UNSPECIFIED * KEY_ALG_RSA_1024 * KEY_ALG_RSA_2048 * `private_key_data`: Private key data. Base-64 encoded. * `public_key_data`: Public key data. Base-64 encoded. * `valid_after_time`: Key can only be used after this time. * `valid_before_time`: Key can only be used before this time. * `key_type`: Specifies the type of the key. Possible values include KEY_TYPE_UNSPECIFIED, USER_MANAGED and SYSTEM_MANAGED Possible values: * KEY_TYPE_UNSPECIFIED * USER_MANAGED * SYSTEM_MANAGED * `key_origin`: The key origin. Possible values: * ORIGIN_UNSPECIFIED * USER_PROVIDED * GOOGLE_PROVIDED * `service_account`: The name of the serviceAccount. * `path`: The full name of the file that will hold the service account private key. The management of this file will depend on the value of sync_file parameter. File path must be absolute. * `disabled`: The key status. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_service_account_keys.md ================================================ +++ title = "google_service_account_keys resource" draft = false [menu.gcp] title = "google_service_account_keys" identifier = "inspec/resources/gcp/google_service_account_keys resource" parent = "inspec/resources/gcp" +++ Use the `google_service_account_keys` InSpec audit resource to to test a Google Cloud ServiceAccountKey resource. ## Examples ```ruby describe google_service_account_keys(project: 'chef-gcp-inspec', service_account: "display-name@project-id.iam.gserviceaccount.com") do its('count') { should be <= 1000 } its('key_types') { should_not include 'USER_MANAGED' } end ``` ### Test that there are no more than a specified number of keys for the service account describe google_service_account_keys(project: 'sample-project', service_account: 'sample-account@sample-project.iam.gserviceaccount.com') do its('count') { should be <= 1000} end ### Test that a service account with expected name is available describe google_service_account_keys(project: 'sample-project', service_account: 'sample-account@sample-project.iam.gserviceaccount.com') do its('key_names'){ should include "projects/sample-project/serviceAccounts/test-sa@sample-project.iam.gserviceaccount.com/keys/c6bd986da9fac6d71178db41d1741cbe751a5080" } end ## Properties Properties that can be accessed from the `google_service_account_keys` resource: See [google_service_account_key](google_service_account_key) for more detailed information. * `key_names`: an array of `google_service_account_key` name * `private_key_types`: an array of `google_service_account_key` private_key_type * `key_algorithms`: an array of `google_service_account_key` key_algorithm * `private_key_data`: an array of `google_service_account_key` private_key_data * `public_key_data`: an array of `google_service_account_key` public_key_data * `valid_after_times`: an array of `google_service_account_key` valid_after_time * `valid_before_times`: an array of `google_service_account_key` valid_before_time * `key_origins`: an array of `google_service_account_key` key_origin * `key_types`: an array of `google_service_account_key` key_type * `service_accounts`: an array of `google_service_account_key` service_account * `paths`: an array of `google_service_account_key` path * `disableds`: an array of `google_service_account_key` disabled ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_service_accounts.md ================================================ +++ title = "google_service_accounts resource" draft = false [menu.gcp] title = "google_service_accounts" identifier = "inspec/resources/gcp/google_service_accounts resource" parent = "inspec/resources/gcp" +++ Use the `google_service_accounts` InSpec audit resource to to test a Google Cloud ServiceAccount resource. ## Examples ```ruby describe google_service_accounts(project: 'chef-gcp-inspec', name: "display-name@project-id.iam.gserviceaccount.com") do its('service_account_emails') { should include "display-name@project-id.iam.gserviceaccount.com" } its('count') { should be <= 1000 } end ``` ### Test that there are no more than a specified number of service accounts for the project describe google_service_accounts(project: 'chef-inspec-gcp') do its('count') { should be <= 1000} end ### Test that an expected service account display name is available describe google_service_accounts(project: 'chef-inspec-gcp') do its('service_account_display_names'){ should include "gcp_sa_name" } end ### Test that an expected service account unique identifier is available describe google_service_accounts(project: 'chef-inspec-gcp') do its('service_account_ids'){ should include 12345678 } end ### Test that a service account with expected name is available describe google_service_accounts(project: 'dummy-project') do its('service_account_names'){ should include "projects/dummy-project/serviceAccounts/dummy-acct@dummy-project.iam.gserviceaccount.com" } end ### Use filtering to retrieve a particular service account google_service_accounts(project: 'chef-inspec-gcp').where(service_account_display_names: /^dummyaccount/).service_account_names.each do |sa_name| describe google_service_account(name: sa_name) do it { should exist } end end ## Properties Properties that can be accessed from the `google_service_accounts` resource: See [google_service_account](google_service_account) for more detailed information. * `service_account_names`: an array of `google_service_account` name * `project_ids`: an array of `google_service_account` project_id * `service_account_ids`: an array of `google_service_account` unique_id * `service_account_emails`: an array of `google_service_account` email * `service_account_display_names`: an array of `google_service_account` display_name * `oauth2_client_ids`: an array of `google_service_account` oauth2_client_id ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Identity and Access Management (IAM) API](https://console.cloud.google.com/apis/library/iam.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_service_networking_service_connections.md ================================================ +++ title = "google_service_networking_service_connections resource" draft = false [menu.gcp] title = "google_service_networking_service_connections" identifier = "inspec/resources/gcp/google_service_networking_service_connections resource" parent = "inspec/resources/gcp" +++ Use the `google_service_networking_service_connections` InSpec audit resource to to test a Google Cloud service_connection resource. ## Examples ```ruby describe google_servicenetworking_service_connections(parent: ' value_parent',network: 'value_network') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_service_networking_service_connections` resource: See [google_service_networking_service_connection](google_service_networking_service_connection) for more detailed information. * `networks`: an array of `google_service_networking_service_connection` network * `reserved_peering_ranges`: an array of `google_service_networking_service_connection` reserved_peering_ranges * `peerings`: an array of `google_service_networking_service_connection` peering * `services`: an array of `google_service_networking_service_connection` service ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [https://servicenetworking.googleapis.com/](https://console.cloud.google.com/apis/library/servicenetworking.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sourcerepo_repositories.md ================================================ +++ title = "google_sourcerepo_repositories resource" draft = false [menu.gcp] title = "google_sourcerepo_repositories" identifier = "inspec/resources/gcp/google_sourcerepo_repositories resource" parent = "inspec/resources/gcp" +++ Use the `google_sourcerepo_repositories` InSpec audit resource to to test a Google Cloud Repository resource. ## Examples ```ruby repo_name = 'inspec-gcp-repository' describe.one do google_sourcerepo_repositories(project: 'chef-gcp-inspec').names.each do |name| describe name do it { should match /\/repos\/#{repo_name}$/ } end end end ``` ## Properties Properties that can be accessed from the `google_sourcerepo_repositories` resource: See [google_sourcerepo_repository](google_sourcerepo_repository) for more detailed information. * `names`: an array of `google_sourcerepo_repository` name * `urls`: an array of `google_sourcerepo_repository` url * `sizes`: an array of `google_sourcerepo_repository` size * `pubsub_configs`: an array of `google_sourcerepo_repository` pubsub_configs ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Source Repositories API](https://console.cloud.google.com/apis/library/sourcerepo.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sourcerepo_repository.md ================================================ +++ title = "google_sourcerepo_repository resource" draft = false [menu.gcp] title = "google_sourcerepo_repository" identifier = "inspec/resources/gcp/google_sourcerepo_repository resource" parent = "inspec/resources/gcp" +++ Use the `google_sourcerepo_repository` InSpec audit resource to to test a Google Cloud Repository resource. ## Examples ```ruby describe google_sourcerepo_repository(project: 'chef-gcp-inspec', name: 'inspec-gcp-repository') do it { should exist } end describe google_sourcerepo_repository(project: 'chef-gcp-inspec', name: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_sourcerepo_repository` resource: * `name`: Resource name of the repository, of the form projects/{{project}}/repos/{{repo}}. The repo name may contain slashes. eg, projects/myproject/repos/name/with/slash * `url`: URL to clone the repository from Google Cloud Source Repositories. * `size`: The disk usage of the repo, in bytes. * `pubsub_configs`: How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names. ## GCP permissions Ensure the [Cloud Source Repositories API](https://console.cloud.google.com/apis/library/sourcerepo.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_spanner_database.md ================================================ +++ title = "google_spanner_database resource" draft = false [menu.gcp] title = "google_spanner_database" identifier = "inspec/resources/gcp/google_spanner_database resource" parent = "inspec/resources/gcp" +++ Use the `google_spanner_database` InSpec audit resource to to test a Google Cloud Database resource. ## Examples ```ruby describe google_spanner_database(project: 'chef-gcp-inspec', instance: 'spinstance', name: 'spdatabase') do it { should exist } its('name') { should match 'spdatabase' } end ``` ## Properties Properties that can be accessed from the `google_spanner_database` resource: * `name`: A unique identifier for the database, which cannot be changed after the instance is created. Values are of the form [a-z][-a-z0-9]*[a-z0-9]. * `instance`: The instance to create the database on. ## GCP permissions Ensure the [Cloud Spanner API](https://console.cloud.google.com/apis/library/spanner.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_spanner_databases.md ================================================ +++ title = "google_spanner_databases resource" draft = false [menu.gcp] title = "google_spanner_databases" identifier = "inspec/resources/gcp/google_spanner_databases resource" parent = "inspec/resources/gcp" +++ Use the `google_spanner_databases` InSpec audit resource to to test a Google Cloud Database resource. ## Examples ```ruby describe.one do google_spanner_databases(project: 'chef-gcp-inspec', instance: 'spinstance').names.each do |name| describe name do it { should match 'spdatabase' } end end end ``` ## Properties Properties that can be accessed from the `google_spanner_databases` resource: See [google_spanner_database](google_spanner_database) for more detailed information. * `names`: an array of `google_spanner_database` name * `instances`: an array of `google_spanner_database` instance ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Spanner API](https://console.cloud.google.com/apis/library/spanner.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_spanner_instance.md ================================================ +++ title = "google_spanner_instance resource" draft = false [menu.gcp] title = "google_spanner_instance" identifier = "inspec/resources/gcp/google_spanner_instance resource" parent = "inspec/resources/gcp" +++ Use the `google_spanner_instance` InSpec audit resource to to test a Google Cloud Instance resource. ## Examples ```ruby describe google_spanner_instance(project: 'chef-gcp-inspec', name: 'spinstance', config: 'regional-us-east1') do it { should exist } its('config') { should match 'regional-us-east1' } its('name') { should match 'spinstance' } its('display_name') { should eq 'inspectest' } its('node_count') { should eq '1' } its('labels') { should include('env' => 'test') } end ``` ## Properties Properties that can be accessed from the `google_spanner_instance` resource: * `name`: A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. * `config`: The name of the instance's configuration (similar but not quite the same as a region) which defines defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form `regional-europe-west1` , `us-central` etc. In order to obtain a valid list please consult the [Configuration section of the docs](https://cloud.google.com/spanner/docs/instances). * `display_name`: The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. * `node_count`: The number of nodes allocated to this instance. * `labels`: An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. ## GCP permissions Ensure the [Cloud Spanner API](https://console.cloud.google.com/apis/library/spanner.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_spanner_instance_iam_binding.md ================================================ +++ title = "google_spanner_instance_iam_binding resource" draft = false [menu.gcp] title = "google_spanner_instance_iam_binding" identifier = "inspec/resources/gcp/google_spanner_instance_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_spanner_instance_iam_binding` is used to test a Google Instance Iam Bindings ## Examples ```ruby describe google_spanner_instance_iam_binding(project: "project", name: "name", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_spanner_instance_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Cloud Spanner API](https://console.cloud.google.com/apis/library/spanner.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_spanner_instance_iam_policy.md ================================================ +++ title = "google_spanner_instance_iam_policy resource" draft = false [menu.gcp] title = "google_spanner_instance_iam_policy" identifier = "inspec/resources/gcp/google_spanner_instance_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_spanner_instance_iam_policy` is used to test a Google Instance Iam Policy resource. ## Examples ```ruby describe google_spanner_instance_iam_policy(project: "project", name: "name") do it { should exist } end google_spanner_instance_iam_policy(project: "project", name: "name").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_spanner_instance_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Cloud Spanner API](https://console.cloud.google.com/apis/library/spanner.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_spanner_instances.md ================================================ +++ title = "google_spanner_instances resource" draft = false [menu.gcp] title = "google_spanner_instances" identifier = "inspec/resources/gcp/google_spanner_instances resource" parent = "inspec/resources/gcp" +++ Use the `google_spanner_instances` InSpec audit resource to to test a Google Cloud Instance resource. ## Examples ```ruby describe.one do google_spanner_instances(project: 'chef-gcp-inspec', config: 'regional-us-east1').configs.each do |config| describe config do it { should match 'regional-us-east1' } end end end ``` ## Properties Properties that can be accessed from the `google_spanner_instances` resource: See [google_spanner_instance](google_spanner_instance) for more detailed information. * `names`: an array of `google_spanner_instance` name * `configs`: an array of `google_spanner_instance` config * `display_names`: an array of `google_spanner_instance` display_name * `node_counts`: an array of `google_spanner_instance` node_count * `labels`: an array of `google_spanner_instance` labels ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud Spanner API](https://console.cloud.google.com/apis/library/spanner.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_connect.md ================================================ +++ title = "google_sql_connect resource" draft = false [menu.gcp] title = "google_sql_connect" identifier = "inspec/resources/gcp/google_sql_connect resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_connect` InSpec audit resource to to test a Google Cloud Connect resource. ## Examples ```ruby describe google_sql_connect(project: 'chef-gcp-inspec', instance: 'test-pg') do it { should exist } its('region') { should include 'us-central1' } its('database_version') { should include 'POSTGRES_13' } its('backend_type') { should include 'SECOND_GEN' } end ``` ## Properties Properties that can be accessed from the `google_sql_connect` resource: * `region`: The region where you want your Cloud SQL replicas to reside. * `ip_addresses`: The assigned IP addresses for the instance. * `ip_address`: The IP address assigned. * `time_to_retire`: The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired. * `type`: The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported. Possible values: * PRIMARY * OUTGOING * `database_version`: The MySQL version running on your source database server. Possible values: * MYSQL_5_5 * MYSQL_5_6 * MYSQL_5_7 * MYSQL_8_0 * `backend_type`: * FIRST_GEN: First Generation instance. MySQL only. * SECOND_GEN: Second Generation instance or PostgreSQL instance. * EXTERNAL: A database server that is not managed by Google. Possible values: * FIRST_GEN * SECOND_GEN * EXTERNAL * `server_ca_cert`: Configuration specific to on-premises instances. * `cert`: PEM representation of the X.509 certificate. * `cert_serial_number`: Serial number, as extracted from the certificate. * `common_name`: User supplied name. Constrained to [a-zA-Z.-_ ]+. * `sha1_fingerprint`: Sha1 Fingerprint. * `instance`: Name of the database instance. * `create_time`: The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. * `expiration_time`: The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_database.md ================================================ +++ title = "google_sql_database resource" draft = false [menu.gcp] title = "google_sql_database" identifier = "inspec/resources/gcp/google_sql_database resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_database` InSpec audit resource to to test a Google Cloud Database resource. ## Examples ```ruby describe google_sql_database(project: 'chef-gcp-inspec', instance: 'my-database', gcp_db_name: 'my-db') do it { should exist } its('name') { should eq 'my-db' } its('instance') { should eq 'my-database' } end ``` ## Properties Properties that can be accessed from the `google_sql_database` resource: * `charset`: The charset value. See MySQL's [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html) for more details and supported values. Postgres databases only support a value of `UTF8` at creation time. * `collation`: The collation value. See MySQL's [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html) for more details and supported values. Postgres databases only support a value of `en_US.UTF8` at creation time. * `name`: The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. * `instance`: The name of the Cloud SQL instance. This does not include the project ID. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_database_instance.md ================================================ +++ title = "google_sql_database_instance resource" draft = false [menu.gcp] title = "google_sql_database_instance" identifier = "inspec/resources/gcp/google_sql_database_instance resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_database_instance` InSpec audit resource to to test a Google Cloud DatabaseInstance resource. ## Examples ```ruby describe google_sql_database_instance(project: 'chef-gcp-inspec', instance: 'my-database') do it { should exist } its('state') { should eq 'RUNNABLE' } its('backend_type') { should eq 'SECOND_GEN' } its('database_version') { should eq 'MYSQL_5_7' } end ``` ### Test that a GCP Cloud SQL Database instance is in the expected state describe google_sql_database_instance(project: 'chef-inspec-gcp', database: 'my-database') do its('state') { should eq 'RUNNABLE' } end ### Test that a GCP Cloud SQL Database instance generation type describe google_sql_database_instance(project: 'chef-inspec-gcp', database: 'my-database') do its('backend_type') { should eq "SECOND_GEN" } end ### Test that a GCP Cloud SQL Database instance connection name is as expected describe google_sql_database_instance(project: 'spaterson-project', database: 'gcp-inspec-db-instance') do its('connection_name') { should eq "spaterson-project:europe-west2:gcp-inspec-db-instance" } end ### Confirm that a GCP Cloud SQL Database instance has the correct version describe google_sql_database_instance(project: 'spaterson-project', database: 'gcp-inspec-db-instance') do its('database_version') { should eq "MYSQL_5_7" } end ### Confirm that a GCP Cloud SQL Database instance is running in the desired region and zone describe google_sql_database_instance(project: 'spaterson-project', database: 'gcp-inspec-db-instance') do its('gce_zone') { should eq "europe-west2-a" } its('region') { should eq "europe-west2" } end ## Properties Properties that can be accessed from the `google_sql_database_instance` resource: * `backend_type`: * FIRST_GEN: First Generation instance. MySQL only. * SECOND_GEN: Second Generation instance or PostgreSQL instance. * EXTERNAL: A database server that is not managed by Google. Possible values: * FIRST_GEN * SECOND_GEN * EXTERNAL * `kind`: This is always sql#instancesList. * `connection_name`: Connection name of the Cloud SQL instance used in connection strings. * `database_version`: The database engine type and version. For First Generation instances, can be MYSQL_5_5, or MYSQL_5_6. For Second Generation instances, can be MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6 The databaseVersion property can not be changed after instance creation. Possible values: * MYSQL_5_5 * MYSQL_5_6 * MYSQL_5_7 * POSTGRES_9_6 * `failover_replica`: The name and status of the failover replica. This property is applicable only to Second Generation instances. * `available`: The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the failover replica when the status is true. * `name`: The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. * `instance_type`: The instance type. This can be one of the following. * CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master. * ON_PREMISES_INSTANCE: An instance running on the customer's premises. * READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica. Possible values: * CLOUD_SQL_INSTANCE * ON_PREMISES_INSTANCE * READ_REPLICA_INSTANCE * `ip_addresses`: The assigned IP addresses for the instance. * `ip_address`: The IP address assigned. * `time_to_retire`: The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired. * `type`: The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported. Possible values: * PRIMARY * OUTGOING * `ipv6_address`: The IPv6 address assigned to the instance. This property is applicable only to First Generation instances. * `master_instance_name`: The name of the instance which will act as master in the replication setup. * `max_disk_size`: The maximum disk size of the instance in bytes. * `name`: Name of the Cloud SQL instance. This does not include the project ID. * `region`: The geographical region. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation/PostgreSQL). * `replica_configuration`: Configuration specific to failover replicas and read replicas. * `failover_target`: Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. In case the master instance fails, the replica instance will be promoted as the new master instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance. * `mysql_replica_configuration`: MySQL specific configuration when replicating from a MySQL on-premises master. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named master.info in the data directory. * `ca_certificate`: PEM representation of the trusted CA's x509 certificate. * `client_certificate`: PEM representation of the replica's x509 certificate * `client_key`: PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate. * `connect_retry_interval`: Seconds to wait between connect retries. MySQL's default is 60 seconds. * `dump_file_path`: Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should have the binlog coordinates from which replication should begin. This can be accomplished by setting --master-data to 1 when using mysqldump. * `master_heartbeat_period`: Interval in milliseconds between replication heartbeats. * `password`: The password for the replication connection. * `ssl_cipher`: A list of permissible ciphers to use for SSL encryption. * `username`: The username for the replication connection. * `verify_server_certificate`: Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake. * `replica_names`: The replicas of the instance. * `service_account_email_address`: The service account email address assigned to the instance. This property is applicable only to Second Generation instances. * `settings`: The user settings. * `kind`: This is always sql#settings. * `database_flags`: The database flags passed to the instance at startup * `name`: The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags should be specified with underscores, not hyphens. * `value`: The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value. * `ip_configuration`: The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. * `ipv4_enabled`: Whether the instance should be assigned an IP address or not. * `authorized_networks`: The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24). * `expiration_time`: The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. * `name`: An optional label to identify this entry. * `value`: The whitelisted value for the access control list. For example, to grant access to a client from an external IP (IPv4 or IPv6) address or subnet, use that address or subnet here. * `require_ssl`: Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP. * `tier`: The tier or machine type for this instance, for example db-n1-standard-1. For MySQL instances, this field determines whether the instance is Second Generation (recommended) or First Generation. * `availability_type`: The availabilityType define if your postgres instance is run zonal or regional. Possible values: * ZONAL * REGIONAL * `backup_configuration`: The daily backup configuration for the instance. * `enabled`: Enable Autobackup for your instance. * `binary_log_enabled`: Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well. MySQL only. * `start_time`: Define the backup start time in UTC (HH:MM) * `settings_version`: The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. * `user_labels`: User-provided labels, represented as a dictionary where each label is a single key value pair. * `activation_policy`: Specifies when the instance is activated. Possible values: * SQL_ACTIVATION_POLICY_UNSPECIFIED * ALWAYS * NEVER * `data_disk_size_gb`: The size of data disk, in GB. The data disk size minimum is 10GB. * `data_disk_type`: Specifies when the instance is activated. Possible values: * SQL_ACTIVATION_POLICY_UNSPECIFIED * ALWAYS * NEVER * `pricing_plan`: The pricing plan for this instance. Possible values: * SQL_PRICING_PLAN_UNSPECIFIED * PACKAGE * PER_USE * `replication_type`: The pricing plan for this instance. Possible values: * SQL_REPLICATION_TYPE_UNSPECIFIED * SYNCHRONOUS * ASYNCHRONOUS * `storage_auto_resize`: Configuration to increase storage size automatically. The default value is true. * `storage_auto_resize_limit`: The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. * `gce_zone`: The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. * `state`: The current serving state of the database instance. Possible values: * SQL_INSTANCE_STATE_UNSPECIFIED * RUNNABLE * SUSPENDED * PENDING_DELETE * PENDING_CREATE * MAINTENANCE * FAILED * `disk_encryption_configuration`: Disk encryption settings * `kms_key_name`: The KMS key used to encrypt the Cloud SQL instance * `disk_encryption_status`: Disk encryption status * `kms_key_version_name`: The KMS key version used to encrypt the Cloud SQL instance * `server_ca_cert`: SSL configuration * `cert`: PEM representation of the X.509 certificate. * `cert_serial_number`: Serial number, as extracted from the certificate. * `common_name`: User supplied name. Constrained to [a-zA-Z.-_ ]+. * `create_time`: The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. * `expiration_time`: The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. * `sha1_fingerprint`: SHA-1 fingerprint of the certificate. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_database_instances.md ================================================ +++ title = "google_sql_database_instances resource" draft = false [menu.gcp] title = "google_sql_database_instances" identifier = "inspec/resources/gcp/google_sql_database_instances resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_database_instances` InSpec audit resource to to test a Google Cloud DatabaseInstance resource. ## Examples ```ruby describe google_sql_database_instances(project: 'chef-gcp-inspec') do its('instance_states') { should include 'RUNNABLE' } its('instance_names') { should include 'my-database' } end ``` ### Test that there are no more than a specified number of zones available for the project describe google_sql_database_instances(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test that a database instance exists in the expected zone describe google_sql_database_instances(project: 'chef-inspec-gcp') do its('instance_zones') { should include "us-east1-b" } end ### Test that a database instance exists in the expected region describe google_sql_database_instances(project: 'chef-inspec-gcp') do its('instance_regions') { should include "us-east1" } end ### Confirm that at least one database instance is in "RUNNABLE" state describe google_sql_database_instances(project: 'chef-inspec-gcp') do its('instance_states') { should include "RUNNABLE" } end ### Test that a subset of all database instances matching "*mysqldb*" are all version "MYSQL_5_7" google_sql_database_instances(project: 'chef-inspec-gcp').where(instance_name: /mysqldb/).instance_names.each do |instance_name| describe google_sql_database_instance(project: 'chef-inspec-gcp', database: instance_name) do it { should exist } its('database_version') { should eq "MYSQL_5_7" } end end ## Properties Properties that can be accessed from the `google_sql_database_instances` resource: See [google_sql_database_instance](google_sql_database_instance) for more detailed information. * `backend_types`: an array of `google_sql_database_instance` backend_type * `kinds`: an array of `google_sql_database_instance` kind * `connection_names`: an array of `google_sql_database_instance` connection_name * `instance_versions`: an array of `google_sql_database_instance` database_version * `failover_replicas`: an array of `google_sql_database_instance` failover_replica * `instance_types`: an array of `google_sql_database_instance` instance_type * `ip_addresses`: an array of `google_sql_database_instance` ip_addresses * `ipv6_addresses`: an array of `google_sql_database_instance` ipv6_address * `master_instance_names`: an array of `google_sql_database_instance` master_instance_name * `max_disk_sizes`: an array of `google_sql_database_instance` max_disk_size * `instance_names`: an array of `google_sql_database_instance` name * `instance_regions`: an array of `google_sql_database_instance` region * `replica_configurations`: an array of `google_sql_database_instance` replica_configuration * `settings`: an array of `google_sql_database_instance` settings * `instance_zones`: an array of `google_sql_database_instance` gce_zone * `instance_states`: an array of `google_sql_database_instance` state * `disk_encryption_configurations`: an array of `google_sql_database_instance` disk_encryption_configuration * `disk_encryption_statuses`: an array of `google_sql_database_instance` disk_encryption_status * `server_ca_certs`: an array of `google_sql_database_instance` server_ca_cert ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_databases.md ================================================ +++ title = "google_sql_databases resource" draft = false [menu.gcp] title = "google_sql_databases" identifier = "inspec/resources/gcp/google_sql_databases resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_databases` InSpec audit resource to to test a Google Cloud Database resource. ## Examples ```ruby describe google_sql_databases(project: 'chef-gcp-inspec', instance: 'my-database') do it { should exist } its('names') { should include 'my-db' } its('instances') { should include 'my-database' } end ``` ## Properties Properties that can be accessed from the `google_sql_databases` resource: See [google_sql_database](google_sql_database) for more detailed information. * `charsets`: an array of `google_sql_database` charset * `collations`: an array of `google_sql_database` collation * `names`: an array of `google_sql_database` name * `instances`: an array of `google_sql_database` instance ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_flags.md ================================================ +++ title = "google_sql_flags resource" draft = false [menu.gcp] title = "google_sql_flags" identifier = "inspec/resources/gcp/google_sql_flags resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_flags` InSpec audit resource to to test a Google Cloud Flag resource. ## Examples ```ruby describe google_sql_flags do its('names') { should include , 'audit_log' } its('types') { should include , 'STRING' } its('applies_tos.first') { should include , 'MYSQL_5_6' } its('allowed_string_values.first') { should include , 'true' } its('requires_restarts') { should include , 'true' } end ``` ## Properties Properties that can be accessed from the `google_sql_flags` resource: See [google_sql_flag](google_sql_flag) for more detailed information. * `allowed_string_values`: an array of `google_sql_flag` allowed_string_values * `applies_tos`: an array of `google_sql_flag` applies_to * `max_values`: an array of `google_sql_flag` max_value * `min_values`: an array of `google_sql_flag` min_value * `names`: an array of `google_sql_flag` name * `requires_restarts`: an array of `google_sql_flag` requires_restart * `types`: an array of `google_sql_flag` type ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_operation.md ================================================ +++ title = "google_sql_operation resource" draft = false [menu.gcp] title = "google_sql_operation" identifier = "inspec/resources/gcp/google_sql_operation resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_operation` InSpec audit resource to to test a Google Cloud Operation resource. ## Examples ```ruby describe google_sql_operation(project: 'chef-gcp-inspec', operation: 'e5c522f1-8391-4830-a8ff-ff1cc4a7b2a5') do it { should exist } its('name') { should eq 'e5c522f1-8391-4830-a8ff-ff1cc4a7b2a5' } its('status') { should eq 'DONE' } its('operation_type') { should eq 'CREATE' } end describe google_sql_operation(project: 'chef-gcp-inspec', operation: 'nonexistant') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_sql_operation` resource: * `user`: The email address of the user who initiated this operation. * `name`: An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. * `status`: An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Possible values: * PENDING * RUNNING * DONE * SQL_OPERATION_STATUS_UNSPECIFIED * `operation_type`: An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Possible values: * SQL_OPERATION_TYPE_UNSPECIFIED * IMPORT * EXPORT * CREATE * UPDATE * DELETE * RESTART * BACKUP_VOLUME * DELETE_VOLUME * RESTORE_VOLUME * INJECT_USER * CLONE * STOP_REPLICA * START_REPLICA * START_REPLICA * CREATE_REPLICA * CREATE_USER * DELETE_USER * UPDATE_USER * CREATE_DATABASE * DELETE_DATABASE * CREATE_REPLICA * UPDATE_DATABASE * FAILOVER * DELETE_BACKUP * RECREATE_REPLICA * TRUNCATE_LOG * DEMOTE_MASTER * MAINTENANCE * RESCHEDULE_MAINTENANCE * START_EXTERNAL_SYNC * `instance`: The name of the Cloud SQL instance. This does not include the project ID. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_operations.md ================================================ +++ title = "google_sql_operations resource" draft = false [menu.gcp] title = "google_sql_operations" identifier = "inspec/resources/gcp/google_sql_operations resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_operations` InSpec audit resource to to test a Google Cloud Operation resource. ## Examples ```ruby describe google_sql_operations(project: 'chef-gcp-inspec', instance: 'my-database') do it { should exist } its('names') { should include 'e5c522f1-8391-4830-a8ff-ff1cc4a7b2a5' } its('statuses') { should include 'DONE' } its('operation_types') { should include 'CREATE' } end ``` ## Properties Properties that can be accessed from the `google_sql_operations` resource: See [google_sql_operation](google_sql_operation) for more detailed information. * `users`: an array of `google_sql_operation` user * `names`: an array of `google_sql_operation` name * `statuses`: an array of `google_sql_operation` status * `operation_types`: an array of `google_sql_operation` operation_type * `instances`: an array of `google_sql_operation` instance ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_ssl_cert.md ================================================ +++ title = "google_sql_ssl_cert resource" draft = false [menu.gcp] title = "google_sql_ssl_cert" identifier = "inspec/resources/gcp/google_sql_ssl_cert resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_ssl_cert` InSpec audit resource to to test a Google Cloud SslCert resource. ## Examples ```ruby describe google_sql_ssl_cert(project: 'chef-gcp-inspec', instance: 'test-pg', sha1_fingerprint: '80c5c611c0a591db967c7dda3467e23127288fed') do it { should exist } its('instance') { should eq 'test-pg' } its('common_name') { should eq 'C=US,O=Google\, Inc,CN=Google Cloud SQL Server CA,dnQualifier=68c79386-b63e-4998-8254-ba59729cdf78' } its('sha1_fingerprint') { should eq '80c5c611c0a591db967c7dda3467e23127288fed' } end describe google_sql_ssl_cert(project: 'chef-gcp-inspec', instance: 'nonexistent', sha1_fingerprint: '80c5c611c0a591db967c7dda3467e23127288fed') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_sql_ssl_cert` resource: * `cert`: PEM representation of the X.509 certificate. * `cert_serial_number`: Serial number, as extracted from the certificate. * `common_name`: User supplied name. Constrained to [a-zA-Z.-_ ]+. * `create_time`: The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. * `expiration_time`: The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. * `instance`: The name of the Cloud SQL instance. This does not include the project ID. * `sha1_fingerprint`: The SHA-1 of the certificate. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_ssl_certs.md ================================================ +++ title = "google_sql_ssl_certs resource" draft = false [menu.gcp] title = "google_sql_ssl_certs" identifier = "inspec/resources/gcp/google_sql_ssl_certs resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_ssl_certs` InSpec audit resource to to test a Google Cloud SslCerts resource. ## Examples ```ruby describe google_sql_ssl_certs(project: 'chef-gcp-inspec', instance: 'test-pg') do it { should exist } its('instances') { should include 'test-pg' } its('common_names') { should include 'C=US,O=Google\, Inc,CN=Google Cloud SQL Server CA,dnQualifier=68c79386-b63e-4998-8254-ba59729cdf78' } its('sha1_fingerprints') { should include '80c5c611c0a591db967c7dda3467e23127288fed' } end describe google_sql_ssl_certs(project: 'chef-gcp-inspec', instance: 'nonexistent') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_sql_ssl_certs` resource: See [google_sql_ssl_cert](google_sql_ssl_cert) for more detailed information. * `certs`: an array of `google_sql_ssl_cert` cert * `cert_serial_numbers`: an array of `google_sql_ssl_cert` cert_serial_number * `common_names`: an array of `google_sql_ssl_cert` common_name * `create_times`: an array of `google_sql_ssl_cert` create_time * `expiration_times`: an array of `google_sql_ssl_cert` expiration_time * `instances`: an array of `google_sql_ssl_cert` instance * `sha1_fingerprints`: an array of `google_sql_ssl_cert` sha1_fingerprint ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_user.md ================================================ +++ title = "google_sql_user resource" draft = false [menu.gcp] title = "google_sql_user" identifier = "inspec/resources/gcp/google_sql_user resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_user` InSpec audit resource to to test a Google Cloud User resource. ## Examples ```ruby describe google_sql_user(project: 'chef-gcp-inspec', database: 'my-database', name: 'user-name', host: "example.com") do it { should exist } its('name') { should cmp 'user-name' } its('instance') { should cmp 'my-database' } end describe google_sql_user(project: 'chef-gcp-inspec', database: 'my-database', name: "nonexistent", host: "example.com") do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_sql_user` resource: * `host`: The host name from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name cannot be updated after insertion. * `name`: The name of the user in the Cloud SQL instance. * `instance`: The name of the Cloud SQL instance. This does not include the project ID. * `password`: The password for the user. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_sql_users.md ================================================ +++ title = "google_sql_users resource" draft = false [menu.gcp] title = "google_sql_users" identifier = "inspec/resources/gcp/google_sql_users resource" parent = "inspec/resources/gcp" +++ Use the `google_sql_users` InSpec audit resource to to test a Google Cloud User resource. ## Examples ```ruby describe google_sql_users(project: 'chef-gcp-inspec', database: 'my-database') do its('user_names') { should include 'user-name' } end ``` ### Test that there are no more than a specified number of users available for the project describe google_sql_users(project: 'chef-inspec-gcp', database: 'database-instance') do its('count') { should be <= 100} end ### Test that an expected user is available for the project describe google_sql_users(project: 'chef-inspec-gcp') do its('user_names') { should include "us-east1-b" } end ### Test whether any users are in status "DOWN" describe google_sql_users(project: 'chef-inspec-gcp') do its('user_statuses') { should_not include "DOWN" } end ### Test users exist for all database instances in a project google_sql_database_instances(project: 'chef-inspec-gcp').instance_names.each do |instance_name| describe google_sql_users(project: 'chef-inspec-gcp', database: instance_name) do it { should exist } end end ## Properties Properties that can be accessed from the `google_sql_users` resource: See [google_sql_user](google_sql_user) for more detailed information. * `user_hosts`: an array of `google_sql_user` host * `user_names`: an array of `google_sql_user` name * `user_instances`: an array of `google_sql_user` instance * `passwords`: an array of `google_sql_user` password ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Cloud SQL Admin API](https://console.cloud.google.com/apis/library/sqladmin.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_storage_bucket.md ================================================ +++ title = "google_storage_bucket resource" draft = false [menu.gcp] title = "google_storage_bucket" identifier = "inspec/resources/gcp/google_storage_bucket resource" parent = "inspec/resources/gcp" +++ Use the `google_storage_bucket` InSpec audit resource to to test a Google Cloud Bucket resource. ## Examples ```ruby describe google_storage_bucket(name: bucket-name) do it { should exist } its('location') { should cmp 'europe-west2'.upcase } its('storage_class') { should eq "STANDARD" } its('labels') { should include("key" => "value") } its('retention_policy.retention_period') { should cmp 1000 } end describe google_storage_bucket(name: "nonexistent") do it { should_not exist } end ``` ### Test that a GCP storage bucket is in the expected location describe google_storage_bucket(name: 'chef-inspec-gcp-storage-bucket-abcd') do its('location') { should eq "EUROPE-WEST2" } end ### Test that a GCP storage bucket has the expected project number describe google_storage_bucket(name: 'chef-inspec-gcp-storage-bucket-abcd') do its('project_number') {should eq 12345678 } end ### Test that a GCP storage bucket has the expected storage class describe google_storage_bucket(name: 'chef-inspec-gcp-storage-bucket-abcd') do its('storage_class') { should eq 'STANDARD' } end ## Properties Properties that can be accessed from the `google_storage_bucket` resource: * `acl`: Access controls on the bucket. * `bucket`: The name of the bucket. * `domain`: The domain associated with the entity. * `email`: The email address associated with the entity. * `entity`: The entity holding the permission, in one of the following forms: user-userId user-email group-groupId group-email domain-domain project-team-projectId allUsers allAuthenticatedUsers Examples: The user liz@example.com would be user-liz@example.com. The group example@googlegroups.com would be group-example@googlegroups.com. To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. * `entity_id`: The ID for the entity * `id`: The ID of the access-control entry. * `project_team`: The project team associated with the entity * `project_number`: The project team associated with the entity * `team`: The team. Possible values: * editors * owners * viewers * `role`: The access permission for the entity. Possible values: * OWNER * READER * WRITER * `cors`: The bucket's Cross-Origin Resource Sharing (CORS) configuration. * `max_age_seconds`: The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. * `method`: The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". * `origin`: The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". * `response_header`: The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. * `default_event_based_hold`: Whether or not to automatically apply an eventBasedHold to new objects added to the bucket. * `default_object_acl`: Default access controls to apply to new objects when no ACL is provided. * `bucket`: The name of the bucket. * `domain`: The domain associated with the entity. * `email`: The email address associated with the entity. * `entity`: The entity holding the permission, in one of the following forms: * user-{{userId}} * user-{{email}} (such as "user-liz@example.com") * group-{{groupId}} * group-{{email}} (such as "group-example@googlegroups.com") * domain-{{domain}} (such as "domain-example.com") * project-team-{{projectId}} * allUsers * allAuthenticatedUsers * `entity_id`: The ID for the entity * `generation`: The content generation of the object, if applied to an object. * `id`: The ID of the access-control entry. * `object`: The name of the object, if applied to an object. * `project_team`: The project team associated with the entity * `project_number`: The project team associated with the entity * `team`: The team. Possible values: * editors * owners * viewers * `role`: The access permission for the entity. Possible values: * OWNER * READER * `id`: The ID of the bucket. For buckets, the id and name properities are the same. * `lifecycle`: The bucket's lifecycle configuration. See https://developers.google.com/storage/docs/lifecycle for more information. * `rule`: A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. * `action`: The action to take. * `storage_class`: Target storage class. Required iff the type of the action is SetStorageClass. * `type`: Type of the action. Currently, only Delete and SetStorageClass are supported. Possible values: * Delete * SetStorageClass * `condition`: The condition(s) under which the action will be taken. * `age_days`: Age of an object (in days). This condition is satisfied when an object reaches the specified age. * `created_before`: A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. * `is_live`: Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. * `matches_storage_class`: Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. * `num_newer_versions`: Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. * `location`: The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. * `logging`: The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. * `log_bucket`: The destination bucket where the current bucket's logs should be placed. * `log_object_prefix`: A prefix for log object names. * `metageneration`: The metadata generation of this bucket. * `name`: The name of the bucket * `owner`: The owner of the bucket. This is always the project team's owner group. * `entity`: The entity, in the form project-owner-projectId. * `entity_id`: The ID for the entity. * `project_number`: The project number of the project the bucket belongs to. * `storage_class`: The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. Possible values: * MULTI_REGIONAL * REGIONAL * STANDARD * NEARLINE * COLDLINE * ARCHIVE * DURABLE_REDUCED_AVAILABILITY * `time_created`: The creation time of the bucket in RFC 3339 format. * `updated`: The modification time of the bucket in RFC 3339 format. * `versioning`: The bucket's versioning configuration. * `enabled`: While set to true, versioning is fully enabled for this bucket. * `website`: The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. * `main_page_suffix`: If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. * `not_found_page`: If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. * `labels`: Labels applied to this bucket. A list of key->value pairs. * `encryption`: Encryption configuration for the bucket * `default_kms_key_name`: A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. * `retention_policy`: Retention policy for the bucket * `effective_time`: The time from which the retention policy was effective * `is_locked`: If the retention policy is locked. If true, the retention policy cannot be removed and the period cannot be reduced. * `retention_period`: The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or made noncurrent. * `project`: A valid API project identifier. * `predefined_default_object_acl`: Apply a predefined set of default object access controls to this bucket. Acceptable values are: - "authenticatedRead": Object owner gets OWNER access, and allAuthenticatedUsers get READER access. - "bucketOwnerFullControl": Object owner gets OWNER access, and project team owners get OWNER access. - "bucketOwnerRead": Object owner gets OWNER access, and project team owners get READER access. - "private": Object owner gets OWNER access. - "projectPrivate": Object owner gets OWNER access, and project team members get access according to their roles. - "publicRead": Object owner gets OWNER access, and allUsers get READER access. Possible values: * authenticatedRead * bucketOwnerFullControl * bucketOwnerRead * private * projectPrivate * publicRead ## GCP permissions Ensure the [Google Cloud Storage](https://console.cloud.google.com/apis/library/storage-component.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_storage_bucket_acl.md ================================================ +++ title = "google_storage_bucket_acl resource" draft = false [menu.gcp] title = "google_storage_bucket_acl" identifier = "inspec/resources/gcp/google_storage_bucket_acl resource" parent = "inspec/resources/gcp" +++ Use the `google_storage_bucket_acl` InSpec audit resource to to test a Google Cloud BucketACL resource. ## Examples ```ruby describe google_storage_bucket_acl(bucket: 'storage-bucket-name', entity: user-email) do it { should exist } its('role') { should cmp "OWNER" } its('bucket') { should eq 'storage-bucket-name' } its('email') { should include entity-email.com } end describe google_storage_bucket_acl(bucket: 'storage-bucket-name', entity: "allUsers") do it { should_not exist } end ``` ### Test that a GCP storage bucket ACL exists describe google_storage_bucket_acl(bucket: 'bucket-buvsjjcndqz', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do it { should exist } end ### Test that a GCP storage bucket ACL has the expected role (READER, WRITER or OWNER) describe google_storage_bucket_acl(bucket: 'bucket-buvsjjcndqz', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do its('role') { should eq 'OWNER' } end ## Properties Properties that can be accessed from the `google_storage_bucket_acl` resource: * `domain`: The domain associated with the entity. * `email`: The email address associated with the entity. * `entity`: The entity holding the permission, in one of the following forms: user-userId user-email group-groupId group-email domain-domain project-team-projectId allUsers allAuthenticatedUsers Examples: The user liz@example.com would be user-liz@example.com. The group example@googlegroups.com would be group-example@googlegroups.com. To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. * `entity_id`: The ID for the entity * `id`: The ID of the access-control entry. * `project_team`: The project team associated with the entity * `project_number`: The project team associated with the entity * `team`: The team. Possible values: * editors * owners * viewers * `role`: The access permission for the entity. Possible values: * OWNER * READER * WRITER ## GCP permissions Ensure the [Google Cloud Storage](https://console.cloud.google.com/apis/library/storage-component.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_storage_bucket_iam_binding.md ================================================ +++ title = "google_storage_bucket_iam_binding resource" draft = false [menu.gcp] title = "google_storage_bucket_iam_binding" identifier = "inspec/resources/gcp/google_storage_bucket_iam_binding resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_storage_bucket_iam_binding` is used to test a Google Bucket Iam Bindings ## Examples ```ruby describe google_storage_bucket_iam_binding(bucket: "bucket", role: "roles/editor") do it { should exist } its('members') { should include 'user:testuser@example.com' } end ``` ## Properties Properties that can be accessed from the `google_storage_bucket_iam_binding` resource: * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. ## GCP permissions Ensure the [Google Cloud Storage](https://console.cloud.google.com/apis/library/storage-component.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_storage_bucket_iam_bindings.md ================================================ +++ title = "google_storage_bucket_iam_bindings resource" draft = false [menu.gcp] title = "google_storage_bucket_iam_bindings" identifier = "inspec/resources/gcp/google_storage_bucket_iam_bindings resource" parent = "inspec/resources/gcp" +++ # google\_storage\_bucket\_iam\_bindings **This resource is deprecated. Please use `google_storage_bucket_iam_policy` instead** Use the `google_storage_bucket_iam_bindings` InSpec audit resource to test properties of all, or a filtered group of, GCP storage bucket IAM bindings.
## Syntax A `google_storage_bucket_iam_bindings` resource block collects GCP storage bucket IAM bindings then tests that group. describe google_storage_bucket_iam_bindings(bucket: 'bucket-buvsjjcndqz') do it { should exist } end Use this InSpec resource to enumerate roles then test in-depth using `google_project_iam_binding`. google_storage_bucket_iam_bindings(bucket: 'bucket-buvsjjcndqz').iam_binding_roles.each do |iam_binding_role| describe google_storage_bucket_iam_binding(bucket: 'bucket-buvsjjcndqz', role: iam_binding_role) do it { should exist } its('members') {should include 'user:someuser@domain.com' } end end
## Examples The following examples show how to use this InSpec audit resource. ### Test that there are no more than a specified number of IAM bindings roles available for the bucket describe google_storage_bucket_iam_bindings(bucket: 'bucket-buvsjjcndqz') do its('count') { should be <= 100} end ### Test that an expected role is available for the bucket describe google_storage_bucket_iam_bindings(bucket: 'bucket-buvsjjcndqz') do its('iam_binding_roles') { should include "roles/storage.admin" } end ### Test that a particular role does not exist using filtering of the plural resource describe google_storage_bucket_iam_bindings(bucket: 'bucket-buvsjjcndqz').where(iam_binding_role: "roles/iam.securityReviewer") do it { should_not exist } end
## Filter criteria This resource supports the following filter criteria: `iam_binding_role`. This may be used with `where`, as a block or as a method. ## Properties * `iam_binding_roles` - an array of google_storage_bucket_iam_binding role strings e.g. `["roles/storage.admin", "roles/owner"]`
## GCP permissions Ensure the [Google Cloud Storage API](https://console.cloud.google.com/apis/api/storage-component.googleapis.com/) is enabled. ================================================ FILE: docs-chef-io/content/google_storage_bucket_iam_policy.md ================================================ +++ title = "google_storage_bucket_iam_policy resource" draft = false [menu.gcp] title = "google_storage_bucket_iam_policy" identifier = "inspec/resources/gcp/google_storage_bucket_iam_policy resource" parent = "inspec/resources/gcp" +++ ## Syntax A `google_storage_bucket_iam_policy` is used to test a Google Bucket Iam Policy resource. ## Examples ```ruby describe google_storage_bucket_iam_policy(bucket: "bucket") do it { should exist } end google_storage_bucket_iam_policy(bucket: "bucket").bindings.each do |binding| describe binding do its('role') { should eq 'roles/editor'} its('members') { should include 'user:testuser@example.com'} end end ``` ## Properties Properties that can be accessed from the `google_storage_bucket_iam_policy` resource: * `iam_binding_roles`: The list of roles that exist on the policy. * `bindings`: Associates a list of members to a role. * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. * `members`: Specifies the identities requesting access for a Cloud Platform resource. * `audit_configs`: Specifies cloud audit logging configuration for this policy. * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. * `audit_log_configs`: The configuration for logging of each type of permission. * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. ## GCP permissions Ensure the [Google Cloud Storage](https://console.cloud.google.com/apis/library/storage-component.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_storage_bucket_object.md ================================================ +++ title = "google_storage_bucket_object resource" draft = false [menu.gcp] title = "google_storage_bucket_object" identifier = "inspec/resources/gcp/google_storage_bucket_object resource" parent = "inspec/resources/gcp" +++ Use the `google_storage_bucket_object` InSpec audit resource to to test a Google Cloud BucketObject resource. ## Examples ```ruby describe google_storage_bucket_object(bucket: 'bucket-with-object', object: 'image1') do it { should exist } its('size.to_i') { should be > 0 } its('time_created') { should be > Time.now - 60*60*24*10 } its('time_updated') { should be > Time.now - 60*60*24*10 } end describe google_storage_bucket_object(bucket: 'bucket-with-object', object: "nonexistent") do it { should_not exist } end ``` ### Test that a GCP compute zone exists describe google_storage_bucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do it { should exist } end ### Test that a GCP storage bucket object has non-zero size describe google_storage_bucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do its('size') { should be > 0 } end ### Test that a GCP storage bucket object has the expected content type describe google_storage_bucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do its('content_type') { should eq "text/plain; charset=utf-8" } end ### Test that a GCP storage bucket object was created within a certain time period describe google_storage_bucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do its('time_created_date') { should be > Time.now - 365*60*60*24*10 } end ### Test that a GCP storage bucket object was last updated within a certain time period describe google_storage_bucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do its('time_updated') { should be > Time.now - 365*60*60*24*10 } end ## Properties Properties that can be accessed from the `google_storage_bucket_object` resource: * `bucket`: The name of the bucket. * `object`: The name of the object. * `content_type`: The Content-Type of the object data. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types for more information on possible Content-Types * `crc32c`: CRC32c checksum. * `etag`: The object entity tag. * `generation`: The content generation of this object. Used for object versioning. * `id`: The ID of the object, including the bucket name, object name, and generation number. * `md5_hash`: MD5 hash of the data; encoded using base64. * `media_link`: Media download link. * `metageneration`: The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. * `name`: The name of the object. * `size`: Content-Length of the data in bytes. * `storage_class`: Storage class of the object. * `time_created`: The time this object was created. * `time_deleted`: The time this object was deleted. Returned if and only if this version of the object is no longer a live version, but remains in the bucket as a noncurrent version. * `time_storage_class_updated`: The time at which the object's storage class was last changed. * `time_updated`: The modification time of the object metadata. ## GCP permissions Ensure the [Google Cloud Storage](https://console.cloud.google.com/apis/library/storage-component.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_storage_bucket_objects.md ================================================ +++ title = "google_storage_bucket_objects resource" draft = false [menu.gcp] title = "google_storage_bucket_objects" identifier = "inspec/resources/gcp/google_storage_bucket_objects resource" parent = "inspec/resources/gcp" +++ Use the `google_storage_bucket_objects` InSpec audit resource to to test a Google Cloud BucketObject resource. ## Examples ```ruby describe google_storage_bucket_objects(bucket: 'bucket-with-object') do its('object_names') { should include 'image1' } its('count') { should be <= 10 } end ``` ### Test that there are no more than a specified number of storage buckets for the project describe google_storage_bucket_objects(bucket: 'bucket-name') do its('count') { should be <= 100 } end ### Test that an expected named bucket is available describe google_storage_bucket_objects(bucket: 'bucket-name') do its('object_buckets'){ should include 'my_expected_bucket' } end ### Test that an expected named bucket is available describe google_storage_bucket_objects(bucket: 'bucket-name') do its('object_names'){ should include 'my_expected_object' } end ### Test a filtered group of bucket objects created within the last 24hrs describe google_storage_bucket_objects(bucket: 'bucket-name').where(object_created_time > Time.now - 60*60*24) do it { should exist } end ## Properties Properties that can be accessed from the `google_storage_bucket_objects` resource: See [google_storage_bucket_object](google_storage_bucket_object) for more detailed information. * `object_buckets`: an array of `google_storage_bucket_object` bucket * `objects`: an array of `google_storage_bucket_object` object * `content_types`: an array of `google_storage_bucket_object` content_type * `crc32cs`: an array of `google_storage_bucket_object` crc32c * `etags`: an array of `google_storage_bucket_object` etag * `generations`: an array of `google_storage_bucket_object` generation * `ids`: an array of `google_storage_bucket_object` id * `md5_hashes`: an array of `google_storage_bucket_object` md5_hash * `media_links`: an array of `google_storage_bucket_object` media_link * `metagenerations`: an array of `google_storage_bucket_object` metageneration * `object_names`: an array of `google_storage_bucket_object` name * `sizes`: an array of `google_storage_bucket_object` size * `storage_classes`: an array of `google_storage_bucket_object` storage_class * `object_created_times`: an array of `google_storage_bucket_object` time_created * `time_deleteds`: an array of `google_storage_bucket_object` time_deleted * `time_storage_class_updateds`: an array of `google_storage_bucket_object` time_storage_class_updated * `time_updateds`: an array of `google_storage_bucket_object` time_updated ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Google Cloud Storage](https://console.cloud.google.com/apis/library/storage-component.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_storage_buckets.md ================================================ +++ title = "google_storage_buckets resource" draft = false [menu.gcp] title = "google_storage_buckets" identifier = "inspec/resources/gcp/google_storage_buckets resource" parent = "inspec/resources/gcp" +++ Use the `google_storage_buckets` InSpec audit resource to to test a Google Cloud Bucket resource. ## Examples ```ruby describe google_storage_buckets(project: 'chef-gcp-inspec') do its('bucket_names') { should include bucket-name } end ``` ### Test that there are no more than a specified number of storage buckets for the project describe google_storage_buckets(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end ### Test that an expected named bucket is available describe google_storage_buckets do its('bucket_names'){ should include "my_expected_bucket" } end ### Test that all buckets belong to the expected project number google_storage_buckets(project: 'chef-inspec-gcp').bucket_names.each do |bucket_name| describe google_storage_bucket(name: bucket_name) do it { should exist } its('project_number'){ should eq 1122334455 } end end ## Properties Properties that can be accessed from the `google_storage_buckets` resource: See [google_storage_bucket](google_storage_bucket) for more detailed information. * `acls`: an array of `google_storage_bucket` acl * `cors`: an array of `google_storage_bucket` cors * `default_event_based_holds`: an array of `google_storage_bucket` default_event_based_hold * `default_object_acls`: an array of `google_storage_bucket` default_object_acl * `bucket_ids`: an array of `google_storage_bucket` id * `lifecycles`: an array of `google_storage_bucket` lifecycle * `bucket_locations`: an array of `google_storage_bucket` location * `loggings`: an array of `google_storage_bucket` logging * `metagenerations`: an array of `google_storage_bucket` metageneration * `bucket_names`: an array of `google_storage_bucket` name * `owners`: an array of `google_storage_bucket` owner * `bucket_project_numbers`: an array of `google_storage_bucket` project_number * `storage_classes`: an array of `google_storage_bucket` storage_class * `time_createds`: an array of `google_storage_bucket` time_created * `updateds`: an array of `google_storage_bucket` updated * `versionings`: an array of `google_storage_bucket` versioning * `websites`: an array of `google_storage_bucket` website * `labels`: an array of `google_storage_bucket` labels * `encryptions`: an array of `google_storage_bucket` encryption * `retention_policies`: an array of `google_storage_bucket` retention_policy * `projects`: an array of `google_storage_bucket` project * `predefined_default_object_acls`: an array of `google_storage_bucket` predefined_default_object_acl ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions Ensure the [Google Cloud Storage](https://console.cloud.google.com/apis/library/storage-component.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_storage_default_object_acl.md ================================================ +++ title = "google_storage_default_object_acl resource" draft = false [menu.gcp] title = "google_storage_default_object_acl" identifier = "inspec/resources/gcp/google_storage_default_object_acl resource" parent = "inspec/resources/gcp" +++ Use the `google_storage_default_object_acl` InSpec audit resource to to test a Google Cloud DefaultObjectACL resource. ## Examples ```ruby describe google_storage_default_object_acl(bucket: 'gcp-inspec-storage-bucket', entity: user-email) do it { should exist } its('role') { should cmp "OWNER" } its('bucket') { should eq 'gcp-inspec-storage-bucket' } its('email') { should include entity-email.com } end describe google_storage_default_object_acl(bucket: 'gcp-inspec-storage-bucket', entity: "allUsers") do it { should_not exist } end ``` ### Test that a GCP storage bucket ACL exists describe google_storage_default_object_acl(bucket: 'bucket-buvsjjcndqz', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do it { should exist } end ### Test that a GCP storage default object ACL has the expected role (READER, WRITER or OWNER) describe google_storage_default_object_acl(bucket: 'bucket-buvsjjcndqz', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do its('role') { should eq 'OWNER' } end ## Properties Properties that can be accessed from the `google_storage_default_object_acl` resource: * `domain`: The domain associated with the entity. * `email`: The email address associated with the entity. * `entity`: The entity holding the permission, in one of the following forms: * user-{{userId}} * user-{{email}} (such as "user-liz@example.com") * group-{{groupId}} * group-{{email}} (such as "group-example@googlegroups.com") * domain-{{domain}} (such as "domain-example.com") * project-team-{{projectId}} * allUsers * allAuthenticatedUsers * `entity_id`: The ID for the entity * `generation`: The content generation of the object, if applied to an object. * `id`: The ID of the access-control entry. * `object`: The name of the object, if applied to an object. * `project_team`: The project team associated with the entity * `project_number`: The project team associated with the entity * `team`: The team. Possible values: * editors * owners * viewers * `role`: The access permission for the entity. Possible values: * OWNER * READER ## GCP permissions Ensure the [Google Cloud Storage](https://console.cloud.google.com/apis/library/storage-component.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_storage_object_acl.md ================================================ +++ title = "google_storage_object_acl resource" draft = false [menu.gcp] title = "google_storage_object_acl" identifier = "inspec/resources/gcp/google_storage_object_acl resource" parent = "inspec/resources/gcp" +++ Use the `google_storage_object_acl` InSpec audit resource to to test a Google Cloud ObjectACL resource. ## Examples ```ruby describe google_storage_object_acl(bucket: 'bucket-with-object', object: 'image1', entity: user-email) do it { should exist } its('role') { should cmp "OWNER" } its('bucket') { should eq 'bucket-with-object' } its('email') { should include entity-email.com } end describe google_storage_object_acl(bucket: 'bucket-with-object', object: 'image1', entity: "allUsers") do it { should_not exist } end ``` ### Test that a GCP storage bucket ACL exists describe google_storage_object_acl(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do it { should exist } end ### Test that a GCP storage object ACL has the expected role (READER, WRITER or OWNER) describe google_storage_object_acl(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do its('role') { should eq 'OWNER' } end ## Properties Properties that can be accessed from the `google_storage_object_acl` resource: * `domain`: The domain associated with the entity. * `email`: The email address associated with the entity. * `entity`: The entity holding the permission, in one of the following forms: * user-{{userId}} * user-{{email}} (such as "user-liz@example.com") * group-{{groupId}} * group-{{email}} (such as "group-example@googlegroups.com") * domain-{{domain}} (such as "domain-example.com") * project-team-{{projectId}} * allUsers * allAuthenticatedUsers * `entity_id`: The ID for the entity * `generation`: The content generation of the object, if applied to an object. * `id`: The ID of the access-control entry. * `object`: The name of the object, if applied to an object. * `project_team`: The project team associated with the entity * `project_number`: The project team associated with the entity * `team`: The team. Possible values: * editors * owners * viewers * `role`: The access permission for the entity. Possible values: * OWNER * READER ## GCP permissions Ensure the [Google Cloud Storage](https://console.cloud.google.com/apis/library/storage-component.googleapis.com/) is enabled for the current project. ================================================ FILE: docs-chef-io/content/google_user.md ================================================ +++ title = "google_user resource" draft = false [menu.gcp] title = "google_user" identifier = "inspec/resources/gcp/google_user resource" parent = "inspec/resources/gcp" +++ # google\_user Use the `google_user` InSpec audit resource to test properties of a single GCP user.
## Syntax A `google_user` resource block declares the tests for a single GCP user by principal email address or immutable ID. describe google_user(user_key: 'principal_email_address@domain.com') do it { should exist } end
## Examples The following examples show how to use this InSpec audit resource. ### Test that a GCP user with specified ID exists describe google_user(user_key: '110491234567894702010') do it { should exist } end ### Test that a GCP user has expected full name describe google_user(user_key: '110491234567894702010') do its('name.full_name') { should eq "Bill S. Preston Esq." } end ### Test that a GCP user has MFA enabled describe google_user(user_key: 'theodore_ted_logan@excellentadventure.com') do it { should have_mfa_enabled } end ### Test that a GCP user is suspended or not describe google_user(user_key: 'theodore_ted_logan@excellentadventure.com') do it { should_not be_suspended } end
## Properties * `agreed_to_terms`, `archived`, `change_password_at_next_login`, `creation_time`, `customer_id`, `emails`, `etag`, `id`, `include_in_global_address_list`, `ip_whitelisted`, `is_admin`, `is_delegated_admin`, `is_enforced_in2_sv`, `is_enrolled_in2_sv`, `is_mailbox_setup`, `kind`, `last_login_time`, `name`, `non_editable_aliases`, `org_unit_path`, `primary_email`, `suspended`
## GCP permissions Ensure the G Suite Admin SDK [Directory API](https://developers.google.com/admin-sdk/directory/) is enabled and you have sufficient privileges to list users. ================================================ FILE: docs-chef-io/content/google_users.md ================================================ +++ title = "google_users resource" draft = false [menu.gcp] title = "google_users" identifier = "inspec/resources/gcp/google_users resource" parent = "inspec/resources/gcp" +++ # google\_users Use the `google_users` InSpec audit resource to test properties of all, or a filtered group of, GCP users.
## Syntax A `google_users` resource block collects GCP users for the specified customer. As documented [here](https://developers.google.com/admin-sdk/directory/v1/reference/users/list), this defaults to the `my_customer` alias to represent your account's `customerId`. describe google_users(customer: 'my_customer') do it { should exist } end The `domain` argument can optionally be provided to get fields from only one domain. Either the customer or the domain parameter must be provided. describe google_users(domain: 'my_domain.com') do it { should exist } end Use this InSpec resource to enumerate IDs then test in-depth using `google_user`. google_users(customer: 'my_customer').user_ids.each do |user_id| describe google_user(user_key: user_id) do it { should exist } it { should_not be_suspended } end end
## Examples The following examples show how to use this InSpec audit resource. ### Test that there are no more than a specified number of users available for the project describe google_users(customer: 'my_customer') do its('count') { should be <= 100} end ### Test that an expected user is available for the project describe google_users(customer: 'my_customer') do its('user_names') { should include "Monsieur Happy" } end ### Test that a subset of all users with name matching "Batman" exists google_users(customer: 'my_customer').where(user_full_name: /Batman/).user_ids.each do |user_id| describe google_user(user_key: user_id) do it { should exist } end end
## Filter criteria This resource supports the following filter criteria: `user_id`; `user_full_name` and `user_email`. Any of these may be used with `where`, as a block or as a method. ## Properties * `user_ids` - an array of google_user identifier integers * `user_full_names` - an array of google_user full name strings * `user_emails`- an array of google_user primary email address strings
## GCP permissions Ensure the G Suite Admin SDK [Directory API](https://developers.google.com/admin-sdk/directory/) is enabled and you have sufficient privileges to list users. ================================================ FILE: docs-chef-io/content/google_vertex_ai_batch_prediction_job.md ================================================ +++ title = "google_vertex_ai_batch_prediction_job resource" draft = false [menu.gcp] title = "google_vertex_ai_batch_prediction_job" identifier = "inspec/resources/gcp/google_vertex_ai_batch_prediction_job resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_batch_prediction_job` InSpec audit resource to to test a Google Cloud BatchPredictionJob resource. ## Examples ```ruby describe google_vertex_ai_batch_prediction_job(name: ' value_name', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_batch_prediction_job` resource: * `create_time`: Output only. Time when the BatchPredictionJob was created. * `model_parameters`: The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri. * `instance_config`: Configuration defining how to transform batch prediction input instances to the instances that the Model accepts. * `included_fields`: Fields that will be included in the prediction instance that is sent to the Model. If instance_type is `array`, the order of field names in included_fields also determines the order of the values in the array. When included_fields is populated, excluded_fields must be empty. The input must be JSONL with objects at each line, CSV, BigQuery or TfRecord. * `instance_type`: The format of the instance that the Model accepts. Vertex AI will convert compatible batch prediction input instance formats to the specified format. Supported values are: * `object`: Each input is converted to JSON object format. * For `bigquery`, each row is converted to an object. * For `jsonl`, each line of the JSONL input must be an object. * Does not apply to `csv`, `file-list`, `tf-record`, or `tf-record-gzip`. * `array`: Each input is converted to JSON array format. * For `bigquery`, each row is converted to an array. The order of columns is determined by the BigQuery column order, unless included_fields is populated. included_fields must be populated for specifying field orders. * For `jsonl`, if each line of the JSONL input is an object, included_fields must be populated for specifying field orders. * Does not apply to `csv`, `file-list`, `tf-record`, or `tf-record-gzip`. If not specified, Vertex AI converts the batch prediction input as follows: * For `bigquery` and `csv`, the behavior is the same as `array`. The order of columns is the same as defined in the file or table, unless included_fields is populated. * For `jsonl`, the prediction instance format is determined by each line of the input. * For `tf-record`/`tf-record-gzip`, each record will be converted to an object in the format of `{"b64": }`, where `` is the Base64-encoded string of the content of the record. * For `file-list`, each file in the list will be converted to an object in the format of `{"b64": }`, where `` is the Base64-encoded string of the content of the file. * `excluded_fields`: Fields that will be excluded in the prediction instance that is sent to the Model. Excluded will be attached to the batch prediction output if key_field is not specified. When excluded_fields is populated, included_fields must be empty. The input must be JSONL with objects at each line, CSV, BigQuery or TfRecord. * `key_field`: The name of the field that is considered as a key. The values identified by the key field is not included in the transformed instances that is sent to the Model. This is similar to specifying this name of the field in excluded_fields. In addition, the batch prediction output will not include the instances. Instead the output will only include the value of the key field, in a field named `key` in the output: * For `jsonl` output format, the output will have a `key` field instead of the `instance` field. * For `csv`/`bigquery` output format, the output will have have a `key` column instead of the instance feature columns. The input must be JSONL with objects at each line, CSV, BigQuery or TfRecord. * `model_version_id`: Output only. The version ID of the Model that produces the predictions via this job. * `dedicated_resources`: A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration. * `starting_replica_count`: Immutable. The number of machine replicas used at the start of the batch operation. If not set, Vertex AI decides starting number, not greater than max_replica_count * `max_replica_count`: Immutable. The maximum number of machine replicas the batch operation may be scaled to. The default value is 10. * `machine_spec`: Specification of a single machine. * `accelerator_type`: Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. Possible values: * ACCELERATOR_TYPE_UNSPECIFIED * NVIDIA_TESLA_K80 * NVIDIA_TESLA_P100 * NVIDIA_TESLA_V100 * NVIDIA_TESLA_P4 * NVIDIA_TESLA_T4 * NVIDIA_TESLA_A100 * NVIDIA_A100_80GB * NVIDIA_L4 * TPU_V2 * TPU_V3 * TPU_V4_POD * `machine_type`: Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. * `accelerator_count`: The number of accelerators to attach to the machine. * `output_info`: Further describes this job's output. Supplements output_config. * `bigquery_output_dataset`: Output only. The path of the BigQuery dataset created, in `bq://projectId.bqDatasetId` format, into which the prediction output is written. * `gcs_output_directory`: Output only. The full path of the Cloud Storage directory created, into which the prediction output is written. * `bigquery_output_table`: Output only. The name of the BigQuery table created, in `predictions_` format, into which the prediction output is written. Can be used by UI to generate the BigQuery output path, for example. * `disable_container_logging`: For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. * `explanation_spec`: Specification of Model explanation. * `parameters`: Parameters to configure explaining for Model's predictions. * `output_indices`: If populated, only returns attributions that have output_index contained in output_indices. It must be an ndarray of integers, with the same shape of the output it's explaining. If not populated, returns attributions for top_k indices of outputs. If neither top_k nor output_indices is populated, returns the argmax index of the outputs. Only applicable to Models that predict multiple outputs (e,g, multi-class Models that predict multiple classes). * `examples`: Example-based explainability that returns the nearest neighbors from the provided dataset. * `presets`: Preset configuration for example-based explanations * `modality`: The modality of the uploaded model, which automatically configures the distance measurement and feature normalization for the underlying example index and queries. If your model does not precisely fit one of these types, it is okay to choose the closest type. Possible values: * MODALITY_UNSPECIFIED * IMAGE * TEXT * TABULAR * `query`: Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. Possible values: * PRECISE * FAST * `neighbor_count`: The number of neighbors to return when querying for examples. * `example_gcs_source`: The Cloud Storage input instances. * `gcs_source`: The Google Cloud Storage location for the input content. * `uris`: Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. * `data_format`: The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. Possible values: * DATA_FORMAT_UNSPECIFIED * JSONL * `nearest_neighbor_search_config`: The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). * `xrai_attribution`: An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Supported only by image Models. * `smooth_grad_config`: Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf * `feature_noise_sigma`: Noise sigma by features. Noise sigma represents the standard deviation of the gaussian kernel that will be used to add noise to interpolated inputs prior to computing gradients. * `noise_sigma`: Noise sigma per feature. No noise is added to features that are not set. * `name`: The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. * `sigma`: This represents the standard deviation of the Gaussian kernel that will be used to add noise to the feature prior to computing gradients. Similar to noise_sigma but represents the noise added to the current feature. Defaults to 0.1. * `noise_sigma`: This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. If the distribution is different per feature, set feature_noise_sigma instead for each feature. * `noisy_sample_count`: The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3. * `step_count`: Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. Valid range of its value is [1, 100], inclusively. * `blur_baseline_config`: Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383 * `max_blur_sigma`: The standard deviation of the blur kernel for the blurred baseline. The same blurring parameter is used for both the height and the width dimension. If not set, the method defaults to the zero (i.e. black for images) baseline. * `top_k`: If populated, returns attributions for top K indices of outputs (defaults to 1). Only applies to Models that predicts more than one outputs (e,g, multi-class Models). When set to -1, returns explanations for all outputs. * `integrated_gradients_attribution`: An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365 * `step_count`: Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is within the desired error range. Valid range of its value is [1, 100], inclusively. * `smooth_grad_config`: Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf * `feature_noise_sigma`: Noise sigma by features. Noise sigma represents the standard deviation of the gaussian kernel that will be used to add noise to interpolated inputs prior to computing gradients. * `noise_sigma`: Noise sigma per feature. No noise is added to features that are not set. * `name`: The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. * `sigma`: This represents the standard deviation of the Gaussian kernel that will be used to add noise to the feature prior to computing gradients. Similar to noise_sigma but represents the noise added to the current feature. Defaults to 0.1. * `noise_sigma`: This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. If the distribution is different per feature, set feature_noise_sigma instead for each feature. * `noisy_sample_count`: The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3. * `blur_baseline_config`: Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383 * `max_blur_sigma`: The standard deviation of the blur kernel for the blurred baseline. The same blurring parameter is used for both the height and the width dimension. If not set, the method defaults to the zero (i.e. black for images) baseline. * `sampled_shapley_attribution`: An attribution method that approximates Shapley values for features that contribute to the label being predicted. A sampling strategy is used to approximate the value rather than considering all subsets of features. * `path_count`: Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. * `metadata`: Metadata describing the Model's input and output for explanation. * `feature_attributions_schema_uri`: Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML tabular Models always have this field populated by Vertex AI. Note: The URI given on output may be different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `latent_space_source`: Name of the source to generate embeddings for example based explanations. * `outputs`: Required. Map from output names to output metadata. For Vertex AI-provided Tensorflow images, keys can be any user defined string that consists of any UTF-8 characters. For custom images, keys are the name of the output field in the prediction to be explained. Currently only one key is allowed. * `additional_properties`: Metadata of the prediction output to be explained. * `inputs`: Required. Map from feature names to feature input metadata. Keys are the name of the features. Values are the specification of the feature. An empty InputMetadata is valid. It describes a text feature which has the name specified as the key in ExplanationMetadata.inputs. The baseline of the empty feature is chosen by Vertex AI. For Vertex AI-provided Tensorflow images, the key can be any friendly name of the feature. Once specified, featureAttributions are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. * `additional_properties`: Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. * `end_time`: Output only. Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. * `generate_explanation`: Generate explanation with the batch prediction results. When set to `true`, the batch prediction output changes based on the `predictions_format` field of the BatchPredictionJob.output_config object: * `bigquery`: output includes a column named `explanation`. The value is a struct that conforms to the Explanation object. * `jsonl`: The JSON objects on each line include an additional entry keyed `explanation`. The value of the entry is a JSON object that conforms to the Explanation object. * `csv`: Generating explanations for CSV format is not supported. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated. * `resources_consumed`: Statistics information about resource consumption. * `replica_hours`: Output only. The number of replica hours used. Note that many replicas may run in parallel, and additionally any given work may be queued for some time. Therefore this value is not strictly related to wall time. * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `input_config`: Configures the input to BatchPredictionJob. See Model.supported_input_storage_formats for Model's supported input formats, and how instances should be expressed via any of them. * `instances_format`: Required. The format in which instances are given, must be one of the Model's supported_input_storage_formats. * `bigquery_source`: The BigQuery location for the input content. * `input_uri`: Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. * `gcs_source`: The Google Cloud Storage location for the input content. * `uris`: Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. * `unmanaged_container_model`: Contains model information necessary to perform batch prediction without requiring a full model import. * `artifact_uri`: The path to the directory containing the Model artifact and any of its supporting files. * `predict_schemata`: Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. * `instance_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `parameters_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI, if no parameters are supported, then it is set to an empty string. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `prediction_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single prediction produced by this Model, which are returned via PredictResponse.predictions, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `container_spec`: Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `predict_route`: Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.predict to this path on the container's IP address and port. Vertex AI then returns the container's response in the API response. For example, if you set this field to `/foo`, then when Vertex AI receives a prediction request, it forwards the request body in a POST request to the `/foo` path on the port of your container specified by the first value of this `ModelContainerSpec`'s ports field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * `image_uri`: Required. Immutable. URI of the Docker image to be used as the custom container for serving predictions. This URI must identify an image in Artifact Registry or Container Registry. Learn more about the [container publishing requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon ModelService.UploadModel, stored internally, and this original path is afterwards not used. To learn about the requirements for the Docker image itself, see [Custom container requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. * `env`: Immutable. List of environment variables to set in the container. After the container starts running, code running in the container can read these environment variables. Additionally, the command and args fields can reference these variables. Later entries in this list can also reference earlier entries. For example, the following example sets the variable `VAR_2` to have the value `foo bar`: ```json [ { "name": "VAR_1", "value": "foo" }, { "name": "VAR_2", "value": "$(VAR_1) bar" } ] ``` If you switch the order of the variables in the example, then the expansion does not occur. This field corresponds to the `env` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `name`: Required. Name of the environment variable. Must be a valid C identifier. * `value`: Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. * `args`: Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify this field as an array of executable and arguments, similar to a Docker `CMD`'s "default parameters" form. If you don't specify this field but do specify the command field, then the command from the `command` field runs without any additional arguments. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container's `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `args` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `command`: Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint). Specify this field as an array of executable and arguments, similar to a Docker `ENTRYPOINT`'s "exec" form, not its "shell" form. If you do not specify this field, then the container's `ENTRYPOINT` runs, in conjunction with the args field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd), if either exists. If this field is not specified and the container does not have an `ENTRYPOINT`, then refer to the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). If you specify this field, then you can also specify the `args` field to provide additional arguments for this command. However, if you specify this field, then the container's `CMD` is ignored. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container's `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `command` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `ports`: Immutable. List of ports to expose from the container. Vertex AI sends any prediction requests that it receives to the first port on this list. Vertex AI also sends [liveness and health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```json [ { "containerPort": 8080 } ] ``` Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `container_port`: The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. * `health_route`: Immutable. HTTP path on the container to send health checks to. Vertex AI intermittently sends GET requests to this path on the container's IP address and port to check that the container is healthy. Read more about [health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). For example, if you set this field to `/bar`, then Vertex AI intermittently sends a GET request to the `/bar` path on the port of your container specified by the first value of this `ModelContainerSpec`'s ports field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/ DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * `completion_stats`: Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. * `successful_forecast_point_count`: Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. * `incomplete_count`: Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). * `failed_count`: Output only. The number of entities for which any error was encountered. * `successful_count`: Output only. The number of entities that had been processed successfully. * `start_time`: Output only. Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state. * `manual_batch_tuning_parameters`: Manual batch tuning parameters. * `batch_size`: Immutable. The number of the records (e.g. instances) of the operation given in each batch to a machine replica. Machine type, and size of a single record should be considered when setting this parameter, higher value speeds up the batch operation's execution, but too high value will result in a whole batch not fitting in a machine's memory, and the whole operation will fail. The default value is 64. * `update_time`: Output only. Time when the BatchPredictionJob was most recently updated. * `name`: Output only. Resource name of the BatchPredictionJob. * `labels`: The labels with user-defined metadata to organize BatchPredictionJobs. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: * `state`: Output only. The detailed state of the job. Possible values: * JOB_STATE_UNSPECIFIED * JOB_STATE_QUEUED * JOB_STATE_PENDING * JOB_STATE_RUNNING * JOB_STATE_SUCCEEDED * JOB_STATE_FAILED * JOB_STATE_CANCELLING * JOB_STATE_CANCELLED * JOB_STATE_PAUSED * JOB_STATE_EXPIRED * JOB_STATE_UPDATING * JOB_STATE_PARTIALLY_SUCCEEDED * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `partial_failures`: Output only. Partial failures encountered. For example, single files that can't be read. This field never exceeds 20 entries. Status details fields contain standard Google Cloud error details. * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `model`: The name of the Model resource that produces the predictions via this job, must share the same ancestor Location. Starting this job has no impact on any existing deployments of the Model and their resources. Exactly one of model and unmanaged_container_model must be set. The model resource name may contain version id or version alias to specify the version. Example: `projects/{project}/locations/{location}/models/{model}@2` or `projects/{project}/locations/{location}/models/{model}@golden` if no version is specified, the default version will be deployed. The model resource could also be a publisher model. Example: `publishers/{publisher}/models/{model}` or `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}` * `output_config`: Configures the output of BatchPredictionJob. See Model.supported_output_storage_formats for supported output formats, and how predictions are expressed via any of them. * `gcs_destination`: The Google Cloud Storage location where the output is to be written to. * `output_uri_prefix`: Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist. * `predictions_format`: Required. The format in which Vertex AI gives the predictions, must be one of the Model's supported_output_storage_formats. * `bigquery_destination`: The BigQuery location for the output content. * `output_uri`: Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`. * `display_name`: Required. The user-defined name of this BatchPredictionJob. * `service_account`: The service account that the DeployedModel's container runs as. If not specified, a system generated one will be used, which has minimal permissions and the custom container, if used, may not have enough permission to access other Google Cloud resources. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_batch_prediction_jobs.md ================================================ +++ title = "google_vertex_ai_batch_prediction_jobs resource" draft = false [menu.gcp] title = "google_vertex_ai_batch_prediction_jobs" identifier = "inspec/resources/gcp/google_vertex_ai_batch_prediction_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_batch_prediction_jobs` InSpec audit resource to to test a Google Cloud BatchPredictionJob resource. ## Examples ```ruby describe google_vertex_ai_batch_prediction_jobs(parent: ' value_parent', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_batch_prediction_jobs` resource: See [google_vertex_ai_batch_prediction_job](google_vertex_ai_batch_prediction_job) for more detailed information. * `create_times`: an array of `google_vertex_ai_batch_prediction_job` create_time * `model_parameters`: an array of `google_vertex_ai_batch_prediction_job` model_parameters * `instance_configs`: an array of `google_vertex_ai_batch_prediction_job` instance_config * `model_version_ids`: an array of `google_vertex_ai_batch_prediction_job` model_version_id * `dedicated_resources`: an array of `google_vertex_ai_batch_prediction_job` dedicated_resources * `output_infos`: an array of `google_vertex_ai_batch_prediction_job` output_info * `disable_container_loggings`: an array of `google_vertex_ai_batch_prediction_job` disable_container_logging * `explanation_specs`: an array of `google_vertex_ai_batch_prediction_job` explanation_spec * `end_times`: an array of `google_vertex_ai_batch_prediction_job` end_time * `generate_explanations`: an array of `google_vertex_ai_batch_prediction_job` generate_explanation * `resources_consumeds`: an array of `google_vertex_ai_batch_prediction_job` resources_consumed * `errors`: an array of `google_vertex_ai_batch_prediction_job` error * `input_configs`: an array of `google_vertex_ai_batch_prediction_job` input_config * `unmanaged_container_models`: an array of `google_vertex_ai_batch_prediction_job` unmanaged_container_model * `completion_stats`: an array of `google_vertex_ai_batch_prediction_job` completion_stats * `start_times`: an array of `google_vertex_ai_batch_prediction_job` start_time * `manual_batch_tuning_parameters`: an array of `google_vertex_ai_batch_prediction_job` manual_batch_tuning_parameters * `update_times`: an array of `google_vertex_ai_batch_prediction_job` update_time * `names`: an array of `google_vertex_ai_batch_prediction_job` name * `labels`: an array of `google_vertex_ai_batch_prediction_job` labels * `states`: an array of `google_vertex_ai_batch_prediction_job` state * `encryption_specs`: an array of `google_vertex_ai_batch_prediction_job` encryption_spec * `partial_failures`: an array of `google_vertex_ai_batch_prediction_job` partial_failures * `models`: an array of `google_vertex_ai_batch_prediction_job` model * `output_configs`: an array of `google_vertex_ai_batch_prediction_job` output_config * `display_names`: an array of `google_vertex_ai_batch_prediction_job` display_name * `service_accounts`: an array of `google_vertex_ai_batch_prediction_job` service_account ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_custom_job.md ================================================ +++ title = "google_vertex_ai_custom_job resource" draft = false [menu.gcp] title = "google_vertex_ai_custom_job" identifier = "inspec/resources/gcp/google_vertex_ai_custom_job resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_custom_job` InSpec audit resource to to test a Google Cloud CustomJob resource. ## Examples ```ruby describe google_vertex_ai_custom_job(name: ' value_name', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_custom_job` resource: * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `web_access_uris`: Output only. URIs for accessing [interactive shells](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) (one URI for each training node). Only available if job_spec.enable_web_access is `true`. The keys are names of each node in the training job; for example, `workerpool0-0` for the primary node, `workerpool1-0` for the first node in the second worker pool, and `workerpool1-1` for the second node in the second worker pool. The values are the URIs for each node's interactive shell. * `additional_properties`: * `job_spec`: Represents the spec of a CustomJob. * `worker_pool_specs`: Required. The spec of the worker pools including machine type and Docker image. All worker pools except the first one are optional and can be skipped by providing an empty value. * `container_spec`: The spec of a Container. * `env`: Environment variables to be passed to the container. Maximum limit is 100. * `name`: Required. Name of the environment variable. Must be a valid C identifier. * `value`: Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. * `args`: The arguments to be passed when starting the container. * `command`: The command to be invoked when the container is started. It overrides the entrypoint instruction in Dockerfile when provided. * `image_uri`: Required. The URI of a container image in the Container Registry that is to be run on each worker replica. * `machine_spec`: Specification of a single machine. * `accelerator_type`: Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. Possible values: * ACCELERATOR_TYPE_UNSPECIFIED * NVIDIA_TESLA_K80 * NVIDIA_TESLA_P100 * NVIDIA_TESLA_V100 * NVIDIA_TESLA_P4 * NVIDIA_TESLA_T4 * NVIDIA_TESLA_A100 * NVIDIA_A100_80GB * NVIDIA_L4 * TPU_V2 * TPU_V3 * TPU_V4_POD * `machine_type`: Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. * `accelerator_count`: The number of accelerators to attach to the machine. * `replica_count`: Optional. The number of worker replicas to use for this worker pool. * `nfs_mounts`: Optional. List of NFS mount spec. * `path`: Required. Source path exported from NFS server. Has to start with '/', and combined with the ip address, it indicates the source mount path in the form of `server:path` * `mount_point`: Required. Destination mount path. The NFS will be mounted for the user under /mnt/nfs/ * `server`: Required. IP address of the NFS server. * `python_package_spec`: The spec of a Python packaged code. * `package_uris`: Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100. * `env`: Environment variables to be passed to the python module. Maximum limit is 100. * `name`: Required. Name of the environment variable. Must be a valid C identifier. * `value`: Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. * `executor_image_uri`: Required. The URI of a container image in Artifact Registry that will run the provided Python package. Vertex AI provides a wide range of executor images with pre-installed packages to meet users' various use cases. See the list of [pre-built containers for training](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). You must use an image from this list. * `args`: Command line arguments to be passed to the Python task. * `python_module`: Required. The Python module name to run after installing the packages. * `disk_spec`: Represents the spec of disk options. * `boot_disk_type`: Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). * `boot_disk_size_gb`: Size in GB of the boot disk (default is 100GB). * `enable_web_access`: Optional. Whether you want Vertex AI to enable [interactive shell access](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) to training containers. If set to `true`, you can access interactive shells at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials). * `tensorboard`: Optional. The name of a Vertex AI Tensorboard resource to which this CustomJob will upload Tensorboard logs. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}` * `experiment`: Optional. The Experiment associated with this job. Format: `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}` * `experiment_run`: Optional. The Experiment Run associated with this job. Format: `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}-{experiment-run-name}` * `scheduling`: All parameters related to queuing and scheduling of custom jobs. * `disable_retries`: Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false. * `timeout`: The maximum job running time. The default is 7 days. * `restart_job_on_worker_restart`: Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job. * `enable_dashboard_access`: Optional. Whether you want Vertex AI to enable access to the customized dashboard in training chief container. If set to `true`, you can access the dashboard at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials). * `service_account`: Specifies the service account for workload run-as account. Users submitting jobs must have act-as permission on this run-as account. If unspecified, the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) for the CustomJob's project is used. * `base_output_directory`: The Google Cloud Storage location where the output is to be written to. * `output_uri_prefix`: Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist. * `reserved_ip_ranges`: Optional. A list of names for the reserved ip ranges under the VPC network that can be used for this job. If set, we will deploy the job within the provided ip ranges. Otherwise, the job will be deployed to any ip ranges under the provided VPC network. Example: ['vertex-ai-ip-range']. * `network`: Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the Job should be peered. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the job is not peered with any network. * `start_time`: Output only. Time when the CustomJob for the first time entered the `JOB_STATE_RUNNING` state. * `labels`: The labels with user-defined metadata to organize CustomJobs. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `create_time`: Output only. Time when the CustomJob was created. * `update_time`: Output only. Time when the CustomJob was most recently updated. * `end_time`: Output only. Time when the CustomJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. * `state`: Output only. The detailed state of the job. Possible values: * JOB_STATE_UNSPECIFIED * JOB_STATE_QUEUED * JOB_STATE_PENDING * JOB_STATE_RUNNING * JOB_STATE_SUCCEEDED * JOB_STATE_FAILED * JOB_STATE_CANCELLING * JOB_STATE_CANCELLED * JOB_STATE_PAUSED * JOB_STATE_EXPIRED * JOB_STATE_UPDATING * JOB_STATE_PARTIALLY_SUCCEEDED * `display_name`: Required. The display name of the CustomJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `name`: Output only. Resource name of a CustomJob. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_custom_jobs.md ================================================ +++ title = "google_vertex_ai_custom_jobs resource" draft = false [menu.gcp] title = "google_vertex_ai_custom_jobs" identifier = "inspec/resources/gcp/google_vertex_ai_custom_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_custom_jobs` InSpec audit resource to to test a Google Cloud CustomJob resource. ## Examples ```ruby describe google_vertex_ai_custom_job(parent: ' value_parent', region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_custom_jobs` resource: See [google_vertex_ai_custom_job](google_vertex_ai_custom_job) for more detailed information. * `errors`: an array of `google_vertex_ai_custom_job` error * `web_access_uris`: an array of `google_vertex_ai_custom_job` web_access_uris * `job_specs`: an array of `google_vertex_ai_custom_job` job_spec * `start_times`: an array of `google_vertex_ai_custom_job` start_time * `labels`: an array of `google_vertex_ai_custom_job` labels * `encryption_specs`: an array of `google_vertex_ai_custom_job` encryption_spec * `create_times`: an array of `google_vertex_ai_custom_job` create_time * `update_times`: an array of `google_vertex_ai_custom_job` update_time * `end_times`: an array of `google_vertex_ai_custom_job` end_time * `states`: an array of `google_vertex_ai_custom_job` state * `display_names`: an array of `google_vertex_ai_custom_job` display_name * `names`: an array of `google_vertex_ai_custom_job` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_dataset.md ================================================ +++ title = "google_vertex_ai_dataset resource" draft = false [menu.gcp] title = "google_vertex_ai_dataset" identifier = "inspec/resources/gcp/google_vertex_ai_dataset resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_dataset` InSpec audit resource to to test a Google Cloud Dataset resource. ## Examples ```ruby describe google_vertex_ai_dataset(name: ' ', region: ' ') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_dataset` resource: * `saved_queries`: All SavedQueries belong to the Dataset will be returned in List/Get Dataset response. The annotation_specs field will not be populated except for UI cases which will only use annotation_spec_count. In CreateDataset request, a SavedQuery is created together if this field is set, up to one SavedQuery can be set in CreateDatasetRequest. The SavedQuery should not contain any AnnotationSpec. * `annotation_spec_count`: Output only. Number of AnnotationSpecs in the context of the SavedQuery. * `update_time`: Output only. Timestamp when SavedQuery was last updated. * `support_automl_training`: Output only. If the Annotations belonging to the SavedQuery can be used for AutoML training. * `metadata`: Some additional information about the SavedQuery. * `problem_type`: Required. Problem type of the SavedQuery. Allowed values: * IMAGE_CLASSIFICATION_SINGLE_LABEL * IMAGE_CLASSIFICATION_MULTI_LABEL * IMAGE_BOUNDING_POLY * IMAGE_BOUNDING_BOX * TEXT_CLASSIFICATION_SINGLE_LABEL * TEXT_CLASSIFICATION_MULTI_LABEL * TEXT_EXTRACTION * TEXT_SENTIMENT * VIDEO_CLASSIFICATION * VIDEO_OBJECT_TRACKING * `name`: Output only. Resource name of the SavedQuery. * `create_time`: Output only. Timestamp when this SavedQuery was created. * `etag`: Used to perform a consistent read-modify-write update. If not set, a blind "overwrite" update happens. * `display_name`: Required. The user-defined name of the SavedQuery. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `annotation_filter`: Output only. Filters on the Annotations in the dataset. * `create_time`: Output only. Timestamp when this Dataset was created. * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `name`: Output only. The resource name of the Dataset. * `metadata`: Required. Additional information about the Dataset. * `etag`: Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `description`: The description of the Dataset. * `labels`: The labels with user-defined metadata to organize your Datasets. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Dataset (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. Following system labels exist for each Dataset: * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its value is the metadata_schema's title. * `additional_properties`: * `metadata_schema_uri`: Required. Points to a YAML file stored on Google Cloud Storage describing additional information about the Dataset. The schema is defined as an OpenAPI 3.0.2 Schema Object. The schema files that can be used here are found in gs://google-cloud-aiplatform/schema/dataset/metadata/. * `metadata_artifact`: Output only. The resource name of the Artifact that was created in MetadataStore when creating the Dataset. The Artifact resource name pattern is `projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}`. * `update_time`: Output only. Timestamp when this Dataset was last updated. * `data_item_count`: Output only. The number of DataItems in this Dataset. Only apply for non-structured Dataset. * `display_name`: Required. The user-defined name of the Dataset. The name can be up to 128 characters long and can consist of any UTF-8 characters. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_dataset_data_item_annotations.md ================================================ +++ title = "google_vertex_ai_dataset_data_item_annotations resource" draft = false [menu.gcp] title = "google_vertex_ai_dataset_data_item_annotations" identifier = "inspec/resources/gcp/google_vertex_ai_dataset_data_item_annotations resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_dataset_data_item_annotations` InSpec audit resource to to test a Google Cloud DatasetDataItemAnnotation resource. ## Examples ```ruby describe google_vertex_ai_dataset_data_item_annotations(parent: "projects/#{gcp_project_id}/locations/#{dataset_data_item_annotation['region']}/datasets/#{dataset_data_item_annotation['dataset']}/dataItems/#{dataset_data_item_annotation['dataItem']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_dataset_data_item_annotations` resource: See [google_vertex_ai_dataset_data_item_annotation](google_vertex_ai_dataset_data_item_annotation) for more detailed information. * `payload_schema_uris`: an array of `google_vertex_ai_dataset_data_item_annotation` payload_schema_uri * `create_times`: an array of `google_vertex_ai_dataset_data_item_annotation` create_time * `etags`: an array of `google_vertex_ai_dataset_data_item_annotation` etag * `labels`: an array of `google_vertex_ai_dataset_data_item_annotation` labels * `update_times`: an array of `google_vertex_ai_dataset_data_item_annotation` update_time * `payloads`: an array of `google_vertex_ai_dataset_data_item_annotation` payload * `annotation_sources`: an array of `google_vertex_ai_dataset_data_item_annotation` annotation_source * `names`: an array of `google_vertex_ai_dataset_data_item_annotation` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_datasets.md ================================================ +++ title = "google_vertex_ai_datasets resource" draft = false [menu.gcp] title = "google_vertex_ai_datasets" identifier = "inspec/resources/gcp/google_vertex_ai_datasets resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_datasets` InSpec audit resource to to test a Google Cloud Dataset resource. ## Examples ```ruby describe google_vertex_ai_dataset(parent: ' ', region: ' ') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_datasets` resource: See [google_vertex_ai_dataset](google_vertex_ai_dataset) for more detailed information. * `saved_queries`: an array of `google_vertex_ai_dataset` saved_queries * `create_times`: an array of `google_vertex_ai_dataset` create_time * `encryption_specs`: an array of `google_vertex_ai_dataset` encryption_spec * `names`: an array of `google_vertex_ai_dataset` name * `metadata`: an array of `google_vertex_ai_dataset` metadata * `etags`: an array of `google_vertex_ai_dataset` etag * `descriptions`: an array of `google_vertex_ai_dataset` description * `labels`: an array of `google_vertex_ai_dataset` labels * `metadata_schema_uris`: an array of `google_vertex_ai_dataset` metadata_schema_uri * `metadata_artifacts`: an array of `google_vertex_ai_dataset` metadata_artifact * `update_times`: an array of `google_vertex_ai_dataset` update_time * `data_item_counts`: an array of `google_vertex_ai_dataset` data_item_count * `display_names`: an array of `google_vertex_ai_dataset` display_name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_datasets_annotation_spec.md ================================================ +++ title = "google_vertex_ai_datasets_annotation_spec resource" draft = false [menu.gcp] title = "google_vertex_ai_datasets_annotation_spec" identifier = "inspec/resources/gcp/google_vertex_ai_datasets_annotation_spec resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_datasets_annotation_spec` InSpec audit resource to to test a Google Cloud DatasetsAnnotationSpec resource. ## Examples ```ruby describe google_vertex_ai_datasets_annotation_spec(name: "projects/#{gcp_project_id}/locations/#{datasets_annotation_spec['region']}/datasets/#{datasets_annotation_spec['dataset']}/annotationSpecs/#{datasets_annotation_spec['name']}", region: ' value_region') do it { should exist } its('display_name') { should cmp 'value_displayname' } its('name') { should cmp 'value_name' } its('etag') { should cmp 'value_etag' } its('create_time') { should cmp 'value_createtime' } its('update_time') { should cmp 'value_updatetime' } end describe google_vertex_ai_datasets_annotation_spec(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_datasets_annotation_spec` resource: * `display_name`: Required. The user-defined name of the AnnotationSpec. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `name`: Output only. Resource name of the AnnotationSpec. * `etag`: Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `create_time`: Output only. Timestamp when this AnnotationSpec was created. * `update_time`: Output only. Timestamp when AnnotationSpec was last updated. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_datasets_data_items.md ================================================ +++ title = "google_vertex_ai_datasets_data_items resource" draft = false [menu.gcp] title = "google_vertex_ai_datasets_data_items" identifier = "inspec/resources/gcp/google_vertex_ai_datasets_data_items resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_datasets_data_items` InSpec audit resource to to test a Google Cloud DatasetsDataItem resource. ## Examples ```ruby describe google_vertex_ai_datasets_data_items(parent: "projects/#{gcp_project_id}/locations/#{datasets_data_item['region']}/datasets/#{datasets_data_item['dataset']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_datasets_data_items` resource: See [google_vertex_ai_datasets_data_item](google_vertex_ai_datasets_data_item) for more detailed information. * `update_times`: an array of `google_vertex_ai_datasets_data_item` update_time * `etags`: an array of `google_vertex_ai_datasets_data_item` etag * `names`: an array of `google_vertex_ai_datasets_data_item` name * `create_times`: an array of `google_vertex_ai_datasets_data_item` create_time * `payloads`: an array of `google_vertex_ai_datasets_data_item` payload * `labels`: an array of `google_vertex_ai_datasets_data_item` labels ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_datasets_saved_queries.md ================================================ +++ title = "google_vertex_ai_datasets_saved_queries resource" draft = false [menu.gcp] title = "google_vertex_ai_datasets_saved_queries" identifier = "inspec/resources/gcp/google_vertex_ai_datasets_saved_queries resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_datasets_saved_queries` InSpec audit resource to to test a Google Cloud DatasetsSavedQuery resource. ## Examples ```ruby describe google_vertex_ai_datasets_saved_queries(parent: "projects/#{gcp_project_id}/locations/#{datasets_saved_query['region']}/datasets/#{datasets_saved_query['dataset']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_datasets_saved_queries` resource: See [google_vertex_ai_datasets_saved_query](google_vertex_ai_datasets_saved_query) for more detailed information. * `annotation_spec_counts`: an array of `google_vertex_ai_datasets_saved_query` annotation_spec_count * `update_times`: an array of `google_vertex_ai_datasets_saved_query` update_time * `support_automl_trainings`: an array of `google_vertex_ai_datasets_saved_query` support_automl_training * `metadata`: an array of `google_vertex_ai_datasets_saved_query` metadata * `problem_types`: an array of `google_vertex_ai_datasets_saved_query` problem_type * `names`: an array of `google_vertex_ai_datasets_saved_query` name * `create_times`: an array of `google_vertex_ai_datasets_saved_query` create_time * `etags`: an array of `google_vertex_ai_datasets_saved_query` etag * `display_names`: an array of `google_vertex_ai_datasets_saved_query` display_name * `annotation_filters`: an array of `google_vertex_ai_datasets_saved_query` annotation_filter ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_endpoint.md ================================================ +++ title = "google_vertex_ai_endpoint resource" draft = false [menu.gcp] title = "google_vertex_ai_endpoint" identifier = "inspec/resources/gcp/google_vertex_ai_endpoint resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_endpoint` InSpec audit resource to to test a Google Cloud Endpoint resource. ## Examples ```ruby describe google_vertex_ai_endpoint(name: "projects/#{gcp_project_id}/locations/#{endpoint['region']}/endpoints/#{endpoint['name']}", region: ' value_region') do it { should exist } its('update_time') { should cmp 'value_updatetime' } its('model_deployment_monitoring_job') { should cmp 'value_modeldeploymentmonitoringjob' } its('description') { should cmp 'value_description' } its('network') { should cmp 'value_network' } its('display_name') { should cmp 'value_displayname' } its('etag') { should cmp 'value_etag' } its('create_time') { should cmp 'value_createtime' } its('name') { should cmp 'value_name' } end describe google_vertex_ai_endpoint(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_endpoint` resource: * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `enable_private_service_connect`: Deprecated: If true, expose the Endpoint via private service connect. Only one of the fields, network or enable_private_service_connect, can be set. * `update_time`: Output only. Timestamp when this Endpoint was last updated. * `model_deployment_monitoring_job`: Output only. Resource name of the Model Monitoring job associated with this Endpoint if monitoring is enabled by JobService.CreateModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` * `description`: The description of the Endpoint. * `deployed_models`: Output only. The models deployed in this Endpoint. To add or remove DeployedModels use EndpointService.DeployModel and EndpointService.UndeployModel respectively. * `create_time`: Output only. Timestamp when the DeployedModel was created. * `private_endpoints`: PrivateEndpoints proto is used to provide paths for users to send requests privately. To send request via private service access, use predict_http_uri, explain_http_uri or health_http_uri. To send request via private service connect, use service_attachment. * `health_http_uri`: Output only. Http(s) path to send health check requests. * `explain_http_uri`: Output only. Http(s) path to send explain requests. * `predict_http_uri`: Output only. Http(s) path to send prediction requests. * `service_attachment`: Output only. The name of the service attachment resource. Populated if private service connect is enabled. * `disable_container_logging`: For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. * `model_version_id`: Output only. The version ID of the model that is deployed. * `explanation_spec`: Specification of Model explanation. * `parameters`: Parameters to configure explaining for Model's predictions. * `output_indices`: If populated, only returns attributions that have output_index contained in output_indices. It must be an ndarray of integers, with the same shape of the output it's explaining. If not populated, returns attributions for top_k indices of outputs. If neither top_k nor output_indices is populated, returns the argmax index of the outputs. Only applicable to Models that predict multiple outputs (e,g, multi-class Models that predict multiple classes). * `examples`: Example-based explainability that returns the nearest neighbors from the provided dataset. * `presets`: Preset configuration for example-based explanations * `modality`: The modality of the uploaded model, which automatically configures the distance measurement and feature normalization for the underlying example index and queries. If your model does not precisely fit one of these types, it is okay to choose the closest type. Possible values: * MODALITY_UNSPECIFIED * IMAGE * TEXT * TABULAR * `query`: Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. Possible values: * PRECISE * FAST * `neighbor_count`: The number of neighbors to return when querying for examples. * `example_gcs_source`: The Cloud Storage input instances. * `gcs_source`: The Google Cloud Storage location for the input content. * `uris`: Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. * `data_format`: The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. Possible values: * DATA_FORMAT_UNSPECIFIED * JSONL * `nearest_neighbor_search_config`: The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). * `xrai_attribution`: An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Supported only by image Models. * `smooth_grad_config`: Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf * `feature_noise_sigma`: Noise sigma by features. Noise sigma represents the standard deviation of the gaussian kernel that will be used to add noise to interpolated inputs prior to computing gradients. * `noise_sigma`: Noise sigma per feature. No noise is added to features that are not set. * `name`: The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. * `sigma`: This represents the standard deviation of the Gaussian kernel that will be used to add noise to the feature prior to computing gradients. Similar to noise_sigma but represents the noise added to the current feature. Defaults to 0.1. * `noise_sigma`: This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. If the distribution is different per feature, set feature_noise_sigma instead for each feature. * `noisy_sample_count`: The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3. * `step_count`: Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. Valid range of its value is [1, 100], inclusively. * `blur_baseline_config`: Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383 * `max_blur_sigma`: The standard deviation of the blur kernel for the blurred baseline. The same blurring parameter is used for both the height and the width dimension. If not set, the method defaults to the zero (i.e. black for images) baseline. * `top_k`: If populated, returns attributions for top K indices of outputs (defaults to 1). Only applies to Models that predicts more than one outputs (e,g, multi-class Models). When set to -1, returns explanations for all outputs. * `integrated_gradients_attribution`: An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365 * `step_count`: Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is within the desired error range. Valid range of its value is [1, 100], inclusively. * `smooth_grad_config`: Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf * `feature_noise_sigma`: Noise sigma by features. Noise sigma represents the standard deviation of the gaussian kernel that will be used to add noise to interpolated inputs prior to computing gradients. * `noise_sigma`: Noise sigma per feature. No noise is added to features that are not set. * `name`: The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. * `sigma`: This represents the standard deviation of the Gaussian kernel that will be used to add noise to the feature prior to computing gradients. Similar to noise_sigma but represents the noise added to the current feature. Defaults to 0.1. * `noise_sigma`: This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. If the distribution is different per feature, set feature_noise_sigma instead for each feature. * `noisy_sample_count`: The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3. * `blur_baseline_config`: Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383 * `max_blur_sigma`: The standard deviation of the blur kernel for the blurred baseline. The same blurring parameter is used for both the height and the width dimension. If not set, the method defaults to the zero (i.e. black for images) baseline. * `sampled_shapley_attribution`: An attribution method that approximates Shapley values for features that contribute to the label being predicted. A sampling strategy is used to approximate the value rather than considering all subsets of features. * `path_count`: Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. * `metadata`: Metadata describing the Model's input and output for explanation. * `feature_attributions_schema_uri`: Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML tabular Models always have this field populated by Vertex AI. Note: The URI given on output may be different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `latent_space_source`: Name of the source to generate embeddings for example based explanations. * `outputs`: Required. Map from output names to output metadata. For Vertex AI-provided Tensorflow images, keys can be any user defined string that consists of any UTF-8 characters. For custom images, keys are the name of the output field in the prediction to be explained. Currently only one key is allowed. * `additional_properties`: Metadata of the prediction output to be explained. * `inputs`: Required. Map from feature names to feature input metadata. Keys are the name of the features. Values are the specification of the feature. An empty InputMetadata is valid. It describes a text feature which has the name specified as the key in ExplanationMetadata.inputs. The baseline of the empty feature is chosen by Vertex AI. For Vertex AI-provided Tensorflow images, the key can be any friendly name of the feature. Once specified, featureAttributions are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. * `additional_properties`: Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. * `enable_access_logging`: If true, online prediction access logs are sent to Cloud Logging. These logs are like standard server access logs, containing information like timestamp and latency for each prediction request. Note that logs may incur a cost, especially if your project receives prediction requests at a high queries per second rate (QPS). Estimate your costs before enabling this option. * `service_account`: The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. * `dedicated_resources`: A description of resources that are dedicated to a DeployedModel, and that need a higher degree of manual configuration. * `machine_spec`: Specification of a single machine. * `accelerator_type`: Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. Possible values: * ACCELERATOR_TYPE_UNSPECIFIED * NVIDIA_TESLA_K80 * NVIDIA_TESLA_P100 * NVIDIA_TESLA_V100 * NVIDIA_TESLA_P4 * NVIDIA_TESLA_T4 * NVIDIA_TESLA_A100 * NVIDIA_A100_80GB * NVIDIA_L4 * TPU_V2 * TPU_V3 * TPU_V4_POD * `machine_type`: Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. * `accelerator_count`: The number of accelerators to attach to the machine. * `max_replica_count`: Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). * `autoscaling_metric_specs`: Immutable. The metric specifications that overrides a resource utilization metric (CPU utilization, accelerator's duty cycle, and so on) target value (default to 60 if not set). At most one entry is allowed per metric. If machine_spec.accelerator_count is above 0, the autoscaling will be based on both CPU utilization and accelerator's duty cycle metrics and scale up when either metrics exceeds its target value while scale down if both metrics are under their target value. The default target value is 60 for both metrics. If machine_spec.accelerator_count is 0, the autoscaling will be based on CPU utilization metric only with default target value 60 if not explicitly set. For example, in the case of Online Prediction, if you want to override target CPU utilization to 80, you should set autoscaling_metric_specs.metric_name to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and autoscaling_metric_specs.target to `80`. * `target`: The target resource utilization in percentage (1% - 100%) for the given metric; once the real usage deviates from the target by a certain percentage, the machine replicas change. The default value is 60 (representing 60%) if not provided. * `metric_name`: Required. The resource metric name. Supported metrics: * For Online Prediction: * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * `aiplatform.googleapis.com/prediction/online/cpu/utilization` * `min_replica_count`: Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. * `automatic_resources`: A description of resources that to large degree are decided by Vertex AI, and require only a modest additional configuration. Each Model supporting these resources documents its specific guidelines. * `max_replica_count`: Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, a no upper bound for scaling under heavy traffic will be assume, though Vertex AI may be unable to scale beyond certain replica number. * `min_replica_count`: Immutable. The minimum number of replicas this DeployedModel will be always deployed on. If traffic against it increases, it may dynamically be deployed onto more replicas up to max_replica_count, and as traffic decreases, some of these extra replicas may be freed. If the requested value is too large, the deployment will error. * `display_name`: The display name of the DeployedModel. If not provided upon creation, the Model's display_name is used. * `model`: Required. The resource name of the Model that this is the deployment of. Note that the Model may be in a different location than the DeployedModel's Endpoint. The resource name may contain version id or version alias to specify the version. Example: `projects/{project}/locations/{location}/models/{model}@2` or `projects/{project}/locations/{location}/models/{model}@golden` if no version is specified, the default version will be deployed. * `id`: Immutable. The ID of the DeployedModel. If not provided upon deployment, Vertex AI will generate a value for this ID. This value should be 1-10 characters, and valid characters are /[0-9]/. * `network`: Optional. The full name of the Google Compute Engine [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) to which the Endpoint should be peered. Private services access must already be configured for the network. If left unspecified, the Endpoint is not peered with any network. Only one of the fields, network or enable_private_service_connect, can be set. [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): `projects/{project}/global/networks/{network}`. Where `{project}` is a project number, as in `12345`, and `{network}` is network name. * `traffic_split`: A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel. If a DeployedModel's ID is not listed in this map, then it receives no traffic. The traffic percentage values must add up to 100, or map must be empty if the Endpoint is to not accept any traffic at a moment. * `additional_properties`: * `labels`: The labels with user-defined metadata to organize your Endpoints. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: * `display_name`: Required. The display name of the Endpoint. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `predict_request_response_logging_config`: Configuration for logging request-response to a BigQuery table. * `sampling_rate`: Percentage of requests to be logged, expressed as a fraction in range(0,1]. * `enabled`: If logging is enabled or not. * `bigquery_destination`: The BigQuery location for the output content. * `output_uri`: Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`. * `etag`: Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `create_time`: Output only. Timestamp when this Endpoint was created. * `name`: Output only. The resource name of the Endpoint. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_endpoints.md ================================================ +++ title = "google_vertex_ai_endpoints resource" draft = false [menu.gcp] title = "google_vertex_ai_endpoints" identifier = "inspec/resources/gcp/google_vertex_ai_endpoints resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_endpoints` InSpec audit resource to to test a Google Cloud Endpoint resource. ## Examples ```ruby describe google_vertex_ai_endpoints(parent: "projects/#{gcp_project_id}/locations/#{endpoint['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_endpoints` resource: See [google_vertex_ai_endpoint](google_vertex_ai_endpoint) for more detailed information. * `encryption_specs`: an array of `google_vertex_ai_endpoint` encryption_spec * `enable_private_service_connects`: an array of `google_vertex_ai_endpoint` enable_private_service_connect * `update_times`: an array of `google_vertex_ai_endpoint` update_time * `model_deployment_monitoring_jobs`: an array of `google_vertex_ai_endpoint` model_deployment_monitoring_job * `descriptions`: an array of `google_vertex_ai_endpoint` description * `deployed_models`: an array of `google_vertex_ai_endpoint` deployed_models * `networks`: an array of `google_vertex_ai_endpoint` network * `traffic_splits`: an array of `google_vertex_ai_endpoint` traffic_split * `labels`: an array of `google_vertex_ai_endpoint` labels * `display_names`: an array of `google_vertex_ai_endpoint` display_name * `predict_request_response_logging_configs`: an array of `google_vertex_ai_endpoint` predict_request_response_logging_config * `etags`: an array of `google_vertex_ai_endpoint` etag * `create_times`: an array of `google_vertex_ai_endpoint` create_time * `names`: an array of `google_vertex_ai_endpoint` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_featurestore.md ================================================ +++ title = "google_vertex_ai_featurestore resource" draft = false [menu.gcp] title = "google_vertex_ai_featurestore" identifier = "inspec/resources/gcp/google_vertex_ai_featurestore resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_featurestore` InSpec audit resource to to test a Google Cloud Featurestore resource. ## Examples ```ruby describe google_vertex_ai_featurestore(name: "projects/#{gcp_project_id}/locations/#{featurestore['region']}/featurestores/#{featurestore['name']}", region: ' value_region') do it { should exist } its('state') { should cmp 'value_state' } its('create_time') { should cmp 'value_createtime' } its('etag') { should cmp 'value_etag' } its('update_time') { should cmp 'value_updatetime' } its('name') { should cmp 'value_name' } end describe google_vertex_ai_featurestore(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_featurestore` resource: * `state`: Output only. State of the featurestore. Possible values: * STATE_UNSPECIFIED * STABLE * UPDATING * `create_time`: Output only. Timestamp when this Featurestore was created. * `etag`: Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `online_storage_ttl_days`: Optional. TTL in days for feature values that will be stored in online serving storage. The Feature Store online storage periodically removes obsolete feature values older than `online_storage_ttl_days` since the feature generation time. Note that `online_storage_ttl_days` should be less than or equal to `offline_storage_ttl_days` for each EntityType under a featurestore. If not set, default to 4000 days * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `labels`: Optional. The labels with user-defined metadata to organize your Featurestore. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one Featurestore(System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. * `additional_properties`: * `update_time`: Output only. Timestamp when this Featurestore was last updated. * `name`: Output only. Name of the Featurestore. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}` * `online_serving_config`: OnlineServingConfig specifies the details for provisioning online serving resources. * `fixed_node_count`: The number of nodes for the online store. The number of nodes doesn't scale automatically, but you can manually update the number of nodes. If set to 0, the featurestore will not have an online store and cannot be used for online serving. * `scaling`: Online serving scaling configuration. If min_node_count and max_node_count are set to the same value, the cluster will be configured with the fixed number of node (no auto-scaling). * `max_node_count`: The maximum number of nodes to scale up to. Must be greater than min_node_count, and less than or equal to 10 times of 'min_node_count'. * `min_node_count`: Required. The minimum number of nodes to scale down to. Must be greater than or equal to 1. * `cpu_utilization_target`: Optional. The cpu utilization that the Autoscaler should be trying to achieve. This number is on a scale from 0 (no utilization) to 100 (total utilization), and is limited between 10 and 80. When a cluster's CPU utilization exceeds the target that you have set, Bigtable immediately adds nodes to the cluster. When CPU utilization is substantially lower than the target, Bigtable removes nodes. If not set or set to 0, default to 50. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_featurestore_entity_type_feature.md ================================================ +++ title = "google_vertex_ai_featurestore_entity_type_feature resource" draft = false [menu.gcp] title = "google_vertex_ai_featurestore_entity_type_feature" identifier = "inspec/resources/gcp/google_vertex_ai_featurestore_entity_type_feature resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_featurestore_entity_type_feature` InSpec audit resource to to test a Google Cloud FeaturestoreEntityTypeFeature resource. ## Examples ```ruby describe google_vertex_ai_featurestore_entity_type_feature(name: "projects/#{gcp_project_id}/locations/#{featurestore_entity_type_feature['region']}/featurestores/#{featurestore_entity_type_feature['featurestore']}/entityTypes/#{featurestore_entity_type_feature['entityType']}/features/#{featurestore_entity_type_feature['feature']}", region: ' value_region') do it { should exist } its('description') { should cmp 'value_description' } its('create_time') { should cmp 'value_createtime' } its('etag') { should cmp 'value_etag' } its('name') { should cmp 'value_name' } its('update_time') { should cmp 'value_updatetime' } its('value_type') { should cmp 'value_valuetype' } end describe google_vertex_ai_featurestore_entity_type_feature(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_featurestore_entity_type_feature` resource: * `description`: Description of the Feature. * `create_time`: Output only. Timestamp when this EntityType was created. * `monitoring_stats_anomalies`: Output only. The list of historical stats and anomalies with specified objectives. * `etag`: Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `labels`: Optional. The labels with user-defined metadata to organize your Features. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one Feature (System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. * `additional_properties`: * `name`: Immutable. Name of the Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` The last part feature is assigned by the client. The feature can be up to 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscore(_), and ASCII digits 0-9 starting with a letter. The value will be unique given an entity type. * `update_time`: Output only. Timestamp when this EntityType was most recently updated. * `disable_monitoring`: Optional. If not set, use the monitoring_config defined for the EntityType this Feature belongs to. Only Features with type (Feature.ValueType) BOOL, STRING, DOUBLE or INT64 can enable monitoring. If set to true, all types of data monitoring are disabled despite the config on EntityType. * `value_type`: Required. Immutable. Type of Feature value. Possible values: * VALUE_TYPE_UNSPECIFIED * BOOL * BOOL_ARRAY * DOUBLE * DOUBLE_ARRAY * INT64 * INT64_ARRAY * STRING * STRING_ARRAY * BYTES ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_featurestore_entity_type_features.md ================================================ +++ title = "google_vertex_ai_featurestore_entity_type_features resource" draft = false [menu.gcp] title = "google_vertex_ai_featurestore_entity_type_features" identifier = "inspec/resources/gcp/google_vertex_ai_featurestore_entity_type_features resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_featurestore_entity_type_features` InSpec audit resource to to test a Google Cloud FeaturestoreEntityTypeFeature resource. ## Examples ```ruby describe google_vertex_ai_featurestore_entity_type_features(parent: "projects/#{gcp_project_id}/locations/#{featurestore_entity_type_feature['region']}/featurestores/#{featurestore_entity_type_feature['featurestore']}/entityTypes/#{featurestore_entity_type_feature['entityType']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_featurestore_entity_type_features` resource: See [google_vertex_ai_featurestore_entity_type_feature](google_vertex_ai_featurestore_entity_type_feature) for more detailed information. * `descriptions`: an array of `google_vertex_ai_featurestore_entity_type_feature` description * `create_times`: an array of `google_vertex_ai_featurestore_entity_type_feature` create_time * `monitoring_stats_anomalies`: an array of `google_vertex_ai_featurestore_entity_type_feature` monitoring_stats_anomalies * `etags`: an array of `google_vertex_ai_featurestore_entity_type_feature` etag * `labels`: an array of `google_vertex_ai_featurestore_entity_type_feature` labels * `names`: an array of `google_vertex_ai_featurestore_entity_type_feature` name * `update_times`: an array of `google_vertex_ai_featurestore_entity_type_feature` update_time * `disable_monitorings`: an array of `google_vertex_ai_featurestore_entity_type_feature` disable_monitoring * `value_types`: an array of `google_vertex_ai_featurestore_entity_type_feature` value_type ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_featurestores.md ================================================ +++ title = "google_vertex_ai_featurestores resource" draft = false [menu.gcp] title = "google_vertex_ai_featurestores" identifier = "inspec/resources/gcp/google_vertex_ai_featurestores resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_featurestores` InSpec audit resource to to test a Google Cloud Featurestore resource. ## Examples ```ruby describe google_vertex_ai_featurestores(parent: "projects/#{gcp_project_id}/locations/#{featurestore['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_featurestores` resource: See [google_vertex_ai_featurestore](google_vertex_ai_featurestore) for more detailed information. * `states`: an array of `google_vertex_ai_featurestore` state * `create_times`: an array of `google_vertex_ai_featurestore` create_time * `etags`: an array of `google_vertex_ai_featurestore` etag * `online_storage_ttl_days`: an array of `google_vertex_ai_featurestore` online_storage_ttl_days * `encryption_specs`: an array of `google_vertex_ai_featurestore` encryption_spec * `labels`: an array of `google_vertex_ai_featurestore` labels * `update_times`: an array of `google_vertex_ai_featurestore` update_time * `names`: an array of `google_vertex_ai_featurestore` name * `online_serving_configs`: an array of `google_vertex_ai_featurestore` online_serving_config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_featurestores_entity_type.md ================================================ +++ title = "google_vertex_ai_featurestores_entity_type resource" draft = false [menu.gcp] title = "google_vertex_ai_featurestores_entity_type" identifier = "inspec/resources/gcp/google_vertex_ai_featurestores_entity_type resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_featurestores_entity_type` InSpec audit resource to to test a Google Cloud FeaturestoresEntityType resource. ## Examples ```ruby describe google_vertex_ai_featurestores_entity_type(name: "projects/#{gcp_project_id}/locations/#{featurestores_entity_type['region']}/featurestores/#{featurestores_entity_type['featurestore']}/entityTypes/#{featurestores_entity_type['name']}", region: ' value_region') do it { should exist } its('description') { should cmp 'value_description' } its('name') { should cmp 'value_name' } its('create_time') { should cmp 'value_createtime' } its('etag') { should cmp 'value_etag' } its('update_time') { should cmp 'value_updatetime' } end describe google_vertex_ai_featurestores_entity_type(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_featurestores_entity_type` resource: * `labels`: Optional. The labels with user-defined metadata to organize your EntityTypes. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one EntityType (System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. * `additional_properties`: * `description`: Optional. Description of the EntityType. * `name`: Immutable. Name of the EntityType. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` The last part entity_type is assigned by the client. The entity_type can be up to 64 characters long and can consist only of ASCII Latin letters A-Z and a-z and underscore(_), and ASCII digits 0-9 starting with a letter. The value will be unique given a featurestore. * `create_time`: Output only. Timestamp when this EntityType was created. * `monitoring_config`: Configuration of how features in Featurestore are monitored. * `import_features_analysis`: Configuration of the Featurestore's ImportFeature Analysis Based Monitoring. This type of analysis generates statistics for values of each Feature imported by every ImportFeatureValues operation. * `anomaly_detection_baseline`: The baseline used to do anomaly detection for the statistics generated by import features analysis. Possible values: * BASELINE_UNSPECIFIED * LATEST_STATS * MOST_RECENT_SNAPSHOT_STATS * PREVIOUS_IMPORT_FEATURES_STATS * `state`: Whether to enable / disable / inherite default hebavior for import features analysis. Possible values: * STATE_UNSPECIFIED * DEFAULT * ENABLED * DISABLED * `numerical_threshold_config`: The config for Featurestore Monitoring threshold. * `value`: Specify a threshold value that can trigger the alert. 1. For categorical feature, the distribution distance is calculated by L-inifinity norm. 2. For numerical feature, the distribution distance is calculated by Jensen–Shannon divergence. Each feature must have a non-zero threshold if they need to be monitored. Otherwise no alert will be triggered for that feature. * `categorical_threshold_config`: The config for Featurestore Monitoring threshold. * `value`: Specify a threshold value that can trigger the alert. 1. For categorical feature, the distribution distance is calculated by L-inifinity norm. 2. For numerical feature, the distribution distance is calculated by Jensen–Shannon divergence. Each feature must have a non-zero threshold if they need to be monitored. Otherwise no alert will be triggered for that feature. * `snapshot_analysis`: Configuration of the Featurestore's Snapshot Analysis Based Monitoring. This type of analysis generates statistics for each Feature based on a snapshot of the latest feature value of each entities every monitoring_interval. * `monitoring_interval_days`: Configuration of the snapshot analysis based monitoring pipeline running interval. The value indicates number of days. * `staleness_days`: Customized export features time window for snapshot analysis. Unit is one day. Default value is 3 weeks. Minimum value is 1 day. Maximum value is 4000 days. * `disabled`: The monitoring schedule for snapshot analysis. For EntityType-level config: unset / disabled = true indicates disabled by default for Features under it; otherwise by default enable snapshot analysis monitoring with monitoring_interval for Features under it. Feature-level config: disabled = true indicates disabled regardless of the EntityType-level config; unset monitoring_interval indicates going with EntityType-level config; otherwise run snapshot analysis monitoring with monitoring_interval regardless of the EntityType-level config. Explicitly Disable the snapshot analysis based monitoring. * `etag`: Optional. Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `update_time`: Output only. Timestamp when this EntityType was most recently updated. * `offline_storage_ttl_days`: Optional. Config for data retention policy in offline storage. TTL in days for feature values that will be stored in offline storage. The Feature Store offline storage periodically removes obsolete feature values older than `offline_storage_ttl_days` since the feature generation time. If unset (or explicitly set to 0), default to 4000 days TTL. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_featurestores_entity_types.md ================================================ +++ title = "google_vertex_ai_featurestores_entity_types resource" draft = false [menu.gcp] title = "google_vertex_ai_featurestores_entity_types" identifier = "inspec/resources/gcp/google_vertex_ai_featurestores_entity_types resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_featurestores_entity_types` InSpec audit resource to to test a Google Cloud FeaturestoresEntityType resource. ## Examples ```ruby describe google_vertex_ai_featurestores_entity_types(parent: "projects/#{gcp_project_id}/locations/#{featurestores_entity_type['region']}/featurestores/#{featurestores_entity_type['featurestore']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_featurestores_entity_types` resource: See [google_vertex_ai_featurestores_entity_type](google_vertex_ai_featurestores_entity_type) for more detailed information. * `labels`: an array of `google_vertex_ai_featurestores_entity_type` labels * `descriptions`: an array of `google_vertex_ai_featurestores_entity_type` description * `names`: an array of `google_vertex_ai_featurestores_entity_type` name * `create_times`: an array of `google_vertex_ai_featurestores_entity_type` create_time * `monitoring_configs`: an array of `google_vertex_ai_featurestores_entity_type` monitoring_config * `etags`: an array of `google_vertex_ai_featurestores_entity_type` etag * `update_times`: an array of `google_vertex_ai_featurestores_entity_type` update_time * `offline_storage_ttl_days`: an array of `google_vertex_ai_featurestores_entity_type` offline_storage_ttl_days ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_hyperparameter_tuning_job.md ================================================ +++ title = "google_vertex_ai_hyperparameter_tuning_job resource" draft = false [menu.gcp] title = "google_vertex_ai_hyperparameter_tuning_job" identifier = "inspec/resources/gcp/google_vertex_ai_hyperparameter_tuning_job resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_hyperparameter_tuning_job` InSpec audit resource to to test a Google Cloud HyperparameterTuningJob resource. ## Examples ```ruby describe google_vertex_ai_hyperparameter_tuning_job(name: "projects/#{gcp_project_id}/locations/#{hyperparameter_tuning_job['region']}/hyperparameterTuningJobs/#{hyperparameter_tuning_job['name']}", region: ' value_region') do it { should exist } its('state') { should cmp 'value_state' } its('end_time') { should cmp 'value_endtime' } its('update_time') { should cmp 'value_updatetime' } its('start_time') { should cmp 'value_starttime' } its('create_time') { should cmp 'value_createtime' } its('display_name') { should cmp 'value_displayname' } its('name') { should cmp 'value_name' } end describe google_vertex_ai_hyperparameter_tuning_job(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_hyperparameter_tuning_job` resource: * `study_spec`: Required. Study configuration of the HyperparameterTuningJob. * `trials`: Output only. Trials of the HyperparameterTuningJob. * `state`: Output only. The detailed state of the job. Possible values: * JOB_STATE_UNSPECIFIED * JOB_STATE_QUEUED * JOB_STATE_PENDING * JOB_STATE_RUNNING * JOB_STATE_SUCCEEDED * JOB_STATE_FAILED * JOB_STATE_CANCELLING * JOB_STATE_CANCELLED * JOB_STATE_PAUSED * JOB_STATE_EXPIRED * JOB_STATE_UPDATING * JOB_STATE_PARTIALLY_SUCCEEDED * `max_failed_trial_count`: The number of failed Trials that need to be seen before failing the HyperparameterTuningJob. If set to 0, Vertex AI decides how many Trials must fail before the whole job fails. * `encryption_spec`: Customer-managed encryption key options for a HyperparameterTuningJob. If this is set, then all resources created by the HyperparameterTuningJob will be encrypted with the provided encryption key. * `error`: Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. * `end_time`: Output only. Time when the HyperparameterTuningJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. * `update_time`: Output only. Time when the HyperparameterTuningJob was most recently updated. * `start_time`: Output only. Time when the HyperparameterTuningJob for the first time entered the `JOB_STATE_RUNNING` state. * `labels`: The labels with user-defined metadata to organize HyperparameterTuningJobs. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: * `create_time`: Output only. Time when the HyperparameterTuningJob was created. * `parallel_trial_count`: Required. The desired number of Trials to run in parallel. * `trial_job_spec`: Required. The spec of a trial job. The same spec applies to the CustomJobs created in all the trials. * `max_trial_count`: Required. The desired total number of Trials. * `display_name`: Required. The display name of the HyperparameterTuningJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `name`: Output only. Resource name of the HyperparameterTuningJob. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_hyperparameter_tuning_jobs.md ================================================ +++ title = "google_vertex_ai_hyperparameter_tuning_jobs resource" draft = false [menu.gcp] title = "google_vertex_ai_hyperparameter_tuning_jobs" identifier = "inspec/resources/gcp/google_vertex_ai_hyperparameter_tuning_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_hyperparameter_tuning_jobs` InSpec audit resource to to test a Google Cloud HyperparameterTuningJob resource. ## Examples ```ruby describe google_vertex_ai_hyperparameter_tuning_jobs(parent: "projects/#{gcp_project_id}/locations/#{hyperparameter_tuning_job['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_hyperparameter_tuning_jobs` resource: See [google_vertex_ai_hyperparameter_tuning_job](google_vertex_ai_hyperparameter_tuning_job) for more detailed information. * `study_specs`: an array of `google_vertex_ai_hyperparameter_tuning_job` study_spec * `trials`: an array of `google_vertex_ai_hyperparameter_tuning_job` trials * `states`: an array of `google_vertex_ai_hyperparameter_tuning_job` state * `max_failed_trial_counts`: an array of `google_vertex_ai_hyperparameter_tuning_job` max_failed_trial_count * `encryption_specs`: an array of `google_vertex_ai_hyperparameter_tuning_job` encryption_spec * `errors`: an array of `google_vertex_ai_hyperparameter_tuning_job` error * `end_times`: an array of `google_vertex_ai_hyperparameter_tuning_job` end_time * `update_times`: an array of `google_vertex_ai_hyperparameter_tuning_job` update_time * `start_times`: an array of `google_vertex_ai_hyperparameter_tuning_job` start_time * `labels`: an array of `google_vertex_ai_hyperparameter_tuning_job` labels * `create_times`: an array of `google_vertex_ai_hyperparameter_tuning_job` create_time * `parallel_trial_counts`: an array of `google_vertex_ai_hyperparameter_tuning_job` parallel_trial_count * `trial_job_specs`: an array of `google_vertex_ai_hyperparameter_tuning_job` trial_job_spec * `max_trial_counts`: an array of `google_vertex_ai_hyperparameter_tuning_job` max_trial_count * `display_names`: an array of `google_vertex_ai_hyperparameter_tuning_job` display_name * `names`: an array of `google_vertex_ai_hyperparameter_tuning_job` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_index.md ================================================ +++ title = "google_vertex_ai_index resource" draft = false [menu.gcp] title = "google_vertex_ai_index" identifier = "inspec/resources/gcp/google_vertex_ai_index resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_index` InSpec audit resource to to test a Google Cloud Index resource. ## Examples ```ruby describe google_vertex_ai_index(name: "projects/#{gcp_project_id}/locations/#{index['region']}/indexes/#{index['name']}", region: ' value_region') do it { should exist } its('description') { should cmp 'value_description' } its('name') { should cmp 'value_name' } its('display_name') { should cmp 'value_displayname' } its('metadata_schema_uri') { should cmp 'value_metadataschemauri' } its('index_update_method') { should cmp 'value_indexupdatemethod' } its('update_time') { should cmp 'value_updatetime' } its('create_time') { should cmp 'value_createtime' } its('etag') { should cmp 'value_etag' } end describe google_vertex_ai_index(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_index` resource: * `description`: The description of the Index. * `metadata`: An additional information about the Index; the schema of the metadata can be found in metadata_schema. * `index_stats`: Output only. Stats of the index resource. * `name`: Output only. The resource name of the Index. * `deployed_indexes`: Output only. The pointers to DeployedIndexes created from this Index. An Index can be only deleted if all its DeployedIndexes had been undeployed first. * `display_name`: Required. The display name of the Index. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `metadata_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing additional information about the Index, that is specific to it. Unset if the Index does not have any additional information. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `index_update_method`: Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be used by default. Possible values: * INDEX_UPDATE_METHOD_UNSPECIFIED * BATCH_UPDATE * STREAM_UPDATE * `update_time`: Output only. Timestamp when this Index was most recently updated. This also includes any update to the contents of the Index. Note that Operations working on this Index may have their Operations.metadata.generic_metadata.update_time a little after the value of this timestamp, yet that does not mean their results are not already reflected in the Index. Result of any successfully completed Operation on the Index is reflected in it. * `create_time`: Output only. Timestamp when this Index was created. * `etag`: Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `labels`: The labels with user-defined metadata to organize your Indexes. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_index_endpoint.md ================================================ +++ title = "google_vertex_ai_index_endpoint resource" draft = false [menu.gcp] title = "google_vertex_ai_index_endpoint" identifier = "inspec/resources/gcp/google_vertex_ai_index_endpoint resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_index_endpoint` InSpec audit resource to to test a Google Cloud IndexEndpoint resource. ## Examples ```ruby describe google_vertex_ai_index_endpoint(name: "projects/#{gcp_project_id}/locations/#{index_endpoint['region']}/indexEndpoints/#{index_endpoint['name']}", region: ' value_region') do it { should exist } its('display_name') { should cmp 'value_displayname' } its('create_time') { should cmp 'value_createtime' } its('name') { should cmp 'value_name' } its('network') { should cmp 'value_network' } its('update_time') { should cmp 'value_updatetime' } its('public_endpoint_domain_name') { should cmp 'value_publicendpointdomainname' } its('etag') { should cmp 'value_etag' } its('description') { should cmp 'value_description' } end describe google_vertex_ai_index_endpoint(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_index_endpoint` resource: * `deployed_indexes`: Output only. The indexes deployed in this endpoint. * `private_endpoints`: IndexPrivateEndpoints proto is used to provide paths for users to send requests via private endpoints (e.g. private service access, private service connect). To send request via private service access, use match_grpc_address. To send request via private service connect, use service_attachment. * `service_attachment`: Output only. The name of the service attachment resource. Populated if private service connect is enabled. * `match_grpc_address`: Output only. The ip address used to send match gRPC requests. * `deployment_group`: Optional. The deployment group can be no longer than 64 characters (eg: 'test', 'prod'). If not set, we will use the 'default' deployment group. Creating `deployment_groups` with `reserved_ip_ranges` is a recommended practice when the peered network has multiple peering ranges. This creates your deployments from predictable IP spaces for easier traffic administration. Also, one deployment_group (except 'default') can only be used with the same reserved_ip_ranges which means if the deployment_group has been used with reserved_ip_ranges: [a, b, c], using it with [a, b] or [d, e] is disallowed. Note: we only support up to 5 deployment groups(not including 'default'). * `dedicated_resources`: A description of resources that are dedicated to a DeployedModel, and that need a higher degree of manual configuration. * `machine_spec`: Specification of a single machine. * `accelerator_type`: Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. Possible values: * ACCELERATOR_TYPE_UNSPECIFIED * NVIDIA_TESLA_K80 * NVIDIA_TESLA_P100 * NVIDIA_TESLA_V100 * NVIDIA_TESLA_P4 * NVIDIA_TESLA_T4 * NVIDIA_TESLA_A100 * NVIDIA_A100_80GB * NVIDIA_L4 * TPU_V2 * TPU_V3 * TPU_V4_POD * `machine_type`: Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. * `accelerator_count`: The number of accelerators to attach to the machine. * `max_replica_count`: Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). * `autoscaling_metric_specs`: Immutable. The metric specifications that overrides a resource utilization metric (CPU utilization, accelerator's duty cycle, and so on) target value (default to 60 if not set). At most one entry is allowed per metric. If machine_spec.accelerator_count is above 0, the autoscaling will be based on both CPU utilization and accelerator's duty cycle metrics and scale up when either metrics exceeds its target value while scale down if both metrics are under their target value. The default target value is 60 for both metrics. If machine_spec.accelerator_count is 0, the autoscaling will be based on CPU utilization metric only with default target value 60 if not explicitly set. For example, in the case of Online Prediction, if you want to override target CPU utilization to 80, you should set autoscaling_metric_specs.metric_name to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and autoscaling_metric_specs.target to `80`. * `target`: The target resource utilization in percentage (1% - 100%) for the given metric; once the real usage deviates from the target by a certain percentage, the machine replicas change. The default value is 60 (representing 60%) if not provided. * `metric_name`: Required. The resource metric name. Supported metrics: * For Online Prediction: * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * `aiplatform.googleapis.com/prediction/online/cpu/utilization` * `min_replica_count`: Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. * `deployed_index_auth_config`: Used to set up the auth on the DeployedIndex's private endpoint. * `auth_provider`: Configuration for an authentication provider, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). * `audiences`: The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. * `allowed_issuers`: A list of allowed JWT issuers. Each entry must be a valid Google service account, in the following format: `service-account-name@project-id.iam.gserviceaccount.com` * `id`: Required. The user specified ID of the DeployedIndex. The ID can be up to 128 characters long and must start with a letter and only contain letters, numbers, and underscores. The ID must be unique within the project it is created in. * `index_sync_time`: Output only. The DeployedIndex may depend on various data on its original Index. Additionally when certain changes to the original Index are being done (e.g. when what the Index contains is being changed) the DeployedIndex may be asynchronously updated in the background to reflect these changes. If this timestamp's value is at least the Index.update_time of the original Index, it means that this DeployedIndex and the original Index are in sync. If this timestamp is older, then to see which updates this DeployedIndex already contains (and which it does not), one must list the operations that are running on the original Index. Only the successfully completed Operations with update_time equal or before this sync time are contained in this DeployedIndex. * `automatic_resources`: A description of resources that to large degree are decided by Vertex AI, and require only a modest additional configuration. Each Model supporting these resources documents its specific guidelines. * `max_replica_count`: Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, a no upper bound for scaling under heavy traffic will be assume, though Vertex AI may be unable to scale beyond certain replica number. * `min_replica_count`: Immutable. The minimum number of replicas this DeployedModel will be always deployed on. If traffic against it increases, it may dynamically be deployed onto more replicas up to max_replica_count, and as traffic decreases, some of these extra replicas may be freed. If the requested value is too large, the deployment will error. * `enable_access_logging`: Optional. If true, private endpoint's access logs are sent to Cloud Logging. These logs are like standard server access logs, containing information like timestamp and latency for each MatchRequest. Note that logs may incur a cost, especially if the deployed index receives a high queries per second rate (QPS). Estimate your costs before enabling this option. * `create_time`: Output only. Timestamp when the DeployedIndex was created. * `reserved_ip_ranges`: Optional. A list of reserved ip ranges under the VPC network that can be used for this DeployedIndex. If set, we will deploy the index within the provided ip ranges. Otherwise, the index might be deployed to any ip ranges under the provided VPC network. The value should be the name of the address (https://cloud.google.com/compute/docs/reference/rest/v1/addresses) Example: 'vertex-ai-ip-range'. * `index`: Required. The name of the Index this is the deployment of. We may refer to this Index as the DeployedIndex's "original" Index. * `display_name`: The display name of the DeployedIndex. If not provided upon creation, the Index's display_name is used. * `private_service_connect_config`: Represents configuration for private service connect. * `project_allowlist`: A list of Projects from which the forwarding rule will target the service attachment. * `enable_private_service_connect`: Required. If true, expose the IndexEndpoint via private service connect. * `display_name`: Required. The display name of the IndexEndpoint. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `public_endpoint_enabled`: Optional. If true, the deployed index will be accessible through public endpoint. * `labels`: The labels with user-defined metadata to organize your IndexEndpoints. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: * `create_time`: Output only. Timestamp when this IndexEndpoint was created. * `name`: Output only. The resource name of the IndexEndpoint. * `network`: Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the IndexEndpoint should be peered. Private services access must already be configured for the network. If left unspecified, the Endpoint is not peered with any network. network and private_service_connect_config are mutually exclusive. [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in '12345', and {network} is network name. * `update_time`: Output only. Timestamp when this IndexEndpoint was last updated. This timestamp is not updated when the endpoint's DeployedIndexes are updated, e.g. due to updates of the original Indexes they are the deployments of. * `public_endpoint_domain_name`: Output only. If public_endpoint_enabled is true, this field will be populated with the domain name to use for this index endpoint. * `enable_private_service_connect`: Optional. Deprecated: If true, expose the IndexEndpoint via private service connect. Only one of the fields, network or enable_private_service_connect, can be set. * `etag`: Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `description`: The description of the IndexEndpoint. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_index_endpoints.md ================================================ +++ title = "google_vertex_ai_index_endpoints resource" draft = false [menu.gcp] title = "google_vertex_ai_index_endpoints" identifier = "inspec/resources/gcp/google_vertex_ai_index_endpoints resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_index_endpoints` InSpec audit resource to to test a Google Cloud IndexEndpoint resource. ## Examples ```ruby describe google_vertex_ai_index_endpoints(parent: "projects/#{gcp_project_id}/locations/#{index_endpoint['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_index_endpoints` resource: See [google_vertex_ai_index_endpoint](google_vertex_ai_index_endpoint) for more detailed information. * `deployed_indexes`: an array of `google_vertex_ai_index_endpoint` deployed_indexes * `private_service_connect_configs`: an array of `google_vertex_ai_index_endpoint` private_service_connect_config * `display_names`: an array of `google_vertex_ai_index_endpoint` display_name * `public_endpoint_enableds`: an array of `google_vertex_ai_index_endpoint` public_endpoint_enabled * `labels`: an array of `google_vertex_ai_index_endpoint` labels * `create_times`: an array of `google_vertex_ai_index_endpoint` create_time * `names`: an array of `google_vertex_ai_index_endpoint` name * `networks`: an array of `google_vertex_ai_index_endpoint` network * `update_times`: an array of `google_vertex_ai_index_endpoint` update_time * `public_endpoint_domain_names`: an array of `google_vertex_ai_index_endpoint` public_endpoint_domain_name * `enable_private_service_connects`: an array of `google_vertex_ai_index_endpoint` enable_private_service_connect * `etags`: an array of `google_vertex_ai_index_endpoint` etag * `descriptions`: an array of `google_vertex_ai_index_endpoint` description ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_indices.md ================================================ +++ title = "google_vertex_ai_indices resource" draft = false [menu.gcp] title = "google_vertex_ai_indices" identifier = "inspec/resources/gcp/google_vertex_ai_indices resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_indices` InSpec audit resource to to test a Google Cloud Index resource. ## Examples ```ruby describe google_vertex_ai_indices(parent: "projects/#{gcp_project_id}/locations/#{index['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_indices` resource: See [google_vertex_ai_index](google_vertex_ai_index) for more detailed information. * `descriptions`: an array of `google_vertex_ai_index` description * `metadata`: an array of `google_vertex_ai_index` metadata * `index_stats`: an array of `google_vertex_ai_index` index_stats * `names`: an array of `google_vertex_ai_index` name * `deployed_indexes`: an array of `google_vertex_ai_index` deployed_indexes * `display_names`: an array of `google_vertex_ai_index` display_name * `metadata_schema_uris`: an array of `google_vertex_ai_index` metadata_schema_uri * `index_update_methods`: an array of `google_vertex_ai_index` index_update_method * `update_times`: an array of `google_vertex_ai_index` update_time * `create_times`: an array of `google_vertex_ai_index` create_time * `etags`: an array of `google_vertex_ai_index` etag * `labels`: an array of `google_vertex_ai_index` labels ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_metadata_store.md ================================================ +++ title = "google_vertex_ai_metadata_store resource" draft = false [menu.gcp] title = "google_vertex_ai_metadata_store" identifier = "inspec/resources/gcp/google_vertex_ai_metadata_store resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_metadata_store` InSpec audit resource to to test a Google Cloud MetadataStore resource. ## Examples ```ruby describe google_vertex_ai_metadata_store(name: "projects/#{gcp_project_id}/locations/#{metadata_store['region']}/metadataStores/#{metadata_store['name']}", region: ' value_region') do it { should exist } its('description') { should cmp 'value_description' } its('create_time') { should cmp 'value_createtime' } its('update_time') { should cmp 'value_updatetime' } its('name') { should cmp 'value_name' } end describe google_vertex_ai_metadata_store(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_metadata_store` resource: * `description`: Description of the MetadataStore. * `create_time`: Output only. Timestamp when this MetadataStore was created. * `update_time`: Output only. Timestamp when this MetadataStore was last updated. * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `state`: Represents state information for a MetadataStore. * `disk_utilization_bytes`: The disk utilization of the MetadataStore in bytes. * `name`: Output only. The resource name of the MetadataStore instance. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_metadata_stores.md ================================================ +++ title = "google_vertex_ai_metadata_stores resource" draft = false [menu.gcp] title = "google_vertex_ai_metadata_stores" identifier = "inspec/resources/gcp/google_vertex_ai_metadata_stores resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_metadata_stores` InSpec audit resource to to test a Google Cloud MetadataStore resource. ## Examples ```ruby describe google_vertex_ai_metadata_stores(parent: "projects/#{gcp_project_id}/locations/#{metadata_store['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_metadata_stores` resource: See [google_vertex_ai_metadata_store](google_vertex_ai_metadata_store) for more detailed information. * `descriptions`: an array of `google_vertex_ai_metadata_store` description * `create_times`: an array of `google_vertex_ai_metadata_store` create_time * `update_times`: an array of `google_vertex_ai_metadata_store` update_time * `encryption_specs`: an array of `google_vertex_ai_metadata_store` encryption_spec * `states`: an array of `google_vertex_ai_metadata_store` state * `names`: an array of `google_vertex_ai_metadata_store` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_metadata_stores_artifact.md ================================================ +++ title = "google_vertex_ai_metadata_stores_artifact resource" draft = false [menu.gcp] title = "google_vertex_ai_metadata_stores_artifact" identifier = "inspec/resources/gcp/google_vertex_ai_metadata_stores_artifact resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_metadata_stores_artifact` InSpec audit resource to to test a Google Cloud MetadataStoresArtifact resource. ## Examples ```ruby describe google_vertex_ai_metadata_stores_artifact(name: "projects/#{gcp_project_id}/locations/#{metadata_stores_artifact['region']}/metadataStores/#{metadata_stores_artifact['metadataStore']}/artifacts/#{metadata_stores_artifact['name']}", region: ' value_region') do it { should exist } its('schema_version') { should cmp 'value_schemaversion' } its('display_name') { should cmp 'value_displayname' } its('etag') { should cmp 'value_etag' } its('name') { should cmp 'value_name' } its('update_time') { should cmp 'value_updatetime' } its('state') { should cmp 'value_state' } its('uri') { should cmp 'value_uri' } its('create_time') { should cmp 'value_createtime' } its('schema_title') { should cmp 'value_schematitle' } its('description') { should cmp 'value_description' } end describe google_vertex_ai_metadata_stores_artifact(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_metadata_stores_artifact` resource: * `schema_version`: The version of the schema in schema_name to use. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `display_name`: User provided display name of the Artifact. May be up to 128 Unicode characters. * `etag`: An eTag used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `name`: Output only. The resource name of the Artifact. * `update_time`: Output only. Timestamp when this Artifact was last updated. * `state`: The state of this Artifact. This is a property of the Artifact, and does not imply or capture any ongoing process. This property is managed by clients (such as Vertex AI Pipelines), and the system does not prescribe or check the validity of state transitions. Possible values: * STATE_UNSPECIFIED * PENDING * LIVE * `metadata`: Properties of the Artifact. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB. * `additional_properties`: Properties of the object. * `uri`: The uniform resource identifier of the artifact file. May be empty if there is no actual artifact file. * `create_time`: Output only. Timestamp when this Artifact was created. * `schema_title`: The title of the schema describing the metadata. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `description`: Description of the Artifact * `labels`: The labels with user-defined metadata to organize your Artifacts. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Artifact (System labels are excluded). * `additional_properties`: ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_metadata_stores_artifacts.md ================================================ +++ title = "google_vertex_ai_metadata_stores_artifacts resource" draft = false [menu.gcp] title = "google_vertex_ai_metadata_stores_artifacts" identifier = "inspec/resources/gcp/google_vertex_ai_metadata_stores_artifacts resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_metadata_stores_artifacts` InSpec audit resource to to test a Google Cloud MetadataStoresArtifact resource. ## Examples ```ruby describe google_vertex_ai_metadata_stores_artifacts(parent: "projects/#{gcp_project_id}/locations/#{metadata_stores_artifact['region']}/metadataStores/#{metadata_stores_artifact['metadataStore']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_metadata_stores_artifacts` resource: See [google_vertex_ai_metadata_stores_artifact](google_vertex_ai_metadata_stores_artifact) for more detailed information. * `schema_versions`: an array of `google_vertex_ai_metadata_stores_artifact` schema_version * `display_names`: an array of `google_vertex_ai_metadata_stores_artifact` display_name * `etags`: an array of `google_vertex_ai_metadata_stores_artifact` etag * `names`: an array of `google_vertex_ai_metadata_stores_artifact` name * `update_times`: an array of `google_vertex_ai_metadata_stores_artifact` update_time * `states`: an array of `google_vertex_ai_metadata_stores_artifact` state * `metadata`: an array of `google_vertex_ai_metadata_stores_artifact` metadata * `uris`: an array of `google_vertex_ai_metadata_stores_artifact` uri * `create_times`: an array of `google_vertex_ai_metadata_stores_artifact` create_time * `schema_titles`: an array of `google_vertex_ai_metadata_stores_artifact` schema_title * `descriptions`: an array of `google_vertex_ai_metadata_stores_artifact` description * `labels`: an array of `google_vertex_ai_metadata_stores_artifact` labels ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_metadata_stores_context.md ================================================ +++ title = "google_vertex_ai_metadata_stores_context resource" draft = false [menu.gcp] title = "google_vertex_ai_metadata_stores_context" identifier = "inspec/resources/gcp/google_vertex_ai_metadata_stores_context resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_metadata_stores_context` InSpec audit resource to to test a Google Cloud MetadataStoresContext resource. ## Examples ```ruby describe google_vertex_ai_metadata_stores_context(name: "projects/#{gcp_project_id}/locations/#{metadata_stores_context['region']}/metadataStores/#{metadata_stores_context['metadataStore']}/contexts/#{metadata_stores_context['name']}", region: ' value_region') do it { should exist } its('name') { should cmp 'value_name' } its('schema_title') { should cmp 'value_schematitle' } its('etag') { should cmp 'value_etag' } its('description') { should cmp 'value_description' } its('display_name') { should cmp 'value_displayname' } its('schema_version') { should cmp 'value_schemaversion' } its('create_time') { should cmp 'value_createtime' } its('update_time') { should cmp 'value_updatetime' } end describe google_vertex_ai_metadata_stores_context(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_metadata_stores_context` resource: * `name`: Immutable. The resource name of the Context. * `schema_title`: The title of the schema describing the metadata. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `etag`: An eTag used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `description`: Description of the Context * `display_name`: User provided display name of the Context. May be up to 128 Unicode characters. * `schema_version`: The version of the schema in schema_name to use. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `create_time`: Output only. Timestamp when this Context was created. * `labels`: The labels with user-defined metadata to organize your Contexts. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Context (System labels are excluded). * `additional_properties`: * `metadata`: Properties of the Context. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB. * `additional_properties`: Properties of the object. * `update_time`: Output only. Timestamp when this Context was last updated. * `parent_contexts`: Output only. A list of resource names of Contexts that are parents of this Context. A Context may have at most 10 parent_contexts. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_metadata_stores_contexts.md ================================================ +++ title = "google_vertex_ai_metadata_stores_contexts resource" draft = false [menu.gcp] title = "google_vertex_ai_metadata_stores_contexts" identifier = "inspec/resources/gcp/google_vertex_ai_metadata_stores_contexts resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_metadata_stores_contexts` InSpec audit resource to to test a Google Cloud MetadataStoresContext resource. ## Examples ```ruby describe google_vertex_ai_metadata_stores_contexts(parent: "projects/#{gcp_project_id}/locations/#{metadata_stores_context['region']}/metadataStores/#{metadata_stores_context['metadataStore']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_metadata_stores_contexts` resource: See [google_vertex_ai_metadata_stores_context](google_vertex_ai_metadata_stores_context) for more detailed information. * `names`: an array of `google_vertex_ai_metadata_stores_context` name * `schema_titles`: an array of `google_vertex_ai_metadata_stores_context` schema_title * `etags`: an array of `google_vertex_ai_metadata_stores_context` etag * `descriptions`: an array of `google_vertex_ai_metadata_stores_context` description * `display_names`: an array of `google_vertex_ai_metadata_stores_context` display_name * `schema_versions`: an array of `google_vertex_ai_metadata_stores_context` schema_version * `create_times`: an array of `google_vertex_ai_metadata_stores_context` create_time * `labels`: an array of `google_vertex_ai_metadata_stores_context` labels * `metadata`: an array of `google_vertex_ai_metadata_stores_context` metadata * `update_times`: an array of `google_vertex_ai_metadata_stores_context` update_time * `parent_contexts`: an array of `google_vertex_ai_metadata_stores_context` parent_contexts ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_metadata_stores_execution.md ================================================ +++ title = "google_vertex_ai_metadata_stores_execution resource" draft = false [menu.gcp] title = "google_vertex_ai_metadata_stores_execution" identifier = "inspec/resources/gcp/google_vertex_ai_metadata_stores_execution resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_metadata_stores_execution` InSpec audit resource to to test a Google Cloud MetadataStoresExecution resource. ## Examples ```ruby describe google_vertex_ai_metadata_stores_execution(name: "projects/#{gcp_project_id}/locations/#{metadata_stores_execution['region']}/metadataStores/#{metadata_stores_execution['metadataStore']}/executions/#{metadata_stores_execution['name']}", region: ' value_region') do it { should exist } its('create_time') { should cmp 'value_createtime' } its('schema_version') { should cmp 'value_schemaversion' } its('state') { should cmp 'value_state' } its('name') { should cmp 'value_name' } its('etag') { should cmp 'value_etag' } its('display_name') { should cmp 'value_displayname' } its('schema_title') { should cmp 'value_schematitle' } its('description') { should cmp 'value_description' } its('update_time') { should cmp 'value_updatetime' } end describe google_vertex_ai_metadata_stores_execution(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_metadata_stores_execution` resource: * `labels`: The labels with user-defined metadata to organize your Executions. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Execution (System labels are excluded). * `additional_properties`: * `create_time`: Output only. Timestamp when this Execution was created. * `schema_version`: The version of the schema in `schema_title` to use. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `state`: The state of this Execution. This is a property of the Execution, and does not imply or capture any ongoing process. This property is managed by clients (such as Vertex AI Pipelines) and the system does not prescribe or check the validity of state transitions. Possible values: * STATE_UNSPECIFIED * NEW * RUNNING * COMPLETE * FAILED * CACHED * CANCELLED * `name`: Output only. The resource name of the Execution. * `etag`: An eTag used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `display_name`: User provided display name of the Execution. May be up to 128 Unicode characters. * `metadata`: Properties of the Execution. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB. * `additional_properties`: Properties of the object. * `schema_title`: The title of the schema describing the metadata. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `description`: Description of the Execution * `update_time`: Output only. Timestamp when this Execution was last updated. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_metadata_stores_executions.md ================================================ +++ title = "google_vertex_ai_metadata_stores_executions resource" draft = false [menu.gcp] title = "google_vertex_ai_metadata_stores_executions" identifier = "inspec/resources/gcp/google_vertex_ai_metadata_stores_executions resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_metadata_stores_executions` InSpec audit resource to to test a Google Cloud MetadataStoresExecution resource. ## Examples ```ruby describe google_vertex_ai_metadata_stores_executions(parent: "projects/#{gcp_project_id}/locations/#{metadata_stores_execution['region']}/metadataStores/#{metadata_stores_execution['metadataStore']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_metadata_stores_executions` resource: See [google_vertex_ai_metadata_stores_execution](google_vertex_ai_metadata_stores_execution) for more detailed information. * `labels`: an array of `google_vertex_ai_metadata_stores_execution` labels * `create_times`: an array of `google_vertex_ai_metadata_stores_execution` create_time * `schema_versions`: an array of `google_vertex_ai_metadata_stores_execution` schema_version * `states`: an array of `google_vertex_ai_metadata_stores_execution` state * `names`: an array of `google_vertex_ai_metadata_stores_execution` name * `etags`: an array of `google_vertex_ai_metadata_stores_execution` etag * `display_names`: an array of `google_vertex_ai_metadata_stores_execution` display_name * `metadata`: an array of `google_vertex_ai_metadata_stores_execution` metadata * `schema_titles`: an array of `google_vertex_ai_metadata_stores_execution` schema_title * `descriptions`: an array of `google_vertex_ai_metadata_stores_execution` description * `update_times`: an array of `google_vertex_ai_metadata_stores_execution` update_time ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_metadata_stores_metadata_schema.md ================================================ +++ title = "google_vertex_ai_metadata_stores_metadata_schema resource" draft = false [menu.gcp] title = "google_vertex_ai_metadata_stores_metadata_schema" identifier = "inspec/resources/gcp/google_vertex_ai_metadata_stores_metadata_schema resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_metadata_stores_metadata_schema` InSpec audit resource to to test a Google Cloud MetadataStoresMetadataSchema resource. ## Examples ```ruby describe google_vertex_ai_metadata_stores_metadata_schema(name: "projects/#{gcp_project_id}/locations/#{metadata_stores_metadata_schema['region']}/metadataStores/#{metadata_stores_metadata_schema['metadataStore']}/metadataSchemas/#{metadata_stores_metadata_schema['name']}", region: ' value_region') do it { should exist } its('schema_type') { should cmp 'value_schematype' } its('description') { should cmp 'value_description' } its('schema_version') { should cmp 'value_schemaversion' } its('name') { should cmp 'value_name' } its('create_time') { should cmp 'value_createtime' } its('schema') { should cmp 'value_schema' } end describe google_vertex_ai_metadata_stores_metadata_schema(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_metadata_stores_metadata_schema` resource: * `schema_type`: The type of the MetadataSchema. This is a property that identifies which metadata types will use the MetadataSchema. Possible values: * METADATA_SCHEMA_TYPE_UNSPECIFIED * ARTIFACT_TYPE * EXECUTION_TYPE * CONTEXT_TYPE * `description`: Description of the Metadata Schema * `schema_version`: The version of the MetadataSchema. The version's format must match the following regular expression: `^[0-9]+.+.+$`, which would allow to order/compare different versions. Example: 1.0.0, 1.0.1, etc. * `name`: Output only. The resource name of the MetadataSchema. * `create_time`: Output only. Timestamp when this MetadataSchema was created. * `schema`: Required. The raw YAML string representation of the MetadataSchema. The combination of [MetadataSchema.version] and the schema name given by `title` in [MetadataSchema.schema] must be unique within a MetadataStore. The schema is defined as an OpenAPI 3.0.2 [MetadataSchema Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject) ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_metadata_stores_metadata_schemas.md ================================================ +++ title = "google_vertex_ai_metadata_stores_metadata_schemas resource" draft = false [menu.gcp] title = "google_vertex_ai_metadata_stores_metadata_schemas" identifier = "inspec/resources/gcp/google_vertex_ai_metadata_stores_metadata_schemas resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_metadata_stores_metadata_schemas` InSpec audit resource to to test a Google Cloud MetadataStoresMetadataSchema resource. ## Examples ```ruby describe google_vertex_ai_metadata_stores_metadata_schemas(parent: "projects/#{gcp_project_id}/locations/#{metadata_stores_metadata_schema['region']}/metadataStores/#{metadata_stores_metadata_schema['metadataStore']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_metadata_stores_metadata_schemas` resource: See [google_vertex_ai_metadata_stores_metadata_schema](google_vertex_ai_metadata_stores_metadata_schema) for more detailed information. * `schema_types`: an array of `google_vertex_ai_metadata_stores_metadata_schema` schema_type * `descriptions`: an array of `google_vertex_ai_metadata_stores_metadata_schema` description * `schema_versions`: an array of `google_vertex_ai_metadata_stores_metadata_schema` schema_version * `names`: an array of `google_vertex_ai_metadata_stores_metadata_schema` name * `create_times`: an array of `google_vertex_ai_metadata_stores_metadata_schema` create_time * `schemas`: an array of `google_vertex_ai_metadata_stores_metadata_schema` schema ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_model.md ================================================ +++ title = "google_vertex_ai_model resource" draft = false [menu.gcp] title = "google_vertex_ai_model" identifier = "inspec/resources/gcp/google_vertex_ai_model resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_model` InSpec audit resource to to test a Google Cloud Model resource. ## Examples ```ruby describe google_vertex_ai_model(name: "projects/#{gcp_project_id}/locations/#{model['region']}/models/#{model['name']}", region: ' value_region') do it { should exist } its('name') { should cmp 'value_name' } its('update_time') { should cmp 'value_updatetime' } its('etag') { should cmp 'value_etag' } its('description') { should cmp 'value_description' } its('create_time') { should cmp 'value_createtime' } its('pipeline_job') { should cmp 'value_pipelinejob' } its('version_update_time') { should cmp 'value_versionupdatetime' } its('metadata_artifact') { should cmp 'value_metadataartifact' } its('metadata_schema_uri') { should cmp 'value_metadataschemauri' } its('version_id') { should cmp 'value_versionid' } its('artifact_uri') { should cmp 'value_artifacturi' } its('training_pipeline') { should cmp 'value_trainingpipeline' } its('display_name') { should cmp 'value_displayname' } its('version_create_time') { should cmp 'value_versioncreatetime' } its('version_description') { should cmp 'value_versiondescription' } end describe google_vertex_ai_model(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_model` resource: * `model_source_info`: Detail description of the source information of the model. * `copy`: If this Model is copy of another Model. If true then source_type pertains to the original. * `source_type`: Type of the model source. Possible values: * MODEL_SOURCE_TYPE_UNSPECIFIED * AUTOML * CUSTOM * BQML * MODEL_GARDEN * GENIE * `name`: The resource name of the Model. * `metadata`: Immutable. An additional information about the Model; the schema of the metadata can be found in metadata_schema. Unset if the Model does not have any additional information. * `update_time`: Output only. Timestamp when this Model was most recently updated. * `etag`: Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `description`: The description of the Model. * `deployed_models`: Output only. The pointers to DeployedModels created from this Model. Note that Model could have been deployed to Endpoints in different Locations. * `deployed_model_id`: Immutable. An ID of a DeployedModel in the above Endpoint. * `endpoint`: Immutable. A resource name of an Endpoint. * `create_time`: Output only. Timestamp when this Model was uploaded into Vertex AI. * `explanation_spec`: Specification of Model explanation. * `parameters`: Parameters to configure explaining for Model's predictions. * `output_indices`: If populated, only returns attributions that have output_index contained in output_indices. It must be an ndarray of integers, with the same shape of the output it's explaining. If not populated, returns attributions for top_k indices of outputs. If neither top_k nor output_indices is populated, returns the argmax index of the outputs. Only applicable to Models that predict multiple outputs (e,g, multi-class Models that predict multiple classes). * `examples`: Example-based explainability that returns the nearest neighbors from the provided dataset. * `presets`: Preset configuration for example-based explanations * `modality`: The modality of the uploaded model, which automatically configures the distance measurement and feature normalization for the underlying example index and queries. If your model does not precisely fit one of these types, it is okay to choose the closest type. Possible values: * MODALITY_UNSPECIFIED * IMAGE * TEXT * TABULAR * `query`: Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. Possible values: * PRECISE * FAST * `neighbor_count`: The number of neighbors to return when querying for examples. * `example_gcs_source`: The Cloud Storage input instances. * `gcs_source`: The Google Cloud Storage location for the input content. * `uris`: Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. * `data_format`: The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. Possible values: * DATA_FORMAT_UNSPECIFIED * JSONL * `nearest_neighbor_search_config`: The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). * `xrai_attribution`: An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Supported only by image Models. * `smooth_grad_config`: Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf * `feature_noise_sigma`: Noise sigma by features. Noise sigma represents the standard deviation of the gaussian kernel that will be used to add noise to interpolated inputs prior to computing gradients. * `noise_sigma`: Noise sigma per feature. No noise is added to features that are not set. * `name`: The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. * `sigma`: This represents the standard deviation of the Gaussian kernel that will be used to add noise to the feature prior to computing gradients. Similar to noise_sigma but represents the noise added to the current feature. Defaults to 0.1. * `noise_sigma`: This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. If the distribution is different per feature, set feature_noise_sigma instead for each feature. * `noisy_sample_count`: The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3. * `step_count`: Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. Valid range of its value is [1, 100], inclusively. * `blur_baseline_config`: Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383 * `max_blur_sigma`: The standard deviation of the blur kernel for the blurred baseline. The same blurring parameter is used for both the height and the width dimension. If not set, the method defaults to the zero (i.e. black for images) baseline. * `top_k`: If populated, returns attributions for top K indices of outputs (defaults to 1). Only applies to Models that predicts more than one outputs (e,g, multi-class Models). When set to -1, returns explanations for all outputs. * `integrated_gradients_attribution`: An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365 * `step_count`: Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is within the desired error range. Valid range of its value is [1, 100], inclusively. * `smooth_grad_config`: Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf * `feature_noise_sigma`: Noise sigma by features. Noise sigma represents the standard deviation of the gaussian kernel that will be used to add noise to interpolated inputs prior to computing gradients. * `noise_sigma`: Noise sigma per feature. No noise is added to features that are not set. * `name`: The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. * `sigma`: This represents the standard deviation of the Gaussian kernel that will be used to add noise to the feature prior to computing gradients. Similar to noise_sigma but represents the noise added to the current feature. Defaults to 0.1. * `noise_sigma`: This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. If the distribution is different per feature, set feature_noise_sigma instead for each feature. * `noisy_sample_count`: The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3. * `blur_baseline_config`: Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383 * `max_blur_sigma`: The standard deviation of the blur kernel for the blurred baseline. The same blurring parameter is used for both the height and the width dimension. If not set, the method defaults to the zero (i.e. black for images) baseline. * `sampled_shapley_attribution`: An attribution method that approximates Shapley values for features that contribute to the label being predicted. A sampling strategy is used to approximate the value rather than considering all subsets of features. * `path_count`: Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. * `metadata`: Metadata describing the Model's input and output for explanation. * `feature_attributions_schema_uri`: Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML tabular Models always have this field populated by Vertex AI. Note: The URI given on output may be different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `latent_space_source`: Name of the source to generate embeddings for example based explanations. * `outputs`: Required. Map from output names to output metadata. For Vertex AI-provided Tensorflow images, keys can be any user defined string that consists of any UTF-8 characters. For custom images, keys are the name of the output field in the prediction to be explained. Currently only one key is allowed. * `additional_properties`: Metadata of the prediction output to be explained. * `inputs`: Required. Map from feature names to feature input metadata. Keys are the name of the features. Values are the specification of the feature. An empty InputMetadata is valid. It describes a text feature which has the name specified as the key in ExplanationMetadata.inputs. The baseline of the empty feature is chosen by Vertex AI. For Vertex AI-provided Tensorflow images, the key can be any friendly name of the feature. Once specified, featureAttributions are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. * `additional_properties`: Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `pipeline_job`: Optional. This field is populated if the model is produced by a pipeline job. * `predict_schemata`: Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. * `instance_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `parameters_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI, if no parameters are supported, then it is set to an empty string. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `prediction_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single prediction produced by this Model, which are returned via PredictResponse.predictions, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `version_update_time`: Output only. Timestamp when this version was most recently updated. * `supported_export_formats`: Output only. The formats in which this Model may be exported. If empty, this Model is not available for export. * `exportable_contents`: Output only. The content of this Model that may be exported. * `id`: Output only. The ID of the export format. The possible format IDs are: * `tflite` Used for Android mobile devices. * `edgetpu-tflite` Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices. * `tf-saved-model` A tensorflow model in SavedModel format. * `tf-js` A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the browser and in Node.js using JavaScript. * `core-ml` Used for iOS mobile devices. * `custom-trained` A Model that was uploaded or trained by custom code. * `original_model_info`: Contains information about the original Model if this Model is a copy. * `model`: Output only. The resource name of the Model this Model is a copy of, including the revision. Format: `projects/{project}/locations/{location}/models/{model_id}@{version_id}` * `metadata_artifact`: Output only. The resource name of the Artifact that was created in MetadataStore when creating the Model. The Artifact resource name pattern is `projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}`. * `supported_input_storage_formats`: Output only. The formats this Model supports in BatchPredictionJob.input_config. If PredictSchemata.instance_schema_uri exists, the instances should be given as per that schema. The possible formats are: * `jsonl` The JSON Lines format, where each instance is a single line. Uses GcsSource. * `csv` The CSV format, where each instance is a single comma-separated line. The first line in the file is the header, containing comma-separated field names. Uses GcsSource. * `tf-record` The TFRecord format, where each instance is a single record in tfrecord syntax. Uses GcsSource. * `tf-record-gzip` Similar to `tf-record`, but the file is gzipped. Uses GcsSource. * `bigquery` Each instance is a single row in BigQuery. Uses BigQuerySource. * `file-list` Each line of the file is the location of an instance to process, uses `gcs_source` field of the InputConfig object. If this Model doesn't support any of these formats it means it cannot be used with a BatchPredictionJob. However, if it has supported_deployment_resources_types, it could serve online predictions by using PredictionService.Predict or PredictionService.Explain. * `metadata_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing additional information about the Model, that is specific to it. Unset if the Model does not have any additional information. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI, if no additional metadata is needed, this field is set to an empty string. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `container_spec`: Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `predict_route`: Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.predict to this path on the container's IP address and port. Vertex AI then returns the container's response in the API response. For example, if you set this field to `/foo`, then when Vertex AI receives a prediction request, it forwards the request body in a POST request to the `/foo` path on the port of your container specified by the first value of this `ModelContainerSpec`'s ports field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * `image_uri`: Required. Immutable. URI of the Docker image to be used as the custom container for serving predictions. This URI must identify an image in Artifact Registry or Container Registry. Learn more about the [container publishing requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon ModelService.UploadModel, stored internally, and this original path is afterwards not used. To learn about the requirements for the Docker image itself, see [Custom container requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. * `env`: Immutable. List of environment variables to set in the container. After the container starts running, code running in the container can read these environment variables. Additionally, the command and args fields can reference these variables. Later entries in this list can also reference earlier entries. For example, the following example sets the variable `VAR_2` to have the value `foo bar`: ```json [ { "name": "VAR_1", "value": "foo" }, { "name": "VAR_2", "value": "$(VAR_1) bar" } ] ``` If you switch the order of the variables in the example, then the expansion does not occur. This field corresponds to the `env` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `name`: Required. Name of the environment variable. Must be a valid C identifier. * `value`: Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. * `args`: Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify this field as an array of executable and arguments, similar to a Docker `CMD`'s "default parameters" form. If you don't specify this field but do specify the command field, then the command from the `command` field runs without any additional arguments. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container's `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `args` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `command`: Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint). Specify this field as an array of executable and arguments, similar to a Docker `ENTRYPOINT`'s "exec" form, not its "shell" form. If you do not specify this field, then the container's `ENTRYPOINT` runs, in conjunction with the args field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd), if either exists. If this field is not specified and the container does not have an `ENTRYPOINT`, then refer to the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). If you specify this field, then you can also specify the `args` field to provide additional arguments for this command. However, if you specify this field, then the container's `CMD` is ignored. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container's `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `command` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `ports`: Immutable. List of ports to expose from the container. Vertex AI sends any prediction requests that it receives to the first port on this list. Vertex AI also sends [liveness and health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```json [ { "containerPort": 8080 } ] ``` Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `container_port`: The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. * `health_route`: Immutable. HTTP path on the container to send health checks to. Vertex AI intermittently sends GET requests to this path on the container's IP address and port to check that the container is healthy. Read more about [health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). For example, if you set this field to `/bar`, then Vertex AI intermittently sends a GET request to the `/bar` path on the port of your container specified by the first value of this `ModelContainerSpec`'s ports field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/ DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * `version_id`: Output only. Immutable. The version ID of the model. A new version is committed when a new model version is uploaded or trained under an existing model id. It is an auto-incrementing decimal number in string representation. * `artifact_uri`: Immutable. The path to the directory containing the Model artifact and any of its supporting files. Not present for AutoML Models or Large Models. * `training_pipeline`: Output only. The resource name of the TrainingPipeline that uploaded this Model, if any. * `display_name`: Required. The display name of the Model. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `supported_deployment_resources_types`: Output only. When this Model is deployed, its prediction resources are described by the `prediction_resources` field of the Endpoint.deployed_models object. Because not all Models support all resource configuration types, the configuration types this Model supports are listed here. If no configuration types are listed, the Model cannot be deployed to an Endpoint and does not support online predictions (PredictionService.Predict or PredictionService.Explain). Such a Model can serve predictions by using a BatchPredictionJob, if it has at least one entry each in supported_input_storage_formats and supported_output_storage_formats. * `supported_output_storage_formats`: Output only. The formats this Model supports in BatchPredictionJob.output_config. If both PredictSchemata.instance_schema_uri and PredictSchemata.prediction_schema_uri exist, the predictions are returned together with their instances. In other words, the prediction has the original instance data first, followed by the actual prediction content (as per the schema). The possible formats are: * `jsonl` The JSON Lines format, where each prediction is a single line. Uses GcsDestination. * `csv` The CSV format, where each prediction is a single comma-separated line. The first line in the file is the header, containing comma-separated field names. Uses GcsDestination. * `bigquery` Each prediction is a single row in a BigQuery table, uses BigQueryDestination . If this Model doesn't support any of these formats it means it cannot be used with a BatchPredictionJob. However, if it has supported_deployment_resources_types, it could serve online predictions by using PredictionService.Predict or PredictionService.Explain. * `version_aliases`: User provided version aliases so that a model version can be referenced via alias (i.e. `projects/{project}/locations/{location}/models/{model_id}@{version_alias}` instead of auto-generated version id (i.e. `projects/{project}/locations/{location}/models/{model_id}@{version_id})`. The format is a-z{0,126}[a-z0-9] to distinguish from version_id. A default version alias will be created for the first version of the model, and there must be exactly one default version alias for a model. * `version_create_time`: Output only. Timestamp when this version was created. * `version_description`: The description of this version. * `labels`: The labels with user-defined metadata to organize your Models. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_model_deployment_monitoring_job.md ================================================ +++ title = "google_vertex_ai_model_deployment_monitoring_job resource" draft = false [menu.gcp] title = "google_vertex_ai_model_deployment_monitoring_job" identifier = "inspec/resources/gcp/google_vertex_ai_model_deployment_monitoring_job resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_model_deployment_monitoring_job` InSpec audit resource to to test a Google Cloud ModelDeploymentMonitoringJob resource. ## Examples ```ruby describe google_vertex_ai_model_deployment_monitoring_job(name: "projects/#{gcp_project_id}/locations/#{model_deployment_monitoring_job['region']}/modelDeploymentMonitoringJobs/#{model_deployment_monitoring_job['name']}", region: ' value_region') do it { should exist } its('state') { should cmp 'value_state' } its('analysis_instance_schema_uri') { should cmp 'value_analysisinstanceschemauri' } its('endpoint') { should cmp 'value_endpoint' } its('display_name') { should cmp 'value_displayname' } its('schedule_state') { should cmp 'value_schedulestate' } its('predict_instance_schema_uri') { should cmp 'value_predictinstanceschemauri' } its('next_schedule_time') { should cmp 'value_nextscheduletime' } its('create_time') { should cmp 'value_createtime' } its('log_ttl') { should cmp 'value_logttl' } its('update_time') { should cmp 'value_updatetime' } its('name') { should cmp 'value_name' } end describe google_vertex_ai_model_deployment_monitoring_job(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_model_deployment_monitoring_job` resource: * `model_deployment_monitoring_objective_configs`: Required. The config for monitoring objectives. This is a per DeployedModel config. Each DeployedModel needs to be configured separately. * `objective_config`: The objective configuration for model monitoring, including the information needed to detect anomalies for one particular model. * `explanation_config`: The config for integrating with Vertex Explainable AI. Only applicable if the Model has explanation_spec populated. * `explanation_baseline`: Output from BatchPredictionJob for Model Monitoring baseline dataset, which can be used to generate baseline attribution scores. * `prediction_format`: The storage format of the predictions generated BatchPrediction job. Possible values: * PREDICTION_FORMAT_UNSPECIFIED * JSONL * BIGQUERY * `gcs`: The Google Cloud Storage location where the output is to be written to. * `output_uri_prefix`: Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist. * `bigquery`: The BigQuery location for the output content. * `output_uri`: Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`. * `enable_feature_attributes`: If want to analyze the Vertex Explainable AI feature attribute scores or not. If set to true, Vertex AI will log the feature attributions from explain response and do the skew/drift detection for them. * `training_dataset`: Training Dataset information. * `logging_sampling_strategy`: Sampling Strategy for logging, can be for both training and prediction dataset. * `random_sample_config`: Requests are randomly selected. * `sample_rate`: Sample rate (0, 1] * `dataset`: The resource name of the Dataset used to train this Model. * `gcs_source`: The Google Cloud Storage location for the input content. * `uris`: Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. * `target_field`: The target field name the model is to predict. This field will be excluded when doing Predict and (or) Explain for the training data. * `bigquery_source`: The BigQuery location for the input content. * `input_uri`: Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. * `data_format`: Data format of the dataset, only applicable if the input is from Google Cloud Storage. The possible formats are: "tf-record" The source file is a TFRecord file. "csv" The source file is a CSV file. "jsonl" The source file is a JSONL file. * `training_prediction_skew_detection_config`: The config for Training & Prediction data skew detection. It specifies the training dataset sources and the skew detection parameters. * `skew_thresholds`: Key is the feature name and value is the threshold. If a feature needs to be monitored for skew, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between the training and prediction feature. * `additional_properties`: The config for feature monitoring threshold. * `default_skew_threshold`: The config for feature monitoring threshold. * `value`: Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 1. For categorical feature, the distribution distance is calculated by L-inifinity norm. 2. For numerical feature, the distribution distance is calculated by Jensen–Shannon divergence. Each feature must have a non-zero threshold if they need to be monitored. Otherwise no alert will be triggered for that feature. * `attribution_score_skew_thresholds`: Key is the feature name and value is the threshold. The threshold here is against attribution score distance between the training and prediction feature. * `additional_properties`: The config for feature monitoring threshold. * `prediction_drift_detection_config`: The config for Prediction data drift detection. * `attribution_score_drift_thresholds`: Key is the feature name and value is the threshold. The threshold here is against attribution score distance between different time windows. * `additional_properties`: The config for feature monitoring threshold. * `drift_thresholds`: Key is the feature name and value is the threshold. If a feature needs to be monitored for drift, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between different time windws. * `additional_properties`: The config for feature monitoring threshold. * `default_drift_threshold`: The config for feature monitoring threshold. * `value`: Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 1. For categorical feature, the distribution distance is calculated by L-inifinity norm. 2. For numerical feature, the distribution distance is calculated by Jensen–Shannon divergence. Each feature must have a non-zero threshold if they need to be monitored. Otherwise no alert will be triggered for that feature. * `deployed_model_id`: The DeployedModel ID of the objective config. * `labels`: The labels with user-defined metadata to organize your ModelDeploymentMonitoringJob. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: * `state`: Output only. The detailed state of the monitoring job. When the job is still creating, the state will be 'PENDING'. Once the job is successfully created, the state will be 'RUNNING'. Pause the job, the state will be 'PAUSED'. Resume the job, the state will return to 'RUNNING'. Possible values: * JOB_STATE_UNSPECIFIED * JOB_STATE_QUEUED * JOB_STATE_PENDING * JOB_STATE_RUNNING * JOB_STATE_SUCCEEDED * JOB_STATE_FAILED * JOB_STATE_CANCELLING * JOB_STATE_CANCELLED * JOB_STATE_PAUSED * JOB_STATE_EXPIRED * JOB_STATE_UPDATING * JOB_STATE_PARTIALLY_SUCCEEDED * `analysis_instance_schema_uri`: YAML schema file uri describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. If this field is empty, all the feature data types are inferred from predict_instance_schema_uri, meaning that TFDV will use the data in the exact format(data type) as prediction request/response. If there are any data type differences between predict instance and TFDV instance, this field can be used to override the schema. For models trained with Vertex AI, this field must be set as all the fields in predict instance formatted as string. * `enable_monitoring_pipeline_logs`: If true, the scheduled monitoring pipeline logs are sent to Google Cloud Logging, including pipeline status and anomalies detected. Please note the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging#pricing). * `endpoint`: Required. Endpoint resource name. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` * `logging_sampling_strategy`: Sampling Strategy for logging, can be for both training and prediction dataset. * `random_sample_config`: Requests are randomly selected. * `sample_rate`: Sample rate (0, 1] * `bigquery_tables`: Output only. The created bigquery tables for the job under customer project. Customer could do their own query & analysis. There could be 4 log tables in maximum: 1. Training data logging predict request/response 2. Serving data logging predict request/response * `log_source`: The source of log. Possible values: * LOG_SOURCE_UNSPECIFIED * TRAINING * SERVING * `bigquery_table_path`: The created BigQuery table to store logs. Customer could do their own query & analysis. Format: `bq://.model_deployment_monitoring_._` * `log_type`: The type of log. Possible values: * LOG_TYPE_UNSPECIFIED * PREDICT * EXPLAIN * `display_name`: Required. The user-defined name of the ModelDeploymentMonitoringJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. Display name of a ModelDeploymentMonitoringJob. * `schedule_state`: Output only. Schedule state when the monitoring job is in Running state. Possible values: * MONITORING_SCHEDULE_STATE_UNSPECIFIED * PENDING * OFFLINE * RUNNING * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `model_monitoring_alert_config`: * `email_alert_config`: The config for email alert. * `user_emails`: The email addresses to send the alert. * `enable_logging`: Dump the anomalies to Cloud Logging. The anomalies will be put to json payload encoded from proto google.cloud.aiplatform.logging.ModelMonitoringAnomaliesLogEntry. This can be further sinked to Pub/Sub or any other services supported by Cloud Logging. * `latest_monitoring_pipeline_metadata`: All metadata of most recent monitoring pipelines. * `status`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `run_time`: The time that most recent monitoring pipelines that is related to this run. * `sample_predict_instance`: Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we will generate predict schema from collected predict requests. * `predict_instance_schema_uri`: YAML schema file uri describing the format of a single instance, which are given to format this Endpoint's prediction (and explanation). If not set, we will generate predict schema from collected predict requests. * `next_schedule_time`: Output only. Timestamp when this monitoring pipeline will be scheduled to run for the next round. * `create_time`: Output only. Timestamp when this ModelDeploymentMonitoringJob was created. * `log_ttl`: The TTL of BigQuery tables in user projects which stores logs. A day is the basic unit of the TTL and we take the ceil of TTL/86400(a day). e.g. { second: 3600} indicates ttl = 1 day. * `stats_anomalies_base_directory`: The Google Cloud Storage location where the output is to be written to. * `output_uri_prefix`: Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist. * `update_time`: Output only. Timestamp when this ModelDeploymentMonitoringJob was updated most recently. * `model_deployment_monitoring_schedule_config`: The config for scheduling monitoring job. * `monitor_window`: The time window of the prediction data being included in each prediction dataset. This window specifies how long the data should be collected from historical model results for each run. If not set, ModelDeploymentMonitoringScheduleConfig.monitor_interval will be used. e.g. If currently the cutoff time is 2022-01-08 14:30:00 and the monitor_window is set to be 3600, then data from 2022-01-08 13:30:00 to 2022-01-08 14:30:00 will be retrieved and aggregated to calculate the monitoring statistics. * `monitor_interval`: Required. The model monitoring job scheduling interval. It will be rounded up to next full hour. This defines how often the monitoring jobs are triggered. * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `name`: Output only. Resource name of a ModelDeploymentMonitoringJob. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_model_deployment_monitoring_jobs.md ================================================ +++ title = "google_vertex_ai_model_deployment_monitoring_jobs resource" draft = false [menu.gcp] title = "google_vertex_ai_model_deployment_monitoring_jobs" identifier = "inspec/resources/gcp/google_vertex_ai_model_deployment_monitoring_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_model_deployment_monitoring_jobs` InSpec audit resource to to test a Google Cloud ModelDeploymentMonitoringJob resource. ## Examples ```ruby describe google_vertex_ai_model_deployment_monitoring_jobs(parent: "projects/#{gcp_project_id}/locations/#{model_deployment_monitoring_job['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_model_deployment_monitoring_jobs` resource: See [google_vertex_ai_model_deployment_monitoring_job](google_vertex_ai_model_deployment_monitoring_job) for more detailed information. * `model_deployment_monitoring_objective_configs`: an array of `google_vertex_ai_model_deployment_monitoring_job` model_deployment_monitoring_objective_configs * `labels`: an array of `google_vertex_ai_model_deployment_monitoring_job` labels * `states`: an array of `google_vertex_ai_model_deployment_monitoring_job` state * `analysis_instance_schema_uris`: an array of `google_vertex_ai_model_deployment_monitoring_job` analysis_instance_schema_uri * `enable_monitoring_pipeline_logs`: an array of `google_vertex_ai_model_deployment_monitoring_job` enable_monitoring_pipeline_logs * `endpoints`: an array of `google_vertex_ai_model_deployment_monitoring_job` endpoint * `logging_sampling_strategies`: an array of `google_vertex_ai_model_deployment_monitoring_job` logging_sampling_strategy * `bigquery_tables`: an array of `google_vertex_ai_model_deployment_monitoring_job` bigquery_tables * `display_names`: an array of `google_vertex_ai_model_deployment_monitoring_job` display_name * `schedule_states`: an array of `google_vertex_ai_model_deployment_monitoring_job` schedule_state * `errors`: an array of `google_vertex_ai_model_deployment_monitoring_job` error * `model_monitoring_alert_configs`: an array of `google_vertex_ai_model_deployment_monitoring_job` model_monitoring_alert_config * `latest_monitoring_pipeline_metadata`: an array of `google_vertex_ai_model_deployment_monitoring_job` latest_monitoring_pipeline_metadata * `sample_predict_instances`: an array of `google_vertex_ai_model_deployment_monitoring_job` sample_predict_instance * `predict_instance_schema_uris`: an array of `google_vertex_ai_model_deployment_monitoring_job` predict_instance_schema_uri * `next_schedule_times`: an array of `google_vertex_ai_model_deployment_monitoring_job` next_schedule_time * `create_times`: an array of `google_vertex_ai_model_deployment_monitoring_job` create_time * `log_ttls`: an array of `google_vertex_ai_model_deployment_monitoring_job` log_ttl * `stats_anomalies_base_directories`: an array of `google_vertex_ai_model_deployment_monitoring_job` stats_anomalies_base_directory * `update_times`: an array of `google_vertex_ai_model_deployment_monitoring_job` update_time * `model_deployment_monitoring_schedule_configs`: an array of `google_vertex_ai_model_deployment_monitoring_job` model_deployment_monitoring_schedule_config * `encryption_specs`: an array of `google_vertex_ai_model_deployment_monitoring_job` encryption_spec * `names`: an array of `google_vertex_ai_model_deployment_monitoring_job` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_model_evaluation_slice.md ================================================ +++ title = "google_vertex_ai_model_evaluation_slice resource" draft = false [menu.gcp] title = "google_vertex_ai_model_evaluation_slice" identifier = "inspec/resources/gcp/google_vertex_ai_model_evaluation_slice resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_model_evaluation_slice` InSpec audit resource to to test a Google Cloud ModelEvaluationSlice resource. ## Examples ```ruby describe google_vertex_ai_model_evaluation_slice(name: "projects/#{gcp_project_id}/locations/#{models_evaluations_slice['region']}/models/#{models_evaluations_slice['model']}/evaluations/#{models_evaluations_slice['evaluation']}/slices/#{models_evaluations_slice['slice']}", region: ' value_region') do it { should exist } its('create_time') { should cmp 'value_createtime' } its('name') { should cmp 'value_name' } its('metrics_schema_uri') { should cmp 'value_metricsschemauri' } end describe google_vertex_ai_model_evaluation_slice(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_model_evaluation_slice` resource: * `create_time`: Output only. Timestamp when this ModelEvaluationSlice was created. * `model_explanation`: Aggregated explanation metrics for a Model over a set of instances. * `mean_attributions`: Output only. Aggregated attributions explaining the Model's prediction outputs over the set of instances. The attributions are grouped by outputs. For Models that predict only one output, such as regression Models that predict only one score, there is only one attibution that explains the predicted output. For Models that predict multiple outputs, such as multiclass Models that predict multiple classes, each element explains one specific item. Attribution.output_index can be used to identify which output this attribution is explaining. The baselineOutputValue, instanceOutputValue and featureAttributions fields are averaged over the test data. NOTE: Currently AutoML tabular classification Models produce only one attribution, which averages attributions over all the classes it predicts. Attribution.approximation_error is not populated. * `output_display_name`: Output only. The display name of the output identified by output_index. For example, the predicted class name by a multi-classification Model. This field is only populated iff the Model predicts display names as a separate field along with the explained output. The predicted display name must has the same shape of the explained output, and can be located using output_index. * `baseline_output_value`: Output only. Model predicted output if the input instance is constructed from the baselines of all the features defined in ExplanationMetadata.inputs. The field name of the output is determined by the key in ExplanationMetadata.outputs. If the Model's predicted output has multiple dimensions (rank > 1), this is the value in the output located by output_index. If there are multiple baselines, their output values are averaged. * `output_name`: Output only. Name of the explain output. Specified as the key in ExplanationMetadata.outputs. * `feature_attributions`: Output only. Attributions of each explained feature. Features are extracted from the prediction instances according to explanation metadata for inputs. The value is a struct, whose keys are the name of the feature. The values are how much the feature in the instance contributed to the predicted result. The format of the value is determined by the feature's input format: * If the feature is a scalar value, the attribution value is a floating number. * If the feature is an array of scalar values, the attribution value is an array. * If the feature is a struct, the attribution value is a struct. The keys in the attribution value struct are the same as the keys in the feature struct. The formats of the values in the attribution struct are determined by the formats of the values in the feature struct. The ExplanationMetadata.feature_attributions_schema_uri field, pointed to by the ExplanationSpec field of the Endpoint.deployed_models object, points to the schema file that describes the features and their attribution values (if it is populated). * `output_index`: Output only. The index that locates the explained prediction output. If the prediction output is a scalar value, output_index is not populated. If the prediction output has multiple dimensions, the length of the output_index list is the same as the number of dimensions of the output. The i-th element in output_index is the element index of the i-th dimension of the output vector. Indices start from 0. * `instance_output_value`: Output only. Model predicted output on the corresponding explanation instance. The field name of the output is determined by the key in ExplanationMetadata.outputs. If the Model predicted output has multiple dimensions, this is the value in the output located by output_index. * `approximation_error`: Output only. Error of feature_attributions caused by approximation used in the explanation method. Lower value means more precise attributions. * For Sampled Shapley attribution, increasing path_count might reduce the error. * For Integrated Gradients attribution, increasing step_count might reduce the error. * For XRAI attribution, increasing step_count might reduce the error. See [this introduction](/vertex-ai/docs/explainable-ai/overview) for more information. * `name`: Output only. The resource name of the ModelEvaluationSlice. * `metrics`: Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored in metrics_schema_uri * `slice`: Definition of a slice. * `value`: Output only. The value of the dimension in this slice. * `dimension`: Output only. The dimension of the slice. Well-known dimensions are: * `annotationSpec`: This slice is on the test data that has either ground truth or prediction with AnnotationSpec.display_name equals to value. * `slice`: This slice is a user customized slice defined by its SliceSpec. * `slice_spec`: Specification for how the data should be sliced. * `configs`: Mapping configuration for this SliceSpec. The key is the name of the feature. By default, the key will be prefixed by "instance" as a dictionary prefix for Vertex Batch Predictions output format. * `additional_properties`: Specification message containing the config for this SliceSpec. When `kind` is selected as `value` and/or `range`, only a single slice will be computed. When `all_values` is present, a separate slice will be computed for each possible label/value for the corresponding key in `config`. Examples, with feature zip_code with values 12345, 23334, 88888 and feature country with values "US", "Canada", "Mexico" in the dataset: Example 1: { "zip_code": { "value": { "float_value": 12345.0 } } } A single slice for any data with zip_code 12345 in the dataset. Example 2: { "zip_code": { "range": { "low": 12345, "high": 20000 } } } A single slice containing data where the zip_codes between 12345 and 20000 For this example, data with the zip_code of 12345 will be in this slice. Example 3: { "zip_code": { "range": { "low": 10000, "high": 20000 } }, "country": { "value": { "string_value": "US" } } } A single slice containing data where the zip_codes between 10000 and 20000 has the country "US". For this example, data with the zip_code of 12345 and country "US" will be in this slice. Example 4: { "country": {"all_values": { "value": true } } } Three slices are computed, one for each unique country in the dataset. Example 5: { "country": { "all_values": { "value": true } }, "zip_code": { "value": { "float_value": 12345.0 } } } Three slices are computed, one for each unique country in the dataset where the zip_code is also 12345. For this example, data with zip_code 12345 and country "US" will be in one slice, zip_code 12345 and country "Canada" in another slice, and zip_code 12345 and country "Mexico" in another slice, totaling 3 slices. * `metrics_schema_uri`: Output only. Points to a YAML file stored on Google Cloud Storage describing the metrics of this ModelEvaluationSlice. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_model_evaluation_slices.md ================================================ +++ title = "google_vertex_ai_model_evaluation_slices resource" draft = false [menu.gcp] title = "google_vertex_ai_model_evaluation_slices" identifier = "inspec/resources/gcp/google_vertex_ai_model_evaluation_slices resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_model_evaluation_slices` InSpec audit resource to to test a Google Cloud ModelEvaluationSlice resource. ## Examples ```ruby describe google_vertex_ai_model_evaluation_slices(parent: "projects/#{gcp_project_id}/locations/#{models_evaluations_slice['region']}/models/#{models_evaluations_slice['model']}/evaluations/#{models_evaluations_slice['evaluation']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_model_evaluation_slices` resource: See [google_vertex_ai_model_evaluation_slice](google_vertex_ai_model_evaluation_slice) for more detailed information. * `create_times`: an array of `google_vertex_ai_model_evaluation_slice` create_time * `model_explanations`: an array of `google_vertex_ai_model_evaluation_slice` model_explanation * `names`: an array of `google_vertex_ai_model_evaluation_slice` name * `metrics`: an array of `google_vertex_ai_model_evaluation_slice` metrics * `slices`: an array of `google_vertex_ai_model_evaluation_slice` slice * `metrics_schema_uris`: an array of `google_vertex_ai_model_evaluation_slice` metrics_schema_uri ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_models.md ================================================ +++ title = "google_vertex_ai_models resource" draft = false [menu.gcp] title = "google_vertex_ai_models" identifier = "inspec/resources/gcp/google_vertex_ai_models resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_models` InSpec audit resource to to test a Google Cloud Model resource. ## Examples ```ruby describe google_vertex_ai_models(parent: "projects/#{gcp_project_id}/locations/#{model['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_models` resource: See [google_vertex_ai_model](google_vertex_ai_model) for more detailed information. * `model_source_infos`: an array of `google_vertex_ai_model` model_source_info * `names`: an array of `google_vertex_ai_model` name * `metadata`: an array of `google_vertex_ai_model` metadata * `update_times`: an array of `google_vertex_ai_model` update_time * `etags`: an array of `google_vertex_ai_model` etag * `descriptions`: an array of `google_vertex_ai_model` description * `deployed_models`: an array of `google_vertex_ai_model` deployed_models * `create_times`: an array of `google_vertex_ai_model` create_time * `explanation_specs`: an array of `google_vertex_ai_model` explanation_spec * `encryption_specs`: an array of `google_vertex_ai_model` encryption_spec * `pipeline_jobs`: an array of `google_vertex_ai_model` pipeline_job * `predict_schemata`: an array of `google_vertex_ai_model` predict_schemata * `version_update_times`: an array of `google_vertex_ai_model` version_update_time * `supported_export_formats`: an array of `google_vertex_ai_model` supported_export_formats * `original_model_infos`: an array of `google_vertex_ai_model` original_model_info * `metadata_artifacts`: an array of `google_vertex_ai_model` metadata_artifact * `supported_input_storage_formats`: an array of `google_vertex_ai_model` supported_input_storage_formats * `metadata_schema_uris`: an array of `google_vertex_ai_model` metadata_schema_uri * `container_specs`: an array of `google_vertex_ai_model` container_spec * `version_ids`: an array of `google_vertex_ai_model` version_id * `artifact_uris`: an array of `google_vertex_ai_model` artifact_uri * `training_pipelines`: an array of `google_vertex_ai_model` training_pipeline * `display_names`: an array of `google_vertex_ai_model` display_name * `supported_deployment_resources_types`: an array of `google_vertex_ai_model` supported_deployment_resources_types * `supported_output_storage_formats`: an array of `google_vertex_ai_model` supported_output_storage_formats * `version_aliases`: an array of `google_vertex_ai_model` version_aliases * `version_create_times`: an array of `google_vertex_ai_model` version_create_time * `version_descriptions`: an array of `google_vertex_ai_model` version_description * `labels`: an array of `google_vertex_ai_model` labels ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_models_evaluation.md ================================================ +++ title = "google_vertex_ai_models_evaluation resource" draft = false [menu.gcp] title = "google_vertex_ai_models_evaluation" identifier = "inspec/resources/gcp/google_vertex_ai_models_evaluation resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_models_evaluation` InSpec audit resource to to test a Google Cloud ModelsEvaluation resource. ## Examples ```ruby describe google_vertex_ai_models_evaluation(name: "projects/#{gcp_project_id}/locations/#{models_evaluation['region']}/models/#{models_evaluation['model']}/evaluations/#{models_evaluation['name']}", region: ' value_region') do it { should exist } its('data_item_schema_uri') { should cmp 'value_dataitemschemauri' } its('metrics_schema_uri') { should cmp 'value_metricsschemauri' } its('create_time') { should cmp 'value_createtime' } its('annotation_schema_uri') { should cmp 'value_annotationschemauri' } its('name') { should cmp 'value_name' } its('display_name') { should cmp 'value_displayname' } end describe google_vertex_ai_models_evaluation(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_models_evaluation` resource: * `data_item_schema_uri`: Points to a YAML file stored on Google Cloud Storage describing EvaluatedDataItemView.data_item_payload and EvaluatedAnnotation.data_item_payload. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). This field is not populated if there are neither EvaluatedDataItemViews nor EvaluatedAnnotations under this ModelEvaluation. * `metadata`: The metadata of the ModelEvaluation. For the ModelEvaluation uploaded from Managed Pipeline, metadata contains a structured value with keys of "pipeline_job_id", "evaluation_dataset_type", "evaluation_dataset_path". * `metrics_schema_uri`: Points to a YAML file stored on Google Cloud Storage describing the metrics of this ModelEvaluation. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). * `create_time`: Output only. Timestamp when this ModelEvaluation was created. * `annotation_schema_uri`: Points to a YAML file stored on Google Cloud Storage describing EvaluatedDataItemView.predictions, EvaluatedDataItemView.ground_truths, EvaluatedAnnotation.predictions, and EvaluatedAnnotation.ground_truths. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). This field is not populated if there are neither EvaluatedDataItemViews nor EvaluatedAnnotations under this ModelEvaluation. * `metrics`: Evaluation metrics of the Model. The schema of the metrics is stored in metrics_schema_uri * `explanation_specs`: Describes the values of ExplanationSpec that are used for explaining the predicted values on the evaluated data. * `explanation_spec`: Specification of Model explanation. * `parameters`: Parameters to configure explaining for Model's predictions. * `output_indices`: If populated, only returns attributions that have output_index contained in output_indices. It must be an ndarray of integers, with the same shape of the output it's explaining. If not populated, returns attributions for top_k indices of outputs. If neither top_k nor output_indices is populated, returns the argmax index of the outputs. Only applicable to Models that predict multiple outputs (e,g, multi-class Models that predict multiple classes). * `examples`: Example-based explainability that returns the nearest neighbors from the provided dataset. * `presets`: Preset configuration for example-based explanations * `modality`: The modality of the uploaded model, which automatically configures the distance measurement and feature normalization for the underlying example index and queries. If your model does not precisely fit one of these types, it is okay to choose the closest type. Possible values: * MODALITY_UNSPECIFIED * IMAGE * TEXT * TABULAR * `query`: Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. Possible values: * PRECISE * FAST * `neighbor_count`: The number of neighbors to return when querying for examples. * `example_gcs_source`: The Cloud Storage input instances. * `gcs_source`: The Google Cloud Storage location for the input content. * `uris`: Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. * `data_format`: The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. Possible values: * DATA_FORMAT_UNSPECIFIED * JSONL * `nearest_neighbor_search_config`: The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). * `xrai_attribution`: An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Supported only by image Models. * `smooth_grad_config`: Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf * `feature_noise_sigma`: Noise sigma by features. Noise sigma represents the standard deviation of the gaussian kernel that will be used to add noise to interpolated inputs prior to computing gradients. * `noise_sigma`: Noise sigma per feature. No noise is added to features that are not set. * `name`: The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. * `sigma`: This represents the standard deviation of the Gaussian kernel that will be used to add noise to the feature prior to computing gradients. Similar to noise_sigma but represents the noise added to the current feature. Defaults to 0.1. * `noise_sigma`: This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. If the distribution is different per feature, set feature_noise_sigma instead for each feature. * `noisy_sample_count`: The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3. * `step_count`: Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. Valid range of its value is [1, 100], inclusively. * `blur_baseline_config`: Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383 * `max_blur_sigma`: The standard deviation of the blur kernel for the blurred baseline. The same blurring parameter is used for both the height and the width dimension. If not set, the method defaults to the zero (i.e. black for images) baseline. * `top_k`: If populated, returns attributions for top K indices of outputs (defaults to 1). Only applies to Models that predicts more than one outputs (e,g, multi-class Models). When set to -1, returns explanations for all outputs. * `integrated_gradients_attribution`: An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365 * `step_count`: Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is within the desired error range. Valid range of its value is [1, 100], inclusively. * `smooth_grad_config`: Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf * `feature_noise_sigma`: Noise sigma by features. Noise sigma represents the standard deviation of the gaussian kernel that will be used to add noise to interpolated inputs prior to computing gradients. * `noise_sigma`: Noise sigma per feature. No noise is added to features that are not set. * `name`: The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. * `sigma`: This represents the standard deviation of the Gaussian kernel that will be used to add noise to the feature prior to computing gradients. Similar to noise_sigma but represents the noise added to the current feature. Defaults to 0.1. * `noise_sigma`: This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. If the distribution is different per feature, set feature_noise_sigma instead for each feature. * `noisy_sample_count`: The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3. * `blur_baseline_config`: Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383 * `max_blur_sigma`: The standard deviation of the blur kernel for the blurred baseline. The same blurring parameter is used for both the height and the width dimension. If not set, the method defaults to the zero (i.e. black for images) baseline. * `sampled_shapley_attribution`: An attribution method that approximates Shapley values for features that contribute to the label being predicted. A sampling strategy is used to approximate the value rather than considering all subsets of features. * `path_count`: Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. * `metadata`: Metadata describing the Model's input and output for explanation. * `feature_attributions_schema_uri`: Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML tabular Models always have this field populated by Vertex AI. Note: The URI given on output may be different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `latent_space_source`: Name of the source to generate embeddings for example based explanations. * `outputs`: Required. Map from output names to output metadata. For Vertex AI-provided Tensorflow images, keys can be any user defined string that consists of any UTF-8 characters. For custom images, keys are the name of the output field in the prediction to be explained. Currently only one key is allowed. * `additional_properties`: Metadata of the prediction output to be explained. * `inputs`: Required. Map from feature names to feature input metadata. Keys are the name of the features. Values are the specification of the feature. An empty InputMetadata is valid. It describes a text feature which has the name specified as the key in ExplanationMetadata.inputs. The baseline of the empty feature is chosen by Vertex AI. For Vertex AI-provided Tensorflow images, the key can be any friendly name of the feature. Once specified, featureAttributions are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. * `additional_properties`: Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. * `explanation_type`: Explanation type. For AutoML Image Classification models, possible values are: * `image-integrated-gradients` * `image-xrai` * `slice_dimensions`: All possible dimensions of ModelEvaluationSlices. The dimensions can be used as the filter of the ModelService.ListModelEvaluationSlices request, in the form of `slice.dimension = `. * `model_explanation`: Aggregated explanation metrics for a Model over a set of instances. * `mean_attributions`: Output only. Aggregated attributions explaining the Model's prediction outputs over the set of instances. The attributions are grouped by outputs. For Models that predict only one output, such as regression Models that predict only one score, there is only one attibution that explains the predicted output. For Models that predict multiple outputs, such as multiclass Models that predict multiple classes, each element explains one specific item. Attribution.output_index can be used to identify which output this attribution is explaining. The baselineOutputValue, instanceOutputValue and featureAttributions fields are averaged over the test data. NOTE: Currently AutoML tabular classification Models produce only one attribution, which averages attributions over all the classes it predicts. Attribution.approximation_error is not populated. * `output_display_name`: Output only. The display name of the output identified by output_index. For example, the predicted class name by a multi-classification Model. This field is only populated iff the Model predicts display names as a separate field along with the explained output. The predicted display name must has the same shape of the explained output, and can be located using output_index. * `baseline_output_value`: Output only. Model predicted output if the input instance is constructed from the baselines of all the features defined in ExplanationMetadata.inputs. The field name of the output is determined by the key in ExplanationMetadata.outputs. If the Model's predicted output has multiple dimensions (rank > 1), this is the value in the output located by output_index. If there are multiple baselines, their output values are averaged. * `output_name`: Output only. Name of the explain output. Specified as the key in ExplanationMetadata.outputs. * `feature_attributions`: Output only. Attributions of each explained feature. Features are extracted from the prediction instances according to explanation metadata for inputs. The value is a struct, whose keys are the name of the feature. The values are how much the feature in the instance contributed to the predicted result. The format of the value is determined by the feature's input format: * If the feature is a scalar value, the attribution value is a floating number. * If the feature is an array of scalar values, the attribution value is an array. * If the feature is a struct, the attribution value is a struct. The keys in the attribution value struct are the same as the keys in the feature struct. The formats of the values in the attribution struct are determined by the formats of the values in the feature struct. The ExplanationMetadata.feature_attributions_schema_uri field, pointed to by the ExplanationSpec field of the Endpoint.deployed_models object, points to the schema file that describes the features and their attribution values (if it is populated). * `output_index`: Output only. The index that locates the explained prediction output. If the prediction output is a scalar value, output_index is not populated. If the prediction output has multiple dimensions, the length of the output_index list is the same as the number of dimensions of the output. The i-th element in output_index is the element index of the i-th dimension of the output vector. Indices start from 0. * `instance_output_value`: Output only. Model predicted output on the corresponding explanation instance. The field name of the output is determined by the key in ExplanationMetadata.outputs. If the Model predicted output has multiple dimensions, this is the value in the output located by output_index. * `approximation_error`: Output only. Error of feature_attributions caused by approximation used in the explanation method. Lower value means more precise attributions. * For Sampled Shapley attribution, increasing path_count might reduce the error. * For Integrated Gradients attribution, increasing step_count might reduce the error. * For XRAI attribution, increasing step_count might reduce the error. See [this introduction](/vertex-ai/docs/explainable-ai/overview) for more information. * `name`: Output only. The resource name of the ModelEvaluation. * `display_name`: The display name of the ModelEvaluation. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_models_evaluations.md ================================================ +++ title = "google_vertex_ai_models_evaluations resource" draft = false [menu.gcp] title = "google_vertex_ai_models_evaluations" identifier = "inspec/resources/gcp/google_vertex_ai_models_evaluations resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_models_evaluations` InSpec audit resource to to test a Google Cloud ModelsEvaluation resource. ## Examples ```ruby describe google_vertex_ai_models_evaluations(parent: "projects/#{gcp_project_id}/locations/#{models_evaluation['region']}/models/#{models_evaluation['model']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_models_evaluations` resource: See [google_vertex_ai_models_evaluation](google_vertex_ai_models_evaluation) for more detailed information. * `data_item_schema_uris`: an array of `google_vertex_ai_models_evaluation` data_item_schema_uri * `metadata`: an array of `google_vertex_ai_models_evaluation` metadata * `metrics_schema_uris`: an array of `google_vertex_ai_models_evaluation` metrics_schema_uri * `create_times`: an array of `google_vertex_ai_models_evaluation` create_time * `annotation_schema_uris`: an array of `google_vertex_ai_models_evaluation` annotation_schema_uri * `metrics`: an array of `google_vertex_ai_models_evaluation` metrics * `explanation_specs`: an array of `google_vertex_ai_models_evaluation` explanation_specs * `slice_dimensions`: an array of `google_vertex_ai_models_evaluation` slice_dimensions * `model_explanations`: an array of `google_vertex_ai_models_evaluation` model_explanation * `names`: an array of `google_vertex_ai_models_evaluation` name * `display_names`: an array of `google_vertex_ai_models_evaluation` display_name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_nas_job.md ================================================ +++ title = "google_vertex_ai_nas_job resource" draft = false [menu.gcp] title = "google_vertex_ai_nas_job" identifier = "inspec/resources/gcp/google_vertex_ai_nas_job resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_nas_job` InSpec audit resource to to test a Google Cloud NasJob resource. ## Examples ```ruby describe google_vertex_ai_nas_job(name: "projects/#{gcp_project_id}/locations/#{nas_job['region']}/nasJobs/#{nas_job['name']}", region: ' value_region') do it { should exist } its('name') { should cmp 'value_name' } its('end_time') { should cmp 'value_endtime' } its('state') { should cmp 'value_state' } its('create_time') { should cmp 'value_createtime' } its('display_name') { should cmp 'value_displayname' } its('start_time') { should cmp 'value_starttime' } its('update_time') { should cmp 'value_updatetime' } end describe google_vertex_ai_nas_job(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_nas_job` resource: * `nas_job_output`: Represents a uCAIP NasJob output. * `multi_trial_job_output`: The output of a multi-trial Neural Architecture Search (NAS) jobs. * `search_trials`: Output only. List of NasTrials that were started as part of search stage. * `id`: Output only. The identifier of the NasTrial assigned by the service. * `state`: Output only. The detailed state of the NasTrial. Possible values: * STATE_UNSPECIFIED * REQUESTED * ACTIVE * STOPPING * SUCCEEDED * INFEASIBLE * `final_measurement`: A message representing a Measurement of a Trial. A Measurement contains the Metrics got by executing a Trial using suggested hyperparameter values. * `metrics`: Output only. A list of metrics got by evaluating the objective functions using suggested Parameter values. * `metric_id`: Output only. The ID of the Metric. The Metric should be defined in StudySpec's Metrics. * `value`: Output only. The value for this metric. * `elapsed_duration`: Output only. Time that the Trial has been running at the point of this Measurement. * `step_count`: Output only. The number of steps the machine learning model has been trained for. Must be non-negative. * `start_time`: Output only. Time when the NasTrial was started. * `end_time`: Output only. Time when the NasTrial's status changed to `SUCCEEDED` or `INFEASIBLE`. * `train_trials`: Output only. List of NasTrials that were started as part of train stage. * `id`: Output only. The identifier of the NasTrial assigned by the service. * `state`: Output only. The detailed state of the NasTrial. Possible values: * STATE_UNSPECIFIED * REQUESTED * ACTIVE * STOPPING * SUCCEEDED * INFEASIBLE * `final_measurement`: A message representing a Measurement of a Trial. A Measurement contains the Metrics got by executing a Trial using suggested hyperparameter values. * `metrics`: Output only. A list of metrics got by evaluating the objective functions using suggested Parameter values. * `metric_id`: Output only. The ID of the Metric. The Metric should be defined in StudySpec's Metrics. * `value`: Output only. The value for this metric. * `elapsed_duration`: Output only. Time that the Trial has been running at the point of this Measurement. * `step_count`: Output only. The number of steps the machine learning model has been trained for. Must be non-negative. * `start_time`: Output only. Time when the NasTrial was started. * `end_time`: Output only. Time when the NasTrial's status changed to `SUCCEEDED` or `INFEASIBLE`. * `name`: Output only. Resource name of the NasJob. * `end_time`: Output only. Time when the NasJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `state`: Output only. The detailed state of the job. Possible values: * JOB_STATE_UNSPECIFIED * JOB_STATE_QUEUED * JOB_STATE_PENDING * JOB_STATE_RUNNING * JOB_STATE_SUCCEEDED * JOB_STATE_FAILED * JOB_STATE_CANCELLING * JOB_STATE_CANCELLED * JOB_STATE_PAUSED * JOB_STATE_EXPIRED * JOB_STATE_UPDATING * JOB_STATE_PARTIALLY_SUCCEEDED * `create_time`: Output only. Time when the NasJob was created. * `display_name`: Required. The display name of the NasJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `nas_job_spec`: Represents the spec of a NasJob. * `search_space_spec`: It defines the search space for Neural Architecture Search (NAS). * `resume_nas_job_id`: The ID of the existing NasJob in the same Project and Location which will be used to resume search. search_space_spec and nas_algorithm_spec are obtained from previous NasJob hence should not provide them again for this NasJob. * `multi_trial_algorithm_spec`: The spec of multi-trial Neural Architecture Search (NAS). * `search_trial_spec`: Represent spec for search trials. * `max_failed_trial_count`: The number of failed trials that need to be seen before failing the NasJob. If set to 0, Vertex AI decides how many trials must fail before the whole job fails. * `max_parallel_trial_count`: Required. The maximum number of trials to run in parallel. * `search_trial_job_spec`: Represents the spec of a CustomJob. * `worker_pool_specs`: Required. The spec of the worker pools including machine type and Docker image. All worker pools except the first one are optional and can be skipped by providing an empty value. * `container_spec`: The spec of a Container. * `env`: Environment variables to be passed to the container. Maximum limit is 100. * `name`: Required. Name of the environment variable. Must be a valid C identifier. * `value`: Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. * `args`: The arguments to be passed when starting the container. * `command`: The command to be invoked when the container is started. It overrides the entrypoint instruction in Dockerfile when provided. * `image_uri`: Required. The URI of a container image in the Container Registry that is to be run on each worker replica. * `machine_spec`: Specification of a single machine. * `accelerator_type`: Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. Possible values: * ACCELERATOR_TYPE_UNSPECIFIED * NVIDIA_TESLA_K80 * NVIDIA_TESLA_P100 * NVIDIA_TESLA_V100 * NVIDIA_TESLA_P4 * NVIDIA_TESLA_T4 * NVIDIA_TESLA_A100 * NVIDIA_A100_80GB * NVIDIA_L4 * TPU_V2 * TPU_V3 * TPU_V4_POD * `machine_type`: Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. * `accelerator_count`: The number of accelerators to attach to the machine. * `replica_count`: Optional. The number of worker replicas to use for this worker pool. * `nfs_mounts`: Optional. List of NFS mount spec. * `path`: Required. Source path exported from NFS server. Has to start with '/', and combined with the ip address, it indicates the source mount path in the form of `server:path` * `mount_point`: Required. Destination mount path. The NFS will be mounted for the user under /mnt/nfs/ * `server`: Required. IP address of the NFS server. * `python_package_spec`: The spec of a Python packaged code. * `package_uris`: Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100. * `env`: Environment variables to be passed to the python module. Maximum limit is 100. * `name`: Required. Name of the environment variable. Must be a valid C identifier. * `value`: Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. * `executor_image_uri`: Required. The URI of a container image in Artifact Registry that will run the provided Python package. Vertex AI provides a wide range of executor images with pre-installed packages to meet users' various use cases. See the list of [pre-built containers for training](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). You must use an image from this list. * `args`: Command line arguments to be passed to the Python task. * `python_module`: Required. The Python module name to run after installing the packages. * `disk_spec`: Represents the spec of disk options. * `boot_disk_type`: Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). * `boot_disk_size_gb`: Size in GB of the boot disk (default is 100GB). * `enable_web_access`: Optional. Whether you want Vertex AI to enable [interactive shell access](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) to training containers. If set to `true`, you can access interactive shells at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials). * `tensorboard`: Optional. The name of a Vertex AI Tensorboard resource to which this CustomJob will upload Tensorboard logs. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}` * `experiment`: Optional. The Experiment associated with this job. Format: `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}` * `experiment_run`: Optional. The Experiment Run associated with this job. Format: `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}-{experiment-run-name}` * `scheduling`: All parameters related to queuing and scheduling of custom jobs. * `disable_retries`: Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false. * `timeout`: The maximum job running time. The default is 7 days. * `restart_job_on_worker_restart`: Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job. * `enable_dashboard_access`: Optional. Whether you want Vertex AI to enable access to the customized dashboard in training chief container. If set to `true`, you can access the dashboard at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials). * `service_account`: Specifies the service account for workload run-as account. Users submitting jobs must have act-as permission on this run-as account. If unspecified, the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) for the CustomJob's project is used. * `base_output_directory`: The Google Cloud Storage location where the output is to be written to. * `output_uri_prefix`: Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist. * `reserved_ip_ranges`: Optional. A list of names for the reserved ip ranges under the VPC network that can be used for this job. If set, we will deploy the job within the provided ip ranges. Otherwise, the job will be deployed to any ip ranges under the provided VPC network. Example: ['vertex-ai-ip-range']. * `network`: Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the Job should be peered. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the job is not peered with any network. * `max_trial_count`: Required. The maximum number of Neural Architecture Search (NAS) trials to run. * `multi_trial_algorithm`: The multi-trial Neural Architecture Search (NAS) algorithm type. Defaults to `REINFORCEMENT_LEARNING`. Possible values: * MULTI_TRIAL_ALGORITHM_UNSPECIFIED * REINFORCEMENT_LEARNING * GRID_SEARCH * `train_trial_spec`: Represent spec for train trials. * `frequency`: Required. Frequency of search trials to start train stage. Top N [TrainTrialSpec.max_parallel_trial_count] search trials will be trained for every M [TrainTrialSpec.frequency] trials searched. * `max_parallel_trial_count`: Required. The maximum number of trials to run in parallel. * `train_trial_job_spec`: Represents the spec of a CustomJob. * `worker_pool_specs`: Required. The spec of the worker pools including machine type and Docker image. All worker pools except the first one are optional and can be skipped by providing an empty value. * `container_spec`: The spec of a Container. * `env`: Environment variables to be passed to the container. Maximum limit is 100. * `name`: Required. Name of the environment variable. Must be a valid C identifier. * `value`: Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. * `args`: The arguments to be passed when starting the container. * `command`: The command to be invoked when the container is started. It overrides the entrypoint instruction in Dockerfile when provided. * `image_uri`: Required. The URI of a container image in the Container Registry that is to be run on each worker replica. * `machine_spec`: Specification of a single machine. * `accelerator_type`: Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. Possible values: * ACCELERATOR_TYPE_UNSPECIFIED * NVIDIA_TESLA_K80 * NVIDIA_TESLA_P100 * NVIDIA_TESLA_V100 * NVIDIA_TESLA_P4 * NVIDIA_TESLA_T4 * NVIDIA_TESLA_A100 * NVIDIA_A100_80GB * NVIDIA_L4 * TPU_V2 * TPU_V3 * TPU_V4_POD * `machine_type`: Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. * `accelerator_count`: The number of accelerators to attach to the machine. * `replica_count`: Optional. The number of worker replicas to use for this worker pool. * `nfs_mounts`: Optional. List of NFS mount spec. * `path`: Required. Source path exported from NFS server. Has to start with '/', and combined with the ip address, it indicates the source mount path in the form of `server:path` * `mount_point`: Required. Destination mount path. The NFS will be mounted for the user under /mnt/nfs/ * `server`: Required. IP address of the NFS server. * `python_package_spec`: The spec of a Python packaged code. * `package_uris`: Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100. * `env`: Environment variables to be passed to the python module. Maximum limit is 100. * `name`: Required. Name of the environment variable. Must be a valid C identifier. * `value`: Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. * `executor_image_uri`: Required. The URI of a container image in Artifact Registry that will run the provided Python package. Vertex AI provides a wide range of executor images with pre-installed packages to meet users' various use cases. See the list of [pre-built containers for training](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). You must use an image from this list. * `args`: Command line arguments to be passed to the Python task. * `python_module`: Required. The Python module name to run after installing the packages. * `disk_spec`: Represents the spec of disk options. * `boot_disk_type`: Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). * `boot_disk_size_gb`: Size in GB of the boot disk (default is 100GB). * `enable_web_access`: Optional. Whether you want Vertex AI to enable [interactive shell access](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) to training containers. If set to `true`, you can access interactive shells at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials). * `tensorboard`: Optional. The name of a Vertex AI Tensorboard resource to which this CustomJob will upload Tensorboard logs. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}` * `experiment`: Optional. The Experiment associated with this job. Format: `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}` * `experiment_run`: Optional. The Experiment Run associated with this job. Format: `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}-{experiment-run-name}` * `scheduling`: All parameters related to queuing and scheduling of custom jobs. * `disable_retries`: Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false. * `timeout`: The maximum job running time. The default is 7 days. * `restart_job_on_worker_restart`: Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job. * `enable_dashboard_access`: Optional. Whether you want Vertex AI to enable access to the customized dashboard in training chief container. If set to `true`, you can access the dashboard at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials). * `service_account`: Specifies the service account for workload run-as account. Users submitting jobs must have act-as permission on this run-as account. If unspecified, the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) for the CustomJob's project is used. * `base_output_directory`: The Google Cloud Storage location where the output is to be written to. * `output_uri_prefix`: Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist. * `reserved_ip_ranges`: Optional. A list of names for the reserved ip ranges under the VPC network that can be used for this job. If set, we will deploy the job within the provided ip ranges. Otherwise, the job will be deployed to any ip ranges under the provided VPC network. Example: ['vertex-ai-ip-range']. * `network`: Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the Job should be peered. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the job is not peered with any network. * `metric`: Represents a metric to optimize. * `goal`: Required. The optimization goal of the metric. Possible values: * GOAL_TYPE_UNSPECIFIED * MAXIMIZE * MINIMIZE * `metric_id`: Required. The ID of the metric. Must not contain whitespaces. * `enable_restricted_image_training`: Optional. Enable a separation of Custom model training and restricted image training for tenant project. * `start_time`: Output only. Time when the NasJob for the first time entered the `JOB_STATE_RUNNING` state. * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `labels`: The labels with user-defined metadata to organize NasJobs. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: * `update_time`: Output only. Time when the NasJob was most recently updated. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_nas_jobs.md ================================================ +++ title = "google_vertex_ai_nas_jobs resource" draft = false [menu.gcp] title = "google_vertex_ai_nas_jobs" identifier = "inspec/resources/gcp/google_vertex_ai_nas_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_nas_jobs` InSpec audit resource to to test a Google Cloud NasJob resource. ## Examples ```ruby describe google_vertex_ai_nas_jobs(parent: "projects/#{gcp_project_id}/locations/#{nas_job['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_nas_jobs` resource: See [google_vertex_ai_nas_job](google_vertex_ai_nas_job) for more detailed information. * `nas_job_outputs`: an array of `google_vertex_ai_nas_job` nas_job_output * `names`: an array of `google_vertex_ai_nas_job` name * `end_times`: an array of `google_vertex_ai_nas_job` end_time * `errors`: an array of `google_vertex_ai_nas_job` error * `states`: an array of `google_vertex_ai_nas_job` state * `create_times`: an array of `google_vertex_ai_nas_job` create_time * `display_names`: an array of `google_vertex_ai_nas_job` display_name * `nas_job_specs`: an array of `google_vertex_ai_nas_job` nas_job_spec * `enable_restricted_image_trainings`: an array of `google_vertex_ai_nas_job` enable_restricted_image_training * `start_times`: an array of `google_vertex_ai_nas_job` start_time * `encryption_specs`: an array of `google_vertex_ai_nas_job` encryption_spec * `labels`: an array of `google_vertex_ai_nas_job` labels * `update_times`: an array of `google_vertex_ai_nas_job` update_time ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_nas_jobs_nas_trial_detail.md ================================================ +++ title = "google_vertex_ai_nas_jobs_nas_trial_detail resource" draft = false [menu.gcp] title = "google_vertex_ai_nas_jobs_nas_trial_detail" identifier = "inspec/resources/gcp/google_vertex_ai_nas_jobs_nas_trial_detail resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_nas_jobs_nas_trial_detail` InSpec audit resource to to test a Google Cloud NasJobsNasTrialDetail resource. ## Examples ```ruby describe google_vertex_ai_nas_jobs_nas_trial_detail(name: "projects/#{gcp_project_id}/locations/#{nas_jobs_nas_trial_detail['region']}/nasJobs/#{nas_jobs_nas_trial_detail['nasJob']}/nasTrialDetails/#{nas_jobs_nas_trial_detail['name']}", region: ' value_region') do it { should exist } its('parameters') { should cmp 'value_parameters' } its('name') { should cmp 'value_name' } end describe google_vertex_ai_nas_jobs_nas_trial_detail(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_nas_jobs_nas_trial_detail` resource: * `parameters`: The parameters for the NasJob NasTrial. * `name`: Output only. Resource name of the NasTrialDetail. * `search_trial`: Represents a uCAIP NasJob trial. * `id`: Output only. The identifier of the NasTrial assigned by the service. * `state`: Output only. The detailed state of the NasTrial. Possible values: * STATE_UNSPECIFIED * REQUESTED * ACTIVE * STOPPING * SUCCEEDED * INFEASIBLE * `final_measurement`: A message representing a Measurement of a Trial. A Measurement contains the Metrics got by executing a Trial using suggested hyperparameter values. * `metrics`: Output only. A list of metrics got by evaluating the objective functions using suggested Parameter values. * `metric_id`: Output only. The ID of the Metric. The Metric should be defined in StudySpec's Metrics. * `value`: Output only. The value for this metric. * `elapsed_duration`: Output only. Time that the Trial has been running at the point of this Measurement. * `step_count`: Output only. The number of steps the machine learning model has been trained for. Must be non-negative. * `start_time`: Output only. Time when the NasTrial was started. * `end_time`: Output only. Time when the NasTrial's status changed to `SUCCEEDED` or `INFEASIBLE`. * `train_trial`: Represents a uCAIP NasJob trial. * `id`: Output only. The identifier of the NasTrial assigned by the service. * `state`: Output only. The detailed state of the NasTrial. Possible values: * STATE_UNSPECIFIED * REQUESTED * ACTIVE * STOPPING * SUCCEEDED * INFEASIBLE * `final_measurement`: A message representing a Measurement of a Trial. A Measurement contains the Metrics got by executing a Trial using suggested hyperparameter values. * `metrics`: Output only. A list of metrics got by evaluating the objective functions using suggested Parameter values. * `metric_id`: Output only. The ID of the Metric. The Metric should be defined in StudySpec's Metrics. * `value`: Output only. The value for this metric. * `elapsed_duration`: Output only. Time that the Trial has been running at the point of this Measurement. * `step_count`: Output only. The number of steps the machine learning model has been trained for. Must be non-negative. * `start_time`: Output only. Time when the NasTrial was started. * `end_time`: Output only. Time when the NasTrial's status changed to `SUCCEEDED` or `INFEASIBLE`. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_nas_jobs_nas_trial_details.md ================================================ +++ title = "google_vertex_ai_nas_jobs_nas_trial_details resource" draft = false [menu.gcp] title = "google_vertex_ai_nas_jobs_nas_trial_details" identifier = "inspec/resources/gcp/google_vertex_ai_nas_jobs_nas_trial_details resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_nas_jobs_nas_trial_details` InSpec audit resource to to test a Google Cloud NasJobsNasTrialDetail resource. ## Examples ```ruby describe google_vertex_ai_nas_jobs_nas_trial_details(parent: "projects/#{gcp_project_id}/locations/#{nas_jobs_nas_trial_detail['region']}/nasJobs/#{nas_jobs_nas_trial_detail['nasJob']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_nas_jobs_nas_trial_details` resource: See [google_vertex_ai_nas_jobs_nas_trial_detail](google_vertex_ai_nas_jobs_nas_trial_detail) for more detailed information. * `parameters`: an array of `google_vertex_ai_nas_jobs_nas_trial_detail` parameters * `names`: an array of `google_vertex_ai_nas_jobs_nas_trial_detail` name * `search_trials`: an array of `google_vertex_ai_nas_jobs_nas_trial_detail` search_trial * `train_trials`: an array of `google_vertex_ai_nas_jobs_nas_trial_detail` train_trial ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_pipeline_job.md ================================================ +++ title = "google_vertex_ai_pipeline_job resource" draft = false [menu.gcp] title = "google_vertex_ai_pipeline_job" identifier = "inspec/resources/gcp/google_vertex_ai_pipeline_job resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_pipeline_job` InSpec audit resource to to test a Google Cloud PipelineJob resource. ## Examples ```ruby describe google_vertex_ai_pipeline_job(name: "projects/#{gcp_project_id}/locations/#{pipeline_job['region']}/pipelineJobs/#{pipeline_job['name']}", region: ' value_region') do it { should exist } its('end_time') { should cmp 'value_endtime' } its('update_time') { should cmp 'value_updatetime' } its('state') { should cmp 'value_state' } its('create_time') { should cmp 'value_createtime' } its('name') { should cmp 'value_name' } its('schedule_name') { should cmp 'value_schedulename' } its('start_time') { should cmp 'value_starttime' } its('service_account') { should cmp 'value_serviceaccount' } its('display_name') { should cmp 'value_displayname' } its('template_uri') { should cmp 'value_templateuri' } its('network') { should cmp 'value_network' } end describe google_vertex_ai_pipeline_job(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_pipeline_job` resource: * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `end_time`: Output only. Pipeline end time. * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `update_time`: Output only. Timestamp when this PipelineJob was most recently updated. * `job_detail`: The runtime detail of PipelineJob. * `task_details`: Output only. The runtime details of the tasks under the pipeline. * `inputs`: Output only. The runtime input artifacts of the task. * `additional_properties`: A list of artifact metadata. * `pipeline_task_status`: Output only. A list of task status. This field keeps a record of task status evolving over time. * `update_time`: Output only. Update time of this status. * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `state`: Output only. The state of the task. Possible values: * STATE_UNSPECIFIED * PENDING * RUNNING * SUCCEEDED * CANCEL_PENDING * CANCELLING * CANCELLED * FAILED * SKIPPED * NOT_TRIGGERED * `end_time`: Output only. Task end time. * `outputs`: Output only. The runtime output artifacts of the task. * `additional_properties`: A list of artifact metadata. * `create_time`: Output only. Task create time. * `start_time`: Output only. Task start time. * `execution`: Instance of a general execution. * `labels`: The labels with user-defined metadata to organize your Executions. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Execution (System labels are excluded). * `additional_properties`: * `create_time`: Output only. Timestamp when this Execution was created. * `schema_version`: The version of the schema in `schema_title` to use. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `state`: The state of this Execution. This is a property of the Execution, and does not imply or capture any ongoing process. This property is managed by clients (such as Vertex AI Pipelines) and the system does not prescribe or check the validity of state transitions. Possible values: * STATE_UNSPECIFIED * NEW * RUNNING * COMPLETE * FAILED * CACHED * CANCELLED * `name`: Output only. The resource name of the Execution. * `etag`: An eTag used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `display_name`: User provided display name of the Execution. May be up to 128 Unicode characters. * `metadata`: Properties of the Execution. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB. * `additional_properties`: Properties of the object. * `schema_title`: The title of the schema describing the metadata. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `description`: Description of the Execution * `update_time`: Output only. Timestamp when this Execution was last updated. * `task_name`: Output only. The user specified name of the task that is defined in pipeline_spec. * `parent_task_id`: Output only. The id of the parent task if the task is within a component scope. Empty if the task is at the root level. * `state`: Output only. State of the task. Possible values: * STATE_UNSPECIFIED * PENDING * RUNNING * SUCCEEDED * CANCEL_PENDING * CANCELLING * CANCELLED * FAILED * SKIPPED * NOT_TRIGGERED * `task_id`: Output only. The system generated ID of the task. * `executor_detail`: The runtime detail of a pipeline executor. * `container_detail`: The detail of a container execution. It contains the job names of the lifecycle of a container execution. * `failed_main_jobs`: Output only. The names of the previously failed CustomJob for the main container executions. The list includes the all attempts in chronological order. * `main_job`: Output only. The name of the CustomJob for the main container execution. * `pre_caching_check_job`: Output only. The name of the CustomJob for the pre-caching-check container execution. This job will be available if the PipelineJob.pipeline_spec specifies the `pre_caching_check` hook in the lifecycle events. * `failed_pre_caching_check_jobs`: Output only. The names of the previously failed CustomJob for the pre-caching-check container executions. This job will be available if the PipelineJob.pipeline_spec specifies the `pre_caching_check` hook in the lifecycle events. The list includes the all attempts in chronological order. * `custom_job_detail`: The detailed info for a custom job executor. * `failed_jobs`: Output only. The names of the previously failed CustomJob. The list includes the all attempts in chronological order. * `job`: Output only. The name of the CustomJob. * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `pipeline_run_context`: Instance of a general context. * `name`: Immutable. The resource name of the Context. * `schema_title`: The title of the schema describing the metadata. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `etag`: An eTag used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `description`: Description of the Context * `display_name`: User provided display name of the Context. May be up to 128 Unicode characters. * `schema_version`: The version of the schema in schema_name to use. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `create_time`: Output only. Timestamp when this Context was created. * `labels`: The labels with user-defined metadata to organize your Contexts. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Context (System labels are excluded). * `additional_properties`: * `metadata`: Properties of the Context. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB. * `additional_properties`: Properties of the object. * `update_time`: Output only. Timestamp when this Context was last updated. * `parent_contexts`: Output only. A list of resource names of Contexts that are parents of this Context. A Context may have at most 10 parent_contexts. * `pipeline_context`: Instance of a general context. * `name`: Immutable. The resource name of the Context. * `schema_title`: The title of the schema describing the metadata. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `etag`: An eTag used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `description`: Description of the Context * `display_name`: User provided display name of the Context. May be up to 128 Unicode characters. * `schema_version`: The version of the schema in schema_name to use. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `create_time`: Output only. Timestamp when this Context was created. * `labels`: The labels with user-defined metadata to organize your Contexts. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Context (System labels are excluded). * `additional_properties`: * `metadata`: Properties of the Context. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB. * `additional_properties`: Properties of the object. * `update_time`: Output only. Timestamp when this Context was last updated. * `parent_contexts`: Output only. A list of resource names of Contexts that are parents of this Context. A Context may have at most 10 parent_contexts. * `template_metadata`: Pipeline template metadata if PipelineJob.template_uri is from supported template registry. Currently, the only supported registry is Artifact Registry. * `version`: The version_name in artifact registry. Will always be presented in output if the PipelineJob.template_uri is from supported template registry. Format is "sha256:abcdef123456...". * `state`: Output only. The detailed state of the job. Possible values: * PIPELINE_STATE_UNSPECIFIED * PIPELINE_STATE_QUEUED * PIPELINE_STATE_PENDING * PIPELINE_STATE_RUNNING * PIPELINE_STATE_SUCCEEDED * PIPELINE_STATE_FAILED * PIPELINE_STATE_CANCELLING * PIPELINE_STATE_CANCELLED * PIPELINE_STATE_PAUSED * `create_time`: Output only. Pipeline creation time. * `name`: Output only. The resource name of the PipelineJob. * `schedule_name`: Output only. The schedule resource name. Only returned if the Pipeline is created by Schedule API. * `reserved_ip_ranges`: A list of names for the reserved ip ranges under the VPC network that can be used for this Pipeline Job's workload. If set, we will deploy the Pipeline Job's workload within the provided ip ranges. Otherwise, the job will be deployed to any ip ranges under the provided VPC network. Example: ['vertex-ai-ip-range']. * `start_time`: Output only. Pipeline start time. * `service_account`: The service account that the pipeline workload runs as. If not specified, the Compute Engine default service account in the project will be used. See https://cloud.google.com/compute/docs/access/service-accounts#default_service_account Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account. * `display_name`: The display name of the Pipeline. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `template_uri`: A template uri from where the PipelineJob.pipeline_spec, if empty, will be downloaded. * `pipeline_spec`: The spec of the pipeline. * `additional_properties`: Properties of the object. * `network`: The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the Pipeline Job's workload should be peered. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. Private services access must already be configured for the network. Pipeline job will apply the network configuration to the Google Cloud resources being launched, if applied, such as Vertex AI Training or Dataflow job. If left unspecified, the workload is not peered with any network. * `labels`: The labels with user-defined metadata to organize PipelineJob. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. Note there is some reserved label key for Vertex AI Pipelines. - `vertex-ai-pipelines-run-billing-id`, user set value will get overrided. * `additional_properties`: * `runtime_config`: The runtime config of a PipelineJob. * `gcs_output_directory`: Required. A path in a Cloud Storage bucket, which will be treated as the root output directory of the pipeline. It is used by the system to generate the paths of output artifacts. The artifact paths are generated with a sub-path pattern `{job_id}/{task_id}/{output_key}` under the specified output directory. The service account specified in this pipeline must have the `storage.objects.get` and `storage.objects.create` permissions for this bucket. * `parameter_values`: The runtime parameters of the PipelineJob. The parameters will be passed into PipelineJob.pipeline_spec to replace the placeholders at runtime. This field is used by pipelines built using `PipelineJob.pipeline_spec.schema_version` 2.1.0, such as pipelines built using Kubeflow Pipelines SDK 1.9 or higher and the v2 DSL. * `additional_properties`: * `failure_policy`: Represents the failure policy of a pipeline. Currently, the default of a pipeline is that the pipeline will continue to run until no more tasks can be executed, also known as PIPELINE_FAILURE_POLICY_FAIL_SLOW. However, if a pipeline is set to PIPELINE_FAILURE_POLICY_FAIL_FAST, it will stop scheduling any new tasks when a task has failed. Any scheduled tasks will continue to completion. Possible values: * PIPELINE_FAILURE_POLICY_UNSPECIFIED * PIPELINE_FAILURE_POLICY_FAIL_SLOW * PIPELINE_FAILURE_POLICY_FAIL_FAST * `parameters`: Deprecated. Use RuntimeConfig.parameter_values instead. The runtime parameters of the PipelineJob. The parameters will be passed into PipelineJob.pipeline_spec to replace the placeholders at runtime. This field is used by pipelines built using `PipelineJob.pipeline_spec.schema_version` 2.0.0 or lower, such as pipelines built using Kubeflow Pipelines SDK 1.8 or lower. * `additional_properties`: Value is the value of the field. * `input_artifacts`: The runtime artifacts of the PipelineJob. The key will be the input artifact name and the value would be one of the InputArtifact. * `additional_properties`: The type of an input artifact. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_pipeline_jobs.md ================================================ +++ title = "google_vertex_ai_pipeline_jobs resource" draft = false [menu.gcp] title = "google_vertex_ai_pipeline_jobs" identifier = "inspec/resources/gcp/google_vertex_ai_pipeline_jobs resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_pipeline_jobs` InSpec audit resource to to test a Google Cloud PipelineJob resource. ## Examples ```ruby describe google_vertex_ai_pipeline_jobs(parent: "projects/#{gcp_project_id}/locations/#{pipeline_job['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_pipeline_jobs` resource: See [google_vertex_ai_pipeline_job](google_vertex_ai_pipeline_job) for more detailed information. * `encryption_specs`: an array of `google_vertex_ai_pipeline_job` encryption_spec * `end_times`: an array of `google_vertex_ai_pipeline_job` end_time * `errors`: an array of `google_vertex_ai_pipeline_job` error * `update_times`: an array of `google_vertex_ai_pipeline_job` update_time * `job_details`: an array of `google_vertex_ai_pipeline_job` job_detail * `template_metadata`: an array of `google_vertex_ai_pipeline_job` template_metadata * `states`: an array of `google_vertex_ai_pipeline_job` state * `create_times`: an array of `google_vertex_ai_pipeline_job` create_time * `names`: an array of `google_vertex_ai_pipeline_job` name * `schedule_names`: an array of `google_vertex_ai_pipeline_job` schedule_name * `reserved_ip_ranges`: an array of `google_vertex_ai_pipeline_job` reserved_ip_ranges * `start_times`: an array of `google_vertex_ai_pipeline_job` start_time * `service_accounts`: an array of `google_vertex_ai_pipeline_job` service_account * `display_names`: an array of `google_vertex_ai_pipeline_job` display_name * `template_uris`: an array of `google_vertex_ai_pipeline_job` template_uri * `pipeline_specs`: an array of `google_vertex_ai_pipeline_job` pipeline_spec * `networks`: an array of `google_vertex_ai_pipeline_job` network * `labels`: an array of `google_vertex_ai_pipeline_job` labels * `runtime_configs`: an array of `google_vertex_ai_pipeline_job` runtime_config ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_schedule.md ================================================ +++ title = "google_vertex_ai_schedule resource" draft = false [menu.gcp] title = "google_vertex_ai_schedule" identifier = "inspec/resources/gcp/google_vertex_ai_schedule resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_schedule` InSpec audit resource to to test a Google Cloud Schedule resource. ## Examples ```ruby describe google_vertex_ai_schedule(name: "projects/#{gcp_project_id}/locations/#{schedule['region']}/schedules/#{schedule['name']}", region: ' value_region') do it { should exist } its('started_run_count') { should cmp 'value_startedruncount' } its('name') { should cmp 'value_name' } its('cron') { should cmp 'value_cron' } its('last_pause_time') { should cmp 'value_lastpausetime' } its('create_time') { should cmp 'value_createtime' } its('start_time') { should cmp 'value_starttime' } its('max_run_count') { should cmp 'value_maxruncount' } its('next_run_time') { should cmp 'value_nextruntime' } its('update_time') { should cmp 'value_updatetime' } its('last_resume_time') { should cmp 'value_lastresumetime' } its('max_concurrent_run_count') { should cmp 'value_maxconcurrentruncount' } its('state') { should cmp 'value_state' } its('display_name') { should cmp 'value_displayname' } its('end_time') { should cmp 'value_endtime' } end describe google_vertex_ai_schedule(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_schedule` resource: * `started_run_count`: Output only. The number of runs started by this schedule. * `allow_queueing`: Optional. Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false. * `name`: Immutable. The resource name of the Schedule. * `cron`: Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone database. For example, "CRON_TZ=America/New_York 1 * * * *", or "TZ=America/New_York 1 * * * *". * `last_pause_time`: Output only. Timestamp when this Schedule was last paused. Unset if never paused. * `create_time`: Output only. Timestamp when this Schedule was created. * `start_time`: Optional. Timestamp after which the first run can be scheduled. Default to Schedule create time if not specified. * `max_run_count`: Optional. Maximum run count of the schedule. If specified, The schedule will be completed when either started_run_count >= max_run_count or when end_time is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified. * `next_run_time`: Output only. Timestamp when this Schedule should schedule the next run. Having a next_run_time in the past means the runs are being started behind schedule. * `update_time`: Output only. Timestamp when this Schedule was updated. * `last_scheduled_run_response`: Status of a scheduled run. * `run_response`: The response of the scheduled run. * `scheduled_run_time`: The scheduled run time based on the user-specified schedule. * `last_resume_time`: Output only. Timestamp when this Schedule was last resumed. Unset if never resumed from pause. * `max_concurrent_run_count`: Required. Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the operations/jobs created by the requests (if applicable). * `state`: Output only. The state of this Schedule. Possible values: * STATE_UNSPECIFIED * ACTIVE * PAUSED * COMPLETED * `create_pipeline_job_request`: Request message for PipelineService.CreatePipelineJob. * `pipeline_job`: An instance of a machine learning PipelineJob. * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `end_time`: Output only. Pipeline end time. * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `update_time`: Output only. Timestamp when this PipelineJob was most recently updated. * `job_detail`: The runtime detail of PipelineJob. * `task_details`: Output only. The runtime details of the tasks under the pipeline. * `inputs`: Output only. The runtime input artifacts of the task. * `additional_properties`: A list of artifact metadata. * `pipeline_task_status`: Output only. A list of task status. This field keeps a record of task status evolving over time. * `update_time`: Output only. Update time of this status. * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `state`: Output only. The state of the task. Possible values: * STATE_UNSPECIFIED * PENDING * RUNNING * SUCCEEDED * CANCEL_PENDING * CANCELLING * CANCELLED * FAILED * SKIPPED * NOT_TRIGGERED * `end_time`: Output only. Task end time. * `outputs`: Output only. The runtime output artifacts of the task. * `additional_properties`: A list of artifact metadata. * `create_time`: Output only. Task create time. * `start_time`: Output only. Task start time. * `execution`: Instance of a general execution. * `labels`: The labels with user-defined metadata to organize your Executions. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Execution (System labels are excluded). * `additional_properties`: * `create_time`: Output only. Timestamp when this Execution was created. * `schema_version`: The version of the schema in `schema_title` to use. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `state`: The state of this Execution. This is a property of the Execution, and does not imply or capture any ongoing process. This property is managed by clients (such as Vertex AI Pipelines) and the system does not prescribe or check the validity of state transitions. Possible values: * STATE_UNSPECIFIED * NEW * RUNNING * COMPLETE * FAILED * CACHED * CANCELLED * `name`: Output only. The resource name of the Execution. * `etag`: An eTag used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `display_name`: User provided display name of the Execution. May be up to 128 Unicode characters. * `metadata`: Properties of the Execution. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB. * `additional_properties`: Properties of the object. * `schema_title`: The title of the schema describing the metadata. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `description`: Description of the Execution * `update_time`: Output only. Timestamp when this Execution was last updated. * `task_name`: Output only. The user specified name of the task that is defined in pipeline_spec. * `parent_task_id`: Output only. The id of the parent task if the task is within a component scope. Empty if the task is at the root level. * `state`: Output only. State of the task. Possible values: * STATE_UNSPECIFIED * PENDING * RUNNING * SUCCEEDED * CANCEL_PENDING * CANCELLING * CANCELLED * FAILED * SKIPPED * NOT_TRIGGERED * `task_id`: Output only. The system generated ID of the task. * `executor_detail`: The runtime detail of a pipeline executor. * `container_detail`: The detail of a container execution. It contains the job names of the lifecycle of a container execution. * `failed_main_jobs`: Output only. The names of the previously failed CustomJob for the main container executions. The list includes the all attempts in chronological order. * `main_job`: Output only. The name of the CustomJob for the main container execution. * `pre_caching_check_job`: Output only. The name of the CustomJob for the pre-caching-check container execution. This job will be available if the PipelineJob.pipeline_spec specifies the `pre_caching_check` hook in the lifecycle events. * `failed_pre_caching_check_jobs`: Output only. The names of the previously failed CustomJob for the pre-caching-check container executions. This job will be available if the PipelineJob.pipeline_spec specifies the `pre_caching_check` hook in the lifecycle events. The list includes the all attempts in chronological order. * `custom_job_detail`: The detailed info for a custom job executor. * `failed_jobs`: Output only. The names of the previously failed CustomJob. The list includes the all attempts in chronological order. * `job`: Output only. The name of the CustomJob. * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `pipeline_run_context`: Instance of a general context. * `name`: Immutable. The resource name of the Context. * `schema_title`: The title of the schema describing the metadata. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `etag`: An eTag used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `description`: Description of the Context * `display_name`: User provided display name of the Context. May be up to 128 Unicode characters. * `schema_version`: The version of the schema in schema_name to use. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `create_time`: Output only. Timestamp when this Context was created. * `labels`: The labels with user-defined metadata to organize your Contexts. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Context (System labels are excluded). * `additional_properties`: * `metadata`: Properties of the Context. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB. * `additional_properties`: Properties of the object. * `update_time`: Output only. Timestamp when this Context was last updated. * `parent_contexts`: Output only. A list of resource names of Contexts that are parents of this Context. A Context may have at most 10 parent_contexts. * `pipeline_context`: Instance of a general context. * `name`: Immutable. The resource name of the Context. * `schema_title`: The title of the schema describing the metadata. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `etag`: An eTag used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `description`: Description of the Context * `display_name`: User provided display name of the Context. May be up to 128 Unicode characters. * `schema_version`: The version of the schema in schema_name to use. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store. * `create_time`: Output only. Timestamp when this Context was created. * `labels`: The labels with user-defined metadata to organize your Contexts. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Context (System labels are excluded). * `additional_properties`: * `metadata`: Properties of the Context. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB. * `additional_properties`: Properties of the object. * `update_time`: Output only. Timestamp when this Context was last updated. * `parent_contexts`: Output only. A list of resource names of Contexts that are parents of this Context. A Context may have at most 10 parent_contexts. * `template_metadata`: Pipeline template metadata if PipelineJob.template_uri is from supported template registry. Currently, the only supported registry is Artifact Registry. * `version`: The version_name in artifact registry. Will always be presented in output if the PipelineJob.template_uri is from supported template registry. Format is "sha256:abcdef123456...". * `state`: Output only. The detailed state of the job. Possible values: * PIPELINE_STATE_UNSPECIFIED * PIPELINE_STATE_QUEUED * PIPELINE_STATE_PENDING * PIPELINE_STATE_RUNNING * PIPELINE_STATE_SUCCEEDED * PIPELINE_STATE_FAILED * PIPELINE_STATE_CANCELLING * PIPELINE_STATE_CANCELLED * PIPELINE_STATE_PAUSED * `create_time`: Output only. Pipeline creation time. * `name`: Output only. The resource name of the PipelineJob. * `schedule_name`: Output only. The schedule resource name. Only returned if the Pipeline is created by Schedule API. * `reserved_ip_ranges`: A list of names for the reserved ip ranges under the VPC network that can be used for this Pipeline Job's workload. If set, we will deploy the Pipeline Job's workload within the provided ip ranges. Otherwise, the job will be deployed to any ip ranges under the provided VPC network. Example: ['vertex-ai-ip-range']. * `start_time`: Output only. Pipeline start time. * `service_account`: The service account that the pipeline workload runs as. If not specified, the Compute Engine default service account in the project will be used. See https://cloud.google.com/compute/docs/access/service-accounts#default_service_account Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account. * `display_name`: The display name of the Pipeline. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `template_uri`: A template uri from where the PipelineJob.pipeline_spec, if empty, will be downloaded. * `pipeline_spec`: The spec of the pipeline. * `additional_properties`: Properties of the object. * `network`: The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the Pipeline Job's workload should be peered. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. Private services access must already be configured for the network. Pipeline job will apply the network configuration to the Google Cloud resources being launched, if applied, such as Vertex AI Training or Dataflow job. If left unspecified, the workload is not peered with any network. * `labels`: The labels with user-defined metadata to organize PipelineJob. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. Note there is some reserved label key for Vertex AI Pipelines. - `vertex-ai-pipelines-run-billing-id`, user set value will get overrided. * `additional_properties`: * `runtime_config`: The runtime config of a PipelineJob. * `gcs_output_directory`: Required. A path in a Cloud Storage bucket, which will be treated as the root output directory of the pipeline. It is used by the system to generate the paths of output artifacts. The artifact paths are generated with a sub-path pattern `{job_id}/{task_id}/{output_key}` under the specified output directory. The service account specified in this pipeline must have the `storage.objects.get` and `storage.objects.create` permissions for this bucket. * `parameter_values`: The runtime parameters of the PipelineJob. The parameters will be passed into PipelineJob.pipeline_spec to replace the placeholders at runtime. This field is used by pipelines built using `PipelineJob.pipeline_spec.schema_version` 2.1.0, such as pipelines built using Kubeflow Pipelines SDK 1.9 or higher and the v2 DSL. * `additional_properties`: * `failure_policy`: Represents the failure policy of a pipeline. Currently, the default of a pipeline is that the pipeline will continue to run until no more tasks can be executed, also known as PIPELINE_FAILURE_POLICY_FAIL_SLOW. However, if a pipeline is set to PIPELINE_FAILURE_POLICY_FAIL_FAST, it will stop scheduling any new tasks when a task has failed. Any scheduled tasks will continue to completion. Possible values: * PIPELINE_FAILURE_POLICY_UNSPECIFIED * PIPELINE_FAILURE_POLICY_FAIL_SLOW * PIPELINE_FAILURE_POLICY_FAIL_FAST * `parameters`: Deprecated. Use RuntimeConfig.parameter_values instead. The runtime parameters of the PipelineJob. The parameters will be passed into PipelineJob.pipeline_spec to replace the placeholders at runtime. This field is used by pipelines built using `PipelineJob.pipeline_spec.schema_version` 2.0.0 or lower, such as pipelines built using Kubeflow Pipelines SDK 1.8 or lower. * `additional_properties`: Value is the value of the field. * `input_artifacts`: The runtime artifacts of the PipelineJob. The key will be the input artifact name and the value would be one of the InputArtifact. * `additional_properties`: The type of an input artifact. * `pipeline_job_id`: The ID to use for the PipelineJob, which will become the final component of the PipelineJob name. If not provided, an ID will be automatically generated. This value should be less than 128 characters, and valid characters are /a-z-/. * `parent`: Required. The resource name of the Location to create the PipelineJob in. Format: `projects/{project}/locations/{location}` * `display_name`: Required. User provided name of the Schedule. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `catch_up`: Output only. Whether to backfill missed runs when the schedule is resumed from PAUSED state. If set to true, all missed runs will be scheduled. New runs will be scheduled after the backfill is complete. Default to false. * `end_time`: Optional. Timestamp after which no new runs can be scheduled. If specified, The schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_schedules.md ================================================ +++ title = "google_vertex_ai_schedules resource" draft = false [menu.gcp] title = "google_vertex_ai_schedules" identifier = "inspec/resources/gcp/google_vertex_ai_schedules resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_schedules` InSpec audit resource to to test a Google Cloud Schedule resource. ## Examples ```ruby describe google_vertex_ai_schedules(parent: "projects/#{gcp_project_id}/locations/#{schedule['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_schedules` resource: See [google_vertex_ai_schedule](google_vertex_ai_schedule) for more detailed information. * `started_run_counts`: an array of `google_vertex_ai_schedule` started_run_count * `allow_queueings`: an array of `google_vertex_ai_schedule` allow_queueing * `names`: an array of `google_vertex_ai_schedule` name * `crons`: an array of `google_vertex_ai_schedule` cron * `last_pause_times`: an array of `google_vertex_ai_schedule` last_pause_time * `create_times`: an array of `google_vertex_ai_schedule` create_time * `start_times`: an array of `google_vertex_ai_schedule` start_time * `max_run_counts`: an array of `google_vertex_ai_schedule` max_run_count * `next_run_times`: an array of `google_vertex_ai_schedule` next_run_time * `update_times`: an array of `google_vertex_ai_schedule` update_time * `last_scheduled_run_responses`: an array of `google_vertex_ai_schedule` last_scheduled_run_response * `last_resume_times`: an array of `google_vertex_ai_schedule` last_resume_time * `max_concurrent_run_counts`: an array of `google_vertex_ai_schedule` max_concurrent_run_count * `states`: an array of `google_vertex_ai_schedule` state * `create_pipeline_job_requests`: an array of `google_vertex_ai_schedule` create_pipeline_job_request * `display_names`: an array of `google_vertex_ai_schedule` display_name * `catch_ups`: an array of `google_vertex_ai_schedule` catch_up * `end_times`: an array of `google_vertex_ai_schedule` end_time ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_studies.md ================================================ +++ title = "google_vertex_ai_studies resource" draft = false [menu.gcp] title = "google_vertex_ai_studies" identifier = "inspec/resources/gcp/google_vertex_ai_studies resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_studies` InSpec audit resource to to test a Google Cloud Study resource. ## Examples ```ruby describe google_vertex_ai_studies(parent: "projects/#{gcp_project_id}/locations/#{study['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_studies` resource: See [google_vertex_ai_study](google_vertex_ai_study) for more detailed information. * `study_specs`: an array of `google_vertex_ai_study` study_spec * `names`: an array of `google_vertex_ai_study` name * `display_names`: an array of `google_vertex_ai_study` display_name * `states`: an array of `google_vertex_ai_study` state * `create_times`: an array of `google_vertex_ai_study` create_time * `inactive_reasons`: an array of `google_vertex_ai_study` inactive_reason ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_studies_trial.md ================================================ +++ title = "google_vertex_ai_studies_trial resource" draft = false [menu.gcp] title = "google_vertex_ai_studies_trial" identifier = "inspec/resources/gcp/google_vertex_ai_studies_trial resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_studies_trial` InSpec audit resource to to test a Google Cloud StudiesTrial resource. ## Examples ```ruby describe google_vertex_ai_studies_trial(name: "projects/#{gcp_project_id}/locations/#{studies_trial['region']}/studies/#{studies_trial['study']}/trials/#{studies_trial['name']}", region: ' value_region') do it { should exist } its('start_time') { should cmp 'value_starttime' } its('end_time') { should cmp 'value_endtime' } its('name') { should cmp 'value_name' } its('infeasible_reason') { should cmp 'value_infeasiblereason' } its('client_id') { should cmp 'value_clientid' } its('custom_job') { should cmp 'value_customjob' } its('state') { should cmp 'value_state' } its('id') { should cmp 'value_id' } end describe google_vertex_ai_studies_trial(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_studies_trial` resource: * `measurements`: Output only. A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_duration). These are used for early stopping computations. * `metrics`: Output only. A list of metrics got by evaluating the objective functions using suggested Parameter values. * `metric_id`: Output only. The ID of the Metric. The Metric should be defined in StudySpec's Metrics. * `value`: Output only. The value for this metric. * `elapsed_duration`: Output only. Time that the Trial has been running at the point of this Measurement. * `step_count`: Output only. The number of steps the machine learning model has been trained for. Must be non-negative. * `start_time`: Output only. Time when the Trial was started. * `end_time`: Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`. * `parameters`: Output only. The parameters of the Trial. * `value`: Output only. The value of the parameter. `number_value` will be set if a parameter defined in StudySpec is in type 'INTEGER', 'DOUBLE' or 'DISCRETE'. `string_value` will be set if a parameter defined in StudySpec is in type 'CATEGORICAL'. * `parameter_id`: Output only. The ID of the parameter. The parameter should be defined in StudySpec's Parameters. * `name`: Output only. Resource name of the Trial assigned by the service. * `infeasible_reason`: Output only. A human readable string describing why the Trial is infeasible. This is set only if Trial state is `INFEASIBLE`. * `final_measurement`: A message representing a Measurement of a Trial. A Measurement contains the Metrics got by executing a Trial using suggested hyperparameter values. * `metrics`: Output only. A list of metrics got by evaluating the objective functions using suggested Parameter values. * `metric_id`: Output only. The ID of the Metric. The Metric should be defined in StudySpec's Metrics. * `value`: Output only. The value for this metric. * `elapsed_duration`: Output only. Time that the Trial has been running at the point of this Measurement. * `step_count`: Output only. The number of steps the machine learning model has been trained for. Must be non-negative. * `client_id`: Output only. The identifier of the client that originally requested this Trial. Each client is identified by a unique client_id. When a client asks for a suggestion, Vertex AI Vizier will assign it a Trial. The client should evaluate the Trial, complete it, and report back to Vertex AI Vizier. If suggestion is asked again by same client_id before the Trial is completed, the same Trial will be returned. Multiple clients with different client_ids can ask for suggestions simultaneously, each of them will get their own Trial. * `custom_job`: Output only. The CustomJob name linked to the Trial. It's set for a HyperparameterTuningJob's Trial. * `state`: Output only. The detailed state of the Trial. Possible values: * STATE_UNSPECIFIED * REQUESTED * ACTIVE * STOPPING * SUCCEEDED * INFEASIBLE * `web_access_uris`: Output only. URIs for accessing [interactive shells](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) (one URI for each training node). Only available if this trial is part of a HyperparameterTuningJob and the job's trial_job_spec.enable_web_access field is `true`. The keys are names of each node used for the trial; for example, `workerpool0-0` for the primary node, `workerpool1-0` for the first node in the second worker pool, and `workerpool1-1` for the second node in the second worker pool. The values are the URIs for each node's interactive shell. * `additional_properties`: * `id`: Output only. The identifier of the Trial assigned by the service. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_studies_trials.md ================================================ +++ title = "google_vertex_ai_studies_trials resource" draft = false [menu.gcp] title = "google_vertex_ai_studies_trials" identifier = "inspec/resources/gcp/google_vertex_ai_studies_trials resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_studies_trials` InSpec audit resource to to test a Google Cloud StudiesTrial resource. ## Examples ```ruby describe google_vertex_ai_studies_trials(parent: "projects/#{gcp_project_id}/locations/#{studies_trial['region']}/studies/#{studies_trial['study']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_studies_trials` resource: See [google_vertex_ai_studies_trial](google_vertex_ai_studies_trial) for more detailed information. * `measurements`: an array of `google_vertex_ai_studies_trial` measurements * `start_times`: an array of `google_vertex_ai_studies_trial` start_time * `end_times`: an array of `google_vertex_ai_studies_trial` end_time * `parameters`: an array of `google_vertex_ai_studies_trial` parameters * `names`: an array of `google_vertex_ai_studies_trial` name * `infeasible_reasons`: an array of `google_vertex_ai_studies_trial` infeasible_reason * `final_measurements`: an array of `google_vertex_ai_studies_trial` final_measurement * `client_ids`: an array of `google_vertex_ai_studies_trial` client_id * `custom_jobs`: an array of `google_vertex_ai_studies_trial` custom_job * `states`: an array of `google_vertex_ai_studies_trial` state * `web_access_uris`: an array of `google_vertex_ai_studies_trial` web_access_uris * `ids`: an array of `google_vertex_ai_studies_trial` id ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_study.md ================================================ +++ title = "google_vertex_ai_study resource" draft = false [menu.gcp] title = "google_vertex_ai_study" identifier = "inspec/resources/gcp/google_vertex_ai_study resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_study` InSpec audit resource to to test a Google Cloud Study resource. ## Examples ```ruby describe google_vertex_ai_study(name: "projects/#{gcp_project_id}/locations/#{study['region']}/studies/#{study['name']}", region: ' value_region') do it { should exist } its('name') { should cmp 'value_name' } its('display_name') { should cmp 'value_displayname' } its('state') { should cmp 'value_state' } its('create_time') { should cmp 'value_createtime' } its('inactive_reason') { should cmp 'value_inactivereason' } end describe google_vertex_ai_study(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_study` resource: * `study_spec`: Required. Configuration of the Study. * `name`: Output only. The name of a study. The study's globally unique identifier. Format: `projects/{project}/locations/{location}/studies/{study}` * `display_name`: Required. Describes the Study, default value is empty string. * `state`: Output only. The detailed state of a Study. Possible values: * STATE_UNSPECIFIED * ACTIVE * INACTIVE * COMPLETED * `create_time`: Output only. Time at which the study was created. * `inactive_reason`: Output only. A human readable reason why the Study is inactive. This should be empty if a study is ACTIVE or COMPLETED. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_tensorboard.md ================================================ +++ title = "google_vertex_ai_tensorboard resource" draft = false [menu.gcp] title = "google_vertex_ai_tensorboard" identifier = "inspec/resources/gcp/google_vertex_ai_tensorboard resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_tensorboard` InSpec audit resource to to test a Google Cloud Tensorboard resource. ## Examples ```ruby describe google_vertex_ai_tensorboard(name: "projects/#{gcp_project_id}/locations/#{tensorboard['region']}/tensorboards/#{tensorboard['name']}", region: ' value_region') do it { should exist } its('name') { should cmp 'value_name' } its('update_time') { should cmp 'value_updatetime' } its('blob_storage_path_prefix') { should cmp 'value_blobstoragepathprefix' } its('etag') { should cmp 'value_etag' } its('create_time') { should cmp 'value_createtime' } its('display_name') { should cmp 'value_displayname' } its('description') { should cmp 'value_description' } end describe google_vertex_ai_tensorboard(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_tensorboard` resource: * `name`: Output only. Name of the Tensorboard. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}` * `is_default`: Used to indicate if the TensorBoard instance is the default one. Each project & region can have at most one default TensorBoard instance. Creation of a default TensorBoard instance and updating an existing TensorBoard instance to be default will mark all other TensorBoard instances (if any) as non default. * `update_time`: Output only. Timestamp when this Tensorboard was last updated. * `labels`: The labels with user-defined metadata to organize your Tensorboards. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Tensorboard (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. * `additional_properties`: * `blob_storage_path_prefix`: Output only. Consumer project Cloud Storage path prefix used to store blob data, which can either be a bucket or directory. Does not end with a '/'. * `etag`: Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `create_time`: Output only. Timestamp when this Tensorboard was created. * `run_count`: Output only. The number of Runs stored in this Tensorboard. * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `display_name`: Required. User provided name of this Tensorboard. * `description`: Description of this Tensorboard. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_tensorboard_experiment_run.md ================================================ +++ title = "google_vertex_ai_tensorboard_experiment_run resource" draft = false [menu.gcp] title = "google_vertex_ai_tensorboard_experiment_run" identifier = "inspec/resources/gcp/google_vertex_ai_tensorboard_experiment_run resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_tensorboard_experiment_run` InSpec audit resource to to test a Google Cloud TensorboardExperimentRun resource. ## Examples ```ruby describe google_vertex_ai_tensorboard_experiment_run(name: "projects/#{gcp_project_id}/locations/#{tensorboard_experiment_run['region']}/tensorboards/#{tensorboard_experiment_run['tensorboard']}/experiments/#{tensorboard_experiment_run['experiment']}/runs/#{tensorboard_experiment_run['run']}", region: ' value_region') do it { should exist } end describe google_vertex_ai_tensorboard_experiment_run(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_tensorboard_experiment_run` resource: * `display_name`: Required. User provided name of this TensorboardRun. This value must be unique among all TensorboardRuns belonging to the same parent TensorboardExperiment. * `update_time`: Output only. Timestamp when this TensorboardRun was last updated. * `description`: Description of this TensorboardRun. * `etag`: Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `labels`: The labels with user-defined metadata to organize your TensorboardRuns. This field will be used to filter and visualize Runs in the Tensorboard UI. For example, a Vertex AI training job can set a label aiplatform.googleapis.com/training_job_id=xxxxx to all the runs created within that job. An end user can set a label experiment_id=xxxxx for all the runs produced in a Jupyter notebook. These runs can be grouped by a label value and visualized together in the Tensorboard UI. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one TensorboardRun (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. * `additional_properties`: * `create_time`: Output only. Timestamp when this TensorboardRun was created. * `name`: Output only. Name of the TensorboardRun. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_tensorboard_experiment_run_time_series_resource.md ================================================ +++ title = "google_vertex_ai_tensorboard_experiment_run_time_series_resource resource" draft = false [menu.gcp] title = "google_vertex_ai_tensorboard_experiment_run_time_series_resource" identifier = "inspec/resources/gcp/google_vertex_ai_tensorboard_experiment_run_time_series_resource resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_tensorboard_experiment_run_time_series_resource` InSpec audit resource to to test a Google Cloud TensorboardExperimentRunTimeSeriesResource resource. ## Examples ```ruby describe google_vertex_ai_tensorboard_experiment_run_time_series_resource(name: "projects/#{gcp_project_id}/locations/#{tensorboard_experiment_run_time_series_resource['region']}/tensorboards/#{tensorboard_experiment_run_time_series_resource['tensorboard']}/experiments/#{tensorboard_experiment_run_time_series_resource['experiment']}/runs/#{tensorboard_experiment_run_time_series_resource['run']}/timeSeries/#{tensorboard_experiment_run_time_series_resource['timeSery']}", region: ' value_region') do it { should exist } its('plugin_name') { should cmp 'value_pluginname' } its('plugin_data') { should cmp 'value_plugindata' } its('description') { should cmp 'value_description' } its('etag') { should cmp 'value_etag' } its('display_name') { should cmp 'value_displayname' } its('update_time') { should cmp 'value_updatetime' } its('create_time') { should cmp 'value_createtime' } its('name') { should cmp 'value_name' } its('value_type') { should cmp 'value_valuetype' } end describe google_vertex_ai_tensorboard_experiment_run_time_series_resource(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_tensorboard_experiment_run_time_series_resource` resource: * `plugin_name`: Immutable. Name of the plugin this time series pertain to. Such as Scalar, Tensor, Blob * `plugin_data`: Data of the current plugin, with the size limited to 65KB. * `description`: Description of this TensorboardTimeSeries. * `etag`: Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `display_name`: Required. User provided name of this TensorboardTimeSeries. This value should be unique among all TensorboardTimeSeries resources belonging to the same TensorboardRun resource (parent resource). * `update_time`: Output only. Timestamp when this TensorboardTimeSeries was last updated. * `create_time`: Output only. Timestamp when this TensorboardTimeSeries was created. * `name`: Output only. Name of the TensorboardTimeSeries. * `metadata`: Output only. Scalar, Tensor, or Blob metadata for this TensorboardTimeSeries. * `value_type`: Required. Immutable. Type of TensorboardTimeSeries value. Possible values: * VALUE_TYPE_UNSPECIFIED * SCALAR * TENSOR * BLOB_SEQUENCE ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_tensorboard_experiment_run_time_series_resources.md ================================================ +++ title = "google_vertex_ai_tensorboard_experiment_run_time_series_resources resource" draft = false [menu.gcp] title = "google_vertex_ai_tensorboard_experiment_run_time_series_resources" identifier = "inspec/resources/gcp/google_vertex_ai_tensorboard_experiment_run_time_series_resources resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_tensorboard_experiment_run_time_series_resources` InSpec audit resource to to test a Google Cloud TensorboardExperimentRunTimeSeriesResource resource. ## Examples ```ruby describe google_vertex_ai_tensorboard_experiment_run_time_series_resources(parent: "projects/#{gcp_project_id}/locations/#{tensorboard_experiment_run_time_series_resource['region']}/tensorboards/#{tensorboard_experiment_run_time_series_resource['tensorboard']}/experiments/#{tensorboard_experiment_run_time_series_resource['experiment']}/runs/#{tensorboard_experiment_run_time_series_resource['run']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_tensorboard_experiment_run_time_series_resources` resource: See [google_vertex_ai_tensorboard_experiment_run_time_series_resource](google_vertex_ai_tensorboard_experiment_run_time_series_resource) for more detailed information. * `plugin_names`: an array of `google_vertex_ai_tensorboard_experiment_run_time_series_resource` plugin_name * `plugin_data`: an array of `google_vertex_ai_tensorboard_experiment_run_time_series_resource` plugin_data * `descriptions`: an array of `google_vertex_ai_tensorboard_experiment_run_time_series_resource` description * `etags`: an array of `google_vertex_ai_tensorboard_experiment_run_time_series_resource` etag * `display_names`: an array of `google_vertex_ai_tensorboard_experiment_run_time_series_resource` display_name * `update_times`: an array of `google_vertex_ai_tensorboard_experiment_run_time_series_resource` update_time * `create_times`: an array of `google_vertex_ai_tensorboard_experiment_run_time_series_resource` create_time * `names`: an array of `google_vertex_ai_tensorboard_experiment_run_time_series_resource` name * `metadata`: an array of `google_vertex_ai_tensorboard_experiment_run_time_series_resource` metadata * `value_types`: an array of `google_vertex_ai_tensorboard_experiment_run_time_series_resource` value_type ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_tensorboard_experiment_runs.md ================================================ +++ title = "google_vertex_ai_tensorboard_experiment_runs resource" draft = false [menu.gcp] title = "google_vertex_ai_tensorboard_experiment_runs" identifier = "inspec/resources/gcp/google_vertex_ai_tensorboard_experiment_runs resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_tensorboard_experiment_runs` InSpec audit resource to to test a Google Cloud TensorboardExperimentRun resource. ## Examples ```ruby describe google_vertex_ai_tensorboard_experiment_runs(parent: "projects/#{gcp_project_id}/locations/#{tensorboard_experiment_run['region']}/tensorboards/#{tensorboard_experiment_run['tensorboard']}/experiments/#{tensorboard_experiment_run['experiment']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_tensorboard_experiment_runs` resource: See [google_vertex_ai_tensorboard_experiment_run](google_vertex_ai_tensorboard_experiment_run) for more detailed information. * `display_names`: an array of `google_vertex_ai_tensorboard_experiment_run` display_name * `update_times`: an array of `google_vertex_ai_tensorboard_experiment_run` update_time * `descriptions`: an array of `google_vertex_ai_tensorboard_experiment_run` description * `etags`: an array of `google_vertex_ai_tensorboard_experiment_run` etag * `labels`: an array of `google_vertex_ai_tensorboard_experiment_run` labels * `create_times`: an array of `google_vertex_ai_tensorboard_experiment_run` create_time * `names`: an array of `google_vertex_ai_tensorboard_experiment_run` name ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_tensorboards.md ================================================ +++ title = "google_vertex_ai_tensorboards resource" draft = false [menu.gcp] title = "google_vertex_ai_tensorboards" identifier = "inspec/resources/gcp/google_vertex_ai_tensorboards resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_tensorboards` InSpec audit resource to to test a Google Cloud Tensorboard resource. ## Examples ```ruby describe google_vertex_ai_tensorboards(parent: "projects/#{gcp_project_id}/locations/#{tensorboard['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_tensorboards` resource: See [google_vertex_ai_tensorboard](google_vertex_ai_tensorboard) for more detailed information. * `names`: an array of `google_vertex_ai_tensorboard` name * `is_defaults`: an array of `google_vertex_ai_tensorboard` is_default * `update_times`: an array of `google_vertex_ai_tensorboard` update_time * `labels`: an array of `google_vertex_ai_tensorboard` labels * `blob_storage_path_prefixes`: an array of `google_vertex_ai_tensorboard` blob_storage_path_prefix * `etags`: an array of `google_vertex_ai_tensorboard` etag * `create_times`: an array of `google_vertex_ai_tensorboard` create_time * `run_counts`: an array of `google_vertex_ai_tensorboard` run_count * `encryption_specs`: an array of `google_vertex_ai_tensorboard` encryption_spec * `display_names`: an array of `google_vertex_ai_tensorboard` display_name * `descriptions`: an array of `google_vertex_ai_tensorboard` description ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_tensorboards_experiment.md ================================================ +++ title = "google_vertex_ai_tensorboards_experiment resource" draft = false [menu.gcp] title = "google_vertex_ai_tensorboards_experiment" identifier = "inspec/resources/gcp/google_vertex_ai_tensorboards_experiment resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_tensorboards_experiment` InSpec audit resource to to test a Google Cloud TensorboardsExperiment resource. ## Examples ```ruby describe google_vertex_ai_tensorboards_experiment(name: "projects/#{gcp_project_id}/locations/#{tensorboards_experiment['region']}/tensorboards/#{tensorboards_experiment['tensorboard']}/experiments/#{tensorboards_experiment['name']}", region: ' value_region') do it { should exist } its('description') { should cmp 'value_description' } its('source') { should cmp 'value_source' } its('display_name') { should cmp 'value_displayname' } its('create_time') { should cmp 'value_createtime' } its('update_time') { should cmp 'value_updatetime' } its('name') { should cmp 'value_name' } its('etag') { should cmp 'value_etag' } end describe google_vertex_ai_tensorboards_experiment(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_tensorboards_experiment` resource: * `description`: Description of this TensorboardExperiment. * `source`: Immutable. Source of the TensorboardExperiment. Example: a custom training job. * `display_name`: User provided name of this TensorboardExperiment. * `create_time`: Output only. Timestamp when this TensorboardExperiment was created. * `update_time`: Output only. Timestamp when this TensorboardExperiment was last updated. * `labels`: The labels with user-defined metadata to organize your TensorboardExperiment. Label keys and values cannot be longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Dataset (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with `aiplatform.googleapis.com/` and are immutable. The following system labels exist for each Dataset: * `aiplatform.googleapis.com/dataset_metadata_schema`: output only. Its value is the metadata_schema's title. * `additional_properties`: * `name`: Output only. Name of the TensorboardExperiment. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` * `etag`: Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_tensorboards_experiments.md ================================================ +++ title = "google_vertex_ai_tensorboards_experiments resource" draft = false [menu.gcp] title = "google_vertex_ai_tensorboards_experiments" identifier = "inspec/resources/gcp/google_vertex_ai_tensorboards_experiments resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_tensorboards_experiments` InSpec audit resource to to test a Google Cloud TensorboardsExperiment resource. ## Examples ```ruby describe google_vertex_ai_tensorboards_experiments(parent: "projects/#{gcp_project_id}/locations/#{tensorboards_experiment['region']}/tensorboards/#{tensorboards_experiment['tensorboard']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_tensorboards_experiments` resource: See [google_vertex_ai_tensorboards_experiment](google_vertex_ai_tensorboards_experiment) for more detailed information. * `descriptions`: an array of `google_vertex_ai_tensorboards_experiment` description * `sources`: an array of `google_vertex_ai_tensorboards_experiment` source * `display_names`: an array of `google_vertex_ai_tensorboards_experiment` display_name * `create_times`: an array of `google_vertex_ai_tensorboards_experiment` create_time * `update_times`: an array of `google_vertex_ai_tensorboards_experiment` update_time * `labels`: an array of `google_vertex_ai_tensorboards_experiment` labels * `names`: an array of `google_vertex_ai_tensorboards_experiment` name * `etags`: an array of `google_vertex_ai_tensorboards_experiment` etag ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_training_pipeline.md ================================================ +++ title = "google_vertex_ai_training_pipeline resource" draft = false [menu.gcp] title = "google_vertex_ai_training_pipeline" identifier = "inspec/resources/gcp/google_vertex_ai_training_pipeline resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_training_pipeline` InSpec audit resource to to test a Google Cloud TrainingPipeline resource. ## Examples ```ruby describe google_vertex_ai_training_pipeline(name: "projects/#{gcp_project_id}/locations/#{training_pipeline['region']}/trainingPipelines/#{training_pipeline['name']}", region: ' value_region') do it { should exist } end describe google_vertex_ai_training_pipeline(name: "does_not_exit", region: ' value_region') do it { should_not exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_training_pipeline` resource: * `end_time`: Output only. Time when the TrainingPipeline entered any of the following states: `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`, `PIPELINE_STATE_CANCELLED`. * `error`: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). * `details`: A list of messages that carry the error details. There is a common set of message types for APIs to use. * `code`: The status code, which should be an enum value of google.rpc.Code. * `message`: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. * `display_name`: Required. The user-defined name of this TrainingPipeline. * `name`: Output only. Resource name of the TrainingPipeline. * `input_data_config`: Specifies Vertex AI owned input data to be used for training, and possibly evaluating, the Model. * `fraction_split`: Assigns the input data to training, validation, and test sets as per the given fractions. Any of `training_fraction`, `validation_fraction` and `test_fraction` may optionally be provided, they must sum to up to 1. If the provided ones sum to less than 1, the remainder is assigned to sets as decided by Vertex AI. If none of the fractions are set, by default roughly 80% of data is used for training, 10% for validation, and 10% for test. * `training_fraction`: The fraction of the input data that is to be used to train the Model. * `test_fraction`: The fraction of the input data that is to be used to evaluate the Model. * `validation_fraction`: The fraction of the input data that is to be used to validate the Model. * `persist_ml_use_assignment`: Whether to persist the ML use assignment to data item system labels. * `saved_query_id`: Only applicable to Datasets that have SavedQueries. The ID of a SavedQuery (annotation set) under the Dataset specified by dataset_id used for filtering Annotations for training. Only Annotations that are associated with this SavedQuery are used in respectively training. When used in conjunction with annotations_filter, the Annotations used for training are filtered by both saved_query_id and annotations_filter. Only one of saved_query_id and annotation_schema_uri should be specified as both of them represent the same thing: problem type. * `annotations_filter`: Applicable only to Datasets that have DataItems and Annotations. A filter on Annotations of the Dataset. Only Annotations that both match this filter and belong to DataItems not ignored by the split method are used in respectively training, validation or test role, depending on the role of the DataItem they are on (for the auto-assigned that role is decided by Vertex AI). A filter with same syntax as the one used in ListAnnotations may be used, but note here it filters across all Annotations of the Dataset, and not just within a single DataItem. * `gcs_destination`: The Google Cloud Storage location where the output is to be written to. * `output_uri_prefix`: Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist. * `bigquery_destination`: The BigQuery location for the output content. * `output_uri`: Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`. * `stratified_split`: Assigns input data to the training, validation, and test sets so that the distribution of values found in the categorical column (as specified by the `key` field) is mirrored within each split. The fraction values determine the relative sizes of the splits. For example, if the specified column has three values, with 50% of the rows having value "A", 25% value "B", and 25% value "C", and the split fractions are specified as 80/10/10, then the training set will constitute 80% of the training data, with about 50% of the training set rows having the value "A" for the specified column, about 25% having the value "B", and about 25% having the value "C". Only the top 500 occurring values are used; any values not in the top 500 values are randomly assigned to a split. If less than three rows contain a specific value, those rows are randomly assigned. Supported only for tabular Datasets. * `training_fraction`: The fraction of the input data that is to be used to train the Model. * `test_fraction`: The fraction of the input data that is to be used to evaluate the Model. * `key`: Required. The key is a name of one of the Dataset's data columns. The key provided must be for a categorical column. * `validation_fraction`: The fraction of the input data that is to be used to validate the Model. * `annotation_schema_uri`: Applicable only to custom training with Datasets that have DataItems and Annotations. Cloud Storage URI that points to a YAML file describing the annotation schema. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). The schema files that can be used here are found in gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the chosen schema must be consistent with metadata of the Dataset specified by dataset_id. Only Annotations that both match this schema and belong to DataItems not ignored by the split method are used in respectively training, validation or test role, depending on the role of the DataItem they are on. When used in conjunction with annotations_filter, the Annotations used for training are filtered by both annotations_filter and annotation_schema_uri. * `predefined_split`: Assigns input data to training, validation, and test sets based on the value of a provided key. Supported only for tabular Datasets. * `key`: Required. The key is a name of one of the Dataset's data columns. The value of the key (either the label's value or value in the column) must be one of {`training`, `validation`, `test`}, and it defines to which set the given piece of data is assigned. If for a piece of data the key is not present or has an invalid value, that piece is ignored by the pipeline. * `filter_split`: Assigns input data to training, validation, and test sets based on the given filters, data pieces not matched by any filter are ignored. Currently only supported for Datasets containing DataItems. If any of the filters in this message are to match nothing, then they can be set as '-' (the minus sign). Supported only for unstructured Datasets. * `validation_filter`: Required. A filter on DataItems of the Dataset. DataItems that match this filter are used to validate the Model. A filter with same syntax as the one used in DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order. * `test_filter`: Required. A filter on DataItems of the Dataset. DataItems that match this filter are used to test the Model. A filter with same syntax as the one used in DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order. * `training_filter`: Required. A filter on DataItems of the Dataset. DataItems that match this filter are used to train the Model. A filter with same syntax as the one used in DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order. * `timestamp_split`: Assigns input data to training, validation, and test sets based on a provided timestamps. The youngest data pieces are assigned to training set, next to validation set, and the oldest to the test set. Supported only for tabular Datasets. * `test_fraction`: The fraction of the input data that is to be used to evaluate the Model. * `training_fraction`: The fraction of the input data that is to be used to train the Model. * `validation_fraction`: The fraction of the input data that is to be used to validate the Model. * `key`: Required. The key is a name of one of the Dataset's data columns. The values of the key (the values in the column) must be in RFC 3339 `date-time` format, where `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not present or has an invalid value, that piece is ignored by the pipeline. * `dataset_id`: Required. The ID of the Dataset in the same Project and Location which data will be used to train the Model. The Dataset must use schema compatible with Model being trained, and what is compatible should be described in the used TrainingPipeline's training_task_definition. For tabular Datasets, all their data is exported to training, to pick and choose from. * `parent_model`: Optional. When specify this field, the `model_to_upload` will not be uploaded as a new model, instead, it will become a new version of this `parent_model`. * `update_time`: Output only. Time when the TrainingPipeline was most recently updated. * `state`: Output only. The detailed state of the pipeline. Possible values: * PIPELINE_STATE_UNSPECIFIED * PIPELINE_STATE_QUEUED * PIPELINE_STATE_PENDING * PIPELINE_STATE_RUNNING * PIPELINE_STATE_SUCCEEDED * PIPELINE_STATE_FAILED * PIPELINE_STATE_CANCELLING * PIPELINE_STATE_CANCELLED * PIPELINE_STATE_PAUSED * `labels`: The labels with user-defined metadata to organize TrainingPipelines. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: * `training_task_definition`: Required. A Google Cloud Storage path to the YAML file that defines the training task which is responsible for producing the model artifact, and may also include additional auxiliary work. The definition files that can be used here are found in gs://google-cloud-aiplatform/schema/trainingjob/definition/. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `start_time`: Output only. Time when the TrainingPipeline for the first time entered the `PIPELINE_STATE_RUNNING` state. * `create_time`: Output only. Time when the TrainingPipeline was created. * `training_task_metadata`: Output only. The metadata information as specified in the training_task_definition's `metadata`. This metadata is an auxiliary runtime and final information about the training task. While the pipeline is running this information is populated only at a best effort basis. Only present if the pipeline's training_task_definition contains `metadata` object. * `training_task_inputs`: Required. The training task's parameter(s), as specified in the training_task_definition's `inputs`. * `model_id`: Optional. The ID to use for the uploaded Model, which will become the final component of the model resource name. This value may be up to 63 characters, and valid characters are `[a-z0-9_-]`. The first character cannot be a number or hyphen. * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `model_to_upload`: A trained machine learning Model. * `model_source_info`: Detail description of the source information of the model. * `copy`: If this Model is copy of another Model. If true then source_type pertains to the original. * `source_type`: Type of the model source. Possible values: * MODEL_SOURCE_TYPE_UNSPECIFIED * AUTOML * CUSTOM * BQML * MODEL_GARDEN * GENIE * `name`: The resource name of the Model. * `metadata`: Immutable. An additional information about the Model; the schema of the metadata can be found in metadata_schema. Unset if the Model does not have any additional information. * `update_time`: Output only. Timestamp when this Model was most recently updated. * `etag`: Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. * `description`: The description of the Model. * `deployed_models`: Output only. The pointers to DeployedModels created from this Model. Note that Model could have been deployed to Endpoints in different Locations. * `deployed_model_id`: Immutable. An ID of a DeployedModel in the above Endpoint. * `endpoint`: Immutable. A resource name of an Endpoint. * `create_time`: Output only. Timestamp when this Model was uploaded into Vertex AI. * `explanation_spec`: Specification of Model explanation. * `parameters`: Parameters to configure explaining for Model's predictions. * `output_indices`: If populated, only returns attributions that have output_index contained in output_indices. It must be an ndarray of integers, with the same shape of the output it's explaining. If not populated, returns attributions for top_k indices of outputs. If neither top_k nor output_indices is populated, returns the argmax index of the outputs. Only applicable to Models that predict multiple outputs (e,g, multi-class Models that predict multiple classes). * `examples`: Example-based explainability that returns the nearest neighbors from the provided dataset. * `presets`: Preset configuration for example-based explanations * `modality`: The modality of the uploaded model, which automatically configures the distance measurement and feature normalization for the underlying example index and queries. If your model does not precisely fit one of these types, it is okay to choose the closest type. Possible values: * MODALITY_UNSPECIFIED * IMAGE * TEXT * TABULAR * `query`: Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. Possible values: * PRECISE * FAST * `neighbor_count`: The number of neighbors to return when querying for examples. * `example_gcs_source`: The Cloud Storage input instances. * `gcs_source`: The Google Cloud Storage location for the input content. * `uris`: Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. * `data_format`: The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. Possible values: * DATA_FORMAT_UNSPECIFIED * JSONL * `nearest_neighbor_search_config`: The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). * `xrai_attribution`: An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Supported only by image Models. * `smooth_grad_config`: Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf * `feature_noise_sigma`: Noise sigma by features. Noise sigma represents the standard deviation of the gaussian kernel that will be used to add noise to interpolated inputs prior to computing gradients. * `noise_sigma`: Noise sigma per feature. No noise is added to features that are not set. * `name`: The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. * `sigma`: This represents the standard deviation of the Gaussian kernel that will be used to add noise to the feature prior to computing gradients. Similar to noise_sigma but represents the noise added to the current feature. Defaults to 0.1. * `noise_sigma`: This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. If the distribution is different per feature, set feature_noise_sigma instead for each feature. * `noisy_sample_count`: The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3. * `step_count`: Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. Valid range of its value is [1, 100], inclusively. * `blur_baseline_config`: Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383 * `max_blur_sigma`: The standard deviation of the blur kernel for the blurred baseline. The same blurring parameter is used for both the height and the width dimension. If not set, the method defaults to the zero (i.e. black for images) baseline. * `top_k`: If populated, returns attributions for top K indices of outputs (defaults to 1). Only applies to Models that predicts more than one outputs (e,g, multi-class Models). When set to -1, returns explanations for all outputs. * `integrated_gradients_attribution`: An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365 * `step_count`: Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is within the desired error range. Valid range of its value is [1, 100], inclusively. * `smooth_grad_config`: Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf * `feature_noise_sigma`: Noise sigma by features. Noise sigma represents the standard deviation of the gaussian kernel that will be used to add noise to interpolated inputs prior to computing gradients. * `noise_sigma`: Noise sigma per feature. No noise is added to features that are not set. * `name`: The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. * `sigma`: This represents the standard deviation of the Gaussian kernel that will be used to add noise to the feature prior to computing gradients. Similar to noise_sigma but represents the noise added to the current feature. Defaults to 0.1. * `noise_sigma`: This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. If the distribution is different per feature, set feature_noise_sigma instead for each feature. * `noisy_sample_count`: The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3. * `blur_baseline_config`: Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383 * `max_blur_sigma`: The standard deviation of the blur kernel for the blurred baseline. The same blurring parameter is used for both the height and the width dimension. If not set, the method defaults to the zero (i.e. black for images) baseline. * `sampled_shapley_attribution`: An attribution method that approximates Shapley values for features that contribute to the label being predicted. A sampling strategy is used to approximate the value rather than considering all subsets of features. * `path_count`: Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. * `metadata`: Metadata describing the Model's input and output for explanation. * `feature_attributions_schema_uri`: Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML tabular Models always have this field populated by Vertex AI. Note: The URI given on output may be different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `latent_space_source`: Name of the source to generate embeddings for example based explanations. * `outputs`: Required. Map from output names to output metadata. For Vertex AI-provided Tensorflow images, keys can be any user defined string that consists of any UTF-8 characters. For custom images, keys are the name of the output field in the prediction to be explained. Currently only one key is allowed. * `additional_properties`: Metadata of the prediction output to be explained. * `inputs`: Required. Map from feature names to feature input metadata. Keys are the name of the features. Values are the specification of the feature. An empty InputMetadata is valid. It describes a text feature which has the name specified as the key in ExplanationMetadata.inputs. The baseline of the empty feature is chosen by Vertex AI. For Vertex AI-provided Tensorflow images, the key can be any friendly name of the feature. Once specified, featureAttributions are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. * `additional_properties`: Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. * `encryption_spec`: Represents a customer-managed encryption key spec that can be applied to a top-level resource. * `kms_key_name`: Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. * `pipeline_job`: Optional. This field is populated if the model is produced by a pipeline job. * `predict_schemata`: Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. * `instance_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `parameters_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI, if no parameters are supported, then it is set to an empty string. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `prediction_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single prediction produced by this Model, which are returned via PredictResponse.predictions, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `version_update_time`: Output only. Timestamp when this version was most recently updated. * `supported_export_formats`: Output only. The formats in which this Model may be exported. If empty, this Model is not available for export. * `exportable_contents`: Output only. The content of this Model that may be exported. * `id`: Output only. The ID of the export format. The possible format IDs are: * `tflite` Used for Android mobile devices. * `edgetpu-tflite` Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices. * `tf-saved-model` A tensorflow model in SavedModel format. * `tf-js` A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the browser and in Node.js using JavaScript. * `core-ml` Used for iOS mobile devices. * `custom-trained` A Model that was uploaded or trained by custom code. * `original_model_info`: Contains information about the original Model if this Model is a copy. * `model`: Output only. The resource name of the Model this Model is a copy of, including the revision. Format: `projects/{project}/locations/{location}/models/{model_id}@{version_id}` * `metadata_artifact`: Output only. The resource name of the Artifact that was created in MetadataStore when creating the Model. The Artifact resource name pattern is `projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}`. * `supported_input_storage_formats`: Output only. The formats this Model supports in BatchPredictionJob.input_config. If PredictSchemata.instance_schema_uri exists, the instances should be given as per that schema. The possible formats are: * `jsonl` The JSON Lines format, where each instance is a single line. Uses GcsSource. * `csv` The CSV format, where each instance is a single comma-separated line. The first line in the file is the header, containing comma-separated field names. Uses GcsSource. * `tf-record` The TFRecord format, where each instance is a single record in tfrecord syntax. Uses GcsSource. * `tf-record-gzip` Similar to `tf-record`, but the file is gzipped. Uses GcsSource. * `bigquery` Each instance is a single row in BigQuery. Uses BigQuerySource. * `file-list` Each line of the file is the location of an instance to process, uses `gcs_source` field of the InputConfig object. If this Model doesn't support any of these formats it means it cannot be used with a BatchPredictionJob. However, if it has supported_deployment_resources_types, it could serve online predictions by using PredictionService.Predict or PredictionService.Explain. * `metadata_schema_uri`: Immutable. Points to a YAML file stored on Google Cloud Storage describing additional information about the Model, that is specific to it. Unset if the Model does not have any additional information. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML Models always have this field populated by Vertex AI, if no additional metadata is needed, this field is set to an empty string. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. * `container_spec`: Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `predict_route`: Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.predict to this path on the container's IP address and port. Vertex AI then returns the container's response in the API response. For example, if you set this field to `/foo`, then when Vertex AI receives a prediction request, it forwards the request body in a POST request to the `/foo` path on the port of your container specified by the first value of this `ModelContainerSpec`'s ports field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * `image_uri`: Required. Immutable. URI of the Docker image to be used as the custom container for serving predictions. This URI must identify an image in Artifact Registry or Container Registry. Learn more about the [container publishing requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon ModelService.UploadModel, stored internally, and this original path is afterwards not used. To learn about the requirements for the Docker image itself, see [Custom container requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. * `env`: Immutable. List of environment variables to set in the container. After the container starts running, code running in the container can read these environment variables. Additionally, the command and args fields can reference these variables. Later entries in this list can also reference earlier entries. For example, the following example sets the variable `VAR_2` to have the value `foo bar`: ```json [ { "name": "VAR_1", "value": "foo" }, { "name": "VAR_2", "value": "$(VAR_1) bar" } ] ``` If you switch the order of the variables in the example, then the expansion does not occur. This field corresponds to the `env` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `name`: Required. Name of the environment variable. Must be a valid C identifier. * `value`: Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. * `args`: Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify this field as an array of executable and arguments, similar to a Docker `CMD`'s "default parameters" form. If you don't specify this field but do specify the command field, then the command from the `command` field runs without any additional arguments. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container's `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `args` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `command`: Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint). Specify this field as an array of executable and arguments, similar to a Docker `ENTRYPOINT`'s "exec" form, not its "shell" form. If you do not specify this field, then the container's `ENTRYPOINT` runs, in conjunction with the args field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd), if either exists. If this field is not specified and the container does not have an `ENTRYPOINT`, then refer to the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). If you specify this field, then you can also specify the `args` field to provide additional arguments for this command. However, if you specify this field, then the container's `CMD` is ignored. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container's `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `command` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `ports`: Immutable. List of ports to expose from the container. Vertex AI sends any prediction requests that it receives to the first port on this list. Vertex AI also sends [liveness and health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```json [ { "containerPort": 8080 } ] ``` Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). * `container_port`: The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. * `health_route`: Immutable. HTTP path on the container to send health checks to. Vertex AI intermittently sends GET requests to this path on the container's IP address and port to check that the container is healthy. Read more about [health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). For example, if you set this field to `/bar`, then Vertex AI intermittently sends a GET request to the `/bar` path on the port of your container specified by the first value of this `ModelContainerSpec`'s ports field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/ DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * `version_id`: Output only. Immutable. The version ID of the model. A new version is committed when a new model version is uploaded or trained under an existing model id. It is an auto-incrementing decimal number in string representation. * `artifact_uri`: Immutable. The path to the directory containing the Model artifact and any of its supporting files. Not present for AutoML Models or Large Models. * `training_pipeline`: Output only. The resource name of the TrainingPipeline that uploaded this Model, if any. * `display_name`: Required. The display name of the Model. The name can be up to 128 characters long and can consist of any UTF-8 characters. * `supported_deployment_resources_types`: Output only. When this Model is deployed, its prediction resources are described by the `prediction_resources` field of the Endpoint.deployed_models object. Because not all Models support all resource configuration types, the configuration types this Model supports are listed here. If no configuration types are listed, the Model cannot be deployed to an Endpoint and does not support online predictions (PredictionService.Predict or PredictionService.Explain). Such a Model can serve predictions by using a BatchPredictionJob, if it has at least one entry each in supported_input_storage_formats and supported_output_storage_formats. * `supported_output_storage_formats`: Output only. The formats this Model supports in BatchPredictionJob.output_config. If both PredictSchemata.instance_schema_uri and PredictSchemata.prediction_schema_uri exist, the predictions are returned together with their instances. In other words, the prediction has the original instance data first, followed by the actual prediction content (as per the schema). The possible formats are: * `jsonl` The JSON Lines format, where each prediction is a single line. Uses GcsDestination. * `csv` The CSV format, where each prediction is a single comma-separated line. The first line in the file is the header, containing comma-separated field names. Uses GcsDestination. * `bigquery` Each prediction is a single row in a BigQuery table, uses BigQueryDestination . If this Model doesn't support any of these formats it means it cannot be used with a BatchPredictionJob. However, if it has supported_deployment_resources_types, it could serve online predictions by using PredictionService.Predict or PredictionService.Explain. * `version_aliases`: User provided version aliases so that a model version can be referenced via alias (i.e. `projects/{project}/locations/{location}/models/{model_id}@{version_alias}` instead of auto-generated version id (i.e. `projects/{project}/locations/{location}/models/{model_id}@{version_id})`. The format is a-z{0,126}[a-z0-9] to distinguish from version_id. A default version alias will be created for the first version of the model, and there must be exactly one default version alias for a model. * `version_create_time`: Output only. Timestamp when this version was created. * `version_description`: The description of this version. * `labels`: The labels with user-defined metadata to organize your Models. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. * `additional_properties`: ## GCP permissions ================================================ FILE: docs-chef-io/content/google_vertex_ai_training_pipelines.md ================================================ +++ title = "google_vertex_ai_training_pipelines resource" draft = false [menu.gcp] title = "google_vertex_ai_training_pipelines" identifier = "inspec/resources/gcp/google_vertex_ai_training_pipelines resource" parent = "inspec/resources/gcp" +++ Use the `google_vertex_ai_training_pipelines` InSpec audit resource to to test a Google Cloud TrainingPipeline resource. ## Examples ```ruby describe google_vertex_ai_training_pipelines(parent: "projects/#{gcp_project_id}/locations/#{training_pipeline['region']}", region: ' value_region') do it { should exist } end ``` ## Properties Properties that can be accessed from the `google_vertex_ai_training_pipelines` resource: See [google_vertex_ai_training_pipeline](google_vertex_ai_training_pipeline) for more detailed information. * `end_times`: an array of `google_vertex_ai_training_pipeline` end_time * `errors`: an array of `google_vertex_ai_training_pipeline` error * `display_names`: an array of `google_vertex_ai_training_pipeline` display_name * `names`: an array of `google_vertex_ai_training_pipeline` name * `input_data_configs`: an array of `google_vertex_ai_training_pipeline` input_data_config * `parent_models`: an array of `google_vertex_ai_training_pipeline` parent_model * `update_times`: an array of `google_vertex_ai_training_pipeline` update_time * `states`: an array of `google_vertex_ai_training_pipeline` state * `labels`: an array of `google_vertex_ai_training_pipeline` labels * `training_task_definitions`: an array of `google_vertex_ai_training_pipeline` training_task_definition * `start_times`: an array of `google_vertex_ai_training_pipeline` start_time * `create_times`: an array of `google_vertex_ai_training_pipeline` create_time * `training_task_metadata`: an array of `google_vertex_ai_training_pipeline` training_task_metadata * `training_task_inputs`: an array of `google_vertex_ai_training_pipeline` training_task_inputs * `model_ids`: an array of `google_vertex_ai_training_pipeline` model_id * `encryption_specs`: an array of `google_vertex_ai_training_pipeline` encryption_spec * `model_to_uploads`: an array of `google_vertex_ai_training_pipeline` model_to_upload ## Filter criteria This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. ## GCP permissions ================================================ FILE: docs-chef-io/go.mod ================================================ module github.com/inspec/inspec-gcp/docs-chef-io go 1.17 ================================================ FILE: generate/Gemfile ================================================ source 'https://rubygems.org' gem 'bundle' gem 'faraday', '>= 0.16.2' gem 'google-api-client' gem 'google-cloud' gem 'googleauth' gem 'inifile' gem 'inspec-bin', '4.16.0' gem 'rubocop' group :development do gem 'github_changelog_generator' gem 'pry-coolline' gem 'rake' gem 'vcr' gem 'webmock' end ================================================ FILE: generate/README.md ================================================ ** This tool is experimental and may change with little notice ** ## What this tool does Allows a user to generate InSpec controls from a GCP environment. Similar to [inspec-iggy](https://github.com/mattray/inspec-iggy) but without the requirement of the infrastructure being managed via Terraform. This tool gathers info on the environment by querying the GCP APIs directly. Currently it only works for a single GCP project, but in the future this could be modified. # Instructions ## Install bundle & inspec CLI Follow directions from https://github.com/inspec/inspec-gcp/ about prerequisites. This tool is based heavily off of the inspec-gcp resource pack, so setup is similar. Individual APIs need to be enabled if you wish to generate tests for resources that use that API. You will need ruby 2.5+ and bundler installed, run `bundle install` in this directory to ensure dependencies are installed ## Set environment variables: ### Required `GCP_PROJECT_NAME=my-gcp-project` The name of the GCP project to generate tests for. Currently this tool only works for a single project. This may change in the future to accommodate an entire organization `GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceaccount.json` Gives InSpec access to view the GCP account in question. This must be created manually either via the console or a CLI tool like `gcloud`. See https://cloud.google.com/iam/docs/understanding-service-accounts This must be a JSON service account file. ### Optional `CNF_PATH=/path/to/config/directory` Path to the directory containing configuration files for modifying which tests to generate. `OUTPUT_PATH=/path/to/output/directory` (must exist) This points to the directory where generated tests will be output `TEMPLATE_PATH=/path/to/generated_test_template.erb` `generated_test_template.erb` is provided with this resource pack. ## Create configuration files (optional) Resources for which tests are generated can be controlled via configuration files for each type of resource. Configuration files are to be placed within the `CNF_PATH` directory, and are YAML files that contain lists of filters and ignored fields. Configuration files are named the same as the InSpec resource for that GCP resource. For example, Google Compute Instances are represented by the InSpec resource `google_compute_instance.rb` and configuration file `google_compute_instance.yaml`. Configuration files have two arrays, `filters` and `ignore_fields`. ** Filters are not currently supported ** Filters are ruby code that is evaluated in context of each potential resource to generate tests for. They have access to the InSpec resource in question as a variable `resource` and return a boolean for if this resource should generate a test. For example, for a Compute Disk `resource` would be a [disk](https://github.com/inspec/inspec-gcp/blob/master/libraries/google_compute_disk.rb) object and have access to all of the [properties](https://github.com/inspec/inspec-gcp/blob/master/docs/resources/google_compute_disk.md) for that disk. This allows a user to generate tests based on their needs. For example, a `google_compute_instance.yaml` file of the following: ``` ignore_fields: [] filters: - resource.status == "RUNNING" ``` Would generate tests for every compute instance that is currently running. `ignore_fields` is used to ignore certain fields when writing an InSpec test for a type of resource. These must match the property name in the [markdown doc](https://github.com/inspec/inspec-gcp/tree/master/docs/resources) for the resource. This only works for top level properties currently. This allows a user to omit extraneous fields when generating tests. For example, a `google_compute_instance.yaml` file of the following: ``` ignore_fields: ['creation_timestamp', 'metadata'] filters: [] ``` Would generate tests for every Compute Instance, but will omit any reference to `creation_timestamp` and `metadata` within those tests. Common use of `filters` would be to exclude managed resources, such as Compute Instances managed by Instance Group Managers. These can be ephemeral resources, so writing tests against individuals may not be useful. ## Create InSpec profile I have included a collection of generation tests within the `gen-controls` directory in this package. Each of these will generate tests for the GCP resource it is named after. `compute_instance.rb` is an InSpec test that will generate tests for all Compute Instances in the project. I have included an InSpec profile at `./generate-profile` that will use the resources included in this package. Add any tests from the `gen-controls` directory to the `./generate-profile/controls` directory to generate tests for those types of resources. ``` # Move one (or more) tests to the control folder of the included InSpec profile. cp gen-controls/* generate-profile/controls/ ``` ## Run InSpec profile Run the InSpec profile with ``` # From the inspec-gcp-generate directory bundle install bundle exec inspec exec generate-profile -t gcp:// ls $OUTPUT_PATH ``` The tests may take a while to execute, as they need to iterate every resource in the project. Executing the tests will not produce any command line output, see the `OUTPUT_DIRECTORY` for results. I recommend starting with a small subset of resources by only including a single test from the `generate` directory at first to ensure everything is working. You can now execute the generated tests to verify that they work correctly ================================================ FILE: generate/gen-controls/bigquery_dataset.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_bigquery_dataset resource.' # rubocop:disable Metrics/BlockLength control 'google_bigquery_dataset-1.0' do impact 1.0 title 'google_bigquery_dataset resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_bigquery_dataset') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_bigquery_dataset.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_bigquery_datasets(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_bigquery_dataset(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Dataset_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/bigquery_table.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_bigquery_table resource.' # rubocop:disable Metrics/BlockLength control 'google_bigquery_table-1.0' do impact 1.0 title 'google_bigquery_table resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_bigquery_table') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_bigquery_table.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] dataset_ids = google_bigquery_datasets(project: project_name).ids dataset_ids.each do |dataset_id| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ dataset: dataset_id.split(':').last })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_bigquery_tables(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_bigquery_table(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Table_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/cloudfunctions_cloud_function.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_cloudfunctions_cloud_function resource.' # rubocop:disable Metrics/BlockLength control 'google_cloudfunctions_cloud_function-1.0' do impact 1.0 title 'google_cloudfunctions_cloud_function resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_cloudfunctions_cloud_function') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_cloudfunctions_cloud_function.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] region_names = google_compute_regions(project: project_name).region_names region_names.each do |region_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ location: region_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_cloudfunctions_cloud_functions(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_cloudfunctions_cloud_function(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/CloudFunction_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_autoscaler.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_autoscaler resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_autoscaler-1.0' do impact 1.0 title 'google_compute_autoscaler resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_autoscaler') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_autoscaler.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] zone_names = google_compute_zones(project: project_name).zone_names zone_names.each do |zone_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ zone: zone_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_autoscalers(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_autoscaler(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Autoscaler_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_backend_bucket.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_backend_bucket resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_backend_bucket-1.0' do impact 1.0 title 'google_compute_backend_bucket resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_backend_bucket') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_backend_bucket.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_backend_buckets(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_backend_bucket(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/BackendBucket_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_backend_service.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_backend_service resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_backend_service-1.0' do impact 1.0 title 'google_compute_backend_service resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_backend_service') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_backend_service.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_backend_services(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_backend_service(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/BackendService_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_disk.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_disk resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_disk-1.0' do impact 1.0 title 'google_compute_disk resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_disk') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_disk.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] zone_names = google_compute_zones(project: project_name).zone_names zone_names.each do |zone_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ zone: zone_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_disks(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_disk(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Disk_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_firewall.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_firewall resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_firewall-1.0' do impact 1.0 title 'google_compute_firewall resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_firewall') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_firewall.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_firewalls(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_firewall(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Firewall_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_global_address.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_global_address resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_global_address-1.0' do impact 1.0 title 'google_compute_global_address resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_global_address') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_global_address.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_global_addresses(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_global_address(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/GlobalAddress_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_global_forwarding_rule.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_global_forwarding_rule resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_global_forwarding_rule-1.0' do impact 1.0 title 'google_compute_global_forwarding_rule resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_global_forwarding_rule') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_global_forwarding_rule.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_global_forwarding_rules(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_global_forwarding_rule(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/GlobalForwardingRule_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_health_check.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_health_check resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_health_check-1.0' do impact 1.0 title 'google_compute_health_check resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_health_check') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_health_check.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_health_checks(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_health_check(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/HealthCheck_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_http_health_check.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_http_health_check resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_http_health_check-1.0' do impact 1.0 title 'google_compute_http_health_check resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_http_health_check') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_http_health_check.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_http_health_checks(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_http_health_check(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/HttpHealthCheck_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_https_health_check.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_https_health_check resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_https_health_check-1.0' do impact 1.0 title 'google_compute_https_health_check resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_https_health_check') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_https_health_check.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_https_health_checks(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_https_health_check(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/HttpsHealthCheck_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_instance.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_instance resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_instance-1.0' do impact 1.0 title 'google_compute_instance resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_instance') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_instance.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] zone_names = google_compute_zones(project: project_name).zone_names zone_names.each do |zone_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ zone: zone_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_instances(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_instance(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Instance_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_instance_group_manager.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_instance_group_manager resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_instance_group_manager-1.0' do impact 1.0 title 'google_compute_instance_group_manager resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_instance_group_manager') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_instance_group_manager.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] zone_names = google_compute_zones(project: project_name).zone_names zone_names.each do |zone_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ zone: zone_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_instance_group_managers(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_instance_group_manager(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/InstanceGroupManager_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_instance_template.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_instance_template resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_instance_template-1.0' do impact 1.0 title 'google_compute_instance_template resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_instance_template') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_instance_template.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_instance_templates(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_instance_template(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/InstanceTemplate_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_network.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_network resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_network-1.0' do impact 1.0 title 'google_compute_network resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_network') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_network.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_networks(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_network(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Network_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_network_endpoint_group.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_network_endpoint_group resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_network_endpoint_group-1.0' do impact 1.0 title 'google_compute_network_endpoint_group resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_network_endpoint_group') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_network_endpoint_group.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] zone_names = google_compute_zones(project: project_name).zone_names zone_names.each do |zone_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ zone: zone_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_network_endpoint_groups(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_network_endpoint_group(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/NetworkEndpointGroup_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_node_group.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_node_group resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_node_group-1.0' do impact 1.0 title 'google_compute_node_group resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_node_group') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_node_group.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] zone_names = google_compute_zones(project: project_name).zone_names zone_names.each do |zone_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ zone: zone_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_node_groups(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_node_group(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/NodeGroup_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_node_template.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_node_template resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_node_template-1.0' do impact 1.0 title 'google_compute_node_template resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_node_template') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_node_template.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] region_names = google_compute_regions(project: project_name).region_names region_names.each do |region_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ region: region_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_node_templates(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_node_template(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/NodeTemplate_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_region_backend_service.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_region_backend_service resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_region_backend_service-1.0' do impact 1.0 title 'google_compute_region_backend_service resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_region_backend_service') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_region_backend_service.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] region_names = google_compute_regions(project: project_name).region_names region_names.each do |region_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ region: region_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_region_backend_services(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_region_backend_service(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/RegionBackendService_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_route.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_route resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_route-1.0' do impact 1.0 title 'google_compute_route resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_route') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_route.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_routes(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_route(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Route_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_router.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_router resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_router-1.0' do impact 1.0 title 'google_compute_router resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_router') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_router.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] region_names = google_compute_regions(project: project_name).region_names region_names.each do |region_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ region: region_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_routers(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_router(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Router_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_snapshot.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_snapshot resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_snapshot-1.0' do impact 1.0 title 'google_compute_snapshot resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_snapshot') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_snapshot.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_snapshots(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_snapshot(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Snapshot_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_ssl_certificate.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_ssl_certificate resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_ssl_certificate-1.0' do impact 1.0 title 'google_compute_ssl_certificate resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_ssl_certificate') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_ssl_certificate.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_ssl_certificates(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_ssl_certificate(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/SslCertificate_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_ssl_policy.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_ssl_policy resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_ssl_policy-1.0' do impact 1.0 title 'google_compute_ssl_policy resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_ssl_policy') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_ssl_policy.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_ssl_policies(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_ssl_policy(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/SslPolicy_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_subnetwork.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_subnetwork resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_subnetwork-1.0' do impact 1.0 title 'google_compute_subnetwork resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_subnetwork') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_subnetwork.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] region_names = google_compute_regions(project: project_name).region_names region_names.each do |region_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ region: region_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_subnetworks(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_subnetwork(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Subnetwork_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_target_http_proxy.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_target_http_proxy resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_target_http_proxy-1.0' do impact 1.0 title 'google_compute_target_http_proxy resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_target_http_proxy') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_target_http_proxy.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_target_http_proxies(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_target_http_proxy(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/TargetHttpProxy_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_target_https_proxy.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_target_https_proxy resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_target_https_proxy-1.0' do impact 1.0 title 'google_compute_target_https_proxy resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_target_https_proxy') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_target_https_proxy.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_target_https_proxies(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_target_https_proxy(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/TargetHttpsProxy_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_target_pool.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_target_pool resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_target_pool-1.0' do impact 1.0 title 'google_compute_target_pool resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_target_pool') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_target_pool.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] region_names = google_compute_regions(project: project_name).region_names region_names.each do |region_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ region: region_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_target_pools(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_target_pool(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/TargetPool_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_target_tcp_proxy.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_target_tcp_proxy resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_target_tcp_proxy-1.0' do impact 1.0 title 'google_compute_target_tcp_proxy resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_target_tcp_proxy') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_target_tcp_proxy.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_target_tcp_proxies(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_target_tcp_proxy(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/TargetTcpProxy_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/compute_url_map.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_compute_url_map resource.' # rubocop:disable Metrics/BlockLength control 'google_compute_url_map-1.0' do impact 1.0 title 'google_compute_url_map resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_compute_url_map') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_compute_url_map.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_compute_url_maps(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_compute_url_map(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/UrlMap_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/dataproc_cluster.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_dataproc_cluster resource.' # rubocop:disable Metrics/BlockLength control 'google_dataproc_cluster-1.0' do impact 1.0 title 'google_dataproc_cluster resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_dataproc_cluster') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_dataproc_cluster.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] region_names = google_compute_regions(project: project_name).region_names region_names.each do |region_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ region: region_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_dataproc_clusters(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_dataproc_cluster(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Cluster_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/dns_resource_record_set.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_dns_resource_record_set resource.' # rubocop:disable Metrics/BlockLength control 'google_dns_resource_record_set-1.0' do impact 1.0 title 'google_dns_resource_record_set resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_dns_resource_record_set') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_dns_resource_record_set.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] managed_zones = google_dns_managed_zones(project: project_name).zone_names managed_zones.each do |managed_zone| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ managed_zone: managed_zone })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_dns_resource_record_sets(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_dns_resource_record_set(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/ResourceRecordSet_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/filestore_instance.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_filestore_instance resource.' # rubocop:disable Metrics/BlockLength control 'google_filestore_instance-1.0' do impact 1.0 title 'google_filestore_instance resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_filestore_instance') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_filestore_instance.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] zone_names = google_compute_zones(project: project_name).zone_names zone_names.each do |zone_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ zone: zone_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_filestore_instances(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_filestore_instance(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Instance_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/mlengine_model.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_ml_engine_model resource.' # rubocop:disable Metrics/BlockLength control 'google_ml_engine_model-1.0' do impact 1.0 title 'google_ml_engine_model resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_ml_engine_model') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_ml_engine_model.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_ml_engine_models(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_ml_engine_model(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Model_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/pubsub_subscription.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_pubsub_subscription resource.' # rubocop:disable Metrics/BlockLength control 'google_pubsub_subscription-1.0' do impact 1.0 title 'google_pubsub_subscription resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_pubsub_subscription') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_pubsub_subscription.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_pubsub_subscriptions(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_pubsub_subscription(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Subscription_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/pubsub_topic.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_pubsub_topic resource.' # rubocop:disable Metrics/BlockLength control 'google_pubsub_topic-1.0' do impact 1.0 title 'google_pubsub_topic resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_pubsub_topic') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_pubsub_topic.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_pubsub_topics(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_pubsub_topic(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Topic_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/gen-controls/redis_instance.rb ================================================ # frozen_string_literal: true require 'yaml' require 'logger' title 'Test GCP google_redis_instance resource.' # rubocop:disable Metrics/BlockLength control 'google_redis_instance-1.0' do impact 1.0 title 'google_redis_instance resource test' logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.warn('Generating tests for google_redis_instance') filters = [] ignored_fields = [] output_folder = ENV['OUTPUT_PATH'] if output_folder.nil? output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') config_folder = ENV['CNF_PATH'] logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') unless config_folder.nil? file_name = File.join(config_folder, 'google_redis_instance.yaml') if File.file?(file_name) config = YAML.load_file(file_name) config_filters = config['filters'] config_filters.each do # This is not currently implemented logger.warn('Filters are not currently supported, ignoring') end config_ignored = config['ignore_fields'] ignored_fields += config_ignored end end project_name = ENV['GCP_PROJECT_NAME'] raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] region_names = google_compute_regions(project: project_name).region_names region_names.each do |region_name| plural_identifiers.each do |plural_identifier| next_identifiers.push(plural_identifier.merge({ region: region_name })) end end plural_identifiers = next_identifiers all_identifiers = [] i = 0 plural_identifiers.each do |plural_identifier| plural = google_redis_instances(plural_identifier) identifiers = plural.identifiers identifiers.each do |identifier| all_identifiers.push(identifier) resource = google_redis_instance(identifier) unless filters.all? { |filter| filter.call(resource) } next end resource.dump(output_folder, template_path, i, ignored_fields) output = "Writing #{File.expand_path(output_folder)}/Instance_#{i}.rb" describe output do # Prints pretty message when writing controls to files its('length') { should be >= 0 } end i += 1 end end end # rubocop:enable Metrics/BlockLength ================================================ FILE: generate/generate-profile/README.md ================================================ # Example InSpec Profile For GCP This example shows the implementation of an InSpec profile for GCP that depends on the [InSpec GCP Resource Pack](https://github.com/inspec/inspec-gcp). See the [README](https://github.com/inspec/inspec-gcp) for instructions on setting up appropriate GCP credentials. ## Create a profile ``` $ inspec init profile --platform gcp my-profile Create new profile at /Users/spaterson/my-profile * Create directory libraries * Create file README.md * Create directory controls * Create file controls/example.rb * Create file inspec.yml * Create file attributes.yml * Create file libraries/.gitkeep ``` ## Update `attributes.yml` to point to your project ``` gcp_project_id: 'my-gcp-project' ``` ## Run the tests ``` $ cd gcp-profile/ $ inspec exec . -t gcp:// --attrs attributes.yml Profile: GCP InSpec Profile (my-profile) Version: 0.1.0 Target: gcp://local-service-account@my-gcp-project.iam.gserviceaccount.com ✔ gcp-single-region-1.0: Ensure single region has the correct properties. ✔ Region europe-west2 zone_names should include "europe-west2-a" ✔ gcp-regions-loop-1.0: Ensure regions have the correct properties in bulk. ✔ Region asia-east1 should be up ✔ Region asia-northeast1 should be up ✔ Region asia-south1 should be up ✔ Region asia-southeast1 should be up ✔ Region australia-southeast1 should be up ✔ Region europe-north1 should be up ✔ Region europe-west1 should be up ✔ Region europe-west2 should be up ✔ Region europe-west3 should be up ✔ Region europe-west4 should be up ✔ Region northamerica-northeast1 should be up ✔ Region southamerica-east1 should be up ✔ Region us-central1 should be up ✔ Region us-east1 should be up ✔ Region us-east4 should be up ✔ Region us-west1 should be up ✔ Region us-west2 should be up Profile: Google Cloud Platform Resource Pack (inspec-gcp) Version: 0.5.0 Target: gcp://local-service-account@my-gcp-project.iam.gserviceaccount.com No tests executed. Profile Summary: 2 successful controls, 0 control failures, 0 controls skipped Test Summary: 18 successful, 0 failures, 0 skipped ``` ================================================ FILE: generate/generate-profile/attributes.yml ================================================ # Below is to be uncommented and set with your GCP project ID: gcp_project_id: 'your-gcp-project' ================================================ FILE: generate/generate-profile/inspec.yml ================================================ name: generate-profile title: GCP InSpec Profile maintainer: The Authors copyright: The Authors copyright_email: you@example.com license: Apache-2.0 summary: An InSpec Compliance Profile For GCP version: 0.1.0 inspec_version: '>= 3.0.25' attributes: - name: gcp_project_id description: 'The GCP project identifier.' type: string depends: - name: inspec-gcp path: ../ supports: - platform: gcp ================================================ FILE: generate/generate-profile/libraries/.gitkeep ================================================ ================================================ FILE: generate/generated_test_template.erb ================================================ title 'Test GCP <%= name %> resource.' control '<%= name %>_<%= number %>' do impact 1.0 title '<%= name %> resource test' describe <%= type %>(<%= identifiers %>) do it { should exist } <% arr.flatten.each do |a| %> <%= a %><% end %> end end ================================================ FILE: generate/inspec.yml ================================================ name: inspec-gcp-generate title: Google Cloud Platform Resource Generation maintainer: slevenick@google.com summary: For generation (TEST) copyright: TEST copyright_email: TEST version: 0.1.0 license: Apache-2.0 inspec_version: '>= 3.0.25' supports: - platform: gcp ================================================ FILE: generate/libraries/gcp_backend.rb ================================================ # frozen_string_literal: true # GCP Inspec Backend Classes # # Based on the Azure Inspec classes by Russell Seymour # require 'json' require 'net/http' require 'googleauth' # Base class for GCP resources - depends on train GCP transport for connection # # module Inspec::Resources class GcpResourceBase < Inspec.resource(1) attr_reader :opts, :gcp def initialize(opts) @opts = opts # ensure we have a GCP connection, resources can choose which of the clients to instantiate @gcp = inspec.backend # Magic Modules generated resources use an alternate transport method # In the future this will be moved into the train-gcp plugin itself @connection = GcpApiConnection.new if opts[:use_http_transport] end def failed_resource? @failed_resource end # Intercept GCP exceptions def catch_gcp_errors yield # create custom messages as needed rescue Google::Apis::ClientError => e error = JSON.parse(e.body) fail_resource error['error']['message'] @failed_resource = true nil end def create_resource_methods(object) dm = GcpResourceDynamicMethods.new dm.create_methods(self, object) end def name_from_self_link(property) property&.split('/')&.last end end # end # Class to create methods on the calling object at run time. Heavily based on the Azure Inspec resources. # class GcpResourceDynamicMethods # Given the calling object and its data, create the methods on the object according # to the data that has been retrieved. Various types of data can be returned so the method # checks the type to ensure that the necessary methods are configured correctly # # @param GcpResourceProbe|GcpResource object The object on which the methods should be craeted # @param variant data The data from which the methods should be created def create_methods(object, data) # Check the type of data as this affects the setup of the methods # If it is an Gcp Generic Resource then setup methods for each of # the instance variables case data.class.to_s when /Google::Apis::.*/ # iterate around the instance variables data.instance_variables.each do |var| create_method(object, var.to_s.delete('@'), data.instance_variable_get(var)) end # When the data is a Hash object iterate around each of the key value pairs and # craete a method for each one. when 'Hash' data.each do |key, value| create_method(object, key, value) end end end private # Method that is responsible for creating the method on the calling object. This is # because some nesting maybe required. For example of the value is a Hash then it will # need to have an GcpResourceProbe create for each key, whereas if it is a simple # string then the value just needs to be returned # def create_method(object, name, value) # Create the necessary method based on the var that has been passed # Test the value for its type so that the method can be setup correctly case value.class.to_s when 'String', 'Integer', 'TrueClass', 'FalseClass', 'Fixnum' object.define_singleton_method name do value end when 'Hash' value.count.zero? ? return_value = value : return_value = GcpResourceProbe.new(value) object.define_singleton_method name do return_value end # there are nested Google API classes throughout when /Google::Apis::.*/ object.define_singleton_method name do if value.respond_to? :to_h value = value.to_h end GcpResourceProbe.new(value) end when 'Array' # Some things are just string or integer arrays # Check this by seeing if the first element is a string / integer / boolean or # a hashtable # This may not be the best method, but short of testing all elements in the array, this is # the quickest test # p value[0].class.to_s case value[0].class.to_s when 'String', 'Integer', 'TrueClass', 'FalseClass', 'Fixnum' probes = value else probes = [] value.each do |value_item| # p value_item if value_item.respond_to? :to_h value_item = value_item.to_h end probes << GcpResourceProbe.new(value_item) end end object.define_singleton_method name do probes end end end end # Class object that is created for each element that is returned by GCP. # This is what is interogated by Inspec. If they are nested hashes, then this results # in nested GcpResourceProbe objects. # # The methods for each of the classes are dynamically defined at run time and will # match the items that are retrieved from GCP. See the 'test/integration/verify/controls' for # examples # class GcpResourceProbe attr_reader :name, :type, :location, :item, :count # Initialize method for the class. Accepts an item, be it a scalar value, hash or GCP object # It will then create the necessary dynamic methods so that they can be called in the tests # This is accomplished by call the GcpResourceDynamicMethods # # @param varaint The item from which the class will be initialized # # @return GcpResourceProbe def initialize(item) dm = GcpResourceDynamicMethods.new dm.create_methods(self, item) # Set the item as a property on the class # This is so that it is possible to interrogate what has been added to the class and isolate them from # the standard methods that a Ruby class has. # This used for checking Tags on a resource for example # It also allows direct access if so required @item = item # Set how many items have been set @count = item.length if item.respond_to? :length end # Allows resources to respond to the include test # This means that things like tags can be checked for and then their value tested # # @param [String] key Name of the item to look for in the @item property def include?(key) @item.key?(key) end # Give a sting like `computer_name` return the camelCase version, e.g. # computerName # # @param string data Data that needs to be converted from snake_case to camelCase # # @return string def camel_case(data) camel_case_data = data.split('_').inject([]) { |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) }.join # Ensure that gb (as in gigabytes) is uppercased camel_case_data.gsub(/[gb]/, &:upcase) end end class GcpApiConnection def initialize @google_application_credentials = ENV['GOOGLE_APPLICATION_CREDENTIALS'] end def fetch_auth unless @service_account_file.nil? return Network::Authorization.new.for!( [ 'https://www.googleapis.com/auth/cloud-platform', ], ).from_google_credentials_json!( @google_application_credentials, ) end Network::Authorization.new.from_application_default! end def fetch(base_url, template, var_data, request_type = 'Get') get_request = Network::Base.new( build_uri(base_url, template, var_data), fetch_auth, request_type, ) return_if_object get_request.send end def fetch_all(base_url, template, var_data, request_type = 'Get') next_page(build_uri(base_url, template, var_data), request_type) end def next_page(uri, request_type, token = nil) next_hash = {} next_hash['pageToken'] = token unless token.nil? current_params = Hash[URI.decode_www_form(uri.query || '')].merge(next_hash) uri.query = URI.encode_www_form(current_params) get_request = Network::Base.new( uri, fetch_auth, request_type, ) result = JSON.parse(get_request.send.body) next_page_token = result['nextPageToken'] return [result] if next_page_token.nil? [result] + next_page(uri, request_type, next_page_token) end def return_if_object(response) raise "Bad response: #{response.body}" \ if response.is_a?(Net::HTTPBadRequest) raise "Bad response: #{response}" \ unless response.is_a?(Net::HTTPResponse) return if response.is_a?(Net::HTTPNotFound) return if response.is_a?(Net::HTTPNoContent) result = JSON.parse(response.body) raise_if_errors result, %w{error errors}, 'message' raise "Bad response: #{response}" unless response.is_a?(Net::HTTPOK) result end def raise_if_errors(response, err_path, msg_field) errors = self.class.navigate(response, err_path) raise_error(errors, msg_field) unless errors.nil? end def raise_error(errors, msg_field) raise IOError, ['Operation failed:', errors.map { |e| e[msg_field] }.join(', ')].join(' ') end def build_uri(base_url, template, var_data) URI.join( base_url, expand_variables(template, var_data), ) end # Allows fetching objects within a tree path. def self.navigate(source, path, default = nil) key = path.take(1)[0] path = path.drop(1) return default unless source.key?(key) result = source.fetch(key) return navigate(result, path, default) unless path.empty? result if path.empty? end def extract_variables(template) template.scan(/{{[^}]*}}/).map { |v| v.gsub(/{{([^}]*)}}/, '\1') } .map(&:to_sym) end def expand_variables(template, var_data) extract_variables(template).each do |v| unless var_data.key?(v) raise "Missing variable :#{v} in #{var_data} on #{caller.join("\n")}}" end template.gsub!(/{{#{v}}}/, var_data[v].to_s) end template end end # A handler for authenticated network request module Network class Base def initialize(link, cred, request_type) @link = link @cred = cred @request_type = request_type end def builder Net::HTTP.const_get(@request_type) end def send request = @cred.authorize(builder.new(@link)) request['User-Agent'] = generate_user_agent response = transport(request).request(request) unless ENV['GOOGLE_HTTP_VERBOSE'].nil? puts ["network(#{request}: [#{response.code}]", response.body.split("\n").map(&:strip).join(' ')].join(' ') end response end def transport(request) uri = request.uri puts "network(#{request}: #{uri})" \ unless ENV['GOOGLE_HTTP_VERBOSE'].nil? transport = Net::HTTP.new(uri.host, uri.port) transport.use_ssl = uri.is_a?(URI::HTTPS) transport.verify_mode = OpenSSL::SSL::VERIFY_PEER transport.set_debug_output $stderr \ unless ENV['GOOGLE_HTTP_DEBUG'].nil? transport end private def generate_user_agent 'inspec-google/1.0.0' end end # A class to aquire credentials and authorize Google API calls. class Authorization def initialize @authorization = nil @scopes = [] end def authorize(obj) raise ArgumentError, 'A from_* method needs to be called before' \ unless @authorization if obj.class <= URI::HTTPS || obj.class <= URI::HTTP authorize_uri obj elsif obj.class < Net::HTTPRequest authorize_http obj else obj.authorization = @authorization obj end end def for!(*scopes) @scopes = scopes self end def from_google_credentials_json!(credentials_file) raise 'Missing argument for scopes' if @scopes.empty? @authorization = ::Google::Auth::DefaultCredentials.make_creds( json_key_io: File.open(credentials_file), scope: @scopes, ) self end def from_application_default! @authorization = ::Google::Auth.get_application_default self end private def authorize_uri(obj) http = Net::HTTP.new(obj.host, obj.port) http.use_ssl = obj.instance_of?(URI::HTTPS) http.verify_mode = OpenSSL::SSL::VERIFY_PEER [http, authorize_http(Net::HTTP::Get.new(obj.request_uri))] end def authorize_http(req) req.extend TokenProperty auth = {} @authorization.apply!(auth) req['Authorization'] = auth[:authorization] req.token = auth[:authorization].split(' ')[1] req end end # Extension methods to enable retrieving the authentication token. module TokenProperty attr_accessor :token end end ================================================ FILE: generate/libraries/google/bigquery/property/dataset_access.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/dataset_access_view' module GoogleInSpec module BigQuery module Property class DatasetAccess attr_reader :arguments attr_reader :domain attr_reader :group_by_email attr_reader :role attr_reader :special_group attr_reader :user_by_email attr_reader :view def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @domain = arguments['domain'] @group_by_email = arguments['groupByEmail'] @role = arguments['role'] @special_group = arguments['specialGroup'] @user_by_email = arguments['userByEmail'] @view = GoogleInSpec::BigQuery::Property::DatasetAccessView.new(arguments['view'], to_s) end def to_s "#{@parent_identifier} DatasetAccess" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'domain' => ->(x, path) { x.nil? ? [] : ["its('#{path}.domain') { should cmp #{x.inspect} }"] }, 'group_by_email' => ->(x, path) { x.nil? ? [] : ["its('#{path}.group_by_email') { should cmp #{x.inspect} }"] }, 'role' => ->(x, path) { x.nil? ? [] : ["its('#{path}.role') { should cmp #{x.inspect} }"] }, 'special_group' => ->(x, path) { x.nil? ? [] : ["its('#{path}.special_group') { should cmp #{x.inspect} }"] }, 'user_by_email' => ->(x, path) { x.nil? ? [] : ["its('#{path}.user_by_email') { should cmp #{x.inspect} }"] }, 'view' => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::DatasetAccessView.un_parse(x, "#{path}.view") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class DatasetAccessArray def self.parse(value, parent_identifier) return if value.nil? return DatasetAccess.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| DatasetAccess.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| DatasetAccess.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/dataset_access_view.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class DatasetAccessView attr_reader :arguments attr_reader :dataset_id attr_reader :project_id attr_reader :table_id def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @dataset_id = arguments['datasetId'] @project_id = arguments['projectId'] @table_id = arguments['tableId'] end def to_s "#{@parent_identifier} DatasetAccessView" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'dataset_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.dataset_id') { should cmp #{x.inspect} }"] }, 'project_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, 'table_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.table_id') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/dataset_dataset_reference.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class DatasetDatasetReference attr_reader :arguments attr_reader :dataset_id attr_reader :project_id def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @dataset_id = arguments['datasetId'] @project_id = arguments['projectId'] end def to_s "#{@parent_identifier} DatasetDatasetReference" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'dataset_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.dataset_id') { should cmp #{x.inspect} }"] }, 'project_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/dataset_default_encryption_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class DatasetDefaultEncryptionConfiguration attr_reader :arguments attr_reader :kms_key_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @kms_key_name = arguments['kmsKeyName'] end def to_s "#{@parent_identifier} DatasetDefaultEncryptionConfiguration" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_encryption_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableEncryptionConfiguration attr_reader :arguments attr_reader :kms_key_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @kms_key_name = arguments['kmsKeyName'] end def to_s "#{@parent_identifier} TableEncryptionConfiguration" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_external_data_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_external_data_configuration_bigtable_options' require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' require 'google/bigquery/property/table_external_data_configuration_csv_options' require 'google/bigquery/property/table_external_data_configuration_google_sheets_options' require 'google/bigquery/property/table_external_data_configuration_schema' require 'google/bigquery/property/table_external_data_configuration_schema_fields' module GoogleInSpec module BigQuery module Property class TableExternalDataConfiguration attr_reader :arguments attr_reader :autodetect attr_reader :compression attr_reader :ignore_unknown_values attr_reader :max_bad_records attr_reader :source_format attr_reader :source_uris attr_reader :schema attr_reader :google_sheets_options attr_reader :csv_options attr_reader :bigtable_options def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @autodetect = arguments['autodetect'] @compression = arguments['compression'] @ignore_unknown_values = arguments['ignoreUnknownValues'] @max_bad_records = arguments['maxBadRecords'] @source_format = arguments['sourceFormat'] @source_uris = arguments['sourceUris'] @schema = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchema.new(arguments['schema'], to_s) @google_sheets_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationGoogleSheetsOptions.new(arguments['googleSheetsOptions'], to_s) @csv_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationCsvOptions.new(arguments['csvOptions'], to_s) @bigtable_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptions.new(arguments['bigtableOptions'], to_s) end def to_s "#{@parent_identifier} TableExternalDataConfiguration" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'autodetect' => ->(x, path) { x.nil? ? [] : ["its('#{path}.autodetect') { should cmp #{x.inspect} }"] }, 'compression' => ->(x, path) { x.nil? ? [] : ["its('#{path}.compression') { should cmp #{x.inspect} }"] }, 'ignore_unknown_values' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ignore_unknown_values') { should cmp #{x.inspect} }"] }, 'max_bad_records' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_bad_records') { should cmp #{x.inspect} }"] }, 'source_format' => ->(x, path) { x.nil? ? [] : ["its('#{path}.source_format') { should cmp #{x.inspect} }"] }, 'source_uris' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.source_uris') { should include #{single.inspect} }" } }, 'schema' => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchema.un_parse(x, "#{path}.schema") }, 'google_sheets_options' => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationGoogleSheetsOptions.un_parse(x, "#{path}.google_sheets_options") }, 'csv_options' => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationCsvOptions.un_parse(x, "#{path}.csv_options") }, 'bigtable_options' => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptions.un_parse(x, "#{path}.bigtable_options") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationBigtableOptions attr_reader :arguments attr_reader :ignore_unspecified_column_families attr_reader :read_rowkey_as_string attr_reader :column_families def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @ignore_unspecified_column_families = arguments['ignoreUnspecifiedColumnFamilies'] @read_rowkey_as_string = arguments['readRowkeyAsString'] @column_families = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesArray.parse(arguments['columnFamilies'], to_s) end def to_s "#{@parent_identifier} TableExternalDataConfigurationBigtableOptions" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'ignore_unspecified_column_families' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ignore_unspecified_column_families') { should cmp #{x.inspect} }"] }, 'read_rowkey_as_string' => ->(x, path) { x.nil? ? [] : ["its('#{path}.read_rowkey_as_string') { should cmp #{x.inspect} }"] }, 'column_families' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.column_families') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns' module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationBigtableOptionsColumnFamilies attr_reader :arguments attr_reader :columns attr_reader :encoding attr_reader :family_id attr_reader :only_read_latest attr_reader :type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @columns = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumnsArray.parse(arguments['columns'], to_s) @encoding = arguments['encoding'] @family_id = arguments['familyId'] @only_read_latest = arguments['onlyReadLatest'] @type = arguments['type'] end def to_s "#{@parent_identifier} TableExternalDataConfigurationBigtableOptionsColumnFamilies" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'columns' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.columns') { should include '#{single.to_json}' }" } }, 'encoding' => ->(x, path) { x.nil? ? [] : ["its('#{path}.encoding') { should cmp #{x.inspect} }"] }, 'family_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.family_id') { should cmp #{x.inspect} }"] }, 'only_read_latest' => ->(x, path) { x.nil? ? [] : ["its('#{path}.only_read_latest') { should cmp #{x.inspect} }"] }, 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class TableExternalDataConfigurationBigtableOptionsColumnFamiliesArray def self.parse(value, parent_identifier) return if value.nil? return TableExternalDataConfigurationBigtableOptionsColumnFamilies.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TableExternalDataConfigurationBigtableOptionsColumnFamilies.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| TableExternalDataConfigurationBigtableOptionsColumnFamilies.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumns attr_reader :arguments attr_reader :encoding attr_reader :field_name attr_reader :only_read_latest attr_reader :qualifier_string attr_reader :type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @encoding = arguments['encoding'] @field_name = arguments['fieldName'] @only_read_latest = arguments['onlyReadLatest'] @qualifier_string = arguments['qualifierString'] @type = arguments['type'] end def to_s "#{@parent_identifier} TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumns" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'encoding' => ->(x, path) { x.nil? ? [] : ["its('#{path}.encoding') { should cmp #{x.inspect} }"] }, 'field_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.field_name') { should cmp #{x.inspect} }"] }, 'only_read_latest' => ->(x, path) { x.nil? ? [] : ["its('#{path}.only_read_latest') { should cmp #{x.inspect} }"] }, 'qualifier_string' => ->(x, path) { x.nil? ? [] : ["its('#{path}.qualifier_string') { should cmp #{x.inspect} }"] }, 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumnsArray def self.parse(value, parent_identifier) return if value.nil? return TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumns.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumns.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumns.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_external_data_configuration_csv_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationCsvOptions attr_reader :arguments attr_reader :allow_jagged_rows attr_reader :allow_quoted_newlines attr_reader :encoding attr_reader :field_delimiter attr_reader :quote attr_reader :skip_leading_rows def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @allow_jagged_rows = arguments['allowJaggedRows'] @allow_quoted_newlines = arguments['allowQuotedNewlines'] @encoding = arguments['encoding'] @field_delimiter = arguments['fieldDelimiter'] @quote = arguments['quote'] @skip_leading_rows = arguments['skipLeadingRows'] end def to_s "#{@parent_identifier} TableExternalDataConfigurationCsvOptions" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'allow_jagged_rows' => ->(x, path) { x.nil? ? [] : ["its('#{path}.allow_jagged_rows') { should cmp #{x.inspect} }"] }, 'allow_quoted_newlines' => ->(x, path) { x.nil? ? [] : ["its('#{path}.allow_quoted_newlines') { should cmp #{x.inspect} }"] }, 'encoding' => ->(x, path) { x.nil? ? [] : ["its('#{path}.encoding') { should cmp #{x.inspect} }"] }, 'field_delimiter' => ->(x, path) { x.nil? ? [] : ["its('#{path}.field_delimiter') { should cmp #{x.inspect} }"] }, 'quote' => ->(x, path) { x.nil? ? [] : ["its('#{path}.quote') { should cmp #{x.inspect} }"] }, 'skip_leading_rows' => ->(x, path) { x.nil? ? [] : ["its('#{path}.skip_leading_rows') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_external_data_configuration_google_sheets_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationGoogleSheetsOptions attr_reader :arguments attr_reader :skip_leading_rows def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @skip_leading_rows = arguments['skipLeadingRows'] end def to_s "#{@parent_identifier} TableExternalDataConfigurationGoogleSheetsOptions" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'skip_leading_rows' => ->(x, path) { x.nil? ? [] : ["its('#{path}.skip_leading_rows') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_external_data_configuration_schema.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_external_data_configuration_schema_fields' module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationSchema attr_reader :arguments attr_reader :fields def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @fields = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchemaFieldsArray.parse(arguments['fields'], to_s) end def to_s "#{@parent_identifier} TableExternalDataConfigurationSchema" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'fields' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_external_data_configuration_schema_fields.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationSchemaFields attr_reader :arguments attr_reader :description attr_reader :fields attr_reader :mode attr_reader :name attr_reader :type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @description = arguments['description'] @fields = arguments['fields'] @mode = arguments['mode'] @name = arguments['name'] @type = arguments['type'] end def to_s "#{@parent_identifier} TableExternalDataConfigurationSchemaFields" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, 'fields' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include #{single.inspect} }" } }, 'mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class TableExternalDataConfigurationSchemaFieldsArray def self.parse(value, parent_identifier) return if value.nil? return TableExternalDataConfigurationSchemaFields.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TableExternalDataConfigurationSchemaFields.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| TableExternalDataConfigurationSchemaFields.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_schema.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_schema_fields' module GoogleInSpec module BigQuery module Property class TableSchema attr_reader :arguments attr_reader :fields def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @fields = GoogleInSpec::BigQuery::Property::TableSchemaFieldsArray.parse(arguments['fields'], to_s) end def to_s "#{@parent_identifier} TableSchema" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'fields' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_schema_fields.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableSchemaFields attr_reader :arguments attr_reader :description attr_reader :fields attr_reader :mode attr_reader :name attr_reader :type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @description = arguments['description'] @fields = arguments['fields'] @mode = arguments['mode'] @name = arguments['name'] @type = arguments['type'] end def to_s "#{@parent_identifier} TableSchemaFields" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, 'fields' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include #{single.inspect} }" } }, 'mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class TableSchemaFieldsArray def self.parse(value, parent_identifier) return if value.nil? return TableSchemaFields.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TableSchemaFields.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| TableSchemaFields.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_streaming_buffer.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableStreamingBuffer attr_reader :arguments attr_reader :estimated_bytes attr_reader :estimated_rows attr_reader :oldest_entry_time def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @estimated_bytes = arguments['estimatedBytes'] @estimated_rows = arguments['estimatedRows'] @oldest_entry_time = arguments['oldestEntryTime'] end def to_s "#{@parent_identifier} TableStreamingBuffer" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'estimated_bytes' => ->(x, path) { x.nil? ? [] : ["its('#{path}.estimated_bytes') { should cmp #{x.inspect} }"] }, 'estimated_rows' => ->(x, path) { x.nil? ? [] : ["its('#{path}.estimated_rows') { should cmp #{x.inspect} }"] }, 'oldest_entry_time' => ->(x, path) { x.nil? ? [] : ["its('#{path}.oldest_entry_time') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_table_reference.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableTableReference attr_reader :arguments attr_reader :dataset_id attr_reader :project_id attr_reader :table_id def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @dataset_id = arguments['datasetId'] @project_id = arguments['projectId'] @table_id = arguments['tableId'] end def to_s "#{@parent_identifier} TableTableReference" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'dataset_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.dataset_id') { should cmp #{x.inspect} }"] }, 'project_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, 'table_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.table_id') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_time_partitioning.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableTimePartitioning attr_reader :arguments attr_reader :expiration_ms attr_reader :field attr_reader :type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @expiration_ms = arguments['expirationMs'] @field = arguments['field'] @type = arguments['type'] end def to_s "#{@parent_identifier} TableTimePartitioning" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'expiration_ms' => ->(x, path) { x.nil? ? [] : ["its('#{path}.expiration_ms') { should cmp #{x.inspect} }"] }, 'field' => ->(x, path) { x.nil? ? [] : ["its('#{path}.field') { should cmp #{x.inspect} }"] }, 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_view.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_view_user_defined_function_resources' module GoogleInSpec module BigQuery module Property class TableView attr_reader :arguments attr_reader :use_legacy_sql attr_reader :user_defined_function_resources def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @use_legacy_sql = arguments['useLegacySql'] @user_defined_function_resources = GoogleInSpec::BigQuery::Property::TableViewUserDefinedFunctionResourcesArray.parse(arguments['userDefinedFunctionResources'], to_s) end def to_s "#{@parent_identifier} TableView" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'use_legacy_sql' => ->(x, path) { x.nil? ? [] : ["its('#{path}.use_legacy_sql') { should cmp #{x.inspect} }"] }, 'user_defined_function_resources' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.user_defined_function_resources') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/bigquery/property/table_view_user_defined_function_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableViewUserDefinedFunctionResources attr_reader :arguments attr_reader :inline_code attr_reader :resource_uri def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @inline_code = arguments['inlineCode'] @resource_uri = arguments['resourceUri'] end def to_s "#{@parent_identifier} TableViewUserDefinedFunctionResources" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'inline_code' => ->(x, path) { x.nil? ? [] : ["its('#{path}.inline_code') { should cmp #{x.inspect} }"] }, 'resource_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.resource_uri') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class TableViewUserDefinedFunctionResourcesArray def self.parse(value, parent_identifier) return if value.nil? return TableViewUserDefinedFunctionResources.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TableViewUserDefinedFunctionResources.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| TableViewUserDefinedFunctionResources.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/cloudbuild/property/trigger_build.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudbuild/property/trigger_build_steps' module GoogleInSpec module CloudBuild module Property class TriggerBuild attr_reader :arguments attr_reader :tags attr_reader :images attr_reader :steps def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @tags = arguments['tags'] @images = arguments['images'] @steps = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsArray.parse(arguments['steps'], to_s) end def to_s "#{@parent_identifier} TriggerBuild" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'tags' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, 'images' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.images') { should include #{single.inspect} }" } }, 'steps' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.steps') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/cloudbuild/property/trigger_build_steps.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudbuild/property/trigger_build_steps_volumes' module GoogleInSpec module CloudBuild module Property class TriggerBuildSteps attr_reader :arguments attr_reader :name attr_reader :args attr_reader :env attr_reader :id attr_reader :entrypoint attr_reader :dir attr_reader :secret_env attr_reader :timeout attr_reader :timing attr_reader :volumes attr_reader :wait_for def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @name = arguments['name'] @args = arguments['args'] @env = arguments['env'] @id = arguments['id'] @entrypoint = arguments['entrypoint'] @dir = arguments['dir'] @secret_env = arguments['secretEnv'] @timeout = arguments['timeout'] @timing = arguments['timing'] @volumes = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsVolumesArray.parse(arguments['volumes'], to_s) @wait_for = arguments['waitFor'] end def to_s "#{@parent_identifier} TriggerBuildSteps" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'args' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.args') { should include #{single.inspect} }" } }, 'env' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.env') { should include #{single.inspect} }" } }, 'id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.id') { should cmp #{x.inspect} }"] }, 'entrypoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.entrypoint') { should cmp #{x.inspect} }"] }, 'dir' => ->(x, path) { x.nil? ? [] : ["its('#{path}.dir') { should cmp #{x.inspect} }"] }, 'secret_env' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.secret_env') { should include #{single.inspect} }" } }, 'timeout' => ->(x, path) { x.nil? ? [] : ["its('#{path}.timeout') { should cmp #{x.inspect} }"] }, 'timing' => ->(x, path) { x.nil? ? [] : ["its('#{path}.timing') { should cmp #{x.inspect} }"] }, 'volumes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.volumes') { should include '#{single.to_json}' }" } }, 'wait_for' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.wait_for') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class TriggerBuildStepsArray def self.parse(value, parent_identifier) return if value.nil? return TriggerBuildSteps.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TriggerBuildSteps.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| TriggerBuildSteps.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/cloudbuild/property/trigger_build_steps_volumes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerBuildStepsVolumes attr_reader :arguments attr_reader :name attr_reader :path def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @name = arguments['name'] @path = arguments['path'] end def to_s "#{@parent_identifier} TriggerBuildStepsVolumes" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'path' => ->(x, path) { x.nil? ? [] : ["its('#{path}.path') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class TriggerBuildStepsVolumesArray def self.parse(value, parent_identifier) return if value.nil? return TriggerBuildStepsVolumes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TriggerBuildStepsVolumes.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| TriggerBuildStepsVolumes.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/cloudbuild/property/trigger_trigger_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerTriggerTemplate attr_reader :arguments attr_reader :project_id attr_reader :repo_name attr_reader :dir attr_reader :branch_name attr_reader :tag_name attr_reader :commit_sha def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @project_id = arguments['projectId'] @repo_name = arguments['repoName'] @dir = arguments['dir'] @branch_name = arguments['branchName'] @tag_name = arguments['tagName'] @commit_sha = arguments['commitSha'] end def to_s "#{@parent_identifier} TriggerTriggerTemplate" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'project_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, 'repo_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.repo_name') { should cmp #{x.inspect} }"] }, 'dir' => ->(x, path) { x.nil? ? [] : ["its('#{path}.dir') { should cmp #{x.inspect} }"] }, 'branch_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.branch_name') { should cmp #{x.inspect} }"] }, 'tag_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.tag_name') { should cmp #{x.inspect} }"] }, 'commit_sha' => ->(x, path) { x.nil? ? [] : ["its('#{path}.commit_sha') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/cloudfunctions/property/cloudfunction_event_trigger.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudFunctions module Property class CloudFunctionEventTrigger attr_reader :arguments attr_reader :event_type attr_reader :resource attr_reader :service def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @event_type = arguments['eventType'] @resource = arguments['resource'] @service = arguments['service'] end def to_s "#{@parent_identifier} CloudFunctionEventTrigger" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'event_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.event_type') { should cmp #{x.inspect} }"] }, 'resource' => ->(x, path) { x.nil? ? [] : ["its('#{path}.resource') { should cmp #{x.inspect} }"] }, 'service' => ->(x, path) { x.nil? ? [] : ["its('#{path}.service') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/cloudfunctions/property/cloudfunction_https_trigger.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudFunctions module Property class CloudFunctionHttpsTrigger attr_reader :arguments attr_reader :url def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @url = arguments['url'] end def to_s "#{@parent_identifier} CloudFunctionHttpsTrigger" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'url' => ->(x, path) { x.nil? ? [] : ["its('#{path}.url') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/cloudfunctions/property/cloudfunction_source_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudFunctions module Property class CloudFunctionSourceRepository attr_reader :arguments attr_reader :url attr_reader :deployed_url def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @url = arguments['url'] @deployed_url = arguments['deployedUrl'] end def to_s "#{@parent_identifier} CloudFunctionSourceRepository" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'url' => ->(x, path) { x.nil? ? [] : ["its('#{path}.url') { should cmp #{x.inspect} }"] }, 'deployed_url' => ->(x, path) { x.nil? ? [] : ["its('#{path}.deployed_url') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/autoscaler_autoscaling_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/autoscaler_autoscaling_policy_cpu_utilization' require 'google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations' require 'google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization' module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicy attr_reader :arguments attr_reader :min_num_replicas attr_reader :max_num_replicas attr_reader :cool_down_period_sec attr_reader :cpu_utilization attr_reader :custom_metric_utilizations attr_reader :load_balancing_utilization def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @min_num_replicas = arguments['minNumReplicas'] @max_num_replicas = arguments['maxNumReplicas'] @cool_down_period_sec = arguments['coolDownPeriodSec'] @cpu_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCpuUtilization.new(arguments['cpuUtilization'], to_s) @custom_metric_utilizations = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCustomMetricUtilizationsArray.parse(arguments['customMetricUtilizations'], to_s) @load_balancing_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyLoadBalancingUtilization.new(arguments['loadBalancingUtilization'], to_s) end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicy" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'min_num_replicas' => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_num_replicas') { should cmp #{x.inspect} }"] }, 'max_num_replicas' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_num_replicas') { should cmp #{x.inspect} }"] }, 'cool_down_period_sec' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cool_down_period_sec') { should cmp #{x.inspect} }"] }, 'cpu_utilization' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCpuUtilization.un_parse(x, "#{path}.cpu_utilization") }, 'custom_metric_utilizations' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.custom_metric_utilizations') { should include '#{single.to_json}' }" } }, 'load_balancing_utilization' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyLoadBalancingUtilization.un_parse(x, "#{path}.load_balancing_utilization") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/autoscaler_autoscaling_policy_cpu_utilization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyCpuUtilization attr_reader :arguments attr_reader :utilization_target def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @utilization_target = arguments['utilizationTarget'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyCpuUtilization" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'utilization_target' => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyCustomMetricUtilizations attr_reader :arguments attr_reader :metric attr_reader :utilization_target attr_reader :utilization_target_type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @metric = arguments['metric'] @utilization_target = arguments['utilizationTarget'] @utilization_target_type = arguments['utilizationTargetType'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyCustomMetricUtilizations" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'metric' => ->(x, path) { x.nil? ? [] : ["its('#{path}.metric') { should cmp #{x.inspect} }"] }, 'utilization_target' => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target') { should cmp #{x.inspect} }"] }, 'utilization_target_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target_type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class AutoscalerAutoscalingPolicyCustomMetricUtilizationsArray def self.parse(value, parent_identifier) return if value.nil? return AutoscalerAutoscalingPolicyCustomMetricUtilizations.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| AutoscalerAutoscalingPolicyCustomMetricUtilizations.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| AutoscalerAutoscalingPolicyCustomMetricUtilizations.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyLoadBalancingUtilization attr_reader :arguments attr_reader :utilization_target def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @utilization_target = arguments['utilizationTarget'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyLoadBalancingUtilization" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'utilization_target' => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/backendbucket_cdn_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendBucketCdnPolicy attr_reader :arguments attr_reader :signed_url_cache_max_age_sec def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @signed_url_cache_max_age_sec = arguments['signedUrlCacheMaxAgeSec'] end def to_s "#{@parent_identifier} BackendBucketCdnPolicy" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'signed_url_cache_max_age_sec' => ->(x, path) { x.nil? ? [] : ["its('#{path}.signed_url_cache_max_age_sec') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/backendservice_backends.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceBackends attr_reader :arguments attr_reader :balancing_mode attr_reader :capacity_scaler attr_reader :description attr_reader :group attr_reader :max_connections attr_reader :max_connections_per_instance attr_reader :max_connections_per_endpoint attr_reader :max_rate attr_reader :max_rate_per_instance attr_reader :max_rate_per_endpoint attr_reader :max_utilization def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @balancing_mode = arguments['balancingMode'] @capacity_scaler = arguments['capacityScaler'] @description = arguments['description'] @group = arguments['group'] @max_connections = arguments['maxConnections'] @max_connections_per_instance = arguments['maxConnectionsPerInstance'] @max_connections_per_endpoint = arguments['maxConnectionsPerEndpoint'] @max_rate = arguments['maxRate'] @max_rate_per_instance = arguments['maxRatePerInstance'] @max_rate_per_endpoint = arguments['maxRatePerEndpoint'] @max_utilization = arguments['maxUtilization'] end def to_s "#{@parent_identifier} BackendServiceBackends" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'balancing_mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.balancing_mode') { should cmp #{x.inspect} }"] }, 'capacity_scaler' => ->(x, path) { x.nil? ? [] : ["its('#{path}.capacity_scaler') { should cmp #{x.inspect} }"] }, 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, 'group' => ->(x, path) { x.nil? ? [] : ["its('#{path}.group') { should cmp #{x.inspect} }"] }, 'max_connections' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_connections') { should cmp #{x.inspect} }"] }, 'max_connections_per_instance' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_connections_per_instance') { should cmp #{x.inspect} }"] }, 'max_connections_per_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_connections_per_endpoint') { should cmp #{x.inspect} }"] }, 'max_rate' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_rate') { should cmp #{x.inspect} }"] }, 'max_rate_per_instance' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_rate_per_instance') { should cmp #{x.inspect} }"] }, 'max_rate_per_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_rate_per_endpoint') { should cmp #{x.inspect} }"] }, 'max_utilization' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_utilization') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class BackendServiceBackendsArray def self.parse(value, parent_identifier) return if value.nil? return BackendServiceBackends.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BackendServiceBackends.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| BackendServiceBackends.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/backendservice_cdn_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/backendservice_cdn_policy_cache_key_policy' module GoogleInSpec module Compute module Property class BackendServiceCdnPolicy attr_reader :arguments attr_reader :cache_key_policy attr_reader :signed_url_cache_max_age_sec def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @cache_key_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicyCacheKeyPolicy.new(arguments['cacheKeyPolicy'], to_s) @signed_url_cache_max_age_sec = arguments['signedUrlCacheMaxAgeSec'] end def to_s "#{@parent_identifier} BackendServiceCdnPolicy" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'cache_key_policy' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceCdnPolicyCacheKeyPolicy.un_parse(x, "#{path}.cache_key_policy") }, 'signed_url_cache_max_age_sec' => ->(x, path) { x.nil? ? [] : ["its('#{path}.signed_url_cache_max_age_sec') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/backendservice_cdn_policy_cache_key_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceCdnPolicyCacheKeyPolicy attr_reader :arguments attr_reader :include_host attr_reader :include_protocol attr_reader :include_query_string attr_reader :query_string_blacklist attr_reader :query_string_whitelist def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @include_host = arguments['includeHost'] @include_protocol = arguments['includeProtocol'] @include_query_string = arguments['includeQueryString'] @query_string_blacklist = arguments['queryStringBlacklist'] @query_string_whitelist = arguments['queryStringWhitelist'] end def to_s "#{@parent_identifier} BackendServiceCdnPolicyCacheKeyPolicy" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'include_host' => ->(x, path) { x.nil? ? [] : ["its('#{path}.include_host') { should cmp #{x.inspect} }"] }, 'include_protocol' => ->(x, path) { x.nil? ? [] : ["its('#{path}.include_protocol') { should cmp #{x.inspect} }"] }, 'include_query_string' => ->(x, path) { x.nil? ? [] : ["its('#{path}.include_query_string') { should cmp #{x.inspect} }"] }, 'query_string_blacklist' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.query_string_blacklist') { should include #{single.inspect} }" } }, 'query_string_whitelist' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.query_string_whitelist') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/backendservice_connection_draining.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceConnectionDraining attr_reader :arguments attr_reader :draining_timeout_sec def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @draining_timeout_sec = arguments['drainingTimeoutSec'] end def to_s "#{@parent_identifier} BackendServiceConnectionDraining" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'draining_timeout_sec' => ->(x, path) { x.nil? ? [] : ["its('#{path}.draining_timeout_sec') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/backendservice_iap.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceIap attr_reader :arguments attr_reader :enabled attr_reader :oauth2_client_id attr_reader :oauth2_client_secret attr_reader :oauth2_client_secret_sha256 def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @enabled = arguments['enabled'] @oauth2_client_id = arguments['oauth2ClientId'] @oauth2_client_secret = arguments['oauth2ClientSecret'] @oauth2_client_secret_sha256 = arguments['oauth2ClientSecretSha256'] end def to_s "#{@parent_identifier} BackendServiceIap" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'enabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, 'oauth2_client_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.oauth2_client_id') { should cmp #{x.inspect} }"] }, 'oauth2_client_secret' => ->(x, path) { x.nil? ? [] : ["its('#{path}.oauth2_client_secret') { should cmp #{x.inspect} }"] }, 'oauth2_client_secret_sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.oauth2_client_secret_sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/disk_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class DiskDiskEncryptionKey attr_reader :arguments attr_reader :raw_key attr_reader :sha256 attr_reader :kms_key_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @raw_key = arguments['rawKey'] @sha256 = arguments['sha256'] @kms_key_name = arguments['kmsKeyName'] end def to_s "#{@parent_identifier} DiskDiskEncryptionKey" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/disk_source_image_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class DiskSourceImageEncryptionKey attr_reader :arguments attr_reader :raw_key attr_reader :sha256 attr_reader :kms_key_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @raw_key = arguments['rawKey'] @sha256 = arguments['sha256'] @kms_key_name = arguments['kmsKeyName'] end def to_s "#{@parent_identifier} DiskSourceImageEncryptionKey" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/disk_source_snapshot_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class DiskSourceSnapshotEncryptionKey attr_reader :arguments attr_reader :raw_key attr_reader :kms_key_name attr_reader :sha256 def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @raw_key = arguments['rawKey'] @kms_key_name = arguments['kmsKeyName'] @sha256 = arguments['sha256'] end def to_s "#{@parent_identifier} DiskSourceSnapshotEncryptionKey" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/firewall_allowed.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class FirewallAllowed attr_reader :arguments attr_reader :ip_protocol attr_reader :ports def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @ip_protocol = arguments['IPProtocol'] @ports = arguments['ports'] end def to_s "#{@parent_identifier} FirewallAllowed" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'ip_protocol' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_protocol') { should cmp #{x.inspect} }"] }, 'ports' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.ports') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class FirewallAllowedArray def self.parse(value, parent_identifier) return if value.nil? return FirewallAllowed.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| FirewallAllowed.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| FirewallAllowed.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/firewall_denied.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class FirewallDenied attr_reader :arguments attr_reader :ip_protocol attr_reader :ports def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @ip_protocol = arguments['IPProtocol'] @ports = arguments['ports'] end def to_s "#{@parent_identifier} FirewallDenied" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'ip_protocol' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_protocol') { should cmp #{x.inspect} }"] }, 'ports' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.ports') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class FirewallDeniedArray def self.parse(value, parent_identifier) return if value.nil? return FirewallDenied.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| FirewallDenied.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| FirewallDenied.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/globalforwardingrule_metadata_filters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/globalforwardingrule_metadata_filters_filter_labels' module GoogleInSpec module Compute module Property class GlobalForwardingRuleMetadataFilters attr_reader :arguments attr_reader :filter_match_criteria attr_reader :filter_labels def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @filter_match_criteria = arguments['filterMatchCriteria'] @filter_labels = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersFilterLabelsArray.parse(arguments['filterLabels'], to_s) end def to_s "#{@parent_identifier} GlobalForwardingRuleMetadataFilters" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'filter_match_criteria' => ->(x, path) { x.nil? ? [] : ["its('#{path}.filter_match_criteria') { should cmp #{x.inspect} }"] }, 'filter_labels' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.filter_labels') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class GlobalForwardingRuleMetadataFiltersArray def self.parse(value, parent_identifier) return if value.nil? return GlobalForwardingRuleMetadataFilters.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| GlobalForwardingRuleMetadataFilters.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| GlobalForwardingRuleMetadataFilters.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class GlobalForwardingRuleMetadataFiltersFilterLabels attr_reader :arguments attr_reader :name attr_reader :value def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @name = arguments['name'] @value = arguments['value'] end def to_s "#{@parent_identifier} GlobalForwardingRuleMetadataFiltersFilterLabels" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'value' => ->(x, path) { x.nil? ? [] : ["its('#{path}.value') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class GlobalForwardingRuleMetadataFiltersFilterLabelsArray def self.parse(value, parent_identifier) return if value.nil? return GlobalForwardingRuleMetadataFiltersFilterLabels.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| GlobalForwardingRuleMetadataFiltersFilterLabels.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| GlobalForwardingRuleMetadataFiltersFilterLabels.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/healthcheck_http2_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckHttp2HealthCheck attr_reader :arguments attr_reader :host attr_reader :request_path attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @host = arguments['host'] @request_path = arguments['requestPath'] @response = arguments['response'] @port = arguments['port'] @port_name = arguments['portName'] @proxy_header = arguments['proxyHeader'] @port_specification = arguments['portSpecification'] end def to_s "#{@parent_identifier} HealthCheckHttp2HealthCheck" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'host' => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, 'request_path' => ->(x, path) { x.nil? ? [] : ["its('#{path}.request_path') { should cmp #{x.inspect} }"] }, 'response' => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, 'port_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, 'proxy_header' => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, 'port_specification' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/healthcheck_http_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckHttpHealthCheck attr_reader :arguments attr_reader :host attr_reader :request_path attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @host = arguments['host'] @request_path = arguments['requestPath'] @response = arguments['response'] @port = arguments['port'] @port_name = arguments['portName'] @proxy_header = arguments['proxyHeader'] @port_specification = arguments['portSpecification'] end def to_s "#{@parent_identifier} HealthCheckHttpHealthCheck" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'host' => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, 'request_path' => ->(x, path) { x.nil? ? [] : ["its('#{path}.request_path') { should cmp #{x.inspect} }"] }, 'response' => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, 'port_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, 'proxy_header' => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, 'port_specification' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/healthcheck_https_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckHttpsHealthCheck attr_reader :arguments attr_reader :host attr_reader :request_path attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @host = arguments['host'] @request_path = arguments['requestPath'] @response = arguments['response'] @port = arguments['port'] @port_name = arguments['portName'] @proxy_header = arguments['proxyHeader'] @port_specification = arguments['portSpecification'] end def to_s "#{@parent_identifier} HealthCheckHttpsHealthCheck" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'host' => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, 'request_path' => ->(x, path) { x.nil? ? [] : ["its('#{path}.request_path') { should cmp #{x.inspect} }"] }, 'response' => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, 'port_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, 'proxy_header' => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, 'port_specification' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/healthcheck_ssl_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckSslHealthCheck attr_reader :arguments attr_reader :request attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @request = arguments['request'] @response = arguments['response'] @port = arguments['port'] @port_name = arguments['portName'] @proxy_header = arguments['proxyHeader'] @port_specification = arguments['portSpecification'] end def to_s "#{@parent_identifier} HealthCheckSslHealthCheck" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'request' => ->(x, path) { x.nil? ? [] : ["its('#{path}.request') { should cmp #{x.inspect} }"] }, 'response' => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, 'port_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, 'proxy_header' => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, 'port_specification' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/healthcheck_tcp_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckTcpHealthCheck attr_reader :arguments attr_reader :request attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @request = arguments['request'] @response = arguments['response'] @port = arguments['port'] @port_name = arguments['portName'] @proxy_header = arguments['proxyHeader'] @port_specification = arguments['portSpecification'] end def to_s "#{@parent_identifier} HealthCheckTcpHealthCheck" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'request' => ->(x, path) { x.nil? ? [] : ["its('#{path}.request') { should cmp #{x.inspect} }"] }, 'response' => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, 'port_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, 'proxy_header' => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, 'port_specification' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instance_disks_disk_encryption_key' require 'google/compute/property/instance_disks_initialize_params' require 'google/compute/property/instance_disks_initialize_params_source_image_encryption_key' module GoogleInSpec module Compute module Property class InstanceDisks attr_reader :arguments attr_reader :auto_delete attr_reader :boot attr_reader :device_name attr_reader :disk_encryption_key attr_reader :index attr_reader :initialize_params attr_reader :interface attr_reader :mode attr_reader :source attr_reader :type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @auto_delete = arguments['autoDelete'] @boot = arguments['boot'] @device_name = arguments['deviceName'] @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksDiskEncryptionKey.new(arguments['diskEncryptionKey'], to_s) @index = arguments['index'] @initialize_params = GoogleInSpec::Compute::Property::InstanceDisksInitializeParams.new(arguments['initializeParams'], to_s) @interface = arguments['interface'] @mode = arguments['mode'] @source = arguments['source'] @type = arguments['type'] end def to_s "#{@parent_identifier} InstanceDisks" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'auto_delete' => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_delete') { should cmp #{x.inspect} }"] }, 'boot' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot') { should cmp #{x.inspect} }"] }, 'device_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.device_name') { should cmp #{x.inspect} }"] }, 'disk_encryption_key' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceDisksDiskEncryptionKey.un_parse(x, "#{path}.disk_encryption_key") }, 'index' => ->(x, path) { x.nil? ? [] : ["its('#{path}.index') { should cmp #{x.inspect} }"] }, 'initialize_params' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceDisksInitializeParams.un_parse(x, "#{path}.initialize_params") }, 'interface' => ->(x, path) { x.nil? ? [] : ["its('#{path}.interface') { should cmp #{x.inspect} }"] }, 'mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, 'source' => ->(x, path) { x.nil? ? [] : ["its('#{path}.source') { should cmp #{x.inspect} }"] }, 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceDisksArray def self.parse(value, parent_identifier) return if value.nil? return InstanceDisks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceDisks.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceDisks.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_disks_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceDisksDiskEncryptionKey attr_reader :arguments attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :sha256 def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @raw_key = arguments['rawKey'] @rsa_encrypted_key = arguments['rsaEncryptedKey'] @sha256 = arguments['sha256'] end def to_s "#{@parent_identifier} InstanceDisksDiskEncryptionKey" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, 'rsa_encrypted_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.rsa_encrypted_key') { should cmp #{x.inspect} }"] }, 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_disks_initialize_params.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instance_disks_initialize_params_source_image_encryption_key' module GoogleInSpec module Compute module Property class InstanceDisksInitializeParams attr_reader :arguments attr_reader :disk_name attr_reader :disk_size_gb attr_reader :disk_type attr_reader :source_image attr_reader :source_image_encryption_key def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @disk_name = arguments['diskName'] @disk_size_gb = arguments['diskSizeGb'] @disk_type = arguments['diskType'] @source_image = arguments['sourceImage'] @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksInitializeParamsSourceImageEncryptionKey.new(arguments['sourceImageEncryptionKey'], to_s) end def to_s "#{@parent_identifier} InstanceDisksInitializeParams" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'disk_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_name') { should cmp #{x.inspect} }"] }, 'disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, 'disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, 'source_image' => ->(x, path) { x.nil? ? [] : ["its('#{path}.source_image') { should cmp #{x.inspect} }"] }, 'source_image_encryption_key' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceDisksInitializeParamsSourceImageEncryptionKey.un_parse(x, "#{path}.source_image_encryption_key") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_disks_initialize_params_source_image_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceDisksInitializeParamsSourceImageEncryptionKey attr_reader :arguments attr_reader :raw_key attr_reader :sha256 def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @raw_key = arguments['rawKey'] @sha256 = arguments['sha256'] end def to_s "#{@parent_identifier} InstanceDisksInitializeParamsSourceImageEncryptionKey" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_guest_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceGuestAccelerators attr_reader :arguments attr_reader :accelerator_count attr_reader :accelerator_type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @accelerator_count = arguments['acceleratorCount'] @accelerator_type = arguments['acceleratorType'] end def to_s "#{@parent_identifier} InstanceGuestAccelerators" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'accelerator_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, 'accelerator_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceGuestAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceGuestAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceGuestAccelerators.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceGuestAccelerators.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_network_interfaces.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instance_network_interfaces_access_configs' require 'google/compute/property/instance_network_interfaces_alias_ip_ranges' module GoogleInSpec module Compute module Property class InstanceNetworkInterfaces attr_reader :arguments attr_reader :access_configs attr_reader :alias_ip_ranges attr_reader :name attr_reader :network attr_reader :network_ip attr_reader :subnetwork def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @access_configs = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAccessConfigsArray.parse(arguments['accessConfigs'], to_s) @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAliasIpRangesArray.parse(arguments['aliasIpRanges'], to_s) @name = arguments['name'] @network = arguments['network'] @network_ip = arguments['networkIP'] @subnetwork = arguments['subnetwork'] end def to_s "#{@parent_identifier} InstanceNetworkInterfaces" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'access_configs' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.access_configs') { should include '#{single.to_json}' }" } }, 'alias_ip_ranges' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.alias_ip_ranges') { should include '#{single.to_json}' }" } }, 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'network' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network') { should cmp #{x.inspect} }"] }, 'network_ip' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network_ip') { should cmp #{x.inspect} }"] }, 'subnetwork' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceNetworkInterfacesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceNetworkInterfaces.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceNetworkInterfaces.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceNetworkInterfaces.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_network_interfaces_access_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceNetworkInterfacesAccessConfigs attr_reader :arguments attr_reader :name attr_reader :nat_ip attr_reader :type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @name = arguments['name'] @nat_ip = arguments['natIP'] @type = arguments['type'] end def to_s "#{@parent_identifier} InstanceNetworkInterfacesAccessConfigs" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'nat_ip' => ->(x, path) { x.nil? ? [] : ["its('#{path}.nat_ip') { should cmp #{x.inspect} }"] }, 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceNetworkInterfacesAccessConfigsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceNetworkInterfacesAccessConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceNetworkInterfacesAccessConfigs.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceNetworkInterfacesAccessConfigs.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_network_interfaces_alias_ip_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceNetworkInterfacesAliasIpRanges attr_reader :arguments attr_reader :ip_cidr_range attr_reader :subnetwork_range_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @ip_cidr_range = arguments['ipCidrRange'] @subnetwork_range_name = arguments['subnetworkRangeName'] end def to_s "#{@parent_identifier} InstanceNetworkInterfacesAliasIpRanges" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'ip_cidr_range' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_cidr_range') { should cmp #{x.inspect} }"] }, 'subnetwork_range_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_range_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceNetworkInterfacesAliasIpRangesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceNetworkInterfacesAliasIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceNetworkInterfacesAliasIpRanges.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceNetworkInterfacesAliasIpRanges.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceScheduling attr_reader :arguments attr_reader :automatic_restart attr_reader :on_host_maintenance attr_reader :preemptible def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @automatic_restart = arguments['automaticRestart'] @on_host_maintenance = arguments['onHostMaintenance'] @preemptible = arguments['preemptible'] end def to_s "#{@parent_identifier} InstanceScheduling" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'automatic_restart' => ->(x, path) { x.nil? ? [] : ["its('#{path}.automatic_restart') { should cmp #{x.inspect} }"] }, 'on_host_maintenance' => ->(x, path) { x.nil? ? [] : ["its('#{path}.on_host_maintenance') { should cmp #{x.inspect} }"] }, 'preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_service_accounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceServiceAccounts attr_reader :arguments attr_reader :email attr_reader :scopes def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @email = arguments['email'] @scopes = arguments['scopes'] end def to_s "#{@parent_identifier} InstanceServiceAccounts" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'email' => ->(x, path) { x.nil? ? [] : ["its('#{path}.email') { should cmp #{x.inspect} }"] }, 'scopes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.scopes') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceServiceAccountsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceServiceAccounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceServiceAccounts.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceServiceAccounts.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_shielded_instance_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceShieldedInstanceConfig attr_reader :arguments attr_reader :enable_secure_boot attr_reader :enable_vtpm attr_reader :enable_integrity_monitoring def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @enable_secure_boot = arguments['enableSecureBoot'] @enable_vtpm = arguments['enableVtpm'] @enable_integrity_monitoring = arguments['enableIntegrityMonitoring'] end def to_s "#{@parent_identifier} InstanceShieldedInstanceConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'enable_secure_boot' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_secure_boot') { should cmp #{x.inspect} }"] }, 'enable_vtpm' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_vtpm') { should cmp #{x.inspect} }"] }, 'enable_integrity_monitoring' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_integrity_monitoring') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instance_tags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTags attr_reader :arguments attr_reader :fingerprint attr_reader :items def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @fingerprint = arguments['fingerprint'] @items = arguments['items'] end def to_s "#{@parent_identifier} InstanceTags" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'fingerprint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.fingerprint') { should cmp #{x.inspect} }"] }, 'items' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.items') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancegroupmanager_current_actions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceGroupManagerCurrentActions attr_reader :arguments attr_reader :abandoning attr_reader :creating attr_reader :creating_without_retries attr_reader :deleting attr_reader :none attr_reader :recreating attr_reader :refreshing attr_reader :restarting def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @abandoning = arguments['abandoning'] @creating = arguments['creating'] @creating_without_retries = arguments['creatingWithoutRetries'] @deleting = arguments['deleting'] @none = arguments['none'] @recreating = arguments['recreating'] @refreshing = arguments['refreshing'] @restarting = arguments['restarting'] end def to_s "#{@parent_identifier} InstanceGroupManagerCurrentActions" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'abandoning' => ->(x, path) { x.nil? ? [] : ["its('#{path}.abandoning') { should cmp #{x.inspect} }"] }, 'creating' => ->(x, path) { x.nil? ? [] : ["its('#{path}.creating') { should cmp #{x.inspect} }"] }, 'creating_without_retries' => ->(x, path) { x.nil? ? [] : ["its('#{path}.creating_without_retries') { should cmp #{x.inspect} }"] }, 'deleting' => ->(x, path) { x.nil? ? [] : ["its('#{path}.deleting') { should cmp #{x.inspect} }"] }, 'none' => ->(x, path) { x.nil? ? [] : ["its('#{path}.none') { should cmp #{x.inspect} }"] }, 'recreating' => ->(x, path) { x.nil? ? [] : ["its('#{path}.recreating') { should cmp #{x.inspect} }"] }, 'refreshing' => ->(x, path) { x.nil? ? [] : ["its('#{path}.refreshing') { should cmp #{x.inspect} }"] }, 'restarting' => ->(x, path) { x.nil? ? [] : ["its('#{path}.restarting') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancegroupmanager_named_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceGroupManagerNamedPorts attr_reader :arguments attr_reader :name attr_reader :port def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @name = arguments['name'] @port = arguments['port'] end def to_s "#{@parent_identifier} InstanceGroupManagerNamedPorts" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceGroupManagerNamedPortsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceGroupManagerNamedPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceGroupManagerNamedPorts.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceGroupManagerNamedPorts.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instancetemplate_properties_disks' require 'google/compute/property/instancetemplate_properties_guest_accelerators' require 'google/compute/property/instancetemplate_properties_network_interfaces' require 'google/compute/property/instancetemplate_properties_scheduling' require 'google/compute/property/instancetemplate_properties_service_accounts' require 'google/compute/property/instancetemplate_properties_tags' module GoogleInSpec module Compute module Property class InstanceTemplateProperties attr_reader :arguments attr_reader :can_ip_forward attr_reader :description attr_reader :disks attr_reader :labels attr_reader :machine_type attr_reader :min_cpu_platform attr_reader :metadata attr_reader :guest_accelerators attr_reader :network_interfaces attr_reader :scheduling attr_reader :service_accounts attr_reader :tags def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @can_ip_forward = arguments['canIpForward'] @description = arguments['description'] @disks = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksArray.parse(arguments['disks'], to_s) @labels = arguments['labels'] @machine_type = arguments['machineType'] @min_cpu_platform = arguments['minCpuPlatform'] @metadata = arguments['metadata'] @guest_accelerators = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesGuestAcceleratorsArray.parse(arguments['guestAccelerators'], to_s) @network_interfaces = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesArray.parse(arguments['networkInterfaces'], to_s) @scheduling = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesScheduling.new(arguments['scheduling'], to_s) @service_accounts = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesServiceAccountsArray.parse(arguments['serviceAccounts'], to_s) @tags = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesTags.new(arguments['tags'], to_s) end def to_s "#{@parent_identifier} InstanceTemplateProperties" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'can_ip_forward' => ->(x, path) { x.nil? ? [] : ["its('#{path}.can_ip_forward') { should cmp #{x.inspect} }"] }, 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, 'disks' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.disks') { should include '#{single.to_json}' }" } }, 'labels' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'machine_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type') { should cmp #{x.inspect} }"] }, 'min_cpu_platform' => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_cpu_platform') { should cmp #{x.inspect} }"] }, 'metadata' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'guest_accelerators' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.guest_accelerators') { should include '#{single.to_json}' }" } }, 'network_interfaces' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.network_interfaces') { should include '#{single.to_json}' }" } }, 'scheduling' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesScheduling.un_parse(x, "#{path}.scheduling") }, 'service_accounts' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.service_accounts') { should include '#{single.to_json}' }" } }, 'tags' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesTags.un_parse(x, "#{path}.tags") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instancetemplate_properties_disks_disk_encryption_key' require 'google/compute/property/instancetemplate_properties_disks_initialize_params' require 'google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key' module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesDisks attr_reader :arguments attr_reader :auto_delete attr_reader :boot attr_reader :device_name attr_reader :disk_encryption_key attr_reader :index attr_reader :initialize_params attr_reader :interface attr_reader :mode attr_reader :source attr_reader :type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @auto_delete = arguments['autoDelete'] @boot = arguments['boot'] @device_name = arguments['deviceName'] @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksDiskEncryptionKey.new(arguments['diskEncryptionKey'], to_s) @index = arguments['index'] @initialize_params = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParams.new(arguments['initializeParams'], to_s) @interface = arguments['interface'] @mode = arguments['mode'] @source = arguments['source'] @type = arguments['type'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesDisks" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'auto_delete' => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_delete') { should cmp #{x.inspect} }"] }, 'boot' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot') { should cmp #{x.inspect} }"] }, 'device_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.device_name') { should cmp #{x.inspect} }"] }, 'disk_encryption_key' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksDiskEncryptionKey.un_parse(x, "#{path}.disk_encryption_key") }, 'index' => ->(x, path) { x.nil? ? [] : ["its('#{path}.index') { should cmp #{x.inspect} }"] }, 'initialize_params' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParams.un_parse(x, "#{path}.initialize_params") }, 'interface' => ->(x, path) { x.nil? ? [] : ["its('#{path}.interface') { should cmp #{x.inspect} }"] }, 'mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, 'source' => ->(x, path) { x.nil? ? [] : ["its('#{path}.source') { should cmp #{x.inspect} }"] }, 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceTemplatePropertiesDisksArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesDisks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesDisks.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceTemplatePropertiesDisks.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_disks_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesDisksDiskEncryptionKey attr_reader :arguments attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :sha256 def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @raw_key = arguments['rawKey'] @rsa_encrypted_key = arguments['rsaEncryptedKey'] @sha256 = arguments['sha256'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesDisksDiskEncryptionKey" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, 'rsa_encrypted_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.rsa_encrypted_key') { should cmp #{x.inspect} }"] }, 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key' module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesDisksInitializeParams attr_reader :arguments attr_reader :disk_name attr_reader :disk_size_gb attr_reader :disk_type attr_reader :source_image attr_reader :source_image_encryption_key def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @disk_name = arguments['diskName'] @disk_size_gb = arguments['diskSizeGb'] @disk_type = arguments['diskType'] @source_image = arguments['sourceImage'] @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey.new(arguments['sourceImageEncryptionKey'], to_s) end def to_s "#{@parent_identifier} InstanceTemplatePropertiesDisksInitializeParams" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'disk_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_name') { should cmp #{x.inspect} }"] }, 'disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, 'disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, 'source_image' => ->(x, path) { x.nil? ? [] : ["its('#{path}.source_image') { should cmp #{x.inspect} }"] }, 'source_image_encryption_key' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey.un_parse(x, "#{path}.source_image_encryption_key") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey attr_reader :arguments attr_reader :raw_key attr_reader :sha256 def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @raw_key = arguments['rawKey'] @sha256 = arguments['sha256'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_guest_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesGuestAccelerators attr_reader :arguments attr_reader :accelerator_count attr_reader :accelerator_type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @accelerator_count = arguments['acceleratorCount'] @accelerator_type = arguments['acceleratorType'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesGuestAccelerators" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'accelerator_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, 'accelerator_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceTemplatePropertiesGuestAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesGuestAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesGuestAccelerators.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceTemplatePropertiesGuestAccelerators.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instancetemplate_properties_network_interfaces_access_configs' require 'google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges' module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesNetworkInterfaces attr_reader :arguments attr_reader :access_configs attr_reader :alias_ip_ranges attr_reader :name attr_reader :network attr_reader :network_ip attr_reader :subnetwork def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @access_configs = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAccessConfigsArray.parse(arguments['accessConfigs'], to_s) @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAliasIpRangesArray.parse(arguments['aliasIpRanges'], to_s) @name = arguments['name'] @network = arguments['network'] @network_ip = arguments['networkIP'] @subnetwork = arguments['subnetwork'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesNetworkInterfaces" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'access_configs' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.access_configs') { should include '#{single.to_json}' }" } }, 'alias_ip_ranges' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.alias_ip_ranges') { should include '#{single.to_json}' }" } }, 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'network' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network') { should cmp #{x.inspect} }"] }, 'network_ip' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network_ip') { should cmp #{x.inspect} }"] }, 'subnetwork' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceTemplatePropertiesNetworkInterfacesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesNetworkInterfaces.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesNetworkInterfaces.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceTemplatePropertiesNetworkInterfaces.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces_access_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesNetworkInterfacesAccessConfigs attr_reader :arguments attr_reader :name attr_reader :nat_ip attr_reader :type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @name = arguments['name'] @nat_ip = arguments['natIP'] @type = arguments['type'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesNetworkInterfacesAccessConfigs" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'nat_ip' => ->(x, path) { x.nil? ? [] : ["its('#{path}.nat_ip') { should cmp #{x.inspect} }"] }, 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceTemplatePropertiesNetworkInterfacesAccessConfigsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesNetworkInterfacesAccessConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesNetworkInterfacesAccessConfigs.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceTemplatePropertiesNetworkInterfacesAccessConfigs.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesNetworkInterfacesAliasIpRanges attr_reader :arguments attr_reader :ip_cidr_range attr_reader :subnetwork_range_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @ip_cidr_range = arguments['ipCidrRange'] @subnetwork_range_name = arguments['subnetworkRangeName'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesNetworkInterfacesAliasIpRanges" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'ip_cidr_range' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_cidr_range') { should cmp #{x.inspect} }"] }, 'subnetwork_range_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_range_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceTemplatePropertiesNetworkInterfacesAliasIpRangesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesNetworkInterfacesAliasIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesNetworkInterfacesAliasIpRanges.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceTemplatePropertiesNetworkInterfacesAliasIpRanges.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesScheduling attr_reader :arguments attr_reader :automatic_restart attr_reader :on_host_maintenance attr_reader :preemptible def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @automatic_restart = arguments['automaticRestart'] @on_host_maintenance = arguments['onHostMaintenance'] @preemptible = arguments['preemptible'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesScheduling" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'automatic_restart' => ->(x, path) { x.nil? ? [] : ["its('#{path}.automatic_restart') { should cmp #{x.inspect} }"] }, 'on_host_maintenance' => ->(x, path) { x.nil? ? [] : ["its('#{path}.on_host_maintenance') { should cmp #{x.inspect} }"] }, 'preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_service_accounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesServiceAccounts attr_reader :arguments attr_reader :email attr_reader :scopes def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @email = arguments['email'] @scopes = arguments['scopes'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesServiceAccounts" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'email' => ->(x, path) { x.nil? ? [] : ["its('#{path}.email') { should cmp #{x.inspect} }"] }, 'scopes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.scopes') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceTemplatePropertiesServiceAccountsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesServiceAccounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesServiceAccounts.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceTemplatePropertiesServiceAccounts.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/instancetemplate_properties_tags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesTags attr_reader :arguments attr_reader :fingerprint attr_reader :items def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @fingerprint = arguments['fingerprint'] @items = arguments['items'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesTags" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'fingerprint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.fingerprint') { should cmp #{x.inspect} }"] }, 'items' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.items') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/nodetemplate_node_type_flexibility.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NodeTemplateNodeTypeFlexibility attr_reader :arguments attr_reader :cpus attr_reader :memory attr_reader :local_ssd def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @cpus = arguments['cpus'] @memory = arguments['memory'] @local_ssd = arguments['localSsd'] end def to_s "#{@parent_identifier} NodeTemplateNodeTypeFlexibility" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'cpus' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cpus') { should cmp #{x.inspect} }"] }, 'memory' => ->(x, path) { x.nil? ? [] : ["its('#{path}.memory') { should cmp #{x.inspect} }"] }, 'local_ssd' => ->(x, path) { x.nil? ? [] : ["its('#{path}.local_ssd') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/region_deprecated.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionDeprecated attr_reader :arguments attr_reader :deleted attr_reader :deprecated attr_reader :obsolete attr_reader :replacement attr_reader :state def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @deleted = parse_time_string(arguments['deleted']) @deprecated = parse_time_string(arguments['deprecated']) @obsolete = parse_time_string(arguments['obsolete']) @replacement = arguments['replacement'] @state = arguments['state'] end def to_s "#{@parent_identifier} RegionDeprecated" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'deleted' => ->(x, path) { x.nil? ? [] : ["its('#{path}.deleted.to_s') { should cmp '#{x.inspect}' }"] }, 'deprecated' => ->(x, path) { x.nil? ? [] : ["its('#{path}.deprecated.to_s') { should cmp '#{x.inspect}' }"] }, 'obsolete' => ->(x, path) { x.nil? ? [] : ["its('#{path}.obsolete.to_s') { should cmp '#{x.inspect}' }"] }, 'replacement' => ->(x, path) { x.nil? ? [] : ["its('#{path}.replacement') { should cmp #{x.inspect} }"] }, 'state' => ->(x, path) { x.nil? ? [] : ["its('#{path}.state') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/region_quotas.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionQuotas attr_reader :arguments attr_reader :metric attr_reader :limit attr_reader :usage attr_reader :owner def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @metric = arguments['metric'] @limit = arguments['limit'] @usage = arguments['usage'] @owner = arguments['owner'] end def to_s "#{@parent_identifier} RegionQuotas" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'metric' => ->(x, path) { x.nil? ? [] : ["its('#{path}.metric') { should cmp #{x.inspect} }"] }, 'limit' => ->(x, path) { x.nil? ? [] : ["its('#{path}.limit') { should cmp #{x.inspect} }"] }, 'usage' => ->(x, path) { x.nil? ? [] : ["its('#{path}.usage') { should cmp #{x.inspect} }"] }, 'owner' => ->(x, path) { x.nil? ? [] : ["its('#{path}.owner') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class RegionQuotasArray def self.parse(value, parent_identifier) return if value.nil? return RegionQuotas.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionQuotas.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| RegionQuotas.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/regionbackendservice_backends.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceBackends attr_reader :arguments attr_reader :description attr_reader :group def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @description = arguments['description'] @group = arguments['group'] end def to_s "#{@parent_identifier} RegionBackendServiceBackends" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, 'group' => ->(x, path) { x.nil? ? [] : ["its('#{path}.group') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class RegionBackendServiceBackendsArray def self.parse(value, parent_identifier) return if value.nil? return RegionBackendServiceBackends.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionBackendServiceBackends.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| RegionBackendServiceBackends.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/regionbackendservice_connection_draining.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceConnectionDraining attr_reader :arguments attr_reader :draining_timeout_sec def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @draining_timeout_sec = arguments['drainingTimeoutSec'] end def to_s "#{@parent_identifier} RegionBackendServiceConnectionDraining" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'draining_timeout_sec' => ->(x, path) { x.nil? ? [] : ["its('#{path}.draining_timeout_sec') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/router_bgp.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/router_bgp_advertised_ip_ranges' module GoogleInSpec module Compute module Property class RouterBgp attr_reader :arguments attr_reader :asn attr_reader :advertise_mode attr_reader :advertised_groups attr_reader :advertised_ip_ranges def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @asn = arguments['asn'] @advertise_mode = arguments['advertiseMode'] @advertised_groups = arguments['advertisedGroups'] @advertised_ip_ranges = GoogleInSpec::Compute::Property::RouterBgpAdvertisedIpRangesArray.parse(arguments['advertisedIpRanges'], to_s) end def to_s "#{@parent_identifier} RouterBgp" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'asn' => ->(x, path) { x.nil? ? [] : ["its('#{path}.asn') { should cmp #{x.inspect} }"] }, 'advertise_mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.advertise_mode') { should cmp #{x.inspect} }"] }, 'advertised_groups' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.advertised_groups') { should include #{single.inspect} }" } }, 'advertised_ip_ranges' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.advertised_ip_ranges') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/router_bgp_advertised_ip_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RouterBgpAdvertisedIpRanges attr_reader :arguments attr_reader :range attr_reader :description def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @range = arguments['range'] @description = arguments['description'] end def to_s "#{@parent_identifier} RouterBgpAdvertisedIpRanges" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'range' => ->(x, path) { x.nil? ? [] : ["its('#{path}.range') { should cmp #{x.inspect} }"] }, 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class RouterBgpAdvertisedIpRangesArray def self.parse(value, parent_identifier) return if value.nil? return RouterBgpAdvertisedIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RouterBgpAdvertisedIpRanges.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| RouterBgpAdvertisedIpRanges.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/snapshot_snapshot_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class SnapshotSnapshotEncryptionKey attr_reader :arguments attr_reader :raw_key attr_reader :sha256 attr_reader :kms_key_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @raw_key = arguments['rawKey'] @sha256 = arguments['sha256'] @kms_key_name = arguments['kmsKeyName'] end def to_s "#{@parent_identifier} SnapshotSnapshotEncryptionKey" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/snapshot_source_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class SnapshotSourceDiskEncryptionKey attr_reader :arguments attr_reader :raw_key attr_reader :kms_key_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @raw_key = arguments['rawKey'] @kms_key_name = arguments['kmsKeyName'] end def to_s "#{@parent_identifier} SnapshotSourceDiskEncryptionKey" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/compute/property/sslpolicy_warnings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class SslPolicyWarnings attr_reader :arguments attr_reader :code attr_reader :message def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @code = arguments['code'] @message = arguments['message'] end def to_s "#{@parent_identifier} SslPolicyWarnings" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'code' => ->(x, path) { x.nil? ? [] : ["its('#{path}.code') { should cmp #{x.inspect} }"] }, 'message' => ->(x, path) { x.nil? ? [] : ["its('#{path}.message') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class SslPolicyWarningsArray def self.parse(value, parent_identifier) return if value.nil? return SslPolicyWarnings.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| SslPolicyWarnings.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| SslPolicyWarnings.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/urlmap_host_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapHostRules attr_reader :arguments attr_reader :description attr_reader :hosts attr_reader :path_matcher def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @description = arguments['description'] @hosts = arguments['hosts'] @path_matcher = arguments['pathMatcher'] end def to_s "#{@parent_identifier} UrlMapHostRules" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, 'hosts' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.hosts') { should include #{single.inspect} }" } }, 'path_matcher' => ->(x, path) { x.nil? ? [] : ["its('#{path}.path_matcher') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class UrlMapHostRulesArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapHostRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapHostRules.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| UrlMapHostRules.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/urlmap_path_matchers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_path_matchers_path_rules' module GoogleInSpec module Compute module Property class UrlMapPathMatchers attr_reader :arguments attr_reader :default_service attr_reader :description attr_reader :name attr_reader :path_rules def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @default_service = arguments['defaultService'] @description = arguments['description'] @name = arguments['name'] @path_rules = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesArray.parse(arguments['pathRules'], to_s) end def to_s "#{@parent_identifier} UrlMapPathMatchers" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'default_service' => ->(x, path) { x.nil? ? [] : ["its('#{path}.default_service') { should cmp #{x.inspect} }"] }, 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'path_rules' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.path_rules') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class UrlMapPathMatchersArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapPathMatchers.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapPathMatchers.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| UrlMapPathMatchers.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/urlmap_path_matchers_path_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersPathRules attr_reader :arguments attr_reader :paths attr_reader :service def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @paths = arguments['paths'] @service = arguments['service'] end def to_s "#{@parent_identifier} UrlMapPathMatchersPathRules" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'paths' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.paths') { should include #{single.inspect} }" } }, 'service' => ->(x, path) { x.nil? ? [] : ["its('#{path}.service') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class UrlMapPathMatchersPathRulesArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapPathMatchersPathRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapPathMatchersPathRules.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| UrlMapPathMatchersPathRules.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/compute/property/urlmap_tests.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapTests attr_reader :arguments attr_reader :description attr_reader :host attr_reader :path attr_reader :service def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @description = arguments['description'] @host = arguments['host'] @path = arguments['path'] @service = arguments['service'] end def to_s "#{@parent_identifier} UrlMapTests" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, 'host' => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, 'path' => ->(x, path) { x.nil? ? [] : ["its('#{path}.path') { should cmp #{x.inspect} }"] }, 'service' => ->(x, path) { x.nil? ? [] : ["its('#{path}.service') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class UrlMapTestsArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapTests.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapTests.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| UrlMapTests.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_addons_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling' require 'google/container/property/regionalcluster_addons_config_http_load_balancing' require 'google/container/property/regionalcluster_addons_config_kubernetes_dashboard' require 'google/container/property/regionalcluster_addons_config_network_policy_config' module GoogleInSpec module Container module Property class RegionalClusterAddonsConfig attr_reader :arguments attr_reader :http_load_balancing attr_reader :horizontal_pod_autoscaling attr_reader :kubernetes_dashboard attr_reader :network_policy_config def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @http_load_balancing = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHttpLoadBalancing.new(arguments['httpLoadBalancing'], to_s) @horizontal_pod_autoscaling = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHorizontalPodAutoscaling.new(arguments['horizontalPodAutoscaling'], to_s) @kubernetes_dashboard = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigKubernetesDashboard.new(arguments['kubernetesDashboard'], to_s) @network_policy_config = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigNetworkPolicyConfig.new(arguments['networkPolicyConfig'], to_s) end def to_s "#{@parent_identifier} RegionalClusterAddonsConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'http_load_balancing' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHttpLoadBalancing.un_parse(x, "#{path}.http_load_balancing") }, 'horizontal_pod_autoscaling' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHorizontalPodAutoscaling.un_parse(x, "#{path}.horizontal_pod_autoscaling") }, 'kubernetes_dashboard' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigKubernetesDashboard.un_parse(x, "#{path}.kubernetes_dashboard") }, 'network_policy_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigNetworkPolicyConfig.un_parse(x, "#{path}.network_policy_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterAddonsConfigHorizontalPodAutoscaling attr_reader :arguments attr_reader :disabled def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @disabled = arguments['disabled'] end def to_s "#{@parent_identifier} RegionalClusterAddonsConfigHorizontalPodAutoscaling" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'disabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_addons_config_http_load_balancing.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterAddonsConfigHttpLoadBalancing attr_reader :arguments attr_reader :disabled def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @disabled = arguments['disabled'] end def to_s "#{@parent_identifier} RegionalClusterAddonsConfigHttpLoadBalancing" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'disabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_addons_config_kubernetes_dashboard.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterAddonsConfigKubernetesDashboard attr_reader :arguments attr_reader :disabled def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @disabled = arguments['disabled'] end def to_s "#{@parent_identifier} RegionalClusterAddonsConfigKubernetesDashboard" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'disabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_addons_config_network_policy_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterAddonsConfigNetworkPolicyConfig attr_reader :arguments attr_reader :disabled def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @disabled = arguments['disabled'] end def to_s "#{@parent_identifier} RegionalClusterAddonsConfigNetworkPolicyConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'disabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_conditions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterConditions attr_reader :arguments attr_reader :code attr_reader :message def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @code = arguments['code'] @message = arguments['message'] end def to_s "#{@parent_identifier} RegionalClusterConditions" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'code' => ->(x, path) { x.nil? ? [] : ["its('#{path}.code') { should cmp #{x.inspect} }"] }, 'message' => ->(x, path) { x.nil? ? [] : ["its('#{path}.message') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class RegionalClusterConditionsArray def self.parse(value, parent_identifier) return if value.nil? return RegionalClusterConditions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionalClusterConditions.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| RegionalClusterConditions.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_default_max_pods_constraint.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterDefaultMaxPodsConstraint attr_reader :arguments attr_reader :max_pods_per_node def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @max_pods_per_node = arguments['maxPodsPerNode'] end def to_s "#{@parent_identifier} RegionalClusterDefaultMaxPodsConstraint" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'max_pods_per_node' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_pods_per_node') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_ip_allocation_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterIpAllocationPolicy attr_reader :arguments attr_reader :use_ip_aliases attr_reader :create_subnetwork attr_reader :subnetwork_name attr_reader :cluster_secondary_range_name attr_reader :services_secondary_range_name attr_reader :cluster_ipv4_cidr_block attr_reader :node_ipv4_cidr_block attr_reader :services_ipv4_cidr_block attr_reader :tpu_ipv4_cidr_block def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @use_ip_aliases = arguments['useIpAliases'] @create_subnetwork = arguments['createSubnetwork'] @subnetwork_name = arguments['subnetworkName'] @cluster_secondary_range_name = arguments['clusterSecondaryRangeName'] @services_secondary_range_name = arguments['servicesSecondaryRangeName'] @cluster_ipv4_cidr_block = arguments['clusterIpv4CidrBlock'] @node_ipv4_cidr_block = arguments['nodeIpv4CidrBlock'] @services_ipv4_cidr_block = arguments['servicesIpv4CidrBlock'] @tpu_ipv4_cidr_block = arguments['tpuIpv4CidrBlock'] end def to_s "#{@parent_identifier} RegionalClusterIpAllocationPolicy" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'use_ip_aliases' => ->(x, path) { x.nil? ? [] : ["its('#{path}.use_ip_aliases') { should cmp #{x.inspect} }"] }, 'create_subnetwork' => ->(x, path) { x.nil? ? [] : ["its('#{path}.create_subnetwork') { should cmp #{x.inspect} }"] }, 'subnetwork_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_name') { should cmp #{x.inspect} }"] }, 'cluster_secondary_range_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cluster_secondary_range_name') { should cmp #{x.inspect} }"] }, 'services_secondary_range_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.services_secondary_range_name') { should cmp #{x.inspect} }"] }, 'cluster_ipv4_cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cluster_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, 'node_ipv4_cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.node_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, 'services_ipv4_cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.services_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, 'tpu_ipv4_cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.tpu_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_legacy_abac.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterLegacyAbac attr_reader :arguments attr_reader :enabled def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @enabled = arguments['enabled'] end def to_s "#{@parent_identifier} RegionalClusterLegacyAbac" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'enabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_master_auth.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/regionalcluster_master_auth_client_certificate_config' module GoogleInSpec module Container module Property class RegionalClusterMasterAuth attr_reader :arguments attr_reader :username attr_reader :password attr_reader :client_certificate_config attr_reader :cluster_ca_certificate attr_reader :client_certificate attr_reader :client_key def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @username = arguments['username'] @password = arguments['password'] @client_certificate_config = GoogleInSpec::Container::Property::RegionalClusterMasterAuthClientCertificateConfig.new(arguments['clientCertificateConfig'], to_s) @cluster_ca_certificate = arguments['clusterCaCertificate'] @client_certificate = arguments['clientCertificate'] @client_key = arguments['clientKey'] end def to_s "#{@parent_identifier} RegionalClusterMasterAuth" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'username' => ->(x, path) { x.nil? ? [] : ["its('#{path}.username') { should cmp #{x.inspect} }"] }, 'password' => ->(x, path) { x.nil? ? [] : ["its('#{path}.password') { should cmp #{x.inspect} }"] }, 'client_certificate_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterMasterAuthClientCertificateConfig.un_parse(x, "#{path}.client_certificate_config") }, 'cluster_ca_certificate' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cluster_ca_certificate') { should cmp #{x.inspect} }"] }, 'client_certificate' => ->(x, path) { x.nil? ? [] : ["its('#{path}.client_certificate') { should cmp #{x.inspect} }"] }, 'client_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.client_key') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_master_auth_client_certificate_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterMasterAuthClientCertificateConfig attr_reader :arguments attr_reader :issue_client_certificate def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @issue_client_certificate = arguments['issueClientCertificate'] end def to_s "#{@parent_identifier} RegionalClusterMasterAuthClientCertificateConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'issue_client_certificate' => ->(x, path) { x.nil? ? [] : ["its('#{path}.issue_client_certificate') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_master_authorized_networks_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks' module GoogleInSpec module Container module Property class RegionalClusterMasterAuthorizedNetworksConfig attr_reader :arguments attr_reader :enabled attr_reader :cidr_blocks def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @enabled = arguments['enabled'] @cidr_blocks = GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfigCidrBlocksArray.parse(arguments['cidrBlocks'], to_s) end def to_s "#{@parent_identifier} RegionalClusterMasterAuthorizedNetworksConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'enabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, 'cidr_blocks' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.cidr_blocks') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterMasterAuthorizedNetworksConfigCidrBlocks attr_reader :arguments attr_reader :display_name attr_reader :cidr_block def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @display_name = arguments['displayName'] @cidr_block = arguments['cidrBlock'] end def to_s "#{@parent_identifier} RegionalClusterMasterAuthorizedNetworksConfigCidrBlocks" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'display_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.display_name') { should cmp #{x.inspect} }"] }, 'cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cidr_block') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class RegionalClusterMasterAuthorizedNetworksConfigCidrBlocksArray def self.parse(value, parent_identifier) return if value.nil? return RegionalClusterMasterAuthorizedNetworksConfigCidrBlocks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionalClusterMasterAuthorizedNetworksConfigCidrBlocks.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| RegionalClusterMasterAuthorizedNetworksConfigCidrBlocks.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_network_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterNetworkPolicy attr_reader :arguments attr_reader :provider attr_reader :enabled def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @provider = arguments['provider'] @enabled = arguments['enabled'] end def to_s "#{@parent_identifier} RegionalClusterNetworkPolicy" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'provider' => ->(x, path) { x.nil? ? [] : ["its('#{path}.provider') { should cmp #{x.inspect} }"] }, 'enabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_node_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/regionalcluster_node_config_accelerators' require 'google/container/property/regionalcluster_node_config_taints' module GoogleInSpec module Container module Property class RegionalClusterNodeConfig attr_reader :arguments attr_reader :machine_type attr_reader :disk_size_gb attr_reader :oauth_scopes attr_reader :service_account attr_reader :metadata attr_reader :image_type attr_reader :labels attr_reader :local_ssd_count attr_reader :tags attr_reader :preemptible attr_reader :accelerators attr_reader :disk_type attr_reader :min_cpu_platform attr_reader :taints def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @machine_type = arguments['machineType'] @disk_size_gb = arguments['diskSizeGb'] @oauth_scopes = arguments['oauthScopes'] @service_account = arguments['serviceAccount'] @metadata = arguments['metadata'] @image_type = arguments['imageType'] @labels = arguments['labels'] @local_ssd_count = arguments['localSsdCount'] @tags = arguments['tags'] @preemptible = arguments['preemptible'] @accelerators = GoogleInSpec::Container::Property::RegionalClusterNodeConfigAcceleratorsArray.parse(arguments['accelerators'], to_s) @disk_type = arguments['diskType'] @min_cpu_platform = arguments['minCpuPlatform'] @taints = GoogleInSpec::Container::Property::RegionalClusterNodeConfigTaintsArray.parse(arguments['taints'], to_s) end def to_s "#{@parent_identifier} RegionalClusterNodeConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'machine_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type') { should cmp #{x.inspect} }"] }, 'disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, 'oauth_scopes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.oauth_scopes') { should include #{single.inspect} }" } }, 'service_account' => ->(x, path) { x.nil? ? [] : ["its('#{path}.service_account') { should cmp #{x.inspect} }"] }, 'metadata' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'image_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_type') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'local_ssd_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.local_ssd_count') { should cmp #{x.inspect} }"] }, 'tags' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, 'preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, 'accelerators' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.accelerators') { should include '#{single.to_json}' }" } }, 'disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, 'min_cpu_platform' => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_cpu_platform') { should cmp #{x.inspect} }"] }, 'taints' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.taints') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_node_config_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterNodeConfigAccelerators attr_reader :arguments attr_reader :accelerator_count attr_reader :accelerator_type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @accelerator_count = arguments['acceleratorCount'] @accelerator_type = arguments['acceleratorType'] end def to_s "#{@parent_identifier} RegionalClusterNodeConfigAccelerators" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'accelerator_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, 'accelerator_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class RegionalClusterNodeConfigAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return RegionalClusterNodeConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionalClusterNodeConfigAccelerators.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| RegionalClusterNodeConfigAccelerators.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_node_config_taints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterNodeConfigTaints attr_reader :arguments attr_reader :key attr_reader :value attr_reader :effect def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @key = arguments['key'] @value = arguments['value'] @effect = arguments['effect'] end def to_s "#{@parent_identifier} RegionalClusterNodeConfigTaints" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.key') { should cmp #{x.inspect} }"] }, 'value' => ->(x, path) { x.nil? ? [] : ["its('#{path}.value') { should cmp #{x.inspect} }"] }, 'effect' => ->(x, path) { x.nil? ? [] : ["its('#{path}.effect') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class RegionalClusterNodeConfigTaintsArray def self.parse(value, parent_identifier) return if value.nil? return RegionalClusterNodeConfigTaints.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionalClusterNodeConfigTaints.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| RegionalClusterNodeConfigTaints.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalcluster_private_cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalClusterPrivateClusterConfig attr_reader :arguments attr_reader :enable_private_nodes attr_reader :enable_private_endpoint attr_reader :master_ipv4_cidr_block attr_reader :private_endpoint attr_reader :public_endpoint def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @enable_private_nodes = arguments['enablePrivateNodes'] @enable_private_endpoint = arguments['enablePrivateEndpoint'] @master_ipv4_cidr_block = arguments['masterIpv4CidrBlock'] @private_endpoint = arguments['privateEndpoint'] @public_endpoint = arguments['publicEndpoint'] end def to_s "#{@parent_identifier} RegionalClusterPrivateClusterConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'enable_private_nodes' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_private_nodes') { should cmp #{x.inspect} }"] }, 'enable_private_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_private_endpoint') { should cmp #{x.inspect} }"] }, 'master_ipv4_cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.master_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, 'private_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.private_endpoint') { should cmp #{x.inspect} }"] }, 'public_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.public_endpoint') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalnodepool_autoscaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalNodePoolAutoscaling attr_reader :arguments attr_reader :enabled attr_reader :min_node_count attr_reader :max_node_count def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @enabled = arguments['enabled'] @min_node_count = arguments['minNodeCount'] @max_node_count = arguments['maxNodeCount'] end def to_s "#{@parent_identifier} RegionalNodePoolAutoscaling" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'enabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, 'min_node_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_node_count') { should cmp #{x.inspect} }"] }, 'max_node_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_node_count') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalnodepool_conditions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalNodePoolConditions attr_reader :arguments attr_reader :code def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @code = arguments['code'] end def to_s "#{@parent_identifier} RegionalNodePoolConditions" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'code' => ->(x, path) { x.nil? ? [] : ["its('#{path}.code') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class RegionalNodePoolConditionsArray def self.parse(value, parent_identifier) return if value.nil? return RegionalNodePoolConditions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionalNodePoolConditions.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| RegionalNodePoolConditions.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalnodepool_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/regionalnodepool_config_accelerators' require 'google/container/property/regionalnodepool_config_taints' module GoogleInSpec module Container module Property class RegionalNodePoolConfig attr_reader :arguments attr_reader :machine_type attr_reader :disk_size_gb attr_reader :oauth_scopes attr_reader :service_account attr_reader :metadata attr_reader :image_type attr_reader :labels attr_reader :local_ssd_count attr_reader :tags attr_reader :preemptible attr_reader :accelerators attr_reader :disk_type attr_reader :min_cpu_platform attr_reader :taints def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @machine_type = arguments['machineType'] @disk_size_gb = arguments['diskSizeGb'] @oauth_scopes = arguments['oauthScopes'] @service_account = arguments['serviceAccount'] @metadata = arguments['metadata'] @image_type = arguments['imageType'] @labels = arguments['labels'] @local_ssd_count = arguments['localSsdCount'] @tags = arguments['tags'] @preemptible = arguments['preemptible'] @accelerators = GoogleInSpec::Container::Property::RegionalNodePoolConfigAcceleratorsArray.parse(arguments['accelerators'], to_s) @disk_type = arguments['diskType'] @min_cpu_platform = arguments['minCpuPlatform'] @taints = GoogleInSpec::Container::Property::RegionalNodePoolConfigTaintsArray.parse(arguments['taints'], to_s) end def to_s "#{@parent_identifier} RegionalNodePoolConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'machine_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type') { should cmp #{x.inspect} }"] }, 'disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, 'oauth_scopes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.oauth_scopes') { should include #{single.inspect} }" } }, 'service_account' => ->(x, path) { x.nil? ? [] : ["its('#{path}.service_account') { should cmp #{x.inspect} }"] }, 'metadata' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'image_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_type') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'local_ssd_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.local_ssd_count') { should cmp #{x.inspect} }"] }, 'tags' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, 'preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, 'accelerators' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.accelerators') { should include '#{single.to_json}' }" } }, 'disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, 'min_cpu_platform' => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_cpu_platform') { should cmp #{x.inspect} }"] }, 'taints' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.taints') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalnodepool_config_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalNodePoolConfigAccelerators attr_reader :arguments attr_reader :accelerator_count attr_reader :accelerator_type def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @accelerator_count = arguments['acceleratorCount'] @accelerator_type = arguments['acceleratorType'] end def to_s "#{@parent_identifier} RegionalNodePoolConfigAccelerators" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'accelerator_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, 'accelerator_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class RegionalNodePoolConfigAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return RegionalNodePoolConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionalNodePoolConfigAccelerators.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| RegionalNodePoolConfigAccelerators.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalnodepool_config_taints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalNodePoolConfigTaints attr_reader :arguments attr_reader :key attr_reader :value attr_reader :effect def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @key = arguments['key'] @value = arguments['value'] @effect = arguments['effect'] end def to_s "#{@parent_identifier} RegionalNodePoolConfigTaints" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.key') { should cmp #{x.inspect} }"] }, 'value' => ->(x, path) { x.nil? ? [] : ["its('#{path}.value') { should cmp #{x.inspect} }"] }, 'effect' => ->(x, path) { x.nil? ? [] : ["its('#{path}.effect') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class RegionalNodePoolConfigTaintsArray def self.parse(value, parent_identifier) return if value.nil? return RegionalNodePoolConfigTaints.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionalNodePoolConfigTaints.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| RegionalNodePoolConfigTaints.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalnodepool_management.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/regionalnodepool_management_upgrade_options' module GoogleInSpec module Container module Property class RegionalNodePoolManagement attr_reader :arguments attr_reader :auto_upgrade attr_reader :auto_repair attr_reader :upgrade_options def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @auto_upgrade = arguments['autoUpgrade'] @auto_repair = arguments['autoRepair'] @upgrade_options = GoogleInSpec::Container::Property::RegionalNodePoolManagementUpgradeOptions.new(arguments['upgradeOptions'], to_s) end def to_s "#{@parent_identifier} RegionalNodePoolManagement" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'auto_upgrade' => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_upgrade') { should cmp #{x.inspect} }"] }, 'auto_repair' => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_repair') { should cmp #{x.inspect} }"] }, 'upgrade_options' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolManagementUpgradeOptions.un_parse(x, "#{path}.upgrade_options") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalnodepool_management_upgrade_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalNodePoolManagementUpgradeOptions attr_reader :arguments attr_reader :auto_upgrade_start_time attr_reader :description def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @auto_upgrade_start_time = parse_time_string(arguments['autoUpgradeStartTime']) @description = arguments['description'] end def to_s "#{@parent_identifier} RegionalNodePoolManagementUpgradeOptions" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'auto_upgrade_start_time' => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_upgrade_start_time.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/container/property/regionalnodepool_max_pods_constraint.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class RegionalNodePoolMaxPodsConstraint attr_reader :arguments attr_reader :max_pods_per_node def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @max_pods_per_node = arguments['maxPodsPerNode'] end def to_s "#{@parent_identifier} RegionalNodePoolMaxPodsConstraint" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'max_pods_per_node' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_pods_per_node') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/cluster_config_encryption_config' require 'google/dataproc/property/cluster_config_gce_cluster_config' require 'google/dataproc/property/cluster_config_initialization_actions' require 'google/dataproc/property/cluster_config_master_config' require 'google/dataproc/property/cluster_config_master_config_disk_config' require 'google/dataproc/property/cluster_config_master_config_managed_group_config' require 'google/dataproc/property/cluster_config_secondary_worker_config' require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' require 'google/dataproc/property/cluster_config_security_config' require 'google/dataproc/property/cluster_config_security_config_kerberos_config' require 'google/dataproc/property/cluster_config_software_config' require 'google/dataproc/property/cluster_config_worker_config' require 'google/dataproc/property/cluster_config_worker_config_disk_config' require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' module GoogleInSpec module Dataproc module Property class ClusterConfig attr_reader :arguments attr_reader :config_bucket attr_reader :gce_cluster_config attr_reader :master_config attr_reader :worker_config attr_reader :secondary_worker_config attr_reader :software_config attr_reader :initialization_actions attr_reader :encryption_config attr_reader :security_config def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @config_bucket = arguments['configBucket'] @gce_cluster_config = GoogleInSpec::Dataproc::Property::ClusterConfigGceClusterConfig.new(arguments['gceClusterConfig'], to_s) @master_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfig.new(arguments['masterConfig'], to_s) @worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfig.new(arguments['workerConfig'], to_s) @secondary_worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfig.new(arguments['secondaryWorkerConfig'], to_s) @software_config = GoogleInSpec::Dataproc::Property::ClusterConfigSoftwareConfig.new(arguments['softwareConfig'], to_s) @initialization_actions = GoogleInSpec::Dataproc::Property::ClusterConfigInitializationActionsArray.parse(arguments['initializationActions'], to_s) @encryption_config = GoogleInSpec::Dataproc::Property::ClusterConfigEncryptionConfig.new(arguments['encryptionConfig'], to_s) @security_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfig.new(arguments['securityConfig'], to_s) end def to_s "#{@parent_identifier} ClusterConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'config_bucket' => ->(x, path) { x.nil? ? [] : ["its('#{path}.config_bucket') { should cmp #{x.inspect} }"] }, 'gce_cluster_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigGceClusterConfig.un_parse(x, "#{path}.gce_cluster_config") }, 'master_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfig.un_parse(x, "#{path}.master_config") }, 'worker_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfig.un_parse(x, "#{path}.worker_config") }, 'secondary_worker_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfig.un_parse(x, "#{path}.secondary_worker_config") }, 'software_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSoftwareConfig.un_parse(x, "#{path}.software_config") }, 'initialization_actions' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.initialization_actions') { should include '#{single.to_json}' }" } }, 'encryption_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigEncryptionConfig.un_parse(x, "#{path}.encryption_config") }, 'security_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfig.un_parse(x, "#{path}.security_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_encryption_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigEncryptionConfig attr_reader :arguments attr_reader :gce_pd_kms_key_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @gce_pd_kms_key_name = arguments['gcePdKmsKeyName'] end def to_s "#{@parent_identifier} ClusterConfigEncryptionConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'gce_pd_kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.gce_pd_kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_gce_cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigGceClusterConfig attr_reader :arguments attr_reader :zone_uri attr_reader :network_uri attr_reader :subnetwork_uri attr_reader :internal_ip_only attr_reader :service_account_scopes attr_reader :tags attr_reader :metadata def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @zone_uri = arguments['zoneUri'] @network_uri = arguments['networkUri'] @subnetwork_uri = arguments['subnetworkUri'] @internal_ip_only = arguments['internalIpOnly'] @service_account_scopes = arguments['serviceAccountScopes'] @tags = arguments['tags'] @metadata = arguments['metadata'] end def to_s "#{@parent_identifier} ClusterConfigGceClusterConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'zone_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.zone_uri') { should cmp #{x.inspect} }"] }, 'network_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network_uri') { should cmp #{x.inspect} }"] }, 'subnetwork_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_uri') { should cmp #{x.inspect} }"] }, 'internal_ip_only' => ->(x, path) { x.nil? ? [] : ["its('#{path}.internal_ip_only') { should cmp #{x.inspect} }"] }, 'service_account_scopes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.service_account_scopes') { should include #{single.inspect} }" } }, 'tags' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, 'metadata' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_initialization_actions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigInitializationActions attr_reader :arguments attr_reader :executable_file attr_reader :execution_timeout def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @executable_file = arguments['executableFile'] @execution_timeout = arguments['executionTimeout'] end def to_s "#{@parent_identifier} ClusterConfigInitializationActions" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'executable_file' => ->(x, path) { x.nil? ? [] : ["its('#{path}.executable_file') { should cmp #{x.inspect} }"] }, 'execution_timeout' => ->(x, path) { x.nil? ? [] : ["its('#{path}.execution_timeout') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class ClusterConfigInitializationActionsArray def self.parse(value, parent_identifier) return if value.nil? return ClusterConfigInitializationActions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ClusterConfigInitializationActions.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| ClusterConfigInitializationActions.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_master_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/cluster_config_master_config_disk_config' require 'google/dataproc/property/cluster_config_master_config_managed_group_config' module GoogleInSpec module Dataproc module Property class ClusterConfigMasterConfig attr_reader :arguments attr_reader :num_instances attr_reader :instance_names attr_reader :image_uri attr_reader :machine_type_uri attr_reader :disk_config attr_reader :is_preemptible attr_reader :managed_group_config def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @num_instances = arguments['numInstances'] @instance_names = arguments['instanceNames'] @image_uri = arguments['imageUri'] @machine_type_uri = arguments['machineTypeUri'] @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigDiskConfig.new(arguments['diskConfig'], to_s) @is_preemptible = arguments['isPreemptible'] @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigManagedGroupConfig.new(arguments['managedGroupConfig'], to_s) end def to_s "#{@parent_identifier} ClusterConfigMasterConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'num_instances' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_instances') { should cmp #{x.inspect} }"] }, 'instance_names' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.instance_names') { should include #{single.inspect} }" } }, 'image_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_uri') { should cmp #{x.inspect} }"] }, 'machine_type_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type_uri') { should cmp #{x.inspect} }"] }, 'disk_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigDiskConfig.un_parse(x, "#{path}.disk_config") }, 'is_preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.is_preemptible') { should cmp #{x.inspect} }"] }, 'managed_group_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigManagedGroupConfig.un_parse(x, "#{path}.managed_group_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_master_config_disk_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigMasterConfigDiskConfig attr_reader :arguments attr_reader :boot_disk_type attr_reader :boot_disk_size_gb attr_reader :num_local_ssds def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @boot_disk_type = arguments['bootDiskType'] @boot_disk_size_gb = arguments['bootDiskSizeGb'] @num_local_ssds = arguments['numLocalSsds'] end def to_s "#{@parent_identifier} ClusterConfigMasterConfigDiskConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'boot_disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_type') { should cmp #{x.inspect} }"] }, 'boot_disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_size_gb') { should cmp #{x.inspect} }"] }, 'num_local_ssds' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_local_ssds') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_master_config_managed_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigMasterConfigManagedGroupConfig attr_reader :arguments attr_reader :instance_template_name attr_reader :instance_group_manager_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @instance_template_name = arguments['instanceTemplateName'] @instance_group_manager_name = arguments['instanceGroupManagerName'] end def to_s "#{@parent_identifier} ClusterConfigMasterConfigManagedGroupConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'instance_template_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_template_name') { should cmp #{x.inspect} }"] }, 'instance_group_manager_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_group_manager_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' module GoogleInSpec module Dataproc module Property class ClusterConfigSecondaryWorkerConfig attr_reader :arguments attr_reader :num_instances attr_reader :instance_names attr_reader :image_uri attr_reader :machine_type_uri attr_reader :disk_config attr_reader :is_preemptible attr_reader :managed_group_config def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @num_instances = arguments['numInstances'] @instance_names = arguments['instanceNames'] @image_uri = arguments['imageUri'] @machine_type_uri = arguments['machineTypeUri'] @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigDiskConfig.new(arguments['diskConfig'], to_s) @is_preemptible = arguments['isPreemptible'] @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigManagedGroupConfig.new(arguments['managedGroupConfig'], to_s) end def to_s "#{@parent_identifier} ClusterConfigSecondaryWorkerConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'num_instances' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_instances') { should cmp #{x.inspect} }"] }, 'instance_names' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.instance_names') { should include #{single.inspect} }" } }, 'image_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_uri') { should cmp #{x.inspect} }"] }, 'machine_type_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type_uri') { should cmp #{x.inspect} }"] }, 'disk_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigDiskConfig.un_parse(x, "#{path}.disk_config") }, 'is_preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.is_preemptible') { should cmp #{x.inspect} }"] }, 'managed_group_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigManagedGroupConfig.un_parse(x, "#{path}.managed_group_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config_disk_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigSecondaryWorkerConfigDiskConfig attr_reader :arguments attr_reader :boot_disk_type attr_reader :boot_disk_size_gb attr_reader :num_local_ssds def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @boot_disk_type = arguments['bootDiskType'] @boot_disk_size_gb = arguments['bootDiskSizeGb'] @num_local_ssds = arguments['numLocalSsds'] end def to_s "#{@parent_identifier} ClusterConfigSecondaryWorkerConfigDiskConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'boot_disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_type') { should cmp #{x.inspect} }"] }, 'boot_disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_size_gb') { should cmp #{x.inspect} }"] }, 'num_local_ssds' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_local_ssds') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigSecondaryWorkerConfigManagedGroupConfig attr_reader :arguments attr_reader :instance_template_name attr_reader :instance_group_manager_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @instance_template_name = arguments['instanceTemplateName'] @instance_group_manager_name = arguments['instanceGroupManagerName'] end def to_s "#{@parent_identifier} ClusterConfigSecondaryWorkerConfigManagedGroupConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'instance_template_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_template_name') { should cmp #{x.inspect} }"] }, 'instance_group_manager_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_group_manager_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_security_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/cluster_config_security_config_kerberos_config' module GoogleInSpec module Dataproc module Property class ClusterConfigSecurityConfig attr_reader :arguments attr_reader :kerberos_config def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @kerberos_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfigKerberosConfig.new(arguments['kerberosConfig'], to_s) end def to_s "#{@parent_identifier} ClusterConfigSecurityConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'kerberos_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfigKerberosConfig.un_parse(x, "#{path}.kerberos_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_security_config_kerberos_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigSecurityConfigKerberosConfig attr_reader :arguments attr_reader :enable_kerberos attr_reader :rootprincipal_password_uri attr_reader :kms_key_uri attr_reader :keystore_uri attr_reader :truststore_uri attr_reader :key_password_uri attr_reader :truststore_password_uri attr_reader :cross_realm_trust_realm attr_reader :cross_realm_trust_admin_server attr_reader :cross_realm_trust_shared_password_uri attr_reader :kdc_db_key_uri attr_reader :tgt_lifetime_hours attr_reader :realm def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @enable_kerberos = arguments['enableKerberos'] @rootprincipal_password_uri = arguments['rootprincipalPasswordUri'] @kms_key_uri = arguments['kmsKeyUri'] @keystore_uri = arguments['keystoreUri'] @truststore_uri = arguments['truststoreUri'] @key_password_uri = arguments['keyPasswordUri'] @truststore_password_uri = arguments['truststorePasswordUri'] @cross_realm_trust_realm = arguments['crossRealmTrustRealm'] @cross_realm_trust_admin_server = arguments['crossRealmTrustAdminServer'] @cross_realm_trust_shared_password_uri = arguments['crossRealmTrustSharedPasswordUri'] @kdc_db_key_uri = arguments['kdcDbKeyUri'] @tgt_lifetime_hours = arguments['tgtLifetimeHours'] @realm = arguments['realm'] end def to_s "#{@parent_identifier} ClusterConfigSecurityConfigKerberosConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'enable_kerberos' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_kerberos') { should cmp #{x.inspect} }"] }, 'rootprincipal_password_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.rootprincipal_password_uri') { should cmp #{x.inspect} }"] }, 'kms_key_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_uri') { should cmp #{x.inspect} }"] }, 'keystore_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.keystore_uri') { should cmp #{x.inspect} }"] }, 'truststore_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.truststore_uri') { should cmp #{x.inspect} }"] }, 'key_password_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.key_password_uri') { should cmp #{x.inspect} }"] }, 'truststore_password_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.truststore_password_uri') { should cmp #{x.inspect} }"] }, 'cross_realm_trust_realm' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cross_realm_trust_realm') { should cmp #{x.inspect} }"] }, 'cross_realm_trust_admin_server' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cross_realm_trust_admin_server') { should cmp #{x.inspect} }"] }, 'cross_realm_trust_shared_password_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cross_realm_trust_shared_password_uri') { should cmp #{x.inspect} }"] }, 'kdc_db_key_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kdc_db_key_uri') { should cmp #{x.inspect} }"] }, 'tgt_lifetime_hours' => ->(x, path) { x.nil? ? [] : ["its('#{path}.tgt_lifetime_hours') { should cmp #{x.inspect} }"] }, 'realm' => ->(x, path) { x.nil? ? [] : ["its('#{path}.realm') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_software_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigSoftwareConfig attr_reader :arguments attr_reader :image_version attr_reader :properties attr_reader :optional_components def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @image_version = arguments['imageVersion'] @properties = arguments['properties'] @optional_components = arguments['optionalComponents'] end def to_s "#{@parent_identifier} ClusterConfigSoftwareConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'image_version' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_version') { should cmp #{x.inspect} }"] }, 'properties' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.properties') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'optional_components' => ->(x, path) { x.nil? ? [] : ["its('#{path}.optional_components') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_worker_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/cluster_config_worker_config_disk_config' require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' module GoogleInSpec module Dataproc module Property class ClusterConfigWorkerConfig attr_reader :arguments attr_reader :num_instances attr_reader :instance_names attr_reader :image_uri attr_reader :machine_type_uri attr_reader :disk_config attr_reader :is_preemptible attr_reader :managed_group_config def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @num_instances = arguments['numInstances'] @instance_names = arguments['instanceNames'] @image_uri = arguments['imageUri'] @machine_type_uri = arguments['machineTypeUri'] @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigDiskConfig.new(arguments['diskConfig'], to_s) @is_preemptible = arguments['isPreemptible'] @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigManagedGroupConfig.new(arguments['managedGroupConfig'], to_s) end def to_s "#{@parent_identifier} ClusterConfigWorkerConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'num_instances' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_instances') { should cmp #{x.inspect} }"] }, 'instance_names' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.instance_names') { should include #{single.inspect} }" } }, 'image_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_uri') { should cmp #{x.inspect} }"] }, 'machine_type_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type_uri') { should cmp #{x.inspect} }"] }, 'disk_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigDiskConfig.un_parse(x, "#{path}.disk_config") }, 'is_preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.is_preemptible') { should cmp #{x.inspect} }"] }, 'managed_group_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigManagedGroupConfig.un_parse(x, "#{path}.managed_group_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_worker_config_disk_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigWorkerConfigDiskConfig attr_reader :arguments attr_reader :boot_disk_type attr_reader :boot_disk_size_gb attr_reader :num_local_ssds def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @boot_disk_type = arguments['bootDiskType'] @boot_disk_size_gb = arguments['bootDiskSizeGb'] @num_local_ssds = arguments['numLocalSsds'] end def to_s "#{@parent_identifier} ClusterConfigWorkerConfigDiskConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'boot_disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_type') { should cmp #{x.inspect} }"] }, 'boot_disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_size_gb') { should cmp #{x.inspect} }"] }, 'num_local_ssds' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_local_ssds') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/dataproc/property/cluster_config_worker_config_managed_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigWorkerConfigManagedGroupConfig attr_reader :arguments attr_reader :instance_template_name attr_reader :instance_group_manager_name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @instance_template_name = arguments['instanceTemplateName'] @instance_group_manager_name = arguments['instanceGroupManagerName'] end def to_s "#{@parent_identifier} ClusterConfigWorkerConfigManagedGroupConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'instance_template_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_template_name') { should cmp #{x.inspect} }"] }, 'instance_group_manager_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_group_manager_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/filestore/property/instance_file_shares.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Filestore module Property class InstanceFileShares attr_reader :arguments attr_reader :name attr_reader :capacity_gb def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @name = arguments['name'] @capacity_gb = arguments['capacityGb'] end def to_s "#{@parent_identifier} InstanceFileShares" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, 'capacity_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.capacity_gb') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceFileSharesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceFileShares.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceFileShares.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceFileShares.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/filestore/property/instance_networks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Filestore module Property class InstanceNetworks attr_reader :arguments attr_reader :network attr_reader :modes attr_reader :reserved_ip_range attr_reader :ip_addresses def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @network = arguments['network'] @modes = arguments['modes'] @reserved_ip_range = arguments['reservedIpRange'] @ip_addresses = arguments['ipAddresses'] end def to_s "#{@parent_identifier} InstanceNetworks" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'network' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network') { should cmp #{x.inspect} }"] }, 'modes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.modes') { should include #{single.inspect} }" } }, 'reserved_ip_range' => ->(x, path) { x.nil? ? [] : ["its('#{path}.reserved_ip_range') { should cmp #{x.inspect} }"] }, 'ip_addresses' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.ip_addresses') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end class InstanceNetworksArray def self.parse(value, parent_identifier) return if value.nil? return InstanceNetworks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceNetworks.new(v, parent_identifier) } end def self.un_parse(arr, path) return if arr.nil? value.map { |v| InstanceNetworks.un_parse(v, path) } end end end end end ================================================ FILE: generate/libraries/google/iam/property/iam_policy_audit_configs.rb ================================================ # frozen_string_literal: false # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'google/iam/property/iam_policy_audit_configs_audit_log_configs' module GoogleInSpec module Iam module Property class IamPolicyAuditConfigs attr_reader :service attr_reader :audit_log_configs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service = args['service'] @audit_log_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsAuditLogConfigsArray.parse(args['auditLogConfigs'], to_s) end def to_s "#{@parent_identifier} IamPolicyAuditConfigs" end end class IamPolicyAuditConfigsArray def self.parse(value, parent_identifier) return if value.nil? return IamPolicyAuditConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| IamPolicyAuditConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: generate/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb ================================================ # frozen_string_literal: false # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module GoogleInSpec module Iam module Property class IamPolicyAuditConfigsAuditLogConfigs attr_reader :log_type attr_reader :exempted_members def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @log_type = args['logType'] @exempted_members = args['exemptedMembers'] end def to_s "#{@parent_identifier} IamPolicyAuditConfigsAuditLogConfigs" end end class IamPolicyAuditConfigsAuditLogConfigsArray def self.parse(value, parent_identifier) return if value.nil? return IamPolicyAuditConfigsAuditLogConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| IamPolicyAuditConfigsAuditLogConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: generate/libraries/google/iam/property/iam_policy_bindings.rb ================================================ # frozen_string_literal: false # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module GoogleInSpec module Iam module Property class IamPolicyBindings attr_reader :role attr_reader :members def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @role = args['role'] @members = args['members'] end def to_s "#{@parent_identifier} IamPolicyBindings" end end class IamPolicyBindingsArray def self.parse(value, parent_identifier) return if value.nil? return IamPolicyBindings.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| IamPolicyBindings.new(v, parent_identifier) } end end end end end ================================================ FILE: generate/libraries/google/mlengine/property/model_default_version.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module MLEngine module Property class ModelDefaultVersion attr_reader :arguments attr_reader :name def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @name = arguments['name'] end def to_s "#{@parent_identifier} ModelDefaultVersion" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/pubsub/property/subscription_expiration_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Pubsub module Property class SubscriptionExpirationPolicy attr_reader :arguments attr_reader :ttl def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @ttl = arguments['ttl'] end def to_s "#{@parent_identifier} SubscriptionExpirationPolicy" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'ttl' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ttl') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/pubsub/property/subscription_push_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Pubsub module Property class SubscriptionPushConfig attr_reader :arguments attr_reader :push_endpoint attr_reader :attributes def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @push_endpoint = arguments['pushEndpoint'] @attributes = arguments['attributes'] end def to_s "#{@parent_identifier} SubscriptionPushConfig" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'push_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.push_endpoint') { should cmp #{x.inspect} }"] }, 'attributes' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.attributes') { should include(#{k.inspect} => #{v.inspect}) }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/pubsub/property/topic_message_storage_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Pubsub module Property class TopicMessageStoragePolicy attr_reader :arguments attr_reader :allowed_persistence_regions def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier @allowed_persistence_regions = arguments['allowedPersistenceRegions'] end def to_s "#{@parent_identifier} TopicMessageStoragePolicy" end def self.un_parse(item, current_path) return if item.nil? way_to_parse = { 'allowed_persistence_regions' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.allowed_persistence_regions') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) end end def to_json(*_args) @arguments.to_json end # other is a string representation of this object def ==(other) @arguments == JSON.parse(other) end end end end end ================================================ FILE: generate/libraries/google/resourcemanager/property/organizationpolicy_boolean_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module ResourceManager module Property class OrganizationPolicyBooleanPolicy attr_reader :enforced def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enforced = args['enforced'] end def to_s "#{@parent_identifier} OrganizationPolicyBooleanPolicy" end end end end end ================================================ FILE: generate/libraries/google/resourcemanager/property/organizationpolicy_list_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module ResourceManager module Property class OrganizationPolicyListPolicy attr_reader :allowed_values attr_reader :denied_values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allowed_values = args['allowedValues'] @denied_values = args['deniedValues'] end def to_s "#{@parent_identifier} OrganizationPolicyListPolicy" end end end end end ================================================ FILE: generate/libraries/google_appengine_standard_app_version.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage App Engine resources. class AppEngineStandardAppVersion < GcpResourceBase name 'google_appengine_standard_app_version' desc 'StandardAppVersion' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :version_id attr_reader :runtime attr_reader :threadsafe def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = @fetched['name'] @version_id = @fetched['id'] @runtime = @fetched['runtime'] @threadsafe = @fetched['threadsafe'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "StandardAppVersion #{@params[:version_id]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'version_id' => ->(x, _) { x.nil? ? [] : ["its('version_id') { should cmp #{x.inspect} }"] }, 'runtime' => ->(x, _) { x.nil? ? [] : ["its('runtime') { should cmp #{x.inspect} }"] }, 'threadsafe' => ->(x, _) { x.nil? ? [] : ["its('threadsafe') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'StandardAppVersion' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_appengine_standard_app_version', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://appengine.googleapis.com/v1/' end def resource_base_url 'apps/{{project}}/services/{{service}}/versions/{{version_id}}' end end ================================================ FILE: generate/libraries/google_appengine_standard_app_versions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class AppEngineStandardAppVersions < GcpResourceBase name 'google_appengine_standard_app_versions' desc 'StandardAppVersion plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:version_ids, field: :version_id) filter_table_config.add(:runtimes, field: :runtime) filter_table_config.add(:threadsaves, field: :threadsafe) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('versions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'id' => ->(obj) { [:version_id, obj['id']] }, 'runtime' => ->(obj) { [:runtime, obj['runtime']] }, 'threadsafe' => ->(obj) { [:threadsafe, obj['threadsafe']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project service version_id} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://appengine.googleapis.com/v1/' end def resource_base_url 'apps/{{project}}/services/{{service}}/versions' end end ================================================ FILE: generate/libraries/google_bigquery_dataset.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/bigquery/property/dataset_access' require 'google/bigquery/property/dataset_dataset_reference' require 'google/bigquery/property/dataset_default_encryption_configuration' # A provider to manage BigQuery resources. class BigQueryDataset < GcpResourceBase name 'google_bigquery_dataset' desc 'Dataset' supports platform: 'gcp' attr_reader :params attr_reader :access attr_reader :creation_time attr_reader :dataset_reference attr_reader :default_table_expiration_ms attr_reader :default_partition_expiration_ms attr_reader :description attr_reader :etag attr_reader :friendly_name attr_reader :id attr_reader :labels attr_reader :last_modified_time attr_reader :location attr_reader :default_encryption_configuration def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @access = GoogleInSpec::BigQuery::Property::DatasetAccessArray.parse(@fetched['access'], to_s) @creation_time = @fetched['creationTime'] @dataset_reference = GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(@fetched['datasetReference'], to_s) @default_table_expiration_ms = @fetched['defaultTableExpirationMs'] @default_partition_expiration_ms = @fetched['defaultPartitionExpirationMs'] @description = @fetched['description'] @etag = @fetched['etag'] @friendly_name = @fetched['friendlyName'] @id = @fetched['id'] @labels = @fetched['labels'] @last_modified_time = @fetched['lastModifiedTime'] @location = @fetched['location'] @default_encryption_configuration = GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(@fetched['defaultEncryptionConfiguration'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Dataset #{@params[:name]}" end def un_parse { 'access' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('access') { should include '#{single.to_json}' }" } }, 'creation_time' => ->(x, _) { x.nil? ? [] : ["its('creation_time') { should cmp #{x.inspect} }"] }, 'dataset_reference' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::DatasetDatasetReference.un_parse(x, 'dataset_reference') }, 'default_table_expiration_ms' => ->(x, _) { x.nil? ? [] : ["its('default_table_expiration_ms') { should cmp #{x.inspect} }"] }, 'default_partition_expiration_ms' => ->(x, _) { x.nil? ? [] : ["its('default_partition_expiration_ms') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'etag' => ->(x, _) { x.nil? ? [] : ["its('etag') { should cmp #{x.inspect} }"] }, 'friendly_name' => ->(x, _) { x.nil? ? [] : ["its('friendly_name') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'last_modified_time' => ->(x, _) { x.nil? ? [] : ["its('last_modified_time') { should cmp #{x.inspect} }"] }, 'location' => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, 'default_encryption_configuration' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.un_parse(x, 'default_encryption_configuration') }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Dataset' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_bigquery_dataset', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end def name dataset_reference&.dataset_id end private def product_url 'https://www.googleapis.com/bigquery/v2/' end def resource_base_url 'projects/{{project}}/datasets/{{name}}' end end ================================================ FILE: generate/libraries/google_bigquery_datasets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class BigQueryDatasets < GcpResourceBase name 'google_bigquery_datasets' desc 'Dataset plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:dataset_references, field: :dataset_reference) filter_table_config.add(:default_partition_expiration_ms, field: :default_partition_expiration_ms) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:friendly_names, field: :friendly_name) filter_table_config.add(:ids, field: :id) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:locations, field: :location) filter_table_config.add(:default_encryption_configurations, field: :default_encryption_configuration) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('datasets') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'datasetReference' => ->(obj) { [:dataset_reference, GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(obj['datasetReference'], to_s)] }, 'defaultPartitionExpirationMs' => ->(obj) { [:default_partition_expiration_ms, obj['defaultPartitionExpirationMs']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'friendlyName' => ->(obj) { [:friendly_name, obj['friendlyName']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'location' => ->(obj) { [:location, obj['location']] }, 'defaultEncryptionConfiguration' => ->(obj) { [:default_encryption_configuration, GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(obj['defaultEncryptionConfiguration'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| if param == 'name' item_identifiers[param.to_sym] = item[:dataset_reference].dataset_id else item_identifiers[param.to_sym] = combo[param.to_sym] end end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/bigquery/v2/' end def resource_base_url 'projects/{{project}}/datasets' end end ================================================ FILE: generate/libraries/google_bigquery_table.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/bigquery/property/table_encryption_configuration' require 'google/bigquery/property/table_external_data_configuration' require 'google/bigquery/property/table_external_data_configuration_bigtable_options' require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' require 'google/bigquery/property/table_external_data_configuration_csv_options' require 'google/bigquery/property/table_external_data_configuration_google_sheets_options' require 'google/bigquery/property/table_external_data_configuration_schema' require 'google/bigquery/property/table_external_data_configuration_schema_fields' require 'google/bigquery/property/table_schema' require 'google/bigquery/property/table_schema_fields' require 'google/bigquery/property/table_streaming_buffer' require 'google/bigquery/property/table_table_reference' require 'google/bigquery/property/table_time_partitioning' require 'google/bigquery/property/table_view' require 'google/bigquery/property/table_view_user_defined_function_resources' # A provider to manage BigQuery resources. class BigQueryTable < GcpResourceBase name 'google_bigquery_table' desc 'Table' supports platform: 'gcp' attr_reader :params attr_reader :table_reference attr_reader :clustering attr_reader :creation_time attr_reader :description attr_reader :friendly_name attr_reader :id attr_reader :labels attr_reader :last_modified_time attr_reader :location attr_reader :name attr_reader :num_bytes attr_reader :num_long_term_bytes attr_reader :num_rows attr_reader :require_partition_filter attr_reader :type attr_reader :view attr_reader :time_partitioning attr_reader :streaming_buffer attr_reader :schema attr_reader :encryption_configuration attr_reader :expiration_time attr_reader :external_data_configuration attr_reader :dataset def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @table_reference = GoogleInSpec::BigQuery::Property::TableTableReference.new(@fetched['tableReference'], to_s) @clustering = @fetched['clustering'] @creation_time = @fetched['creationTime'] @description = @fetched['description'] @friendly_name = @fetched['friendlyName'] @id = @fetched['id'] @labels = @fetched['labels'] @last_modified_time = @fetched['lastModifiedTime'] @location = @fetched['location'] @name = @fetched['name'] @num_bytes = @fetched['numBytes'] @num_long_term_bytes = @fetched['numLongTermBytes'] @num_rows = @fetched['numRows'] @require_partition_filter = @fetched['requirePartitionFilter'] @type = @fetched['type'] @view = GoogleInSpec::BigQuery::Property::TableView.new(@fetched['view'], to_s) @time_partitioning = GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(@fetched['timePartitioning'], to_s) @streaming_buffer = GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(@fetched['streamingBuffer'], to_s) @schema = GoogleInSpec::BigQuery::Property::TableSchema.new(@fetched['schema'], to_s) @encryption_configuration = GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(@fetched['encryptionConfiguration'], to_s) @expiration_time = @fetched['expirationTime'] @external_data_configuration = GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(@fetched['externalDataConfiguration'], to_s) @dataset = @fetched['dataset'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Table #{@params[:name]}" end def un_parse { 'table_reference' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableTableReference.un_parse(x, 'table_reference') }, 'clustering' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('clustering') { should include #{single.inspect} }" } }, 'creation_time' => ->(x, _) { x.nil? ? [] : ["its('creation_time') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'friendly_name' => ->(x, _) { x.nil? ? [] : ["its('friendly_name') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'last_modified_time' => ->(x, _) { x.nil? ? [] : ["its('last_modified_time') { should cmp #{x.inspect} }"] }, 'location' => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'num_bytes' => ->(x, _) { x.nil? ? [] : ["its('num_bytes') { should cmp #{x.inspect} }"] }, 'num_long_term_bytes' => ->(x, _) { x.nil? ? [] : ["its('num_long_term_bytes') { should cmp #{x.inspect} }"] }, 'num_rows' => ->(x, _) { x.nil? ? [] : ["its('num_rows') { should cmp #{x.inspect} }"] }, 'require_partition_filter' => ->(x, _) { x.nil? ? [] : ["its('require_partition_filter') { should cmp #{x.inspect} }"] }, 'type' => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, 'view' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableView.un_parse(x, 'view') }, 'time_partitioning' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableTimePartitioning.un_parse(x, 'time_partitioning') }, 'streaming_buffer' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableStreamingBuffer.un_parse(x, 'streaming_buffer') }, 'schema' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableSchema.un_parse(x, 'schema') }, 'encryption_configuration' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.un_parse(x, 'encryption_configuration') }, 'expiration_time' => ->(x, _) { x.nil? ? [] : ["its('expiration_time') { should cmp #{x.inspect} }"] }, 'external_data_configuration' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.un_parse(x, 'external_data_configuration') }, 'dataset' => ->(x, _) { x.nil? ? [] : ["its('dataset') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Table' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_bigquery_table', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/bigquery/v2/' end def resource_base_url 'projects/{{project}}/datasets/{{dataset}}/tables/{{name}}' end end ================================================ FILE: generate/libraries/google_bigquery_tables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class BigQueryTables < GcpResourceBase name 'google_bigquery_tables' desc 'Table plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:table_references, field: :table_reference) filter_table_config.add(:clusterings, field: :clustering) filter_table_config.add(:creation_times, field: :creation_time) filter_table_config.add(:friendly_names, field: :friendly_name) filter_table_config.add(:ids, field: :id) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:last_modified_times, field: :last_modified_time) filter_table_config.add(:locations, field: :location) filter_table_config.add(:num_bytes, field: :num_bytes) filter_table_config.add(:num_long_term_bytes, field: :num_long_term_bytes) filter_table_config.add(:num_rows, field: :num_rows) filter_table_config.add(:require_partition_filters, field: :require_partition_filter) filter_table_config.add(:types, field: :type) filter_table_config.add(:views, field: :view) filter_table_config.add(:time_partitionings, field: :time_partitioning) filter_table_config.add(:streaming_buffers, field: :streaming_buffer) filter_table_config.add(:schemas, field: :schema) filter_table_config.add(:encryption_configurations, field: :encryption_configuration) filter_table_config.add(:expiration_times, field: :expiration_time) filter_table_config.add(:external_data_configurations, field: :external_data_configuration) filter_table_config.add(:datasets, field: :dataset) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('tables') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'tableReference' => ->(obj) { [:table_reference, GoogleInSpec::BigQuery::Property::TableTableReference.new(obj['tableReference'], to_s)] }, 'clustering' => ->(obj) { [:clustering, obj['clustering']] }, 'creationTime' => ->(obj) { [:creation_time, obj['creationTime']] }, 'friendlyName' => ->(obj) { [:friendly_name, obj['friendlyName']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'lastModifiedTime' => ->(obj) { [:last_modified_time, obj['lastModifiedTime']] }, 'location' => ->(obj) { [:location, obj['location']] }, 'numBytes' => ->(obj) { [:num_bytes, obj['numBytes']] }, 'numLongTermBytes' => ->(obj) { [:num_long_term_bytes, obj['numLongTermBytes']] }, 'numRows' => ->(obj) { [:num_rows, obj['numRows']] }, 'requirePartitionFilter' => ->(obj) { [:require_partition_filter, obj['requirePartitionFilter']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'view' => ->(obj) { [:view, GoogleInSpec::BigQuery::Property::TableView.new(obj['view'], to_s)] }, 'timePartitioning' => ->(obj) { [:time_partitioning, GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(obj['timePartitioning'], to_s)] }, 'streamingBuffer' => ->(obj) { [:streaming_buffer, GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(obj['streamingBuffer'], to_s)] }, 'schema' => ->(obj) { [:schema, GoogleInSpec::BigQuery::Property::TableSchema.new(obj['schema'], to_s)] }, 'encryptionConfiguration' => ->(obj) { [:encryption_configuration, GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(obj['encryptionConfiguration'], to_s)] }, 'expirationTime' => ->(obj) { [:expiration_time, obj['expirationTime']] }, 'externalDataConfiguration' => ->(obj) { [:external_data_configuration, GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(obj['externalDataConfiguration'], to_s)] }, 'dataset' => ->(obj) { [:dataset, obj['dataset']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project dataset name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| if param == 'name' item_identifiers[param.to_sym] = item[:table_reference].table_id else item_identifiers[param.to_sym] = combo[param.to_sym] end end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/bigquery/v2/' end def resource_base_url 'projects/{{project}}/datasets/{{dataset}}/tables' end end ================================================ FILE: generate/libraries/google_cloudbuild_trigger.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/cloudbuild/property/trigger_build' require 'google/cloudbuild/property/trigger_build_steps' require 'google/cloudbuild/property/trigger_trigger_template' # A provider to manage Cloud Build resources. class CloudBuildTrigger < GcpResourceBase name 'google_cloudbuild_trigger' desc 'Trigger' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :description attr_reader :disabled attr_reader :create_time attr_reader :substitutions attr_reader :filename attr_reader :ignored_files attr_reader :included_files attr_reader :trigger_template attr_reader :build def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @id = @fetched['id'] @description = @fetched['description'] @disabled = @fetched['disabled'] @create_time = parse_time_string(@fetched['createTime']) @substitutions = @fetched['substitutions'] @filename = @fetched['filename'] @ignored_files = @fetched['ignoredFiles'] @included_files = @fetched['includedFiles'] @trigger_template = GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(@fetched['triggerTemplate'], to_s) @build = GoogleInSpec::CloudBuild::Property::TriggerBuild.new(@fetched['build'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Trigger #{@params[:id]}" end def un_parse { 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'disabled' => ->(x, _) { x.nil? ? [] : ["its('disabled') { should cmp #{x.inspect} }"] }, 'create_time' => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, 'substitutions' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('substitutions') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'filename' => ->(x, _) { x.nil? ? [] : ["its('filename') { should cmp #{x.inspect} }"] }, 'ignored_files' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('ignored_files') { should include #{single.inspect} }" } }, 'included_files' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('included_files') { should include #{single.inspect} }" } }, 'trigger_template' => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.un_parse(x, 'trigger_template') }, 'build' => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudBuild::Property::TriggerBuild.un_parse(x, 'build') }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Trigger' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_cloudbuild_trigger', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://cloudbuild.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/triggers/{{id}}' end end ================================================ FILE: generate/libraries/google_cloudbuild_triggers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class CloudBuildTriggers < GcpResourceBase name 'google_cloudbuild_triggers' desc 'Trigger plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:disableds, field: :disabled) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:substitutions, field: :substitutions) filter_table_config.add(:filenames, field: :filename) filter_table_config.add(:ignored_files, field: :ignored_files) filter_table_config.add(:included_files, field: :included_files) filter_table_config.add(:trigger_templates, field: :trigger_template) filter_table_config.add(:builds, field: :build) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('triggers') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'substitutions' => ->(obj) { [:substitutions, obj['substitutions']] }, 'filename' => ->(obj) { [:filename, obj['filename']] }, 'ignoredFiles' => ->(obj) { [:ignored_files, obj['ignoredFiles']] }, 'includedFiles' => ->(obj) { [:included_files, obj['includedFiles']] }, 'triggerTemplate' => ->(obj) { [:trigger_template, GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(obj['triggerTemplate'], to_s)] }, 'build' => ->(obj) { [:build, GoogleInSpec::CloudBuild::Property::TriggerBuild.new(obj['build'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project id} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://cloudbuild.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/triggers' end end ================================================ FILE: generate/libraries/google_cloudfunctions_cloud_function.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/cloudfunctions/property/cloudfunction_event_trigger' require 'google/cloudfunctions/property/cloudfunction_https_trigger' require 'google/cloudfunctions/property/cloudfunction_source_repository' # A provider to manage Cloud Functions resources. class CloudFunctionsCloudFunction < GcpResourceBase name 'google_cloudfunctions_cloud_function' desc 'CloudFunction' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :status attr_reader :entry_point attr_reader :runtime attr_reader :timeout attr_reader :available_memory_mb attr_reader :service_account_email attr_reader :update_time attr_reader :version_id attr_reader :labels attr_reader :environment_variables attr_reader :source_archive_url attr_reader :source_upload_url attr_reader :source_repository attr_reader :https_trigger attr_reader :event_trigger attr_reader :location def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = @fetched['name'] @description = @fetched['description'] @status = @fetched['status'] @entry_point = @fetched['entryPoint'] @runtime = @fetched['runtime'] @timeout = @fetched['timeout'] @available_memory_mb = @fetched['availableMemoryMb'] @service_account_email = @fetched['serviceAccountEmail'] @update_time = @fetched['updateTime'] @version_id = @fetched['versionId'] @labels = @fetched['labels'] @environment_variables = @fetched['environmentVariables'] @source_archive_url = @fetched['sourceArchiveUrl'] @source_upload_url = @fetched['sourceUploadUrl'] @source_repository = GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(@fetched['sourceRepository'], to_s) @https_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(@fetched['httpsTrigger'], to_s) @event_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(@fetched['eventTrigger'], to_s) @location = @fetched['location'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "CloudFunction #{@params[:name]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'status' => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, 'entry_point' => ->(x, _) { x.nil? ? [] : ["its('entry_point') { should cmp #{x.inspect} }"] }, 'runtime' => ->(x, _) { x.nil? ? [] : ["its('runtime') { should cmp #{x.inspect} }"] }, 'timeout' => ->(x, _) { x.nil? ? [] : ["its('timeout') { should cmp #{x.inspect} }"] }, 'available_memory_mb' => ->(x, _) { x.nil? ? [] : ["its('available_memory_mb') { should cmp #{x.inspect} }"] }, 'service_account_email' => ->(x, _) { x.nil? ? [] : ["its('service_account_email') { should cmp #{x.inspect} }"] }, 'update_time' => ->(x, _) { x.nil? ? [] : ["its('update_time') { should cmp #{x.inspect} }"] }, 'version_id' => ->(x, _) { x.nil? ? [] : ["its('version_id') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'environment_variables' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('environment_variables') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'source_archive_url' => ->(x, _) { x.nil? ? [] : ["its('source_archive_url') { should cmp #{x.inspect} }"] }, 'source_upload_url' => ->(x, _) { x.nil? ? [] : ["its('source_upload_url') { should cmp #{x.inspect} }"] }, 'source_repository' => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.un_parse(x, 'source_repository') }, 'https_trigger' => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.un_parse(x, 'https_trigger') }, 'event_trigger' => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.un_parse(x, 'event_trigger') }, 'location' => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'CloudFunction' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_cloudfunctions_cloud_function', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://cloudfunctions.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/functions/{{name}}' end end ================================================ FILE: generate/libraries/google_cloudfunctions_cloud_functions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class CloudFunctionsCloudFunctions < GcpResourceBase name 'google_cloudfunctions_cloud_functions' desc 'CloudFunction plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:entry_points, field: :entry_point) filter_table_config.add(:runtimes, field: :runtime) filter_table_config.add(:timeouts, field: :timeout) filter_table_config.add(:available_memory_mbs, field: :available_memory_mb) filter_table_config.add(:service_account_emails, field: :service_account_email) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:version_ids, field: :version_id) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:environment_variables, field: :environment_variables) filter_table_config.add(:source_archive_urls, field: :source_archive_url) filter_table_config.add(:source_upload_urls, field: :source_upload_url) filter_table_config.add(:source_repositories, field: :source_repository) filter_table_config.add(:https_triggers, field: :https_trigger) filter_table_config.add(:event_triggers, field: :event_trigger) filter_table_config.add(:locations, field: :location) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('functions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'entryPoint' => ->(obj) { [:entry_point, obj['entryPoint']] }, 'runtime' => ->(obj) { [:runtime, obj['runtime']] }, 'timeout' => ->(obj) { [:timeout, obj['timeout']] }, 'availableMemoryMb' => ->(obj) { [:available_memory_mb, obj['availableMemoryMb']] }, 'serviceAccountEmail' => ->(obj) { [:service_account_email, obj['serviceAccountEmail']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'versionId' => ->(obj) { [:version_id, obj['versionId']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'environmentVariables' => ->(obj) { [:environment_variables, obj['environmentVariables']] }, 'sourceArchiveUrl' => ->(obj) { [:source_archive_url, obj['sourceArchiveUrl']] }, 'sourceUploadUrl' => ->(obj) { [:source_upload_url, obj['sourceUploadUrl']] }, 'sourceRepository' => ->(obj) { [:source_repository, GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(obj['sourceRepository'], to_s)] }, 'httpsTrigger' => ->(obj) { [:https_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(obj['httpsTrigger'], to_s)] }, 'eventTrigger' => ->(obj) { [:event_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(obj['eventTrigger'], to_s)] }, 'location' => ->(obj) { [:location, obj['location']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project location name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://cloudfunctions.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/functions' end end ================================================ FILE: generate/libraries/google_compute_address.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeAddress < GcpResourceBase name 'google_compute_address' desc 'Verifies settings for a compute address' example " describe google_compute_address(project: 'chef-inspec-gcp', location: 'us-west2', name: 'gcp-inspec-test') do it { should exist } its('name') { should eq 'inspec-test' } its('status') { should eq 'in_use' } ... end " supports platform: 'gcp' def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @address = @gcp.gcp_compute_client.get_address(opts[:project], opts[:location], opts[:name]) create_resource_methods(@address) end end def address_ip_exists !address.nil? end def exists? !address.nil? end # How many users are there for the address def user_count users.count end # Return the first user resource base name def user_resource_name users.first.split('/').last end def to_s "Address #{@display_name}" end end end ================================================ FILE: generate/libraries/google_compute_autoscaler.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/autoscaler_autoscaling_policy' require 'google/compute/property/autoscaler_autoscaling_policy_cpu_utilization' require 'google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations' require 'google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization' # A provider to manage Compute Engine resources. class ComputeAutoscaler < GcpResourceBase name 'google_compute_autoscaler' desc 'Autoscaler' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :autoscaling_policy attr_reader :target attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @id = @fetched['id'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @name = @fetched['name'] @description = @fetched['description'] @autoscaling_policy = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(@fetched['autoscalingPolicy'], to_s) @target = @fetched['target'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Autoscaler #{@params[:name]}" end def un_parse { 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'autoscaling_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.un_parse(x, 'autoscaling_policy') }, 'target' => ->(x, _) { x.nil? ? [] : ["its('target') { should cmp #{x.inspect} }"] }, 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Autoscaler' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_autoscaler', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/autoscalers/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_autoscalers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeAutoscalers < GcpResourceBase name 'google_compute_autoscalers' desc 'Autoscaler plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:autoscaling_policies, field: :autoscaling_policy) filter_table_config.add(:targets, field: :target) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'autoscalingPolicy' => ->(obj) { [:autoscaling_policy, GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(obj['autoscalingPolicy'], to_s)] }, 'target' => ->(obj) { [:target, obj['target']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project zone name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/autoscalers' end end ================================================ FILE: generate/libraries/google_compute_backend_bucket.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/backendbucket_cdn_policy' # A provider to manage Compute Engine resources. class ComputeBackendBucket < GcpResourceBase name 'google_compute_backend_bucket' desc 'BackendBucket' supports platform: 'gcp' attr_reader :params attr_reader :bucket_name attr_reader :cdn_policy attr_reader :creation_timestamp attr_reader :description attr_reader :enable_cdn attr_reader :id attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @bucket_name = @fetched['bucketName'] @cdn_policy = GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(@fetched['cdnPolicy'], to_s) @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @enable_cdn = @fetched['enableCdn'] @id = @fetched['id'] @name = @fetched['name'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "BackendBucket #{@params[:name]}" end def un_parse { 'bucket_name' => ->(x, _) { x.nil? ? [] : ["its('bucket_name') { should cmp #{x.inspect} }"] }, 'cdn_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.un_parse(x, 'cdn_policy') }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'enable_cdn' => ->(x, _) { x.nil? ? [] : ["its('enable_cdn') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'BackendBucket' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_backend_bucket', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/backendBuckets/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_backend_buckets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeBackendBuckets < GcpResourceBase name 'google_compute_backend_buckets' desc 'BackendBucket plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:bucket_names, field: :bucket_name) filter_table_config.add(:cdn_policies, field: :cdn_policy) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:enable_cdns, field: :enable_cdn) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'bucketName' => ->(obj) { [:bucket_name, obj['bucketName']] }, 'cdnPolicy' => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(obj['cdnPolicy'], to_s)] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'enableCdn' => ->(obj) { [:enable_cdn, obj['enableCdn']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/backendBuckets' end end ================================================ FILE: generate/libraries/google_compute_backend_service.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/backendservice_backends' require 'google/compute/property/backendservice_cdn_policy' require 'google/compute/property/backendservice_cdn_policy_cache_key_policy' require 'google/compute/property/backendservice_connection_draining' require 'google/compute/property/backendservice_iap' # A provider to manage Compute Engine resources. class ComputeBackendService < GcpResourceBase name 'google_compute_backend_service' desc 'BackendService' supports platform: 'gcp' attr_reader :params attr_reader :affinity_cookie_ttl_sec attr_reader :backends attr_reader :cdn_policy attr_reader :connection_draining attr_reader :creation_timestamp attr_reader :fingerprint attr_reader :description attr_reader :enable_cdn attr_reader :health_checks attr_reader :id attr_reader :iap attr_reader :load_balancing_scheme attr_reader :name attr_reader :port_name attr_reader :protocol attr_reader :security_policy attr_reader :session_affinity attr_reader :timeout_sec def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @affinity_cookie_ttl_sec = @fetched['affinityCookieTtlSec'] @backends = GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(@fetched['backends'], to_s) @cdn_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(@fetched['cdnPolicy'], to_s) @connection_draining = GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(@fetched['connectionDraining'], to_s) @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @fingerprint = @fetched['fingerprint'] @description = @fetched['description'] @enable_cdn = @fetched['enableCDN'] @health_checks = @fetched['healthChecks'] @id = @fetched['id'] @iap = GoogleInSpec::Compute::Property::BackendServiceIap.new(@fetched['iap'], to_s) @load_balancing_scheme = @fetched['loadBalancingScheme'] @name = @fetched['name'] @port_name = @fetched['portName'] @protocol = @fetched['protocol'] @security_policy = @fetched['securityPolicy'] @session_affinity = @fetched['sessionAffinity'] @timeout_sec = @fetched['timeoutSec'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "BackendService #{@params[:name]}" end def un_parse { 'affinity_cookie_ttl_sec' => ->(x, _) { x.nil? ? [] : ["its('affinity_cookie_ttl_sec') { should cmp #{x.inspect} }"] }, 'backends' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('backends') { should include '#{single.to_json}' }" } }, 'cdn_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.un_parse(x, 'cdn_policy') }, 'connection_draining' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.un_parse(x, 'connection_draining') }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'fingerprint' => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'enable_cdn' => ->(x, _) { x.nil? ? [] : ["its('enable_cdn') { should cmp #{x.inspect} }"] }, 'health_checks' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('health_checks') { should include #{single.inspect} }" } }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'iap' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceIap.un_parse(x, 'iap') }, 'load_balancing_scheme' => ->(x, _) { x.nil? ? [] : ["its('load_balancing_scheme') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'port_name' => ->(x, _) { x.nil? ? [] : ["its('port_name') { should cmp #{x.inspect} }"] }, 'protocol' => ->(x, _) { x.nil? ? [] : ["its('protocol') { should cmp #{x.inspect} }"] }, 'security_policy' => ->(x, _) { x.nil? ? [] : ["its('security_policy') { should cmp #{x.inspect} }"] }, 'session_affinity' => ->(x, _) { x.nil? ? [] : ["its('session_affinity') { should cmp #{x.inspect} }"] }, 'timeout_sec' => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'BackendService' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_backend_service', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/backendServices/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_backend_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeBackendServices < GcpResourceBase name 'google_compute_backend_services' desc 'BackendService plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:affinity_cookie_ttl_secs, field: :affinity_cookie_ttl_sec) filter_table_config.add(:backends, field: :backends) filter_table_config.add(:cdn_policies, field: :cdn_policy) filter_table_config.add(:connection_drainings, field: :connection_draining) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:enable_cdns, field: :enable_cdn) filter_table_config.add(:health_checks, field: :health_checks) filter_table_config.add(:ids, field: :id) filter_table_config.add(:iaps, field: :iap) filter_table_config.add(:load_balancing_schemes, field: :load_balancing_scheme) filter_table_config.add(:names, field: :name) filter_table_config.add(:port_names, field: :port_name) filter_table_config.add(:protocols, field: :protocol) filter_table_config.add(:security_policies, field: :security_policy) filter_table_config.add(:session_affinities, field: :session_affinity) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'affinityCookieTtlSec' => ->(obj) { [:affinity_cookie_ttl_sec, obj['affinityCookieTtlSec']] }, 'backends' => ->(obj) { [:backends, GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(obj['backends'], to_s)] }, 'cdnPolicy' => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(obj['cdnPolicy'], to_s)] }, 'connectionDraining' => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(obj['connectionDraining'], to_s)] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'enableCDN' => ->(obj) { [:enable_cdn, obj['enableCDN']] }, 'healthChecks' => ->(obj) { [:health_checks, obj['healthChecks']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'iap' => ->(obj) { [:iap, GoogleInSpec::Compute::Property::BackendServiceIap.new(obj['iap'], to_s)] }, 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'portName' => ->(obj) { [:port_name, obj['portName']] }, 'protocol' => ->(obj) { [:protocol, obj['protocol']] }, 'securityPolicy' => ->(obj) { [:security_policy, obj['securityPolicy']] }, 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/backendServices' end end ================================================ FILE: generate/libraries/google_compute_disk.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/disk_disk_encryption_key' require 'google/compute/property/disk_source_image_encryption_key' require 'google/compute/property/disk_source_snapshot_encryption_key' # A provider to manage Compute Engine resources. class ComputeDisk < GcpResourceBase name 'google_compute_disk' desc 'Disk' supports platform: 'gcp' attr_reader :params attr_reader :label_fingerprint attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :last_attach_timestamp attr_reader :last_detach_timestamp attr_reader :labels attr_reader :licenses attr_reader :name attr_reader :size_gb attr_reader :users attr_reader :physical_block_size_bytes attr_reader :type attr_reader :source_image attr_reader :zone attr_reader :source_image_encryption_key attr_reader :source_image_id attr_reader :disk_encryption_key attr_reader :source_snapshot attr_reader :source_snapshot_encryption_key attr_reader :source_snapshot_id def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @label_fingerprint = @fetched['labelFingerprint'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @last_attach_timestamp = parse_time_string(@fetched['lastAttachTimestamp']) @last_detach_timestamp = parse_time_string(@fetched['lastDetachTimestamp']) @labels = @fetched['labels'] @licenses = @fetched['licenses'] @name = @fetched['name'] @size_gb = @fetched['sizeGb'] @users = @fetched['users'] @physical_block_size_bytes = @fetched['physicalBlockSizeBytes'] @type = @fetched['type'] @source_image = @fetched['sourceImage'] @zone = @fetched['zone'] @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched['sourceImageEncryptionKey'], to_s) @source_image_id = @fetched['sourceImageId'] @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched['diskEncryptionKey'], to_s) @source_snapshot = @fetched['sourceSnapshot'] @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched['sourceSnapshotEncryptionKey'], to_s) @source_snapshot_id = @fetched['sourceSnapshotId'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Disk #{@params[:name]}" end def un_parse { 'label_fingerprint' => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'last_attach_timestamp' => ->(x, _) { x.nil? ? [] : ["its('last_attach_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'last_detach_timestamp' => ->(x, _) { x.nil? ? [] : ["its('last_detach_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'licenses' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('licenses') { should include #{single.inspect} }" } }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'size_gb' => ->(x, _) { x.nil? ? [] : ["its('size_gb') { should cmp #{x.inspect} }"] }, 'users' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('users') { should include #{single.inspect} }" } }, 'physical_block_size_bytes' => ->(x, _) { x.nil? ? [] : ["its('physical_block_size_bytes') { should cmp #{x.inspect} }"] }, 'type' => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, 'source_image' => ->(x, _) { x.nil? ? [] : ["its('source_image') { should cmp #{x.inspect} }"] }, 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, 'source_image_encryption_key' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.un_parse(x, 'source_image_encryption_key') }, 'source_image_id' => ->(x, _) { x.nil? ? [] : ["its('source_image_id') { should cmp #{x.inspect} }"] }, 'disk_encryption_key' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.un_parse(x, 'disk_encryption_key') }, 'source_snapshot' => ->(x, _) { x.nil? ? [] : ["its('source_snapshot') { should cmp #{x.inspect} }"] }, 'source_snapshot_encryption_key' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.un_parse(x, 'source_snapshot_encryption_key') }, 'source_snapshot_id' => ->(x, _) { x.nil? ? [] : ["its('source_snapshot_id') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Disk' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_disk', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/disks/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeDisks < GcpResourceBase name 'google_compute_disks' desc 'Disk plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:last_attach_timestamps, field: :last_attach_timestamp) filter_table_config.add(:last_detach_timestamps, field: :last_detach_timestamp) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:licenses, field: :licenses) filter_table_config.add(:names, field: :name) filter_table_config.add(:size_gbs, field: :size_gb) filter_table_config.add(:users, field: :users) filter_table_config.add(:physical_block_size_bytes, field: :physical_block_size_bytes) filter_table_config.add(:types, field: :type) filter_table_config.add(:source_images, field: :source_image) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:source_image_encryption_keys, field: :source_image_encryption_key) filter_table_config.add(:source_image_ids, field: :source_image_id) filter_table_config.add(:disk_encryption_keys, field: :disk_encryption_key) filter_table_config.add(:source_snapshots, field: :source_snapshot) filter_table_config.add(:source_snapshot_encryption_keys, field: :source_snapshot_encryption_key) filter_table_config.add(:source_snapshot_ids, field: :source_snapshot_id) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'lastAttachTimestamp' => ->(obj) { [:last_attach_timestamp, parse_time_string(obj['lastAttachTimestamp'])] }, 'lastDetachTimestamp' => ->(obj) { [:last_detach_timestamp, parse_time_string(obj['lastDetachTimestamp'])] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'licenses' => ->(obj) { [:licenses, obj['licenses']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'sizeGb' => ->(obj) { [:size_gb, obj['sizeGb']] }, 'users' => ->(obj) { [:users, obj['users']] }, 'physicalBlockSizeBytes' => ->(obj) { [:physical_block_size_bytes, obj['physicalBlockSizeBytes']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'sourceImage' => ->(obj) { [:source_image, obj['sourceImage']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'sourceImageEncryptionKey' => ->(obj) { [:source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj['sourceImageEncryptionKey'], to_s)] }, 'sourceImageId' => ->(obj) { [:source_image_id, obj['sourceImageId']] }, 'diskEncryptionKey' => ->(obj) { [:disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj['diskEncryptionKey'], to_s)] }, 'sourceSnapshot' => ->(obj) { [:source_snapshot, obj['sourceSnapshot']] }, 'sourceSnapshotEncryptionKey' => ->(obj) { [:source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj['sourceSnapshotEncryptionKey'], to_s)] }, 'sourceSnapshotId' => ->(obj) { [:source_snapshot_id, obj['sourceSnapshotId']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project zone name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/disks' end end ================================================ FILE: generate/libraries/google_compute_firewall.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/firewall_allowed' require 'google/compute/property/firewall_denied' # A provider to manage Compute Engine resources. class ComputeFirewall < GcpResourceBase name 'google_compute_firewall' desc 'Firewall' supports platform: 'gcp' attr_reader :params attr_reader :allowed attr_reader :creation_timestamp attr_reader :denied attr_reader :description attr_reader :destination_ranges attr_reader :direction attr_reader :disabled attr_reader :id attr_reader :name attr_reader :network attr_reader :priority attr_reader :source_ranges attr_reader :source_service_accounts attr_reader :source_tags attr_reader :target_service_accounts attr_reader :target_tags def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @allowed = GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(@fetched['allowed'], to_s) @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @denied = GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(@fetched['denied'], to_s) @description = @fetched['description'] @destination_ranges = @fetched['destinationRanges'] @direction = @fetched['direction'] @disabled = @fetched['disabled'] @id = @fetched['id'] @name = @fetched['name'] @network = @fetched['network'] @priority = @fetched['priority'] @source_ranges = @fetched['sourceRanges'] @source_service_accounts = @fetched['sourceServiceAccounts'] @source_tags = @fetched['sourceTags'] @target_service_accounts = @fetched['targetServiceAccounts'] @target_tags = @fetched['targetTags'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Firewall #{@params[:name]}" end def un_parse { 'allowed' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('allowed') { should include '#{single.to_json}' }" } }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'denied' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('denied') { should include '#{single.to_json}' }" } }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'destination_ranges' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('destination_ranges') { should include #{single.inspect} }" } }, 'direction' => ->(x, _) { x.nil? ? [] : ["its('direction') { should cmp #{x.inspect} }"] }, 'disabled' => ->(x, _) { x.nil? ? [] : ["its('disabled') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, 'priority' => ->(x, _) { x.nil? ? [] : ["its('priority') { should cmp #{x.inspect} }"] }, 'source_ranges' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('source_ranges') { should include #{single.inspect} }" } }, 'source_service_accounts' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('source_service_accounts') { should include #{single.inspect} }" } }, 'source_tags' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('source_tags') { should include #{single.inspect} }" } }, 'target_service_accounts' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target_service_accounts') { should include #{single.inspect} }" } }, 'target_tags' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target_tags') { should include #{single.inspect} }" } }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Firewall' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_firewall', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/firewalls/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_firewalls.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeFirewalls < GcpResourceBase name 'google_compute_firewalls' desc 'Firewall plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:alloweds, field: :allowed) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:denieds, field: :denied) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:destination_ranges, field: :destination_ranges) filter_table_config.add(:directions, field: :direction) filter_table_config.add(:disableds, field: :disabled) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:networks, field: :network) filter_table_config.add(:priorities, field: :priority) filter_table_config.add(:source_ranges, field: :source_ranges) filter_table_config.add(:source_service_accounts, field: :source_service_accounts) filter_table_config.add(:source_tags, field: :source_tags) filter_table_config.add(:target_service_accounts, field: :target_service_accounts) filter_table_config.add(:target_tags, field: :target_tags) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'allowed' => ->(obj) { [:allowed, GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(obj['allowed'], to_s)] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'denied' => ->(obj) { [:denied, GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(obj['denied'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'destinationRanges' => ->(obj) { [:destination_ranges, obj['destinationRanges']] }, 'direction' => ->(obj) { [:direction, obj['direction']] }, 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'priority' => ->(obj) { [:priority, obj['priority']] }, 'sourceRanges' => ->(obj) { [:source_ranges, obj['sourceRanges']] }, 'sourceServiceAccounts' => ->(obj) { [:source_service_accounts, obj['sourceServiceAccounts']] }, 'sourceTags' => ->(obj) { [:source_tags, obj['sourceTags']] }, 'targetServiceAccounts' => ->(obj) { [:target_service_accounts, obj['targetServiceAccounts']] }, 'targetTags' => ->(obj) { [:target_tags, obj['targetTags']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/firewalls' end end ================================================ FILE: generate/libraries/google_compute_forwarding_rule.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeForwardingRule < GcpResourceBase name 'google_compute_forwarding_rule' desc 'Verifies settings for a compute forwarding_rule' example " describe google_compute_forwarding_rule(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-forwarding-rule') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @forwarding_rule = @gcp.gcp_compute_client.get_forwarding_rule(opts[:project], opts[:region], opts[:name]) create_resource_methods(@forwarding_rule) end end def creation_timestamp_date return false if !defined?(creation_timestamp) || creation_timestamp.nil? Time.parse(creation_timestamp.to_s) end def exists? !@forwarding_rule.nil? end def to_s "ForwardingRule #{@display_name}" end end end ================================================ FILE: generate/libraries/google_compute_forwarding_rules.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeForwardingRules < GcpResourceBase name 'google_compute_forwarding_rules' desc 'Verifies settings for GCP compute forwarding_rules in bulk' example " describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west1') do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] @project = opts[:project] @region = opts[:region] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:forwarding_rule_ids, field: :forwarding_rule_id) filter_table_config.add(:forwarding_rule_names, field: :forwarding_rule_name) filter_table_config.add(:forwarding_rule_networks, field: :forwarding_rule_network) filter_table_config.add(:forwarding_rule_load_balancing_schemes, field: :forwarding_rule_load_balancing_scheme) filter_table_config.connect(self, :fetch_data) def fetch_data forwarding_rule_rows = [] next_page = nil loop do catch_gcp_errors do @forwarding_rules = @gcp.gcp_compute_client.list_forwarding_rules(@project, @region, page_token: next_page) end return [] if !@forwarding_rules || !@forwarding_rules.items @forwarding_rules.items.map do |forwarding_rule| forwarding_rule_network = forwarding_rule.network.split('/').last if !forwarding_rule.network.nil? forwarding_rule_rows+=[{ forwarding_rule_id: forwarding_rule.id, forwarding_rule_name: forwarding_rule.name, forwarding_rule_network: forwarding_rule_network, forwarding_rule_load_balancing_scheme: forwarding_rule.load_balancing_scheme }] end next_page = @forwarding_rules.next_page_token break unless next_page end @table = forwarding_rule_rows end end end ================================================ FILE: generate/libraries/google_compute_global_address.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeGlobalAddress < GcpResourceBase name 'google_compute_global_address' desc 'GlobalAddress' supports platform: 'gcp' attr_reader :params attr_reader :address attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :ip_version attr_reader :region attr_reader :prefix_length attr_reader :address_type attr_reader :purpose attr_reader :network def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @address = @fetched['address'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @ip_version = @fetched['ipVersion'] @region = @fetched['region'] @prefix_length = @fetched['prefixLength'] @address_type = @fetched['addressType'] @purpose = @fetched['purpose'] @network = @fetched['network'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "GlobalAddress #{@params[:name]}" end def un_parse { 'address' => ->(x, _) { x.nil? ? [] : ["its('address') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'ip_version' => ->(x, _) { x.nil? ? [] : ["its('ip_version') { should cmp #{x.inspect} }"] }, 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, 'prefix_length' => ->(x, _) { x.nil? ? [] : ["its('prefix_length') { should cmp #{x.inspect} }"] }, 'address_type' => ->(x, _) { x.nil? ? [] : ["its('address_type') { should cmp #{x.inspect} }"] }, 'purpose' => ->(x, _) { x.nil? ? [] : ["its('purpose') { should cmp #{x.inspect} }"] }, 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'GlobalAddress' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_global_address', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/addresses/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_global_addresses.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeGlobalAddresss < GcpResourceBase name 'google_compute_global_addresses' desc 'GlobalAddress plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:addresses, field: :address) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:ip_versions, field: :ip_version) filter_table_config.add(:regions, field: :region) filter_table_config.add(:prefix_lengths, field: :prefix_length) filter_table_config.add(:address_types, field: :address_type) filter_table_config.add(:purposes, field: :purpose) filter_table_config.add(:networks, field: :network) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'address' => ->(obj) { [:address, obj['address']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'ipVersion' => ->(obj) { [:ip_version, obj['ipVersion']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'prefixLength' => ->(obj) { [:prefix_length, obj['prefixLength']] }, 'addressType' => ->(obj) { [:address_type, obj['addressType']] }, 'purpose' => ->(obj) { [:purpose, obj['purpose']] }, 'network' => ->(obj) { [:network, obj['network']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/addresses' end end ================================================ FILE: generate/libraries/google_compute_global_forwarding_rule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/globalforwardingrule_metadata_filters' # A provider to manage Compute Engine resources. class ComputeGlobalForwardingRule < GcpResourceBase name 'google_compute_global_forwarding_rule' desc 'GlobalForwardingRule' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :ip_address attr_reader :ip_protocol attr_reader :ip_version attr_reader :load_balancing_scheme attr_reader :metadata_filters attr_reader :name attr_reader :network attr_reader :port_range attr_reader :target def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @ip_address = @fetched['IPAddress'] @ip_protocol = @fetched['IPProtocol'] @ip_version = @fetched['ipVersion'] @load_balancing_scheme = @fetched['loadBalancingScheme'] @metadata_filters = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(@fetched['metadataFilters'], to_s) @name = @fetched['name'] @network = @fetched['network'] @port_range = @fetched['portRange'] @target = @fetched['target'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "GlobalForwardingRule #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'ip_address' => ->(x, _) { x.nil? ? [] : ["its('ip_address') { should cmp #{x.inspect} }"] }, 'ip_protocol' => ->(x, _) { x.nil? ? [] : ["its('ip_protocol') { should cmp #{x.inspect} }"] }, 'ip_version' => ->(x, _) { x.nil? ? [] : ["its('ip_version') { should cmp #{x.inspect} }"] }, 'load_balancing_scheme' => ->(x, _) { x.nil? ? [] : ["its('load_balancing_scheme') { should cmp #{x.inspect} }"] }, 'metadata_filters' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('metadata_filters') { should include '#{single.to_json}' }" } }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, 'port_range' => ->(x, _) { x.nil? ? [] : ["its('port_range') { should cmp #{x.inspect} }"] }, 'target' => ->(x, _) { x.nil? ? [] : ["its('target') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'GlobalForwardingRule' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_global_forwarding_rule', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/forwardingRules/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_global_forwarding_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeGlobalForwardingRules < GcpResourceBase name 'google_compute_global_forwarding_rules' desc 'GlobalForwardingRule plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:ip_addresses, field: :ip_address) filter_table_config.add(:ip_protocols, field: :ip_protocol) filter_table_config.add(:ip_versions, field: :ip_version) filter_table_config.add(:load_balancing_schemes, field: :load_balancing_scheme) filter_table_config.add(:metadata_filters, field: :metadata_filters) filter_table_config.add(:names, field: :name) filter_table_config.add(:networks, field: :network) filter_table_config.add(:port_ranges, field: :port_range) filter_table_config.add(:targets, field: :target) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'IPAddress' => ->(obj) { [:ip_address, obj['IPAddress']] }, 'IPProtocol' => ->(obj) { [:ip_protocol, obj['IPProtocol']] }, 'ipVersion' => ->(obj) { [:ip_version, obj['ipVersion']] }, 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, 'metadataFilters' => ->(obj) { [:metadata_filters, GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(obj['metadataFilters'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'portRange' => ->(obj) { [:port_range, obj['portRange']] }, 'target' => ->(obj) { [:target, obj['target']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/forwardingRules' end end ================================================ FILE: generate/libraries/google_compute_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/healthcheck_http2_health_check' require 'google/compute/property/healthcheck_http_health_check' require 'google/compute/property/healthcheck_https_health_check' require 'google/compute/property/healthcheck_ssl_health_check' require 'google/compute/property/healthcheck_tcp_health_check' # A provider to manage Compute Engine resources. class ComputeHealthCheck < GcpResourceBase name 'google_compute_health_check' desc 'HealthCheck' supports platform: 'gcp' attr_reader :params attr_reader :check_interval_sec attr_reader :creation_timestamp attr_reader :description attr_reader :healthy_threshold attr_reader :id attr_reader :name attr_reader :timeout_sec attr_reader :unhealthy_threshold attr_reader :type attr_reader :http_health_check attr_reader :https_health_check attr_reader :tcp_health_check attr_reader :ssl_health_check attr_reader :http2_health_check def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @check_interval_sec = @fetched['checkIntervalSec'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @healthy_threshold = @fetched['healthyThreshold'] @id = @fetched['id'] @name = @fetched['name'] @timeout_sec = @fetched['timeoutSec'] @unhealthy_threshold = @fetched['unhealthyThreshold'] @type = @fetched['type'] @http_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(@fetched['httpHealthCheck'], to_s) @https_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(@fetched['httpsHealthCheck'], to_s) @tcp_health_check = GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(@fetched['tcpHealthCheck'], to_s) @ssl_health_check = GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(@fetched['sslHealthCheck'], to_s) @http2_health_check = GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(@fetched['http2HealthCheck'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "HealthCheck #{@params[:name]}" end def un_parse { 'check_interval_sec' => ->(x, _) { x.nil? ? [] : ["its('check_interval_sec') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'healthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('healthy_threshold') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'timeout_sec' => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, 'unhealthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('unhealthy_threshold') { should cmp #{x.inspect} }"] }, 'type' => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, 'http_health_check' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.un_parse(x, 'http_health_check') }, 'https_health_check' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.un_parse(x, 'https_health_check') }, 'tcp_health_check' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.un_parse(x, 'tcp_health_check') }, 'ssl_health_check' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.un_parse(x, 'ssl_health_check') }, 'http2_health_check' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.un_parse(x, 'http2_health_check') }, } end def dump(path, template_path, test_number, ignored_fields) name = 'HealthCheck' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_health_check', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/healthChecks/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_health_checks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeHealthChecks < GcpResourceBase name 'google_compute_health_checks' desc 'HealthCheck plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:check_interval_secs, field: :check_interval_sec) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:healthy_thresholds, field: :healthy_threshold) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.add(:unhealthy_thresholds, field: :unhealthy_threshold) filter_table_config.add(:types, field: :type) filter_table_config.add(:http_health_checks, field: :http_health_check) filter_table_config.add(:https_health_checks, field: :https_health_check) filter_table_config.add(:tcp_health_checks, field: :tcp_health_check) filter_table_config.add(:ssl_health_checks, field: :ssl_health_check) filter_table_config.add(:http2_health_checks, field: :http2_health_check) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'httpHealthCheck' => ->(obj) { [:http_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(obj['httpHealthCheck'], to_s)] }, 'httpsHealthCheck' => ->(obj) { [:https_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(obj['httpsHealthCheck'], to_s)] }, 'tcpHealthCheck' => ->(obj) { [:tcp_health_check, GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(obj['tcpHealthCheck'], to_s)] }, 'sslHealthCheck' => ->(obj) { [:ssl_health_check, GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(obj['sslHealthCheck'], to_s)] }, 'http2HealthCheck' => ->(obj) { [:http2_health_check, GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(obj['http2HealthCheck'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/healthChecks' end end ================================================ FILE: generate/libraries/google_compute_http_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeHttpHealthCheck < GcpResourceBase name 'google_compute_http_health_check' desc 'HttpHealthCheck' supports platform: 'gcp' attr_reader :params attr_reader :check_interval_sec attr_reader :creation_timestamp attr_reader :description attr_reader :healthy_threshold attr_reader :host attr_reader :id attr_reader :name attr_reader :port attr_reader :request_path attr_reader :timeout_sec attr_reader :unhealthy_threshold def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @check_interval_sec = @fetched['checkIntervalSec'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @healthy_threshold = @fetched['healthyThreshold'] @host = @fetched['host'] @id = @fetched['id'] @name = @fetched['name'] @port = @fetched['port'] @request_path = @fetched['requestPath'] @timeout_sec = @fetched['timeoutSec'] @unhealthy_threshold = @fetched['unhealthyThreshold'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "HttpHealthCheck #{@params[:name]}" end def un_parse { 'check_interval_sec' => ->(x, _) { x.nil? ? [] : ["its('check_interval_sec') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'healthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('healthy_threshold') { should cmp #{x.inspect} }"] }, 'host' => ->(x, _) { x.nil? ? [] : ["its('host') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'port' => ->(x, _) { x.nil? ? [] : ["its('port') { should cmp #{x.inspect} }"] }, 'request_path' => ->(x, _) { x.nil? ? [] : ["its('request_path') { should cmp #{x.inspect} }"] }, 'timeout_sec' => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, 'unhealthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('unhealthy_threshold') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'HttpHealthCheck' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_http_health_check', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/httpHealthChecks/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_http_health_checks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeHttpHealthChecks < GcpResourceBase name 'google_compute_http_health_checks' desc 'HttpHealthCheck plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:check_interval_secs, field: :check_interval_sec) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:healthy_thresholds, field: :healthy_threshold) filter_table_config.add(:hosts, field: :host) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:ports, field: :port) filter_table_config.add(:request_paths, field: :request_path) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.add(:unhealthy_thresholds, field: :unhealthy_threshold) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, 'host' => ->(obj) { [:host, obj['host']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'port' => ->(obj) { [:port, obj['port']] }, 'requestPath' => ->(obj) { [:request_path, obj['requestPath']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/httpHealthChecks' end end ================================================ FILE: generate/libraries/google_compute_https_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeHttpsHealthCheck < GcpResourceBase name 'google_compute_https_health_check' desc 'HttpsHealthCheck' supports platform: 'gcp' attr_reader :params attr_reader :check_interval_sec attr_reader :creation_timestamp attr_reader :description attr_reader :healthy_threshold attr_reader :host attr_reader :id attr_reader :name attr_reader :port attr_reader :request_path attr_reader :timeout_sec attr_reader :unhealthy_threshold def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @check_interval_sec = @fetched['checkIntervalSec'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @healthy_threshold = @fetched['healthyThreshold'] @host = @fetched['host'] @id = @fetched['id'] @name = @fetched['name'] @port = @fetched['port'] @request_path = @fetched['requestPath'] @timeout_sec = @fetched['timeoutSec'] @unhealthy_threshold = @fetched['unhealthyThreshold'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "HttpsHealthCheck #{@params[:name]}" end def un_parse { 'check_interval_sec' => ->(x, _) { x.nil? ? [] : ["its('check_interval_sec') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'healthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('healthy_threshold') { should cmp #{x.inspect} }"] }, 'host' => ->(x, _) { x.nil? ? [] : ["its('host') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'port' => ->(x, _) { x.nil? ? [] : ["its('port') { should cmp #{x.inspect} }"] }, 'request_path' => ->(x, _) { x.nil? ? [] : ["its('request_path') { should cmp #{x.inspect} }"] }, 'timeout_sec' => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, 'unhealthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('unhealthy_threshold') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'HttpsHealthCheck' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_https_health_check', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/httpsHealthChecks/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_https_health_checks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeHttpsHealthChecks < GcpResourceBase name 'google_compute_https_health_checks' desc 'HttpsHealthCheck plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:check_interval_secs, field: :check_interval_sec) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:healthy_thresholds, field: :healthy_threshold) filter_table_config.add(:hosts, field: :host) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:ports, field: :port) filter_table_config.add(:request_paths, field: :request_path) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.add(:unhealthy_thresholds, field: :unhealthy_threshold) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, 'host' => ->(obj) { [:host, obj['host']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'port' => ->(obj) { [:port, obj['port']] }, 'requestPath' => ->(obj) { [:request_path, obj['requestPath']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/httpsHealthChecks' end end ================================================ FILE: generate/libraries/google_compute_image.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeImage < GcpResourceBase name 'google_compute_image' desc 'Verifies settings for an image' example " describe google_compute_image(project: 'chef-inspec-gcp', name: 'image-1') do it { should exist } its('name') { should eq 'image-1' } its('source_type') { should eq 'RAW' } its('family') { should eq 'inspec-test-family' } its('status') { should eq 'ready' } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] # there's a little extra complication here because we might want to retrieve a project custom image, or # the latest image that is part of an image family begin @image = @gcp.gcp_compute_client.get_image(opts[:project], opts[:name]) create_resource_methods(@image) rescue Google::Apis::ClientError # if the above is not successful try to get the image from an image family before giving up # Note: this will swallow the previous exception but allows to preserve parity with the single # google_compute_image tf resource catch_gcp_errors do @image = @gcp.gcp_compute_client.get_image_from_family(opts[:project], opts[:name]) create_resource_methods(@image) end end end def exists? !@image.nil? end def to_s "Image #{@display_name}" end end end ================================================ FILE: generate/libraries/google_compute_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/instance_disks' require 'google/compute/property/instance_guest_accelerators' require 'google/compute/property/instance_network_interfaces' require 'google/compute/property/instance_scheduling' require 'google/compute/property/instance_service_accounts' require 'google/compute/property/instance_shielded_instance_config' require 'google/compute/property/instance_tags' # A provider to manage Compute Engine resources. class ComputeInstance < GcpResourceBase name 'google_compute_instance' desc 'Instance' supports platform: 'gcp' attr_reader :params attr_reader :can_ip_forward attr_reader :cpu_platform attr_reader :creation_timestamp attr_reader :deletion_protection attr_reader :disks attr_reader :guest_accelerators attr_reader :hostname attr_reader :id attr_reader :label_fingerprint attr_reader :labels attr_reader :metadata attr_reader :machine_type attr_reader :min_cpu_platform attr_reader :name attr_reader :network_interfaces attr_reader :scheduling attr_reader :service_accounts attr_reader :shielded_instance_config attr_reader :status attr_reader :status_message attr_reader :tags attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @can_ip_forward = @fetched['canIpForward'] @cpu_platform = @fetched['cpuPlatform'] @creation_timestamp = @fetched['creationTimestamp'] @deletion_protection = @fetched['deletionProtection'] @disks = GoogleInSpec::Compute::Property::InstanceDisksArray.parse(@fetched['disks'], to_s) @guest_accelerators = GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(@fetched['guestAccelerators'], to_s) @hostname = @fetched['hostname'] @id = @fetched['id'] @label_fingerprint = @fetched['labelFingerprint'] @labels = @fetched['labels'] @metadata = @fetched['metadata'] @machine_type = @fetched['machineType'] @min_cpu_platform = @fetched['minCpuPlatform'] @name = @fetched['name'] @network_interfaces = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(@fetched['networkInterfaces'], to_s) @scheduling = GoogleInSpec::Compute::Property::InstanceScheduling.new(@fetched['scheduling'], to_s) @service_accounts = GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(@fetched['serviceAccounts'], to_s) @shielded_instance_config = GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(@fetched['shieldedInstanceConfig'], to_s) @status = @fetched['status'] @status_message = @fetched['statusMessage'] @tags = GoogleInSpec::Compute::Property::InstanceTags.new(@fetched['tags'], to_s) @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Instance #{@params[:name]}" end def un_parse { 'can_ip_forward' => ->(x, _) { x.nil? ? [] : ["its('can_ip_forward') { should cmp #{x.inspect} }"] }, 'cpu_platform' => ->(x, _) { x.nil? ? [] : ["its('cpu_platform') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp') { should cmp #{x.inspect} }"] }, 'deletion_protection' => ->(x, _) { x.nil? ? [] : ["its('deletion_protection') { should cmp #{x.inspect} }"] }, 'disks' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('disks') { should include '#{single.to_json}' }" } }, 'guest_accelerators' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('guest_accelerators') { should include '#{single.to_json}' }" } }, 'hostname' => ->(x, _) { x.nil? ? [] : ["its('hostname') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'label_fingerprint' => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'metadata' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'machine_type' => ->(x, _) { x.nil? ? [] : ["its('machine_type') { should cmp #{x.inspect} }"] }, 'min_cpu_platform' => ->(x, _) { x.nil? ? [] : ["its('min_cpu_platform') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'network_interfaces' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('network_interfaces') { should include '#{single.to_json}' }" } }, 'scheduling' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceScheduling.un_parse(x, 'scheduling') }, 'service_accounts' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('service_accounts') { should include '#{single.to_json}' }" } }, 'shielded_instance_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.un_parse(x, 'shielded_instance_config') }, 'status' => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, 'status_message' => ->(x, _) { x.nil? ? [] : ["its('status_message') { should cmp #{x.inspect} }"] }, 'tags' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTags.un_parse(x, 'tags') }, 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Instance' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_instance', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/instances/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_instance_group.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeInstanceGroup < GcpResourceBase name 'google_compute_instance_group' desc 'Verifies settings for a compute instance group' example " describe google_compute_instance_group(project: 'chef-inspec-gcp', zone: 'europe-west2-a', name: 'gcp-inspec-test') do it { should exist } its('name') { should eq 'inspec-test' } its('status') { should eq 'in_use' } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @instance_group = @gcp.gcp_compute_client.get_instance_group(opts[:project], opts[:zone], opts[:name]) create_resource_methods(@instance_group) end end def port_name find_named_ports(:name) end RSpec::Matchers.alias_matcher :has_port_name, :be_allow_port_name def port_value find_named_ports(:port) end RSpec::Matchers.alias_matcher :has_port_value, :be_allow_port_value def find_named_ports(key = :name) # check all name/port values for a match return false if !defined?(named_ports) || named_ports.nil? named_ports.each do |named_port| next if !defined?(named_port.item[key]) || named_port.item[key].nil? return named_port.item[key] end false end def exists? !@instance_group.nil? end def to_s "Instance Group #{@display_name}" end end end ================================================ FILE: generate/libraries/google_compute_instance_group_manager.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/instancegroupmanager_current_actions' require 'google/compute/property/instancegroupmanager_named_ports' # A provider to manage Compute Engine resources. class ComputeInstanceGroupManager < GcpResourceBase name 'google_compute_instance_group_manager' desc 'InstanceGroupManager' supports platform: 'gcp' attr_reader :params attr_reader :base_instance_name attr_reader :creation_timestamp attr_reader :current_actions attr_reader :description attr_reader :id attr_reader :instance_group attr_reader :instance_template attr_reader :name attr_reader :named_ports attr_reader :region attr_reader :target_pools attr_reader :target_size attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @base_instance_name = @fetched['baseInstanceName'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @current_actions = GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(@fetched['currentActions'], to_s) @description = @fetched['description'] @id = @fetched['id'] @instance_group = @fetched['instanceGroup'] @instance_template = @fetched['instanceTemplate'] @name = @fetched['name'] @named_ports = GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(@fetched['namedPorts'], to_s) @region = @fetched['region'] @target_pools = @fetched['targetPools'] @target_size = @fetched['targetSize'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "InstanceGroupManager #{@params[:name]}" end def un_parse { 'base_instance_name' => ->(x, _) { x.nil? ? [] : ["its('base_instance_name') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'current_actions' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.un_parse(x, 'current_actions') }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'instance_group' => ->(x, _) { x.nil? ? [] : ["its('instance_group') { should cmp #{x.inspect} }"] }, 'instance_template' => ->(x, _) { x.nil? ? [] : ["its('instance_template') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'named_ports' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('named_ports') { should include '#{single.to_json}' }" } }, 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, 'target_pools' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target_pools') { should include #{single.inspect} }" } }, 'target_size' => ->(x, _) { x.nil? ? [] : ["its('target_size') { should cmp #{x.inspect} }"] }, 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'InstanceGroupManager' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_instance_group_manager', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_instance_group_managers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeInstanceGroupManagers < GcpResourceBase name 'google_compute_instance_group_managers' desc 'InstanceGroupManager plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:base_instance_names, field: :base_instance_name) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:current_actions, field: :current_actions) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:instance_groups, field: :instance_group) filter_table_config.add(:instance_templates, field: :instance_template) filter_table_config.add(:names, field: :name) filter_table_config.add(:named_ports, field: :named_ports) filter_table_config.add(:regions, field: :region) filter_table_config.add(:target_pools, field: :target_pools) filter_table_config.add(:target_sizes, field: :target_size) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'baseInstanceName' => ->(obj) { [:base_instance_name, obj['baseInstanceName']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'currentActions' => ->(obj) { [:current_actions, GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(obj['currentActions'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'instanceGroup' => ->(obj) { [:instance_group, obj['instanceGroup']] }, 'instanceTemplate' => ->(obj) { [:instance_template, obj['instanceTemplate']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'namedPorts' => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(obj['namedPorts'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, 'targetPools' => ->(obj) { [:target_pools, obj['targetPools']] }, 'targetSize' => ->(obj) { [:target_size, obj['targetSize']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project zone name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/instanceGroupManagers' end end ================================================ FILE: generate/libraries/google_compute_instance_groups.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeInstanceGroups < GcpResourceBase name 'google_compute_instance_groups' desc 'Verifies settings for GCP compute instance_groups in bulk' example " describe google_compute_instance_groups(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @zone = opts[:zone] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:instance_group_ids, field: :instance_group_id) filter_table_config.add(:instance_group_names, field: :instance_group_name) filter_table_config.connect(self, :fetch_data) def fetch_data instance_group_rows = [] catch_gcp_errors do @instance_groups = @gcp.gcp_compute_client.list_instance_groups(@project, @zone) end return [] if !@instance_groups || !@instance_groups.items @instance_groups.items.map do |instance_group| instance_group_rows+=[{ instance_group_id: instance_group.id, instance_group_name: instance_group.name }] end @table = instance_group_rows end end end ================================================ FILE: generate/libraries/google_compute_instance_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/instancetemplate_properties' require 'google/compute/property/instancetemplate_properties_disks' require 'google/compute/property/instancetemplate_properties_guest_accelerators' require 'google/compute/property/instancetemplate_properties_network_interfaces' require 'google/compute/property/instancetemplate_properties_scheduling' require 'google/compute/property/instancetemplate_properties_service_accounts' require 'google/compute/property/instancetemplate_properties_tags' # A provider to manage Compute Engine resources. class ComputeInstanceTemplate < GcpResourceBase name 'google_compute_instance_template' desc 'InstanceTemplate' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :properties def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @properties = GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(@fetched['properties'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "InstanceTemplate #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'properties' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplateProperties.un_parse(x, 'properties') }, } end def dump(path, template_path, test_number, ignored_fields) name = 'InstanceTemplate' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_instance_template', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/instanceTemplates/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_instance_templates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeInstanceTemplates < GcpResourceBase name 'google_compute_instance_templates' desc 'InstanceTemplate plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:properties, field: :properties) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'properties' => ->(obj) { [:properties, GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(obj['properties'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/instanceTemplates' end end ================================================ FILE: generate/libraries/google_compute_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeInstances < GcpResourceBase name 'google_compute_instances' desc 'Instance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:can_ip_forwards, field: :can_ip_forward) filter_table_config.add(:cpu_platforms, field: :cpu_platform) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:deletion_protections, field: :deletion_protection) filter_table_config.add(:disks, field: :disks) filter_table_config.add(:guest_accelerators, field: :guest_accelerators) filter_table_config.add(:hostnames, field: :hostname) filter_table_config.add(:ids, field: :id) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:machine_types, field: :machine_type) filter_table_config.add(:min_cpu_platforms, field: :min_cpu_platform) filter_table_config.add(:names, field: :name) filter_table_config.add(:network_interfaces, field: :network_interfaces) filter_table_config.add(:schedulings, field: :scheduling) filter_table_config.add(:service_accounts, field: :service_accounts) filter_table_config.add(:shielded_instance_configs, field: :shielded_instance_config) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:status_messages, field: :status_message) filter_table_config.add(:tags, field: :tags) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'canIpForward' => ->(obj) { [:can_ip_forward, obj['canIpForward']] }, 'cpuPlatform' => ->(obj) { [:cpu_platform, obj['cpuPlatform']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'deletionProtection' => ->(obj) { [:deletion_protection, obj['deletionProtection']] }, 'disks' => ->(obj) { [:disks, GoogleInSpec::Compute::Property::InstanceDisksArray.parse(obj['disks'], to_s)] }, 'guestAccelerators' => ->(obj) { [:guest_accelerators, GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(obj['guestAccelerators'], to_s)] }, 'hostname' => ->(obj) { [:hostname, obj['hostname']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, 'machineType' => ->(obj) { [:machine_type, obj['machineType']] }, 'minCpuPlatform' => ->(obj) { [:min_cpu_platform, obj['minCpuPlatform']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'networkInterfaces' => ->(obj) { [:network_interfaces, GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(obj['networkInterfaces'], to_s)] }, 'scheduling' => ->(obj) { [:scheduling, GoogleInSpec::Compute::Property::InstanceScheduling.new(obj['scheduling'], to_s)] }, 'serviceAccounts' => ->(obj) { [:service_accounts, GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(obj['serviceAccounts'], to_s)] }, 'shieldedInstanceConfig' => ->(obj) { [:shielded_instance_config, GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(obj['shieldedInstanceConfig'], to_s)] }, 'status' => ->(obj) { [:status, obj['status']] }, 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, 'tags' => ->(obj) { [:tags, GoogleInSpec::Compute::Property::InstanceTags.new(obj['tags'], to_s)] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project zone name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/instances' end end ================================================ FILE: generate/libraries/google_compute_network.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/network_routing_config' # A provider to manage Compute Engine resources. class ComputeNetwork < GcpResourceBase name 'google_compute_network' desc 'Network' supports platform: 'gcp' attr_reader :params attr_reader :description attr_reader :gateway_ipv4 attr_reader :id attr_reader :name attr_reader :subnetworks attr_reader :auto_create_subnetworks attr_reader :creation_timestamp attr_reader :routing_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @description = @fetched['description'] @gateway_ipv4 = @fetched['gatewayIPv4'] @id = @fetched['id'] @name = @fetched['name'] @subnetworks = @fetched['subnetworks'] @auto_create_subnetworks = @fetched['autoCreateSubnetworks'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @routing_config = GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(@fetched['routingConfig'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Network #{@params[:name]}" end def un_parse { 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'gateway_ipv4' => ->(x, _) { x.nil? ? [] : ["its('gateway_ipv4') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'subnetworks' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('subnetworks') { should include #{single.inspect} }" } }, 'auto_create_subnetworks' => ->(x, _) { x.nil? ? [] : ["its('auto_create_subnetworks') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'routing_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::NetworkRoutingConfig.un_parse(x, 'routing_config') }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Network' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_network', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/networks/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_network_endpoint_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeNetworkEndpointGroup < GcpResourceBase name 'google_compute_network_endpoint_group' desc 'NetworkEndpointGroup' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :name attr_reader :description attr_reader :network_endpoint_type attr_reader :size attr_reader :network attr_reader :subnetwork attr_reader :default_port attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @id = @fetched['id'] @name = @fetched['name'] @description = @fetched['description'] @network_endpoint_type = @fetched['networkEndpointType'] @size = @fetched['size'] @network = @fetched['network'] @subnetwork = @fetched['subnetwork'] @default_port = @fetched['defaultPort'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "NetworkEndpointGroup #{@params[:name]}" end def un_parse { 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'network_endpoint_type' => ->(x, _) { x.nil? ? [] : ["its('network_endpoint_type') { should cmp #{x.inspect} }"] }, 'size' => ->(x, _) { x.nil? ? [] : ["its('size') { should cmp #{x.inspect} }"] }, 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, 'subnetwork' => ->(x, _) { x.nil? ? [] : ["its('subnetwork') { should cmp #{x.inspect} }"] }, 'default_port' => ->(x, _) { x.nil? ? [] : ["its('default_port') { should cmp #{x.inspect} }"] }, 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'NetworkEndpointGroup' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_network_endpoint_group', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_network_endpoint_groups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNetworkEndpointGroups < GcpResourceBase name 'google_compute_network_endpoint_groups' desc 'NetworkEndpointGroup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:network_endpoint_types, field: :network_endpoint_type) filter_table_config.add(:sizes, field: :size) filter_table_config.add(:networks, field: :network) filter_table_config.add(:subnetworks, field: :subnetwork) filter_table_config.add(:default_ports, field: :default_port) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'networkEndpointType' => ->(obj) { [:network_endpoint_type, obj['networkEndpointType']] }, 'size' => ->(obj) { [:size, obj['size']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, 'defaultPort' => ->(obj) { [:default_port, obj['defaultPort']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project zone name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/networkEndpointGroups' end end ================================================ FILE: generate/libraries/google_compute_networks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNetworks < GcpResourceBase name 'google_compute_networks' desc 'Network plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:gateway_ipv4s, field: :gateway_ipv4) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:subnetworks, field: :subnetworks) filter_table_config.add(:auto_create_subnetworks, field: :auto_create_subnetworks) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:routing_configs, field: :routing_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'description' => ->(obj) { [:description, obj['description']] }, 'gatewayIPv4' => ->(obj) { [:gateway_ipv4, obj['gatewayIPv4']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'subnetworks' => ->(obj) { [:subnetworks, obj['subnetworks']] }, 'autoCreateSubnetworks' => ->(obj) { [:auto_create_subnetworks, obj['autoCreateSubnetworks']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'routingConfig' => ->(obj) { [:routing_config, GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(obj['routingConfig'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/networks' end end ================================================ FILE: generate/libraries/google_compute_node_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeNodeGroup < GcpResourceBase name 'google_compute_node_group' desc 'NodeGroup' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :name attr_reader :node_template attr_reader :size attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @name = @fetched['name'] @node_template = @fetched['nodeTemplate'] @size = @fetched['size'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "NodeGroup #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'node_template' => ->(x, _) { x.nil? ? [] : ["its('node_template') { should cmp #{x.inspect} }"] }, 'size' => ->(x, _) { x.nil? ? [] : ["its('size') { should cmp #{x.inspect} }"] }, 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'NodeGroup' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_node_group', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/nodeGroups/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_node_groups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNodeGroups < GcpResourceBase name 'google_compute_node_groups' desc 'NodeGroup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.add(:node_templates, field: :node_template) filter_table_config.add(:sizes, field: :size) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'nodeTemplate' => ->(obj) { [:node_template, obj['nodeTemplate']] }, 'size' => ->(obj) { [:size, obj['size']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project zone name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/nodeGroups' end end ================================================ FILE: generate/libraries/google_compute_node_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/nodetemplate_node_type_flexibility' # A provider to manage Compute Engine resources. class ComputeNodeTemplate < GcpResourceBase name 'google_compute_node_template' desc 'NodeTemplate' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :name attr_reader :node_affinity_labels attr_reader :node_type attr_reader :node_type_flexibility attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @name = @fetched['name'] @node_affinity_labels = @fetched['nodeAffinityLabels'] @node_type = @fetched['nodeType'] @node_type_flexibility = GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(@fetched['nodeTypeFlexibility'], to_s) @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "NodeTemplate #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'node_affinity_labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('node_affinity_labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'node_type' => ->(x, _) { x.nil? ? [] : ["its('node_type') { should cmp #{x.inspect} }"] }, 'node_type_flexibility' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.un_parse(x, 'node_type_flexibility') }, 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'NodeTemplate' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_node_template', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/nodeTemplates/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_node_templates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNodeTemplates < GcpResourceBase name 'google_compute_node_templates' desc 'NodeTemplate plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.add(:node_affinity_labels, field: :node_affinity_labels) filter_table_config.add(:node_types, field: :node_type) filter_table_config.add(:node_type_flexibilities, field: :node_type_flexibility) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'nodeAffinityLabels' => ->(obj) { [:node_affinity_labels, obj['nodeAffinityLabels']] }, 'nodeType' => ->(obj) { [:node_type, obj['nodeType']] }, 'nodeTypeFlexibility' => ->(obj) { [:node_type_flexibility, GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(obj['nodeTypeFlexibility'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project region name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/nodeTemplates' end end ================================================ FILE: generate/libraries/google_compute_project_info.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeProjectInfo < GcpResourceBase name 'google_compute_project_info' desc 'Verifies settings for GCP Compute Project Info' example " describe google_compute_project_info(project: 'chef-inspec-gcp') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:project] catch_gcp_errors do @project_info = @gcp.gcp_compute_client.get_project(opts[:project]) create_resource_methods(@project_info) end end def has_enabled_oslogin? return false if !defined?(@project_info.common_instance_metadata.items) || @project_info.common_instance_metadata.items.nil? @project_info.common_instance_metadata.items.each do |element| return true if element.key=='enable-oslogin' and element.value.casecmp('true').zero? end false end def creation_timestamp_date return false if !defined?(creation_timestamp) || creation_timestamp.nil? Time.parse(creation_timestamp.to_s) end def exists? !@project_info.nil? end def to_s "Compute Project Info #{@display_name}" end end end ================================================ FILE: generate/libraries/google_compute_region.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/region_deprecated' require 'google/compute/property/region_quotas' # A provider to manage Compute Engine resources. class ComputeRegion < GcpResourceBase name 'google_compute_region' desc 'Region' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :deprecated attr_reader :description attr_reader :id attr_reader :name attr_reader :quotas attr_reader :status attr_reader :zones def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @deprecated = GoogleInSpec::Compute::Property::RegionDeprecated.new(@fetched['deprecated'], to_s) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @quotas = GoogleInSpec::Compute::Property::RegionQuotasArray.parse(@fetched['quotas'], to_s) @status = @fetched['status'] @zones = @fetched['zones'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Region #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'deprecated' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::RegionDeprecated.un_parse(x, 'deprecated') }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'quotas' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('quotas') { should include '#{single.to_json}' }" } }, 'status' => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, 'zones' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('zones') { should include #{single.inspect} }" } }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Region' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_region', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end # helper for returning a list of zone short names rather than fully qualified URLs e.g. # https://www.googleapis.com/compute/v1/projects/spaterson-project/zones/asia-east1-a def zone_names return [] if !exists? @zones.map { |zone| zone.split('/').last } end def up? return false if !exists? @status == 'UP' end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_region_backend_service.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regionbackendservice_backends' require 'google/compute/property/regionbackendservice_connection_draining' # A provider to manage Compute Engine resources. class ComputeRegionBackendService < GcpResourceBase name 'google_compute_region_backend_service' desc 'RegionBackendService' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :health_checks attr_reader :backends attr_reader :description attr_reader :fingerprint attr_reader :protocol attr_reader :session_affinity attr_reader :region attr_reader :timeout_sec attr_reader :connection_draining attr_reader :load_balancing_scheme def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = @fetched['name'] @health_checks = @fetched['healthChecks'] @backends = GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(@fetched['backends'], to_s) @description = @fetched['description'] @fingerprint = @fetched['fingerprint'] @protocol = @fetched['protocol'] @session_affinity = @fetched['sessionAffinity'] @region = @fetched['region'] @timeout_sec = @fetched['timeoutSec'] @connection_draining = GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(@fetched['connectionDraining'], to_s) @load_balancing_scheme = @fetched['loadBalancingScheme'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "RegionBackendService #{@params[:name]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'health_checks' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('health_checks') { should include #{single.inspect} }" } }, 'backends' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('backends') { should include '#{single.to_json}' }" } }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'fingerprint' => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, 'protocol' => ->(x, _) { x.nil? ? [] : ["its('protocol') { should cmp #{x.inspect} }"] }, 'session_affinity' => ->(x, _) { x.nil? ? [] : ["its('session_affinity') { should cmp #{x.inspect} }"] }, 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, 'timeout_sec' => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, 'connection_draining' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.un_parse(x, 'connection_draining') }, 'load_balancing_scheme' => ->(x, _) { x.nil? ? [] : ["its('load_balancing_scheme') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'RegionBackendService' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_region_backend_service', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/backendServices/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_region_backend_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionBackendServices < GcpResourceBase name 'google_compute_region_backend_services' desc 'RegionBackendService plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:health_checks, field: :health_checks) filter_table_config.add(:backends, field: :backends) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:protocols, field: :protocol) filter_table_config.add(:session_affinities, field: :session_affinity) filter_table_config.add(:regions, field: :region) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.add(:connection_drainings, field: :connection_draining) filter_table_config.add(:load_balancing_schemes, field: :load_balancing_scheme) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'healthChecks' => ->(obj) { [:health_checks, obj['healthChecks']] }, 'backends' => ->(obj) { [:backends, GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(obj['backends'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'protocol' => ->(obj) { [:protocol, obj['protocol']] }, 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, 'connectionDraining' => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(obj['connectionDraining'], to_s)] }, 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project region name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/backendServices' end end ================================================ FILE: generate/libraries/google_compute_region_instance_group_manager.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeRegionInstanceGroupManager < GcpResourceBase name 'google_compute_region_instance_group_manager' desc 'Verifies settings for a compute instance group manager' example " describe google_compute_region_instance_group_manager(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-test') do it { should exist } its('name') { should eq 'inspec-test' } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] @region = opts[:region] catch_gcp_errors do @instance_group_manager = @gcp.gcp_compute_client.get_region_instance_group_manager(opts[:project], @region, @display_name) create_resource_methods(@instance_group_manager) end end def port_name find_named_ports(:name) end RSpec::Matchers.alias_matcher :has_port_name, :be_allow_port_name def port_value find_named_ports(:port) end RSpec::Matchers.alias_matcher :has_port_value, :be_allow_port_value def find_named_ports(key = :name) # check all name/port values for a match return false if !defined?(named_ports) || named_ports.nil? named_ports.each do |named_port| next if !defined?(named_port.item[key]) || named_port.item[key].nil? return named_port.item[key] end false end def exists? !@instance_group_manager.nil? end def to_s "Region Instance Group Manager #{@display_name}" end end end ================================================ FILE: generate/libraries/google_compute_region_instance_group_managers.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeRegionInstanceGroupManagers < GcpResourceBase name 'google_compute_region_instance_group_managers' desc 'Verifies settings for GCP compute region_instance_group_managers in bulk' example " describe google_compute_region_instance_group_managers(project: 'chef-inspec-gcp', region: 'europe-west2') do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @region = opts[:region] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:instance_group_manager_ids, field: :instance_group_manager_id) filter_table_config.add(:instance_group_manager_names, field: :instance_group_manager_name) filter_table_config.connect(self, :fetch_data) def fetch_data instance_group_manager_rows = [] catch_gcp_errors do @instance_group_managers = @gcp.gcp_compute_client.list_region_instance_group_managers(@project, @region) end return [] if !@instance_group_managers || !@instance_group_managers.items @instance_group_managers.items.map do |instance_group| instance_group_manager_rows+=[{ instance_group_manager_id: instance_group.id, instance_group_manager_name: instance_group.name }] end @table = instance_group_manager_rows end end end ================================================ FILE: generate/libraries/google_compute_regional_disk.rb ================================================ # frozen_string_literal: false require 'gcp_backend' require 'google/compute/property/disk_disk_encryption_key' require 'google/compute/property/disk_source_image_encryption_key' require 'google/compute/property/disk_source_snapshot_encryption_key' # A provider to manage Compute Engine resources. class RegionalDisk < GcpResourceBase name 'google_compute_regional_disk' desc 'RegionalDisk' supports platform: 'gcp' attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :params attr_reader :description attr_reader :size_gb attr_reader :zone attr_reader :source_snapshot attr_reader :source_snapshot_id attr_reader :source_snapshot_encryption_key attr_reader :source_image attr_reader :source_image_id attr_reader :source_image_encryption_key attr_reader :type attr_reader :licenses attr_reader :last_attach_timestamp attr_reader :last_detach_timestamp attr_reader :users attr_reader :disk_encryption_key attr_reader :labels attr_reader :label_fingerprint attr_reader :physical_block_size_bytes attr_reader :region attr_reader :replica_zones attr_reader :status def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params) parse unless @fetched.nil? end def parse @id = @fetched['id'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @name = @fetched['name'] @size_gb = @fetched['sizeGb'] @type = @fetched['type'] @label_fingerprint = @fetched['labelFingerprint'] @region = @fetched['region'] @replica_zones = @fetched['replicaZones'] @physical_block_size_bytes = @fetched['physicalBlockSizeBytes'] @description = @fetched['description'] @last_attach_timestamp = parse_time_string(@fetched['lastAttachTimestamp']) @last_detach_timestamp = parse_time_string(@fetched['lastDetachTimestamp']) @labels = @fetched['labels'] @licenses = @fetched['licenses'] @users = @fetched['users'] @source_image = @fetched['sourceImage'] @zone = @fetched['zone'] @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched['sourceImageEncryptionKey'], to_s) @source_image_id = @fetched['sourceImageId'] @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched['diskEncryptionKey'], to_s) @source_snapshot = @fetched['sourceSnapshot'] @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched['sourceSnapshotEncryptionKey'], to_s) @source_snapshot_id = @fetched['sourceSnapshotId'] @stat = @fetched['status'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "RegionalDisk #{@params[:name]}" end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/disks/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_regions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegions < GcpResourceBase name 'google_compute_regions' desc 'Region plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:deprecateds, field: :deprecated) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:region_ids, field: :region_id) filter_table_config.add(:region_names, field: :region_name) filter_table_config.add(:quotas, field: :quotas) filter_table_config.add(:region_statuses, field: :region_status) filter_table_config.add(:zones, field: :zones) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::RegionDeprecated.new(obj['deprecated'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:region_id, obj['id']] }, 'name' => ->(obj) { [:region_name, obj['name']] }, 'quotas' => ->(obj) { [:quotas, GoogleInSpec::Compute::Property::RegionQuotasArray.parse(obj['quotas'], to_s)] }, 'status' => ->(obj) { [:region_status, obj['status']] }, 'zones' => ->(obj) { [:zones, obj['zones']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions' end end ================================================ FILE: generate/libraries/google_compute_route.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeRoute < GcpResourceBase name 'google_compute_route' desc 'Route' supports platform: 'gcp' attr_reader :params attr_reader :dest_range attr_reader :description attr_reader :name attr_reader :network attr_reader :priority attr_reader :tags attr_reader :next_hop_gateway attr_reader :next_hop_instance attr_reader :next_hop_ip attr_reader :next_hop_vpn_tunnel attr_reader :next_hop_network def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @dest_range = @fetched['destRange'] @description = @fetched['description'] @name = @fetched['name'] @network = @fetched['network'] @priority = @fetched['priority'] @tags = @fetched['tags'] @next_hop_gateway = @fetched['nextHopGateway'] @next_hop_instance = @fetched['nextHopInstance'] @next_hop_ip = @fetched['nextHopIp'] @next_hop_vpn_tunnel = @fetched['nextHopVpnTunnel'] @next_hop_network = @fetched['nextHopNetwork'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Route #{@params[:name]}" end def un_parse { 'dest_range' => ->(x, _) { x.nil? ? [] : ["its('dest_range') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, 'priority' => ->(x, _) { x.nil? ? [] : ["its('priority') { should cmp #{x.inspect} }"] }, 'tags' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('tags') { should include #{single.inspect} }" } }, 'next_hop_gateway' => ->(x, _) { x.nil? ? [] : ["its('next_hop_gateway') { should cmp #{x.inspect} }"] }, 'next_hop_instance' => ->(x, _) { x.nil? ? [] : ["its('next_hop_instance') { should cmp #{x.inspect} }"] }, 'next_hop_ip' => ->(x, _) { x.nil? ? [] : ["its('next_hop_ip') { should cmp #{x.inspect} }"] }, 'next_hop_vpn_tunnel' => ->(x, _) { x.nil? ? [] : ["its('next_hop_vpn_tunnel') { should cmp #{x.inspect} }"] }, 'next_hop_network' => ->(x, _) { x.nil? ? [] : ["its('next_hop_network') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Route' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_route', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/routes/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_router.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/router_bgp' require 'google/compute/property/router_bgp_advertised_ip_ranges' # A provider to manage Compute Engine resources. class ComputeRouter < GcpResourceBase name 'google_compute_router' desc 'Router' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :network attr_reader :bgp attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @id = @fetched['id'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @name = @fetched['name'] @description = @fetched['description'] @network = @fetched['network'] @bgp = GoogleInSpec::Compute::Property::RouterBgp.new(@fetched['bgp'], to_s) @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Router #{@params[:name]}" end def un_parse { 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, 'bgp' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::RouterBgp.un_parse(x, 'bgp') }, 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Router' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_router', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/routers/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_routers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRouters < GcpResourceBase name 'google_compute_routers' desc 'Router plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:networks, field: :network) filter_table_config.add(:bgps, field: :bgp) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'bgp' => ->(obj) { [:bgp, GoogleInSpec::Compute::Property::RouterBgp.new(obj['bgp'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project region name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/routers' end end ================================================ FILE: generate/libraries/google_compute_routes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRoutes < GcpResourceBase name 'google_compute_routes' desc 'Route plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:dest_ranges, field: :dest_range) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.add(:networks, field: :network) filter_table_config.add(:priorities, field: :priority) filter_table_config.add(:tags, field: :tags) filter_table_config.add(:next_hop_gateways, field: :next_hop_gateway) filter_table_config.add(:next_hop_instances, field: :next_hop_instance) filter_table_config.add(:next_hop_ips, field: :next_hop_ip) filter_table_config.add(:next_hop_vpn_tunnels, field: :next_hop_vpn_tunnel) filter_table_config.add(:next_hop_networks, field: :next_hop_network) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'destRange' => ->(obj) { [:dest_range, obj['destRange']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'priority' => ->(obj) { [:priority, obj['priority']] }, 'tags' => ->(obj) { [:tags, obj['tags']] }, 'nextHopGateway' => ->(obj) { [:next_hop_gateway, obj['nextHopGateway']] }, 'nextHopInstance' => ->(obj) { [:next_hop_instance, obj['nextHopInstance']] }, 'nextHopIp' => ->(obj) { [:next_hop_ip, obj['nextHopIp']] }, 'nextHopVpnTunnel' => ->(obj) { [:next_hop_vpn_tunnel, obj['nextHopVpnTunnel']] }, 'nextHopNetwork' => ->(obj) { [:next_hop_network, obj['nextHopNetwork']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/routes' end end ================================================ FILE: generate/libraries/google_compute_snapshot.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/snapshot_snapshot_encryption_key' require 'google/compute/property/snapshot_source_disk_encryption_key' # A provider to manage Compute Engine resources. class ComputeSnapshot < GcpResourceBase name 'google_compute_snapshot' desc 'Snapshot' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :id attr_reader :disk_size_gb attr_reader :name attr_reader :description attr_reader :storage_bytes attr_reader :licenses attr_reader :labels attr_reader :label_fingerprint attr_reader :source_disk attr_reader :zone attr_reader :snapshot_encryption_key attr_reader :source_disk_encryption_key def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @id = @fetched['id'] @disk_size_gb = @fetched['diskSizeGb'] @name = @fetched['name'] @description = @fetched['description'] @storage_bytes = @fetched['storageBytes'] @licenses = @fetched['licenses'] @labels = @fetched['labels'] @label_fingerprint = @fetched['labelFingerprint'] @source_disk = @fetched['sourceDisk'] @zone = @fetched['zone'] @snapshot_encryption_key = GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(@fetched['snapshotEncryptionKey'], to_s) @source_disk_encryption_key = GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(@fetched['sourceDiskEncryptionKey'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Snapshot #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'disk_size_gb' => ->(x, _) { x.nil? ? [] : ["its('disk_size_gb') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'storage_bytes' => ->(x, _) { x.nil? ? [] : ["its('storage_bytes') { should cmp #{x.inspect} }"] }, 'licenses' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('licenses') { should include #{single.inspect} }" } }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'label_fingerprint' => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, 'source_disk' => ->(x, _) { x.nil? ? [] : ["its('source_disk') { should cmp #{x.inspect} }"] }, 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, 'snapshot_encryption_key' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.un_parse(x, 'snapshot_encryption_key') }, 'source_disk_encryption_key' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.un_parse(x, 'source_disk_encryption_key') }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Snapshot' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_snapshot', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/snapshots/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_snapshots.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeSnapshots < GcpResourceBase name 'google_compute_snapshots' desc 'Snapshot plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:ids, field: :id) filter_table_config.add(:disk_size_gbs, field: :disk_size_gb) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:storage_bytes, field: :storage_bytes) filter_table_config.add(:licenses, field: :licenses) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:source_disks, field: :source_disk) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:snapshot_encryption_keys, field: :snapshot_encryption_key) filter_table_config.add(:source_disk_encryption_keys, field: :source_disk_encryption_key) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'id' => ->(obj) { [:id, obj['id']] }, 'diskSizeGb' => ->(obj) { [:disk_size_gb, obj['diskSizeGb']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'storageBytes' => ->(obj) { [:storage_bytes, obj['storageBytes']] }, 'licenses' => ->(obj) { [:licenses, obj['licenses']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'sourceDisk' => ->(obj) { [:source_disk, obj['sourceDisk']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'snapshotEncryptionKey' => ->(obj) { [:snapshot_encryption_key, GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(obj['snapshotEncryptionKey'], to_s)] }, 'sourceDiskEncryptionKey' => ->(obj) { [:source_disk_encryption_key, GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(obj['sourceDiskEncryptionKey'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/snapshots' end end ================================================ FILE: generate/libraries/google_compute_ssl_certificate.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeSslCertificate < GcpResourceBase name 'google_compute_ssl_certificate' desc 'SslCertificate' supports platform: 'gcp' attr_reader :params attr_reader :certificate attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :private_key def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @certificate = @fetched['certificate'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @private_key = @fetched['privateKey'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "SslCertificate #{@params[:name]}" end def un_parse { 'certificate' => ->(x, _) { x.nil? ? [] : ["its('certificate') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'private_key' => ->(x, _) { x.nil? ? [] : ["its('private_key') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'SslCertificate' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_ssl_certificate', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/sslCertificates/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_ssl_certificates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeSslCertificates < GcpResourceBase name 'google_compute_ssl_certificates' desc 'SslCertificate plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:certificates, field: :certificate) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:private_keys, field: :private_key) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'certificate' => ->(obj) { [:certificate, obj['certificate']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'privateKey' => ->(obj) { [:private_key, obj['privateKey']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/sslCertificates' end end ================================================ FILE: generate/libraries/google_compute_ssl_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeSslPolicys < GcpResourceBase name 'google_compute_ssl_policies' desc 'SslPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:profiles, field: :profile) filter_table_config.add(:min_tls_versions, field: :min_tls_version) filter_table_config.add(:enabled_features, field: :enabled_features) filter_table_config.add(:custom_features, field: :custom_features) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:warnings, field: :warnings) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'profile' => ->(obj) { [:profile, obj['profile']] }, 'minTlsVersion' => ->(obj) { [:min_tls_version, obj['minTlsVersion']] }, 'enabledFeatures' => ->(obj) { [:enabled_features, obj['enabledFeatures']] }, 'customFeatures' => ->(obj) { [:custom_features, obj['customFeatures']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'warnings' => ->(obj) { [:warnings, GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(obj['warnings'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/sslPolicies' end end ================================================ FILE: generate/libraries/google_compute_ssl_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/sslpolicy_warnings' # A provider to manage Compute Engine resources. class ComputeSslPolicy < GcpResourceBase name 'google_compute_ssl_policy' desc 'SslPolicy' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :profile attr_reader :min_tls_version attr_reader :enabled_features attr_reader :custom_features attr_reader :fingerprint attr_reader :warnings def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @profile = @fetched['profile'] @min_tls_version = @fetched['minTlsVersion'] @enabled_features = @fetched['enabledFeatures'] @custom_features = @fetched['customFeatures'] @fingerprint = @fetched['fingerprint'] @warnings = GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(@fetched['warnings'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "SslPolicy #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'profile' => ->(x, _) { x.nil? ? [] : ["its('profile') { should cmp #{x.inspect} }"] }, 'min_tls_version' => ->(x, _) { x.nil? ? [] : ["its('min_tls_version') { should cmp #{x.inspect} }"] }, 'enabled_features' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('enabled_features') { should include #{single.inspect} }" } }, 'custom_features' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('custom_features') { should include #{single.inspect} }" } }, 'fingerprint' => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, 'warnings' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('warnings') { should include '#{single.to_json}' }" } }, } end def dump(path, template_path, test_number, ignored_fields) name = 'SslPolicy' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_ssl_policy', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/sslPolicies/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_subnetwork.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/subnetwork_log_config' require 'google/compute/property/subnetwork_secondary_ip_ranges' # A provider to manage Compute Engine resources. class ComputeSubnetwork < GcpResourceBase name 'google_compute_subnetwork' desc 'Subnetwork' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :gateway_address attr_reader :id attr_reader :ip_cidr_range attr_reader :name attr_reader :network attr_reader :fingerprint attr_reader :secondary_ip_ranges attr_reader :private_ip_google_access attr_reader :region attr_reader :log_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @gateway_address = @fetched['gatewayAddress'] @id = @fetched['id'] @ip_cidr_range = @fetched['ipCidrRange'] @name = @fetched['name'] @network = @fetched['network'] @fingerprint = @fetched['fingerprint'] @secondary_ip_ranges = GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(@fetched['secondaryIpRanges'], to_s) @private_ip_google_access = @fetched['privateIpGoogleAccess'] @region = @fetched['region'] @log_config = GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(@fetched['logConfig'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Subnetwork #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'gateway_address' => ->(x, _) { x.nil? ? [] : ["its('gateway_address') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'ip_cidr_range' => ->(x, _) { x.nil? ? [] : ["its('ip_cidr_range') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, 'fingerprint' => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, 'secondary_ip_ranges' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('secondary_ip_ranges') { should include '#{single.to_json}' }" } }, 'private_ip_google_access' => ->(x, _) { x.nil? ? [] : ["its('private_ip_google_access') { should cmp #{x.inspect} }"] }, 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, 'log_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::SubnetworkLogConfig.un_parse(x, 'log_config') }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Subnetwork' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_subnetwork', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/subnetworks/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_subnetwork_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Compute Engine IAM Policy resources. class SubnetworkIamPolicy < GcpResourceBase name 'google_compute_subnetwork_iam_policy' desc 'Subnetwork Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Subnetwork IamPolicy #{@params[:name]}" end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/subnetworks/{{name}}/getIamPolicy' end end ================================================ FILE: generate/libraries/google_compute_subnetworks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeSubnetworks < GcpResourceBase name 'google_compute_subnetworks' desc 'Subnetwork plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:gateway_addresses, field: :gateway_address) filter_table_config.add(:ids, field: :id) filter_table_config.add(:ip_cidr_ranges, field: :ip_cidr_range) filter_table_config.add(:names, field: :name) filter_table_config.add(:networks, field: :network) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:secondary_ip_ranges, field: :secondary_ip_ranges) filter_table_config.add(:private_ip_google_accesses, field: :private_ip_google_access) filter_table_config.add(:regions, field: :region) filter_table_config.add(:log_configs, field: :log_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'gatewayAddress' => ->(obj) { [:gateway_address, obj['gatewayAddress']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'ipCidrRange' => ->(obj) { [:ip_cidr_range, obj['ipCidrRange']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'secondaryIpRanges' => ->(obj) { [:secondary_ip_ranges, GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(obj['secondaryIpRanges'], to_s)] }, 'privateIpGoogleAccess' => ->(obj) { [:private_ip_google_access, obj['privateIpGoogleAccess']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(obj['logConfig'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project region name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/subnetworks' end end ================================================ FILE: generate/libraries/google_compute_target_http_proxies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetHttpProxys < GcpResourceBase name 'google_compute_target_http_proxies' desc 'TargetHttpProxy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:url_maps, field: :url_map) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/targetHttpProxies' end end ================================================ FILE: generate/libraries/google_compute_target_http_proxy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetHttpProxy < GcpResourceBase name 'google_compute_target_http_proxy' desc 'TargetHttpProxy' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :url_map def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @url_map = @fetched['urlMap'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "TargetHttpProxy #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'url_map' => ->(x, _) { x.nil? ? [] : ["its('url_map') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'TargetHttpProxy' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_target_http_proxy', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/targetHttpProxies/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_target_https_proxies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetHttpsProxys < GcpResourceBase name 'google_compute_target_https_proxies' desc 'TargetHttpsProxy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:quic_overrides, field: :quic_override) filter_table_config.add(:ssl_certificates, field: :ssl_certificates) filter_table_config.add(:ssl_policies, field: :ssl_policy) filter_table_config.add(:url_maps, field: :url_map) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'quicOverride' => ->(obj) { [:quic_override, obj['quicOverride']] }, 'sslCertificates' => ->(obj) { [:ssl_certificates, obj['sslCertificates']] }, 'sslPolicy' => ->(obj) { [:ssl_policy, obj['sslPolicy']] }, 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/targetHttpsProxies' end end ================================================ FILE: generate/libraries/google_compute_target_https_proxy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetHttpsProxy < GcpResourceBase name 'google_compute_target_https_proxy' desc 'TargetHttpsProxy' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :quic_override attr_reader :ssl_certificates attr_reader :ssl_policy attr_reader :url_map def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @quic_override = @fetched['quicOverride'] @ssl_certificates = @fetched['sslCertificates'] @ssl_policy = @fetched['sslPolicy'] @url_map = @fetched['urlMap'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "TargetHttpsProxy #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'quic_override' => ->(x, _) { x.nil? ? [] : ["its('quic_override') { should cmp #{x.inspect} }"] }, 'ssl_certificates' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('ssl_certificates') { should include #{single.inspect} }" } }, 'ssl_policy' => ->(x, _) { x.nil? ? [] : ["its('ssl_policy') { should cmp #{x.inspect} }"] }, 'url_map' => ->(x, _) { x.nil? ? [] : ["its('url_map') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'TargetHttpsProxy' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_target_https_proxy', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/targetHttpsProxies/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_target_pool.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetPool < GcpResourceBase name 'google_compute_target_pool' desc 'TargetPool' supports platform: 'gcp' attr_reader :params attr_reader :backup_pool attr_reader :creation_timestamp attr_reader :description attr_reader :failover_ratio attr_reader :health_check attr_reader :id attr_reader :instances attr_reader :name attr_reader :session_affinity attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @backup_pool = @fetched['backupPool'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @failover_ratio = @fetched['failoverRatio'] @health_check = @fetched['healthCheck'] @id = @fetched['id'] @instances = @fetched['instances'] @name = @fetched['name'] @session_affinity = @fetched['sessionAffinity'] @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "TargetPool #{@params[:name]}" end def un_parse { 'backup_pool' => ->(x, _) { x.nil? ? [] : ["its('backup_pool') { should cmp #{x.inspect} }"] }, 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'failover_ratio' => ->(x, _) { x.nil? ? [] : ["its('failover_ratio') { should cmp #{x.inspect} }"] }, 'health_check' => ->(x, _) { x.nil? ? [] : ["its('health_check') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'instances' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('instances') { should include #{single.inspect} }" } }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'session_affinity' => ->(x, _) { x.nil? ? [] : ["its('session_affinity') { should cmp #{x.inspect} }"] }, 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'TargetPool' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_target_pool', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end RSpec::Matchers.alias_matcher :has_target_instance, :be_has_target_instance def has_target_instance?(name, zone) instances.any? { |instance_self_link| instance_self_link.end_with?("zones/#{zone}/instances/#{name}") } end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/targetPools/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_target_pools.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetPools < GcpResourceBase name 'google_compute_target_pools' desc 'TargetPool plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:backup_pools, field: :backup_pool) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:failover_ratios, field: :failover_ratio) filter_table_config.add(:health_checks, field: :health_check) filter_table_config.add(:ids, field: :id) filter_table_config.add(:instances, field: :instances) filter_table_config.add(:names, field: :name) filter_table_config.add(:session_affinities, field: :session_affinity) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'backupPool' => ->(obj) { [:backup_pool, obj['backupPool']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'failoverRatio' => ->(obj) { [:failover_ratio, obj['failoverRatio']] }, 'healthCheck' => ->(obj) { [:health_check, obj['healthCheck']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'instances' => ->(obj) { [:instances, obj['instances']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project region name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/targetPools' end end ================================================ FILE: generate/libraries/google_compute_target_tcp_proxies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetTcpProxys < GcpResourceBase name 'google_compute_target_tcp_proxies' desc 'TargetTcpProxy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:proxy_headers, field: :proxy_header) filter_table_config.add(:services, field: :service) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'proxyHeader' => ->(obj) { [:proxy_header, obj['proxyHeader']] }, 'service' => ->(obj) { [:service, obj['service']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/targetTcpProxies' end end ================================================ FILE: generate/libraries/google_compute_target_tcp_proxy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetTcpProxy < GcpResourceBase name 'google_compute_target_tcp_proxy' desc 'TargetTcpProxy' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :proxy_header attr_reader :service def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @proxy_header = @fetched['proxyHeader'] @service = @fetched['service'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "TargetTcpProxy #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'proxy_header' => ->(x, _) { x.nil? ? [] : ["its('proxy_header') { should cmp #{x.inspect} }"] }, 'service' => ->(x, _) { x.nil? ? [] : ["its('service') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'TargetTcpProxy' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_target_tcp_proxy', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/targetTcpProxies/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_url_map.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/urlmap_host_rules' require 'google/compute/property/urlmap_path_matchers' require 'google/compute/property/urlmap_tests' # A provider to manage Compute Engine resources. class ComputeUrlMap < GcpResourceBase name 'google_compute_url_map' desc 'UrlMap' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :default_service attr_reader :description attr_reader :host_rules attr_reader :id attr_reader :fingerprint attr_reader :name attr_reader :path_matchers attr_reader :tests def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @default_service = @fetched['defaultService'] @description = @fetched['description'] @host_rules = GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(@fetched['hostRules'], to_s) @id = @fetched['id'] @fingerprint = @fetched['fingerprint'] @name = @fetched['name'] @path_matchers = GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(@fetched['pathMatchers'], to_s) @tests = GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(@fetched['tests'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "UrlMap #{@params[:name]}" end def un_parse { 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, 'default_service' => ->(x, _) { x.nil? ? [] : ["its('default_service') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'host_rules' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('host_rules') { should include '#{single.to_json}' }" } }, 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, 'fingerprint' => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'path_matchers' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('path_matchers') { should include '#{single.to_json}' }" } }, 'tests' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('tests') { should include '#{single.to_json}' }" } }, } end def dump(path, template_path, test_number, ignored_fields) name = 'UrlMap' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_compute_url_map', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/urlMaps/{{name}}' end end ================================================ FILE: generate/libraries/google_compute_url_maps.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeUrlMaps < GcpResourceBase name 'google_compute_url_maps' desc 'UrlMap plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:default_services, field: :default_service) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:host_rules, field: :host_rules) filter_table_config.add(:ids, field: :id) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:names, field: :name) filter_table_config.add(:path_matchers, field: :path_matchers) filter_table_config.add(:tests, field: :tests) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'defaultService' => ->(obj) { [:default_service, obj['defaultService']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'hostRules' => ->(obj) { [:host_rules, GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(obj['hostRules'], to_s)] }, 'id' => ->(obj) { [:id, obj['id']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'pathMatchers' => ->(obj) { [:path_matchers, GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(obj['pathMatchers'], to_s)] }, 'tests' => ->(obj) { [:tests, GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(obj['tests'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/urlMaps' end end ================================================ FILE: generate/libraries/google_compute_vpn_tunnel.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeVpnTunnel < GcpResourceBase name 'google_compute_vpn_tunnel' desc 'Verifies settings for a compute vpn_tunnel' example " describe google_compute_vpn_tunnel(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-vpn_tunnel') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @vpn_tunnel = @gcp.gcp_compute_client.get_vpn_tunnel(opts[:project], opts[:region], opts[:name]) create_resource_methods(@vpn_tunnel) end end def exists? !@vpn_tunnel.nil? end def creation_timestamp_date return false if !defined?(creation_timestamp) || creation_timestamp.nil? Time.parse(creation_timestamp.to_s) end def to_s "Tunnel #{@display_name}" end end end ================================================ FILE: generate/libraries/google_compute_vpn_tunnels.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeVpnTunnels < GcpResourceBase name 'google_compute_vpn_tunnels' desc 'Verifies settings for GCP compute vpn_tunnels in bulk' example " describe google_compute_vpn_tunnels(project: 'chef-inspec-gcp', region: 'europe-west2') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @region = opts[:region] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:vpn_tunnel_names, field: :vpn_tunnel_name) filter_table_config.add(:vpn_tunnel_target_vpn_gateways, field: :vpn_tunnel_target_vpn_gateway) filter_table_config.connect(self, :fetch_data) def fetch_data tunnel_rows = [] next_page = nil loop do catch_gcp_errors do @vpn_tunnels = @gcp.gcp_compute_client.list_vpn_tunnels(@project, @region, page_token: next_page) end return [] if !@vpn_tunnels || !@vpn_tunnels.items @vpn_tunnels.items.map do |tunnel| tunnel_rows+=[{ vpn_tunnel_name: tunnel.name, vpn_tunnel_target_vpn_gateway: tunnel.target_vpn_gateway }] end next_page = @vpn_tunnels.next_page_token break unless next_page end @table = tunnel_rows end end end ================================================ FILE: generate/libraries/google_compute_zone.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeZone < GcpResourceBase name 'google_compute_zone' desc 'Verifies settings for a zone' example " describe google_compute_zone(project: 'chef-inspec-gcp', zone: 'us-east1-b') do it { should exist } its('name') { should match 'us-east1-b' } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @zone = @gcp.gcp_compute_client.get_zone(opts[:project], opts[:name]) create_resource_methods(@zone) end end # helper method for retrieving a region name def region_name return '' if !defined?(region) || region.nil? region.split('/').last end def exists? !@zone.nil? end def up? return false if !defined?(status) || status.nil? status == 'UP' end def to_s "Zone #{@display_name}" end end end ================================================ FILE: generate/libraries/google_compute_zones.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeZones < GcpResourceBase name 'google_compute_zones' desc 'Verifies settings for GCP compute zones in bulk' example " describe google_compute_zones(project: 'chef-inspec-gcp') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:zone_ids, field: :zone_id) filter_table_config.add(:zone_names, field: :zone_name) filter_table_config.add(:zone_statuses, field: :zone_status) filter_table_config.connect(self, :fetch_data) def fetch_data zone_rows = [] catch_gcp_errors do @zones = @gcp.gcp_compute_client.list_zones(@project) end return [] if !@zones || !@zones.items @zones.items.map do |zone| zone_rows+=[{ zone_id: zone.id, zone_name: zone.name, zone_status: zone.status }] end @table = zone_rows end end end ================================================ FILE: generate/libraries/google_container_cluster.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/container_v1beta1' module Inspec::Resources class GoogleContainerCluster < GcpResourceBase name 'google_container_cluster' desc 'Verifies settings for a google container cluster' example " describe google_container_cluster(project: 'chef-inspec-gcp', zone: 'europe-west2-a', name: 'cluster-name') do it { should exist } its('name') { should eq 'inspec-test' } its('status') { should eq 'in_use' } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @cluster = @gcp.gcp_client(Google::Apis::ContainerV1beta1::ContainerService).get_zone_cluster(opts[:project], opts[:zone], opts[:name]) create_resource_methods(@cluster) end end def has_logging_enabled? return false if !defined?(@cluster.logging_service) return false if @cluster.logging_service.nil? return true if /logging\.googleapis\.com/ =~ @cluster.logging_service false end def has_monitoring_enabled? return false if !defined?(@cluster.monitoring_service) return false if @cluster.monitoring_service.nil? return true if /monitoring\.googleapis\.com/ =~ @cluster.monitoring_service false end def has_legacy_abac_disabled? return nil if !defined?(@cluster.legacy_abac) return true if @cluster.legacy_abac.to_h.empty? false end def has_master_authorized_networks_enabled? return false if !defined?(@cluster.master_authorized_networks_config) return false if @cluster.master_authorized_networks_config.to_h.empty? return false if !defined?(@cluster.master_authorized_networks_config.enabled) return true if @cluster.master_authorized_networks_config.enabled == true false end def has_resource_labels? return false if !defined?(@cluster.resource_labels) return false if @cluster.resource_labels.to_h.empty? true end def has_kubernetes_dashboard_disabled? return false if !defined?(@cluster.addons_config.kubernetes_dashboard) return false if @cluster.addons_config.kubernetes_dashboard.to_h.empty? return true if @cluster.addons_config.kubernetes_dashboard.to_h=={ 'disabled': true } false end def has_basic_authorization? return false if @cluster.master_auth.username.nil? and @cluster.master_auth.password.nil? true end def has_network_policy_enabled? return false if !defined?(@cluster.network_policy.enabled) return true if @cluster.network_policy.enabled==true false end def has_master_auth_client_key? return false if !defined?(@cluster.master_auth.client_key) return false if @cluster.master_auth.client_key.nil? return false if @cluster.master_auth.client_key=='' true end def has_ip_alias_enabled? return false if !defined?(@cluster.ip_allocation_policy.use_ip_aliases) return true if @cluster.ip_allocation_policy.use_ip_aliases==true false end def has_pod_security_policy_config? return false if !defined?(@cluster.pod_security_policy_config.enabled) return true if @cluster.pod_security_policy_config.enabled==true false end def private_cluster? return false if !defined?(@cluster.private_cluster) return true if @cluster.private_cluster==true false end def exists? !@cluster.nil? end def to_s "Cluster #{@display_name}" end end end ================================================ FILE: generate/libraries/google_container_clusters.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleContainerClusters < GcpResourceBase name 'google_container_clusters' desc 'Verifies settings for GCP container clusters in bulk' example " describe google_container_clusters(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @zone = opts[:zone] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:cluster_names, field: :cluster_name) filter_table_config.add(:cluster_statuses, field: :cluster_status) filter_table_config.add(:cluster_subnetworks, field: :cluster_subnetwork) filter_table_config.connect(self, :fetch_data) def fetch_data cluster_rows = [] catch_gcp_errors do # below seemingly doesn't provide pagination @clusters = @gcp.gcp_client(Google::Apis::ContainerV1::ContainerService).list_zone_clusters(@project, @zone) end return [] if !@clusters || !@clusters.clusters @clusters.clusters.map do |cluster| cluster_rows+=[{ cluster_name: cluster.name, cluster_status: cluster.status, cluster_subnetwork: cluster.subnetwork }] end @table = cluster_rows end end end ================================================ FILE: generate/libraries/google_container_node_pool.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/container_v1' module Inspec::Resources class GoogleContainerNodePool < GcpResourceBase name 'google_container_node_pool' desc 'Verifies settings for a container nodepool' example " describe google_container_node_pool(project: 'chef-inspec-gcp', zone: 'europe-west2-a', cluster_name: 'cluster-name', nodepool_name: 'inspec-test') do it { should exist } its('name') { should eq 'inspec-test' } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:nodepool_name] catch_gcp_errors do @nodepool = @gcp.gcp_client(Google::Apis::ContainerV1::ContainerService).get_project_zone_cluster_node_pool(opts[:project], opts[:zone], opts[:cluster_name], opts[:nodepool_name]) create_resource_methods(@nodepool) end end def has_automatic_node_repair? return false if !defined?(@nodepool.management.auto_repair) return false if @nodepool.management.auto_repair.nil? @nodepool.management.auto_repair end def has_automatic_node_upgrade? return false if !defined?(@nodepool.management.auto_upgrade) return false if @nodepool.management.auto_upgrade.nil? @nodepool.management.auto_upgrade end def config_image_type return '' if !defined?(@nodepool.config.image_type) return '' if @nodepool.config.image_type.nil? @nodepool.config.image_type end def config_service_account return '' if !defined?(@nodepool.config.service_account) return '' if @nodepool.config.service_account.nil? @nodepool.config.service_account end def config_oauth_scopes return false if !defined?(@nodepool.config.oauth_scopes) return false if @nodepool.config.oauth_scopes.nil? @nodepool.config.oauth_scopes end def exists? !@nodepool.nil? end def to_s "Nodepool #{@display_name}" end end end ================================================ FILE: generate/libraries/google_container_node_pools.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleContainerNodePools < GcpResourceBase name 'google_container_node_pools' desc 'Verifies settings for GCP container node pools in bulk' example " describe google_container_node_pools(project: 'chef-inspec-gcp', node_pool: 'europe-west2-a', cluster_name: 'inspec-gcp-cluster') it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @zone = opts[:zone] @cluster_name = opts[:cluster_name] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:node_pool_names, field: :node_pool_name) filter_table_config.add(:node_pool_statuses, field: :node_pool_status) filter_table_config.connect(self, :fetch_data) def fetch_data node_pool_rows = [] catch_gcp_errors do # no pagination @node_pools = @gcp.gcp_client(Google::Apis::ContainerV1::ContainerService).list_project_zone_cluster_node_pools(@project, @zone, @cluster_name) end return [] if !@node_pools || !@node_pools.node_pools @node_pools.node_pools.map do |node_pool| node_pool_rows+=[{ node_pool_name: node_pool.name, node_pool_status: node_pool.status }] end @table = node_pool_rows end end end ================================================ FILE: generate/libraries/google_container_regional_cluster.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/container/property/regionalcluster_addons_config' require 'google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling' require 'google/container/property/regionalcluster_addons_config_http_load_balancing' require 'google/container/property/regionalcluster_addons_config_kubernetes_dashboard' require 'google/container/property/regionalcluster_addons_config_network_policy_config' require 'google/container/property/regionalcluster_conditions' require 'google/container/property/regionalcluster_default_max_pods_constraint' require 'google/container/property/regionalcluster_ip_allocation_policy' require 'google/container/property/regionalcluster_legacy_abac' require 'google/container/property/regionalcluster_master_auth' require 'google/container/property/regionalcluster_master_auth_client_certificate_config' require 'google/container/property/regionalcluster_master_authorized_networks_config' require 'google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks' require 'google/container/property/regionalcluster_network_policy' require 'google/container/property/regionalcluster_node_config' require 'google/container/property/regionalcluster_node_config_accelerators' require 'google/container/property/regionalcluster_node_config_taints' require 'google/container/property/regionalcluster_private_cluster_config' # A provider to manage Google Kubernetes Engine resources. class ContainerRegionalCluster < GcpResourceBase name 'google_container_regional_cluster' desc 'RegionalCluster' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :initial_node_count attr_reader :node_config attr_reader :master_auth attr_reader :logging_service attr_reader :monitoring_service attr_reader :network attr_reader :private_cluster_config attr_reader :cluster_ipv4_cidr attr_reader :addons_config attr_reader :subnetwork attr_reader :locations attr_reader :resource_labels attr_reader :label_fingerprint attr_reader :legacy_abac attr_reader :network_policy attr_reader :default_max_pods_constraint attr_reader :ip_allocation_policy attr_reader :endpoint attr_reader :initial_cluster_version attr_reader :current_master_version attr_reader :current_node_version attr_reader :create_time attr_reader :status attr_reader :status_message attr_reader :node_ipv4_cidr_size attr_reader :services_ipv4_cidr attr_reader :current_node_count attr_reader :expire_time attr_reader :enable_tpu attr_reader :tpu_ipv4_cidr_block attr_reader :conditions attr_reader :master_authorized_networks_config attr_reader :location def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = @fetched['name'] @description = @fetched['description'] @initial_node_count = @fetched['initialNodeCount'] @node_config = GoogleInSpec::Container::Property::RegionalClusterNodeConfig.new(@fetched['nodeConfig'], to_s) @master_auth = GoogleInSpec::Container::Property::RegionalClusterMasterAuth.new(@fetched['masterAuth'], to_s) @logging_service = @fetched['loggingService'] @monitoring_service = @fetched['monitoringService'] @network = @fetched['network'] @private_cluster_config = GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.new(@fetched['privateClusterConfig'], to_s) @cluster_ipv4_cidr = @fetched['clusterIpv4Cidr'] @addons_config = GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(@fetched['addonsConfig'], to_s) @subnetwork = @fetched['subnetwork'] @locations = @fetched['locations'] @resource_labels = @fetched['resourceLabels'] @label_fingerprint = @fetched['labelFingerprint'] @legacy_abac = GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.new(@fetched['legacyAbac'], to_s) @network_policy = GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.new(@fetched['networkPolicy'], to_s) @default_max_pods_constraint = GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.new(@fetched['defaultMaxPodsConstraint'], to_s) @ip_allocation_policy = GoogleInSpec::Container::Property::RegionalClusterIpAllocationPolicy.new(@fetched['ipAllocationPolicy'], to_s) @endpoint = @fetched['endpoint'] @initial_cluster_version = @fetched['initialClusterVersion'] @current_master_version = @fetched['currentMasterVersion'] @current_node_version = @fetched['currentNodeVersion'] @create_time = parse_time_string(@fetched['createTime']) @status = @fetched['status'] @status_message = @fetched['statusMessage'] @node_ipv4_cidr_size = @fetched['nodeIpv4CidrSize'] @services_ipv4_cidr = @fetched['servicesIpv4Cidr'] @current_node_count = @fetched['currentNodeCount'] @expire_time = parse_time_string(@fetched['expireTime']) @enable_tpu = @fetched['enableTpu'] @tpu_ipv4_cidr_block = @fetched['tpuIpv4CidrBlock'] @conditions = GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(@fetched['conditions'], to_s) @master_authorized_networks_config = GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.new(@fetched['masterAuthorizedNetworksConfig'], to_s) @location = @fetched['location'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "RegionalCluster #{@params[:name]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'initial_node_count' => ->(x, _) { x.nil? ? [] : ["its('initial_node_count') { should cmp #{x.inspect} }"] }, 'node_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterNodeConfig.un_parse(x, 'node_config') }, 'master_auth' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterMasterAuth.un_parse(x, 'master_auth') }, 'logging_service' => ->(x, _) { x.nil? ? [] : ["its('logging_service') { should cmp #{x.inspect} }"] }, 'monitoring_service' => ->(x, _) { x.nil? ? [] : ["its('monitoring_service') { should cmp #{x.inspect} }"] }, 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, 'private_cluster_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.un_parse(x, 'private_cluster_config') }, 'cluster_ipv4_cidr' => ->(x, _) { x.nil? ? [] : ["its('cluster_ipv4_cidr') { should cmp #{x.inspect} }"] }, 'addons_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.un_parse(x, 'addons_config') }, 'subnetwork' => ->(x, _) { x.nil? ? [] : ["its('subnetwork') { should cmp #{x.inspect} }"] }, 'locations' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('locations') { should include #{single.inspect} }" } }, 'resource_labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('resource_labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'label_fingerprint' => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, 'legacy_abac' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.un_parse(x, 'legacy_abac') }, 'network_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.un_parse(x, 'network_policy') }, 'default_max_pods_constraint' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.un_parse(x, 'default_max_pods_constraint') }, 'ip_allocation_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterIpAllocationPolicy.un_parse(x, 'ip_allocation_policy') }, 'endpoint' => ->(x, _) { x.nil? ? [] : ["its('endpoint') { should cmp #{x.inspect} }"] }, 'initial_cluster_version' => ->(x, _) { x.nil? ? [] : ["its('initial_cluster_version') { should cmp #{x.inspect} }"] }, 'current_master_version' => ->(x, _) { x.nil? ? [] : ["its('current_master_version') { should cmp #{x.inspect} }"] }, 'current_node_version' => ->(x, _) { x.nil? ? [] : ["its('current_node_version') { should cmp #{x.inspect} }"] }, 'create_time' => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, 'status' => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, 'status_message' => ->(x, _) { x.nil? ? [] : ["its('status_message') { should cmp #{x.inspect} }"] }, 'node_ipv4_cidr_size' => ->(x, _) { x.nil? ? [] : ["its('node_ipv4_cidr_size') { should cmp #{x.inspect} }"] }, 'services_ipv4_cidr' => ->(x, _) { x.nil? ? [] : ["its('services_ipv4_cidr') { should cmp #{x.inspect} }"] }, 'current_node_count' => ->(x, _) { x.nil? ? [] : ["its('current_node_count') { should cmp #{x.inspect} }"] }, 'expire_time' => ->(x, _) { x.nil? ? [] : ["its('expire_time.to_s') { should cmp '#{x.inspect}' }"] }, 'enable_tpu' => ->(x, _) { x.nil? ? [] : ["its('enable_tpu') { should cmp #{x.inspect} }"] }, 'tpu_ipv4_cidr_block' => ->(x, _) { x.nil? ? [] : ["its('tpu_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, 'conditions' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('conditions') { should include '#{single.to_json}' }" } }, 'master_authorized_networks_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.un_parse(x, 'master_authorized_networks_config') }, 'location' => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'RegionalCluster' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_container_regional_cluster', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://container.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/clusters/{{name}}' end end ================================================ FILE: generate/libraries/google_container_regional_clusters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ContainerRegionalClusters < GcpResourceBase name 'google_container_regional_clusters' desc 'RegionalCluster plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:initial_node_counts, field: :initial_node_count) filter_table_config.add(:node_configs, field: :node_config) filter_table_config.add(:master_auths, field: :master_auth) filter_table_config.add(:logging_services, field: :logging_service) filter_table_config.add(:monitoring_services, field: :monitoring_service) filter_table_config.add(:networks, field: :network) filter_table_config.add(:private_cluster_configs, field: :private_cluster_config) filter_table_config.add(:cluster_ipv4_cidrs, field: :cluster_ipv4_cidr) filter_table_config.add(:addons_configs, field: :addons_config) filter_table_config.add(:subnetworks, field: :subnetwork) filter_table_config.add(:locations, field: :locations) filter_table_config.add(:resource_labels, field: :resource_labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:legacy_abacs, field: :legacy_abac) filter_table_config.add(:network_policies, field: :network_policy) filter_table_config.add(:default_max_pods_constraints, field: :default_max_pods_constraint) filter_table_config.add(:ip_allocation_policies, field: :ip_allocation_policy) filter_table_config.add(:endpoints, field: :endpoint) filter_table_config.add(:initial_cluster_versions, field: :initial_cluster_version) filter_table_config.add(:current_master_versions, field: :current_master_version) filter_table_config.add(:current_node_versions, field: :current_node_version) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:status_messages, field: :status_message) filter_table_config.add(:node_ipv4_cidr_sizes, field: :node_ipv4_cidr_size) filter_table_config.add(:services_ipv4_cidrs, field: :services_ipv4_cidr) filter_table_config.add(:current_node_counts, field: :current_node_count) filter_table_config.add(:expire_times, field: :expire_time) filter_table_config.add(:enable_tpus, field: :enable_tpu) filter_table_config.add(:tpu_ipv4_cidr_blocks, field: :tpu_ipv4_cidr_block) filter_table_config.add(:conditions, field: :conditions) filter_table_config.add(:master_authorized_networks_configs, field: :master_authorized_networks_config) filter_table_config.add(:locations, field: :location) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('clusters') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'initialNodeCount' => ->(obj) { [:initial_node_count, obj['initialNodeCount']] }, 'nodeConfig' => ->(obj) { [:node_config, GoogleInSpec::Container::Property::RegionalClusterNodeConfig.new(obj['nodeConfig'], to_s)] }, 'masterAuth' => ->(obj) { [:master_auth, GoogleInSpec::Container::Property::RegionalClusterMasterAuth.new(obj['masterAuth'], to_s)] }, 'loggingService' => ->(obj) { [:logging_service, obj['loggingService']] }, 'monitoringService' => ->(obj) { [:monitoring_service, obj['monitoringService']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'privateClusterConfig' => ->(obj) { [:private_cluster_config, GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.new(obj['privateClusterConfig'], to_s)] }, 'clusterIpv4Cidr' => ->(obj) { [:cluster_ipv4_cidr, obj['clusterIpv4Cidr']] }, 'addonsConfig' => ->(obj) { [:addons_config, GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(obj['addonsConfig'], to_s)] }, 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, 'locations' => ->(obj) { [:locations, obj['locations']] }, 'resourceLabels' => ->(obj) { [:resource_labels, obj['resourceLabels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'legacyAbac' => ->(obj) { [:legacy_abac, GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.new(obj['legacyAbac'], to_s)] }, 'networkPolicy' => ->(obj) { [:network_policy, GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.new(obj['networkPolicy'], to_s)] }, 'defaultMaxPodsConstraint' => ->(obj) { [:default_max_pods_constraint, GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.new(obj['defaultMaxPodsConstraint'], to_s)] }, 'ipAllocationPolicy' => ->(obj) { [:ip_allocation_policy, GoogleInSpec::Container::Property::RegionalClusterIpAllocationPolicy.new(obj['ipAllocationPolicy'], to_s)] }, 'endpoint' => ->(obj) { [:endpoint, obj['endpoint']] }, 'initialClusterVersion' => ->(obj) { [:initial_cluster_version, obj['initialClusterVersion']] }, 'currentMasterVersion' => ->(obj) { [:current_master_version, obj['currentMasterVersion']] }, 'currentNodeVersion' => ->(obj) { [:current_node_version, obj['currentNodeVersion']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'status' => ->(obj) { [:status, obj['status']] }, 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, 'nodeIpv4CidrSize' => ->(obj) { [:node_ipv4_cidr_size, obj['nodeIpv4CidrSize']] }, 'servicesIpv4Cidr' => ->(obj) { [:services_ipv4_cidr, obj['servicesIpv4Cidr']] }, 'currentNodeCount' => ->(obj) { [:current_node_count, obj['currentNodeCount']] }, 'expireTime' => ->(obj) { [:expire_time, parse_time_string(obj['expireTime'])] }, 'enableTpu' => ->(obj) { [:enable_tpu, obj['enableTpu']] }, 'tpuIpv4CidrBlock' => ->(obj) { [:tpu_ipv4_cidr_block, obj['tpuIpv4CidrBlock']] }, 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(obj['conditions'], to_s)] }, 'masterAuthorizedNetworksConfig' => ->(obj) { [:master_authorized_networks_config, GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.new(obj['masterAuthorizedNetworksConfig'], to_s)] }, 'location' => ->(obj) { [:location, obj['location']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project location name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://container.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/clusters' end end ================================================ FILE: generate/libraries/google_container_regional_node_pool.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/container/property/regionalnodepool_autoscaling' require 'google/container/property/regionalnodepool_conditions' require 'google/container/property/regionalnodepool_config' require 'google/container/property/regionalnodepool_config_accelerators' require 'google/container/property/regionalnodepool_config_taints' require 'google/container/property/regionalnodepool_management' require 'google/container/property/regionalnodepool_management_upgrade_options' require 'google/container/property/regionalnodepool_max_pods_constraint' # A provider to manage Google Kubernetes Engine resources. class ContainerRegionalNodePool < GcpResourceBase name 'google_container_regional_node_pool' desc 'RegionalNodePool' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :config attr_reader :initial_node_count attr_reader :status attr_reader :status_message attr_reader :version attr_reader :autoscaling attr_reader :management attr_reader :max_pods_constraint attr_reader :conditions attr_reader :pod_ipv4_cidr_size attr_reader :cluster attr_reader :location def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = @fetched['name'] @config = GoogleInSpec::Container::Property::RegionalNodePoolConfig.new(@fetched['config'], to_s) @initial_node_count = @fetched['initialNodeCount'] @status = @fetched['status'] @status_message = @fetched['statusMessage'] @version = @fetched['version'] @autoscaling = GoogleInSpec::Container::Property::RegionalNodePoolAutoscaling.new(@fetched['autoscaling'], to_s) @management = GoogleInSpec::Container::Property::RegionalNodePoolManagement.new(@fetched['management'], to_s) @max_pods_constraint = GoogleInSpec::Container::Property::RegionalNodePoolMaxPodsConstraint.new(@fetched['maxPodsConstraint'], to_s) @conditions = GoogleInSpec::Container::Property::RegionalNodePoolConditionsArray.parse(@fetched['conditions'], to_s) @pod_ipv4_cidr_size = @fetched['podIpv4CidrSize'] @cluster = @fetched['cluster'] @location = @fetched['location'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "RegionalNodePool #{@params[:name]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolConfig.un_parse(x, 'config') }, 'initial_node_count' => ->(x, _) { x.nil? ? [] : ["its('initial_node_count') { should cmp #{x.inspect} }"] }, 'status' => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, 'status_message' => ->(x, _) { x.nil? ? [] : ["its('status_message') { should cmp #{x.inspect} }"] }, 'version' => ->(x, _) { x.nil? ? [] : ["its('version') { should cmp #{x.inspect} }"] }, 'autoscaling' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolAutoscaling.un_parse(x, 'autoscaling') }, 'management' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolManagement.un_parse(x, 'management') }, 'max_pods_constraint' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolMaxPodsConstraint.un_parse(x, 'max_pods_constraint') }, 'conditions' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('conditions') { should include '#{single.to_json}' }" } }, 'pod_ipv4_cidr_size' => ->(x, _) { x.nil? ? [] : ["its('pod_ipv4_cidr_size') { should cmp #{x.inspect} }"] }, 'cluster' => ->(x, _) { x.nil? ? [] : ["its('cluster') { should cmp #{x.inspect} }"] }, 'location' => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'RegionalNodePool' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_container_regional_node_pool', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://container.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}}' end end ================================================ FILE: generate/libraries/google_container_regional_node_pools.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ContainerRegionalNodePools < GcpResourceBase name 'google_container_regional_node_pools' desc 'RegionalNodePool plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:configs, field: :config) filter_table_config.add(:initial_node_counts, field: :initial_node_count) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:status_messages, field: :status_message) filter_table_config.add(:versions, field: :version) filter_table_config.add(:autoscalings, field: :autoscaling) filter_table_config.add(:managements, field: :management) filter_table_config.add(:max_pods_constraints, field: :max_pods_constraint) filter_table_config.add(:conditions, field: :conditions) filter_table_config.add(:pod_ipv4_cidr_sizes, field: :pod_ipv4_cidr_size) filter_table_config.add(:clusters, field: :cluster) filter_table_config.add(:locations, field: :location) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('nodePools') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'config' => ->(obj) { [:config, GoogleInSpec::Container::Property::RegionalNodePoolConfig.new(obj['config'], to_s)] }, 'initialNodeCount' => ->(obj) { [:initial_node_count, obj['initialNodeCount']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, 'version' => ->(obj) { [:version, obj['version']] }, 'autoscaling' => ->(obj) { [:autoscaling, GoogleInSpec::Container::Property::RegionalNodePoolAutoscaling.new(obj['autoscaling'], to_s)] }, 'management' => ->(obj) { [:management, GoogleInSpec::Container::Property::RegionalNodePoolManagement.new(obj['management'], to_s)] }, 'maxPodsConstraint' => ->(obj) { [:max_pods_constraint, GoogleInSpec::Container::Property::RegionalNodePoolMaxPodsConstraint.new(obj['maxPodsConstraint'], to_s)] }, 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Container::Property::RegionalNodePoolConditionsArray.parse(obj['conditions'], to_s)] }, 'podIpv4CidrSize' => ->(obj) { [:pod_ipv4_cidr_size, obj['podIpv4CidrSize']] }, 'cluster' => ->(obj) { [:cluster, obj['cluster']] }, 'location' => ->(obj) { [:location, obj['location']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project location cluster name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://container.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools' end end ================================================ FILE: generate/libraries/google_dataproc_cluster.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataproc/property/cluster_config' require 'google/dataproc/property/cluster_config_encryption_config' require 'google/dataproc/property/cluster_config_gce_cluster_config' require 'google/dataproc/property/cluster_config_initialization_actions' require 'google/dataproc/property/cluster_config_master_config' require 'google/dataproc/property/cluster_config_master_config_disk_config' require 'google/dataproc/property/cluster_config_master_config_managed_group_config' require 'google/dataproc/property/cluster_config_secondary_worker_config' require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' require 'google/dataproc/property/cluster_config_security_config' require 'google/dataproc/property/cluster_config_security_config_kerberos_config' require 'google/dataproc/property/cluster_config_software_config' require 'google/dataproc/property/cluster_config_worker_config' require 'google/dataproc/property/cluster_config_worker_config_disk_config' require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' # A provider to manage Cloud Dataproc resources. class DataprocCluster < GcpResourceBase name 'google_dataproc_cluster' desc 'Cluster' supports platform: 'gcp' attr_reader :params attr_reader :cluster_name attr_reader :labels attr_reader :config attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @cluster_name = @fetched['clusterName'] @labels = @fetched['labels'] @config = GoogleInSpec::Dataproc::Property::ClusterConfig.new(@fetched['config'], to_s) @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Cluster #{@params[:clusterName]}" end def un_parse { 'cluster_name' => ->(x, _) { x.nil? ? [] : ["its('cluster_name') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfig.un_parse(x, 'config') }, 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Cluster' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_dataproc_cluster', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://dataproc.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/clusters/{{cluster_name}}' end end ================================================ FILE: generate/libraries/google_dataproc_clusters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataprocClusters < GcpResourceBase name 'google_dataproc_clusters' desc 'Cluster plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:cluster_names, field: :cluster_name) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:configs, field: :config) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('clusters') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'clusterName' => ->(obj) { [:cluster_name, obj['clusterName']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'config' => ->(obj) { [:config, GoogleInSpec::Dataproc::Property::ClusterConfig.new(obj['config'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project region clusterName} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://dataproc.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/clusters' end end ================================================ FILE: generate/libraries/google_dns_managed_zone.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleDnsManagedZone < GcpResourceBase name 'google_dns_managed_zone' desc 'Verifies settings for a GCP DNS managed zone' example " describe google_dns_managed_zone(project: 'chef-inspec-gcp', zone: 'zone-name') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @managed_zone = @gcp.gcp_client(Google::Apis::DnsV2beta1::DnsService).get_managed_zone(opts[:project], opts[:zone]) create_resource_methods(@managed_zone) @key_specs = {} if defined?(@managed_zone.dnssec_config.default_key_specs) && !@managed_zone.dnssec_config.default_key_specs.nil? @managed_zone.dnssec_config.default_key_specs.each do |spec| @key_specs[spec.key_type] = spec.algorithm end end end end def exists? !@managed_zone.nil? end def creation_time_date return false if !defined?(@managed_zone.creation_time) || @managed_zone.creation_time.nil? Time.parse(@managed_zone.creation_time) end def key_signing_key_algorithm raise Inspec::Exceptions::ResourceFailed, "google_dns_managed_zone is missing expected property 'dnssec_config.default_key_specs KEY_SIGNING'" if !@key_specs.key?('KEY_SIGNING') @key_specs['KEY_SIGNING'] end def zone_signing_key_algorithm raise Inspec::Exceptions::ResourceFailed, "google_dns_managed_zone is missing expected property 'dnssec_config.default_key_specs ZONE_SIGNING'" if !@key_specs.key?('ZONE_SIGNING') @key_specs['ZONE_SIGNING'] end def to_s "DNS Managed Zone #{@display_name}" end end end ================================================ FILE: generate/libraries/google_dns_managed_zones.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/dns_v2beta1' module Inspec::Resources class GoogleDnsManagedZones < GcpResourceBase name 'google_dns_managed_zones' desc 'Verifies settings for GCP DNS managed zones in bulk' example " describe google_dns_managed_zones(project: 'chef-inspec-gcp') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:zone_ids, field: :zone_id) filter_table_config.add(:zone_names, field: :zone_name) filter_table_config.add(:zone_dns_names, field: :zone_dns_name) filter_table_config.add(:dnssec_config_states, field: :dnssec_config_state) filter_table_config.connect(self, :fetch_data) def fetch_data managed_zones = [] next_page = nil loop do catch_gcp_errors do @managed_zones = @gcp.gcp_client(Google::Apis::DnsV2beta1::DnsService).list_managed_zones(@project, page_token: next_page) end return [] if !@managed_zones || !@managed_zones.managed_zones @managed_zones.managed_zones.map do |zone| dns_enabled=false if defined?(zone.dnssec_config.state) && (zone.dnssec_config.state == 'on') dns_enabled=true end managed_zones+=[{ zone_id: zone.id, zone_name: zone.name, zone_dns_name: zone.dns_name, dnssec_config_state: dns_enabled }] end next_page = @managed_zones.next_page_token break unless next_page end @table = managed_zones end end end ================================================ FILE: generate/libraries/google_dns_resource_record_set.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud DNS resources. class DNSResourceRecordSet < GcpResourceBase name 'google_dns_resource_record_set' desc 'ResourceRecordSet' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :type attr_reader :ttl attr_reader :target attr_reader :managed_zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') @fetched = unwrap(fetched, params) parse unless @fetched.nil? end def identity %w{name type} end def collection_item 'rrsets' end def unwrap(fetched, params) fetched[collection_item].find { |result| identity.all? { |id| result[id.to_sym] == params[id] } } end def parse @name = @fetched['name'] @type = @fetched['type'] @ttl = @fetched['ttl'] @target = @fetched['rrdatas'] @managed_zone = @fetched['managed_zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "ResourceRecordSet #{@params[:type]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'type' => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, 'ttl' => ->(x, _) { x.nil? ? [] : ["its('ttl') { should cmp #{x.inspect} }"] }, 'target' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target') { should include #{single.inspect} }" } }, 'managed_zone' => ->(x, _) { x.nil? ? [] : ["its('managed_zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'ResourceRecordSet' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_dns_resource_record_set', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://www.googleapis.com/dns/v1/' end def resource_base_url 'projects/{{project}}/managedZones/{{managed_zone}}/rrsets?name={{name}}&type={{type}}' end end ================================================ FILE: generate/libraries/google_dns_resource_record_sets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DNSResourceRecordSets < GcpResourceBase name 'google_dns_resource_record_sets' desc 'ResourceRecordSet plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:types, field: :type) filter_table_config.add(:ttls, field: :ttl) filter_table_config.add(:targets, field: :target) filter_table_config.add(:managed_zones, field: :managed_zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('rrsets') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'ttl' => ->(obj) { [:ttl, obj['ttl']] }, 'rrdatas' => ->(obj) { [:target, obj['rrdatas']] }, 'managed_zone' => ->(obj) { [:managed_zone, obj['managed_zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project managed_zone name type} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://www.googleapis.com/dns/v1/' end def resource_base_url 'projects/{{project}}/managedZones/{{managed_zone}}/rrsets' end end ================================================ FILE: generate/libraries/google_filestore_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/filestore/property/instance_file_shares' require 'google/filestore/property/instance_networks' # A provider to manage Cloud Filestore resources. class FilestoreInstance < GcpResourceBase name 'google_filestore_instance' desc 'Instance' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :create_time attr_reader :tier attr_reader :labels attr_reader :file_shares attr_reader :networks attr_reader :etag attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = @fetched['name'] @description = @fetched['description'] @create_time = parse_time_string(@fetched['createTime']) @tier = @fetched['tier'] @labels = @fetched['labels'] @file_shares = GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(@fetched['fileShares'], to_s) @networks = GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(@fetched['networks'], to_s) @etag = @fetched['etag'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Instance #{@params[:name]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'create_time' => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, 'tier' => ->(x, _) { x.nil? ? [] : ["its('tier') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'file_shares' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('file_shares') { should include '#{single.to_json}' }" } }, 'networks' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('networks') { should include '#{single.to_json}' }" } }, 'etag' => ->(x, _) { x.nil? ? [] : ["its('etag') { should cmp #{x.inspect} }"] }, 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Instance' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_filestore_instance', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://file.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{zone}}/instances/{{name}}' end end ================================================ FILE: generate/libraries/google_filestore_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class FilestoreInstances < GcpResourceBase name 'google_filestore_instances' desc 'Instance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:tiers, field: :tier) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:file_shares, field: :file_shares) filter_table_config.add(:networks, field: :networks) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('instances') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'tier' => ->(obj) { [:tier, obj['tier']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'fileShares' => ->(obj) { [:file_shares, GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(obj['fileShares'], to_s)] }, 'networks' => ->(obj) { [:networks, GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(obj['networks'], to_s)] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project zone name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://file.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{zone}}/instances' end end ================================================ FILE: generate/libraries/google_kms_crypto_key.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'time' require 'google/apis/cloudkms_v1' module Inspec::Resources class GoogleKMSCryptoKey < GcpResourceBase name 'google_kms_crypto_key' desc 'Verifies settings for a KMS key ring' example " describe google_kms_crypto_key(project: 'chef-inspec-gcp', location: 'us-east1', key_ring_name: 'key-ring', name: 'crypto-key') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @kms_crypto_key = @gcp.gcp_client(Google::Apis::CloudkmsV1::CloudKMSService).get_project_location_key_ring_crypto_key("projects/#{opts[:project]}/locations/#{opts[:location]}/keyRings/#{opts[:key_ring_name]}/cryptoKeys/#{opts[:name]}") create_resource_methods(@kms_crypto_key) end end def crypto_key_name return '' if !defined?(name) || name.nil? name.split('/').last end def create_time_date return false if !defined?(create_time) || create_time.nil? Time.parse(create_time) end # this is added for completeness as crypto key IAM bindings use the crypto_key_url as an identifier def crypto_key_url return '' if !defined?(name) || name.nil? name end def next_rotation_time_date return false if !defined?(next_rotation_time) || next_rotation_time.nil? Time.parse(next_rotation_time) end def primary_create_time_date return false if !defined?(primary.create_time) || primary.create_time.nil? Time.parse(primary.create_time) end def rotation_period_seconds return 0 if !defined?(rotation_period) || rotation_period.nil? result = nil conversion = { 's'=>1, 'm'=>60, 'h'=>60*60, 'd'=>24*60*60 } conversion.each do |time_unit, multiplier| next if /#{time_unit}/.match(rotation_period).nil? result=rotation_period.gsub(time_unit, '').to_i*multiplier end result end def primary_name return '' if !defined?(primary.name) || primary.name.nil? primary.name end def primary_state return false if !defined?(primary.state) || primary.state.nil? primary.state end def exists? !@kms_crypto_key.nil? end def to_s "Crytpo Key #{@display_name}" end end end ================================================ FILE: generate/libraries/google_kms_crypto_key_iam_binding.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleKMSCryptoKeyIAMBinding < GcpResourceBase name 'google_kms_crypto_key_iam_binding' desc 'Verifies settings for a single KMS Crypto Key IAM binding' example " describe google_kms_crypto_key_iam_binding(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name', role: 'roles/owner') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @crypto_key_url = opts[:crypto_key_url] @role = opts[:role] @iam_binding_exists = false @members_list=[] catch_gcp_errors do # NOTE: this is the same call as for the plural iam_bindings resource because there isn't an easy way to pull out a singular binding @iam_bindings = @gcp.gcp_client(Google::Apis::CloudkmsV1::CloudKMSService).get_project_location_key_ring_crypto_key_iam_policy(@crypto_key_url) raise Inspec::Exceptions::ResourceFailed, "google_kms_crypto_key_iam_binding is missing expected IAM policy 'bindings' property" if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.each do |binding| next if binding.role != @role @iam_binding_exists=true @members_list=binding.members end end end # return the list of users corresponding to the role def members @members_list end def exists? @iam_binding_exists end def to_s "Crypto Key IAM Binding #{@role}" end end end ================================================ FILE: generate/libraries/google_kms_crypto_key_iam_bindings.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleKMSCryptoKeyIAMBindings < GcpResourceBase name 'google_kms_crypto_key_iam_bindings' desc 'Verifies settings for GCP KMS Crypto Key IAM Bindings in bulk' example " describe google_kms_key_ring_iam_bindings(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @crypto_key_url = opts[:crypto_key_url] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:iam_binding_roles, field: :iam_binding_role) filter_table_config.connect(self, :fetch_data) def fetch_data iam_binding_rows = [] catch_gcp_errors do @iam_bindings = @gcp.gcp_client(Google::Apis::CloudkmsV1::CloudKMSService).get_project_location_key_ring_crypto_key_iam_policy(@crypto_key_url) end return [] if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.map do |iam_binding| iam_binding_rows+=[{ iam_binding_role: iam_binding.role }] end @table = iam_binding_rows end end end ================================================ FILE: generate/libraries/google_kms_crypto_keys.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleKMSCryptoKeys < GcpResourceBase name 'google_kms_crypto_keys' desc 'Verifies settings for GCP KMS crypto keys in bulk' example " describe google_kms_crypto_keys(project: 'chef-inspec-gcp', location: 'us-east1', crypto_key_name: 'key-ring') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @location = opts[:location] @key_ring_name = opts[:key_ring_name] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:crypto_key_names, field: :crypto_key_name) filter_table_config.add(:crypto_key_urls, field: :crypto_key_url) filter_table_config.connect(self, :fetch_data) def fetch_data crypto_key_rows = [] next_page = nil loop do catch_gcp_errors do @crypto_keys = @gcp.gcp_client(Google::Apis::CloudkmsV1::CloudKMSService).list_project_location_key_ring_crypto_keys("projects/#{@project}/locations/#{@location}/keyRings/#{@key_ring_name}", page_token: next_page) end return [] if !@crypto_keys || !@crypto_keys.crypto_keys @crypto_keys.crypto_keys.map do |crypto_key| crypto_key_rows += [{ crypto_key_name: crypto_key.name.split('/').last, crypto_key_url: crypto_key.name }] end next_page = @crypto_keys.next_page_token break unless next_page end @table = crypto_key_rows end end end ================================================ FILE: generate/libraries/google_kms_key_ring.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'time' require 'google/apis/cloudkms_v1' module Inspec::Resources class GoogleKMSKeyRing < GcpResourceBase name 'google_kms_key_ring' desc 'Verifies settings for a KMS key ring' example " describe google_kms_key_ring(project: 'chef-inspec-gcp', location: 'us-east1', name: 'key-ring-name') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @kms_key_ring = @gcp.gcp_client(Google::Apis::CloudkmsV1::CloudKMSService).get_project_location_key_ring("projects/#{opts[:project]}/locations/#{opts[:location]}/keyRings/#{opts[:name]}") create_resource_methods(@kms_key_ring) end end def key_ring_name return '' if !defined?(name) || name.nil? name.split('/').last end def create_time_date return false if !defined?(create_time) || create_time.nil? Time.parse(create_time) end # this is added for completeness as key ring IAM bindings use the key_ring_url as an identifier def key_ring_url return '' if !defined?(name) || name.nil? name end def exists? !@kms_key_ring.nil? end def to_s "Key Ring #{@display_name}" end end end ================================================ FILE: generate/libraries/google_kms_key_ring_iam_binding.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleKMSKeyRingIAMBinding < GcpResourceBase name 'google_kms_key_ring_iam_binding' desc 'Verifies settings for a single KMS Key Ring IAM binding' example " describe google_kms_key_ring_iam_binding(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring', role: 'roles/compute.admin') do it { should exist } its('members') {should include 'user:someuser@domain.com' } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @key_ring_url = opts[:key_ring_url] @role = opts[:role] @iam_binding_exists = false @members_list=[] catch_gcp_errors do # NOTE: this is the same call as for the plural iam_bindings resource because there isn't an easy way to pull out a singular binding @iam_bindings = @gcp.gcp_client(Google::Apis::CloudkmsV1::CloudKMSService).get_project_location_key_ring_iam_policy(@key_ring_url) raise Inspec::Exceptions::ResourceFailed, "google_kms_key_ring_iam_binding is missing expected IAM policy 'bindings' property" if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.each do |binding| next if binding.role != @role @iam_binding_exists=true @members_list=binding.members end end end # return the list of users corresponding to the role def members @members_list end def exists? @iam_binding_exists end def to_s "Key Ring IAM Binding #{@role}" end end end ================================================ FILE: generate/libraries/google_kms_key_ring_iam_bindings.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleKMSKeyRingIAMBindings < GcpResourceBase name 'google_kms_key_ring_iam_bindings' desc 'Verifies settings for GCP KMS key ring IAM bindings in bulk' example " describe google_kms_key_ring_iam_bindings(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @key_ring_url = opts[:key_ring_url] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:iam_binding_roles, field: :iam_binding_role) filter_table_config.connect(self, :fetch_data) def fetch_data iam_binding_rows = [] catch_gcp_errors do @iam_bindings = @gcp.gcp_client(Google::Apis::CloudkmsV1::CloudKMSService).get_project_location_key_ring_iam_policy(@key_ring_url) end return [] if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.map do |iam_binding| iam_binding_rows+=[{ iam_binding_role: iam_binding.role }] end @table = iam_binding_rows end end end ================================================ FILE: generate/libraries/google_kms_key_rings.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleKMSKeyRings < GcpResourceBase name 'google_kms_key_rings' desc 'Verifies settings for GCP KMS key rings in bulk' example " describe google_kms_key_rings(project: 'chef-inspec-gcp', location: 'us-east1') do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @location = opts[:location] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:key_ring_names, field: :key_ring_name) filter_table_config.add(:key_ring_urls, field: :key_ring_url) filter_table_config.connect(self, :fetch_data) def fetch_data key_ring_rows = [] next_page = nil loop do catch_gcp_errors do @key_rings = @gcp.gcp_client(Google::Apis::CloudkmsV1::CloudKMSService).list_project_location_key_rings("projects/#{@project}/locations/#{@location}", page_token: next_page) end return [] if !@key_rings || !@key_rings.key_rings @key_rings.key_rings.map do |key_ring| key_ring_rows += [{ key_ring_name: key_ring.name.split('/').last, key_ring_url: key_ring.name }] end next_page = @key_rings.next_page_token break unless next_page end @table = key_ring_rows end end end ================================================ FILE: generate/libraries/google_logging_folder_exclusion.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Stackdriver Logging resources. class LoggingFolderExclusion < GcpResourceBase name 'google_logging_folder_exclusion' desc 'FolderExclusion' supports platform: 'gcp' attr_reader :params attr_reader :folder attr_reader :name attr_reader :description attr_reader :filter attr_reader :disabled def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @folder = @fetched['folder'] @name = @fetched['name'] @description = @fetched['description'] @filter = @fetched['filter'] @disabled = @fetched['disabled'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "FolderExclusion #{@params[:name]}" end def un_parse { 'folder' => ->(x, _) { x.nil? ? [] : ["its('folder') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'filter' => ->(x, _) { x.nil? ? [] : ["its('filter') { should cmp #{x.inspect} }"] }, 'disabled' => ->(x, _) { x.nil? ? [] : ["its('disabled') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'FolderExclusion' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_logging_folder_exclusion', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://logging.googleapis.com/v2/' end def resource_base_url 'folders/{{folder}}/exclusions/{{name}}' end end ================================================ FILE: generate/libraries/google_logging_folder_exclusions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class LoggingFolderExclusions < GcpResourceBase name 'google_logging_folder_exclusions' desc 'FolderExclusion plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:folders, field: :folder) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:disableds, field: :disabled) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('exclusions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'folder' => ->(obj) { [:folder, obj['folder']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'filter' => ->(obj) { [:filter, obj['filter']] }, 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{folder name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://logging.googleapis.com/v2/' end def resource_base_url 'folders/{{folder}}/exclusions' end end ================================================ FILE: generate/libraries/google_logging_folder_log_sink.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Stackdriver Logging resources. class LoggingFolderLogSink < GcpResourceBase name 'google_logging_folder_log_sink' desc 'FolderLogSink' supports platform: 'gcp' attr_reader :params attr_reader :folder attr_reader :name attr_reader :filter attr_reader :destination attr_reader :writer_identity attr_reader :include_children def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @folder = @fetched['folder'] @name = @fetched['name'] @filter = @fetched['filter'] @destination = @fetched['destination'] @writer_identity = @fetched['writerIdentity'] @include_children = @fetched['includeChildren'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "FolderLogSink #{@params[:name]}" end def un_parse { 'folder' => ->(x, _) { x.nil? ? [] : ["its('folder') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'filter' => ->(x, _) { x.nil? ? [] : ["its('filter') { should cmp #{x.inspect} }"] }, 'destination' => ->(x, _) { x.nil? ? [] : ["its('destination') { should cmp #{x.inspect} }"] }, 'writer_identity' => ->(x, _) { x.nil? ? [] : ["its('writer_identity') { should cmp #{x.inspect} }"] }, 'include_children' => ->(x, _) { x.nil? ? [] : ["its('include_children') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'FolderLogSink' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_logging_folder_log_sink', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://logging.googleapis.com/v2/' end def resource_base_url 'folders/{{folder}}/sinks/{{name}}' end end ================================================ FILE: generate/libraries/google_logging_folder_log_sinks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class LoggingFolderLogSinks < GcpResourceBase name 'google_logging_folder_log_sinks' desc 'FolderLogSink plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:folders, field: :folder) filter_table_config.add(:names, field: :name) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:destinations, field: :destination) filter_table_config.add(:writer_identities, field: :writer_identity) filter_table_config.add(:include_children, field: :include_children) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('sinks') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'folder' => ->(obj) { [:folder, obj['folder']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'filter' => ->(obj) { [:filter, obj['filter']] }, 'destination' => ->(obj) { [:destination, obj['destination']] }, 'writerIdentity' => ->(obj) { [:writer_identity, obj['writerIdentity']] }, 'includeChildren' => ->(obj) { [:include_children, obj['includeChildren']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{folder name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://logging.googleapis.com/v2/' end def resource_base_url 'folders/{{folder}}/sinks' end end ================================================ FILE: generate/libraries/google_logging_organization_log_sink.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Stackdriver Logging resources. class LoggingOrganizationLogSink < GcpResourceBase name 'google_logging_organization_log_sink' desc 'OrganizationLogSink' supports platform: 'gcp' attr_reader :params attr_reader :organization attr_reader :name attr_reader :filter attr_reader :destination attr_reader :writer_identity attr_reader :include_children def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @organization = @fetched['organization'] @name = @fetched['name'] @filter = @fetched['filter'] @destination = @fetched['destination'] @writer_identity = @fetched['writerIdentity'] @include_children = @fetched['includeChildren'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "OrganizationLogSink #{@params[:name]}" end def un_parse { 'organization' => ->(x, _) { x.nil? ? [] : ["its('organization') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'filter' => ->(x, _) { x.nil? ? [] : ["its('filter') { should cmp #{x.inspect} }"] }, 'destination' => ->(x, _) { x.nil? ? [] : ["its('destination') { should cmp #{x.inspect} }"] }, 'writer_identity' => ->(x, _) { x.nil? ? [] : ["its('writer_identity') { should cmp #{x.inspect} }"] }, 'include_children' => ->(x, _) { x.nil? ? [] : ["its('include_children') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'OrganizationLogSink' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_logging_organization_log_sink', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://logging.googleapis.com/v2/' end def resource_base_url 'organizations/{{organization}}/sinks/{{name}}' end end ================================================ FILE: generate/libraries/google_logging_organization_log_sinks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class LoggingOrganizationLogSinks < GcpResourceBase name 'google_logging_organization_log_sinks' desc 'OrganizationLogSink plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:organizations, field: :organization) filter_table_config.add(:names, field: :name) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:destinations, field: :destination) filter_table_config.add(:writer_identities, field: :writer_identity) filter_table_config.add(:include_children, field: :include_children) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('sinks') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'organization' => ->(obj) { [:organization, obj['organization']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'filter' => ->(obj) { [:filter, obj['filter']] }, 'destination' => ->(obj) { [:destination, obj['destination']] }, 'writerIdentity' => ->(obj) { [:writer_identity, obj['writerIdentity']] }, 'includeChildren' => ->(obj) { [:include_children, obj['includeChildren']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{organization name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://logging.googleapis.com/v2/' end def resource_base_url 'organizations/{{organization}}/sinks' end end ================================================ FILE: generate/libraries/google_logging_project_exclusion.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/logging_v2' module Inspec::Resources class GoogleLoggingProjectExclusion < GcpResourceBase name 'google_logging_project_exclusion' desc 'Verifies settings for a project logging exclusion' example " describe google_logging_project_exclusion(project: 'chef-inspec-gcp', exclusion: 'exclusion-name-abcd') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @exclusion = opts[:exclusion] catch_gcp_errors do @logging_exclusion = @gcp.gcp_client(Google::Apis::LoggingV2::LoggingService).get_project_exclusion("projects/#{opts[:project]}/exclusions/#{opts[:exclusion]}") create_resource_methods(@logging_exclusion) end end def exists? !@logging_exclusion.nil? end def to_s "Logging Project Exclusion #{@exclusion}" end end end ================================================ FILE: generate/libraries/google_logging_project_sink.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/logging_v2' module Inspec::Resources class GoogleLoggingProjectSink < GcpResourceBase name 'google_logging_project_sink' desc 'Verifies settings for a project logging sink' example " describe google_logging_project_sink(project: 'chef-inspec-gcp', sink: 'sink-name-abcd') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @sink = opts[:sink] catch_gcp_errors do @logging_sink = @gcp.gcp_client(Google::Apis::LoggingV2::LoggingService).get_project_sink("projects/#{opts[:project]}/sinks/#{opts[:sink]}") create_resource_methods(@logging_sink) end end def exists? !@logging_sink.nil? end def to_s "Logging Project Sink #{@sink}" end end end ================================================ FILE: generate/libraries/google_logging_project_sinks.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleLoggingProjectSinks < GcpResourceBase name 'google_logging_project_sinks' desc 'Verifies settings for GCP project logging sinks in bulk' example " describe google_logging_project_sinks(project: 'chef-inspec-gcp') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:sink_names, field: :sink_name) filter_table_config.add(:sink_destinations, field: :sink_destination) filter_table_config.connect(self, :fetch_data) def fetch_data sink_rows = [] next_page = nil loop do catch_gcp_errors do @sinks = @gcp.gcp_client(Google::Apis::LoggingV2::LoggingService).list_project_sinks("projects/#{@project}", page_token: next_page) end return [] if !@sinks || !@sinks.sinks @sinks.sinks.map do |sink| logging_sink = @gcp.gcp_client(Google::Apis::LoggingV2::LoggingService).get_project_sink("projects/#{@project}/sinks/#{sink.name}") sink_rows+=[{ sink_name: sink.name, sink_destination: sink.destination, sink_filter: logging_sink.filter }] end next_page = @sinks.next_page_token break unless next_page end @table = sink_rows end end end ================================================ FILE: generate/libraries/google_ml_engine_model.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/mlengine/property/model_default_version' # A provider to manage ML Engine resources. class MLEngineModel < GcpResourceBase name 'google_ml_engine_model' desc 'Model' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :default_version attr_reader :regions attr_reader :online_prediction_logging attr_reader :online_prediction_console_logging attr_reader :labels def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = @fetched['name'] @description = @fetched['description'] @default_version = GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(@fetched['defaultVersion'], to_s) @regions = @fetched['regions'] @online_prediction_logging = @fetched['onlinePredictionLogging'] @online_prediction_console_logging = @fetched['onlinePredictionConsoleLogging'] @labels = @fetched['labels'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Model #{@params[:name]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'default_version' => ->(x, _) { x.nil? ? [] : GoogleInSpec::MLEngine::Property::ModelDefaultVersion.un_parse(x, 'default_version') }, 'regions' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('regions') { should include #{single.inspect} }" } }, 'online_prediction_logging' => ->(x, _) { x.nil? ? [] : ["its('online_prediction_logging') { should cmp #{x.inspect} }"] }, 'online_prediction_console_logging' => ->(x, _) { x.nil? ? [] : ["its('online_prediction_console_logging') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Model' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_ml_engine_model', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://ml.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/models/{{name}}' end end ================================================ FILE: generate/libraries/google_ml_engine_models.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class MLEngineModels < GcpResourceBase name 'google_ml_engine_models' desc 'Model plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:default_versions, field: :default_version) filter_table_config.add(:regions, field: :regions) filter_table_config.add(:online_prediction_loggings, field: :online_prediction_logging) filter_table_config.add(:online_prediction_console_loggings, field: :online_prediction_console_logging) filter_table_config.add(:labels, field: :labels) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('models') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'defaultVersion' => ->(obj) { [:default_version, GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(obj['defaultVersion'], to_s)] }, 'regions' => ->(obj) { [:regions, obj['regions']] }, 'onlinePredictionLogging' => ->(obj) { [:online_prediction_logging, obj['onlinePredictionLogging']] }, 'onlinePredictionConsoleLogging' => ->(obj) { [:online_prediction_console_logging, obj['onlinePredictionConsoleLogging']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://ml.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/models' end end ================================================ FILE: generate/libraries/google_organization.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleOrganization < GcpResourceBase name 'google_organization' desc 'Verifies settings for an organization' example " describe google_organization(name: 'google.com') do it { should exist } its('name') { should eq 'organizations/1234' } its('display_name') { should eq 'google.com' } its('lifecycle_state') { should eq 'ACTIVE' } end " def initialize(opts = {}) super(opts) @display_name = opts[:name] || opts[:display_name] catch_gcp_errors do @organization = @gcp.gcp_project_client.get_organization(opts[:name]) create_resource_methods(@organization) end end def label_value_by_key(label_key) return [] if !defined?(labels) || labels.nil? labels.item[label_key] end def exists? !@organization.nil? end def to_s "Organization #{@display_name}" end end end ================================================ FILE: generate/libraries/google_organization_policy.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleOrganizationPolicy < GcpResourceBase name 'google_organization_policy' desc 'Verifies configuration of an organization policy' example " describe google_organization_policy(name: 'organizations/123456', constraint: 'constraints/compute.disableGuestAttributesAccess') do it { should exist } its('boolean_policy.enforced') { should be true } end " def initialize(opts = {}) super(opts) @display_name = opts[:name] @constraint = opts[:constraint] catch_gcp_errors do org_policy_request = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest.new org_policy_request.constraint = opts[:constraint] @organization_policy = @gcp.gcp_project_client.get_organization_org_policy(opts[:name], org_policy_request) create_resource_methods(@organization_policy) end end def exists? !@organization_policy.nil? end def to_s "Organization #{@display_name} policy for constraint #{@constraint}" end end end ================================================ FILE: generate/libraries/google_organizations.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeOrganizations < GcpResourceBase name 'google_organizations' desc 'Verifies settings for GCP organizations in bulk' example " describe google_organizations do it { should exist } ... end " def initialize(opts = {}) super(opts) end filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:lifecycle_state, field: :lifecycle_state) filter_table_config.connect(self, :fetch_data) def fetch_data organizations_rows = [] loop do catch_gcp_errors do @organizations = @gcp.gcp_project_client.search_organizations({}) end return [] if !@organizations || !@organizations.organizations @organizations.organizations.map do |organization| organizations_rows += [{ name: organization.name, display_name: organization.display_name, lifecycle_state: organization.lifecycle_state }] end next_page = @organizations.next_page_token break unless next_page end @table = organizations_rows end end end ================================================ FILE: generate/libraries/google_project.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleProject < GcpResourceBase name 'google_project' desc 'Verifies settings for a project' example " describe google_project(project: 'chef-inspec-gcp') do it { should exist } its('name') { should eq 'chef-inspec-gcp' } its('project_number') { should eq 1041234567833 } its('lifecycle_state') { should eq 'ACTIVE' } its('labels') { should include(key: 'contact', value: 'operations') } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] || opts[:project] catch_gcp_errors do @project = @gcp.gcp_project_client.get_project(opts[:project]) create_resource_methods(@project) end end def label_value_by_key(label_key) return [] if !defined?(labels) || labels.nil? labels.item[label_key] end def exists? !@project.nil? end def to_s "Project #{@display_name}" end end end ================================================ FILE: generate/libraries/google_project_alert_policies.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/monitoring_v3' module Inspec::Resources class GoogleProjectAlertPolicies < GcpResourceBase name 'google_project_alert_policies' desc 'Verifies settings for GCP project alert policies in bulk' example " describe google_project_alert_policies(project: 'chef-inspec-gcp') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:policy_names, field: :policy_name) filter_table_config.add(:policy_display_names, field: :policy_display_name) filter_table_config.add(:policy_enabled_states, field: :policy_enabled_state) filter_table_config.add(:policy_filter_lists, field: :policy_filter_list) filter_table_config.connect(self, :fetch_data) def fetch_data policy_rows = [] catch_gcp_errors do @policies = @gcp.gcp_client(Google::Apis::MonitoringV3::MonitoringService).list_project_alert_policies("projects/#{@project}") end return [] if !@policies || !@policies.alert_policies @policies.alert_policies.map do |policy| policy_filters = [] policy.conditions.each do |condition| next if !defined?(condition.condition_threshold.filter) || condition.condition_threshold.filter.nil? policy_filters+=[condition.condition_threshold.filter] end policy_rows+=[{ policy_name: policy.name, policy_display_name: policy.display_name, policy_enabled_state: policy.enabled, policy_filter_list: policy_filters }] end @table = policy_rows end end end ================================================ FILE: generate/libraries/google_project_alert_policy.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/monitoring_v3' module Inspec::Resources class GoogleProjectAlertPolicy < GcpResourceBase name 'google_project_alert_policy' desc 'Verifies settings for a single GCP project alert policy' example " describe google_project_alert_policy(policy: 'projects/spaterson-project/alertPolicies/9271751234503117449') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:policy] catch_gcp_errors do @policy = @gcp.gcp_client(Google::Apis::MonitoringV3::MonitoringService).get_project_alert_policy(opts[:policy]) create_resource_methods(@policy) end end def enabled? return false if !defined?(@policy.enabled) || @policy.enabled.nil? @policy.enabled end def exists? !@policy.nil? end def to_s "Alert Policy #{@display_name}" end end end ================================================ FILE: generate/libraries/google_project_alert_policy_condition.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/monitoring_v3' module Inspec::Resources class GoogleProjectAlertPolicyCondition < GcpResourceBase name 'google_project_alert_policy_condition' desc 'Verifies settings for a single GCP project alert policy condition by policy name and filter name' example " describe google_project_alert_policy_condition(policy: 'projects/my-project/alertPolicies/9271751234503117449', filter 'project=\"my-project\"') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @filter = opts[:filter] @policy = opts[:policy] catch_gcp_errors do @policy_result = @gcp.gcp_client(Google::Apis::MonitoringV3::MonitoringService).get_project_alert_policy(@policy) @condition = condition_for_filter(@filter) end end def exists? !@condition.nil? end def condition_for_filter(filter) return nil if !defined?(@policy_result.conditions) || @policy_result.conditions.nil? @policy_result.conditions.each do |condition| next if !defined?(condition.condition_threshold.filter) || condition.condition_threshold.filter.nil? return condition if condition.condition_threshold.filter == filter end nil end def condition_threshold_value return false if !defined?(@condition.condition_threshold.threshold_value) || @condition.condition_threshold.threshold_value.nil? @condition.condition_threshold.threshold_value end def aggregation_alignment_period return false if !defined?(@condition.condition_threshold.aggregations[0].alignment_period) || @condition.condition_threshold.aggregations[0].alignment_period.nil? @condition.condition_threshold.aggregations[0].alignment_period end def aggregation_per_series_aligner return false if !defined?(@condition.condition_threshold.aggregations[0].per_series_aligner) || @condition.condition_threshold.aggregations[0].per_series_aligner.nil? @condition.condition_threshold.aggregations[0].per_series_aligner end def aggregation_cross_series_reducer return false if !defined?(@condition.condition_threshold.aggregations[0].cross_series_reducer) || @condition.condition_threshold.aggregations[0].cross_series_reducer.nil? @condition.condition_threshold.aggregations[0].cross_series_reducer end def to_s "Alert Policy Condition #{@policy} \"#{@filter}\"" end end end ================================================ FILE: generate/libraries/google_project_iam_binding.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleProjectIAMBinding < GcpResourceBase name 'google_project_iam_binding' desc 'Verifies settings for a single GCP KMS key ring IAM bindings' example " describe google_kms_key_ring_iam_binding(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring', role: 'roles/compute.admin') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @role = opts[:role] @iam_binding_exists = false @members_list=[] catch_gcp_errors do # NOTE: this is the same call as for the plural iam_bindings resource because there isn't an easy way to pull out a singular binding @iam_bindings = @gcp.gcp_project_client.get_project_iam_policy(@project) raise Inspec::Exceptions::ResourceFailed, "google_project_iam_binding is missing expected IAM policy 'bindings' property" if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.each do |binding| next if binding.role != @role @iam_binding_exists=true @members_list=binding.members end end end # return the list of users corresponding to the role def members @members_list end def exists? @iam_binding_exists end def to_s "Project IAM Binding #{@role}" end end end ================================================ FILE: generate/libraries/google_project_iam_bindings.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleProjectIAMBindings < GcpResourceBase name 'google_project_iam_bindings' desc 'Verifies settings for GCP project iam_bindings in bulk' example " describe google_project_iam_bindings(project: 'chef-inspec-gcp') do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:iam_binding_roles, field: :iam_binding_role) filter_table_config.connect(self, :fetch_data) def fetch_data iam_binding_rows = [] catch_gcp_errors do @iam_bindings = @gcp.gcp_project_client.get_project_iam_policy(@project) end return [] if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.map do |iam_binding| iam_binding_rows+=[{ iam_binding_role: iam_binding.role }] end @table = iam_binding_rows end end end ================================================ FILE: generate/libraries/google_project_iam_custom_role.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleProjectIamCustomRole < GcpResourceBase name 'google_project_iam_custom_role' desc 'Verifies settings for a project IAM role' example " describe google_project_iam_custom_role(project: 'chef-inspec-gcp', name: 'admin12345') do it { should exist } its('stage') { should eq 'GA' } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @iam_role = @gcp.gcp_iam_client.get_role("projects/#{opts[:project]}/roles/#{opts[:name]}") create_resource_methods(@iam_role) end end def exists? !@iam_role.nil? end def to_s "Project IAM Custom Role #{@display_name}" end end end ================================================ FILE: generate/libraries/google_project_logging_audit_config.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleProjectLoggingAuditConfig < GcpResourceBase name 'google_project_logging_audit_config' desc 'Verifies settings for a GCP project logging audit configuration' example " describe google_project_logging_audit_config(project: 'chef-inspec-gcp') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] catch_gcp_errors do @audit_logging_configs = @gcp.gcp_project_client.get_project_iam_policy(@project) @default_types = [] @default_exempted_members = {} if defined?(@audit_logging_configs.audit_configs) && @audit_logging_configs.audit_configs.instance_of?(::Array) @audit_logging_configs.audit_configs.each do |service_config| next if service_config.service != 'allServices' service_config.audit_log_configs.each do |config| @default_types+=[config.log_type] @default_exempted_members[config.log_type]=config.exempted_members if defined?(config.exempted_members) && !config.exempted_members.nil? end end end end end def exists? defined?(@audit_logging_configs.audit_configs) && !@audit_logging_configs.audit_configs.nil? end attr_reader :default_types attr_reader :default_exempted_members def has_default_exempted_members? @default_exempted_members.values.any? end def to_s "Logging Audit Config For #{@project}" end end end ================================================ FILE: generate/libraries/google_project_metric.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/logging_v2' module Inspec::Resources class GoogleProjectMetric < GcpResourceBase name 'google_project_metric' desc 'Verifies settings for a project metric' example " describe google_project_metric(project: 'chef-inspec-gcp', metric: 'metric_name') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:metric] catch_gcp_errors do @metric = @gcp.gcp_client(Google::Apis::LoggingV2::LoggingService).get_project_metric("projects/#{opts[:project]}/metrics/#{opts[:metric]}") create_resource_methods(@metric) end end def exists? !@metric.nil? end def to_s "Project Metric #{@display_name}" end end end ================================================ FILE: generate/libraries/google_project_metrics.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/logging_v2' module Inspec::Resources class GoogleProjectMetrics < GcpResourceBase name 'google_project_metrics' desc 'Verifies settings for GCP project metrics in bulk' example " describe google_project_metrics(project: 'chef-inspec-gcp') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:metric_names, field: :metric_name) filter_table_config.add(:metric_types, field: :metric_type) filter_table_config.add(:metric_destinations, field: :metric_destination) filter_table_config.connect(self, :fetch_data) def fetch_data metric_rows = [] next_page = nil loop do catch_gcp_errors do @metrics = @gcp.gcp_client(Google::Apis::LoggingV2::LoggingService).list_project_metrics("projects/#{@project}", page_token: next_page) end return [] if !@metrics || !@metrics.metrics @metrics.metrics.map do |metric| metric_rows+=[{ metric_name: metric.name, metric_filter: metric.filter, metric_type: metric.metric_descriptor.type }] end next_page = @metrics.next_page_token break unless next_page end @table = metric_rows end end end ================================================ FILE: generate/libraries/google_projects.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleComputeProjects < GcpResourceBase name 'google_projects' desc 'Verifies settings for GCP compute projects in bulk' example " describe google_projects do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:project_ids, field: :project_id) filter_table_config.add(:project_names, field: :project_name) filter_table_config.add(:project_numbers, field: :project_number) filter_table_config.add(:lifecycle_state, field: :lifecycle_state) filter_table_config.connect(self, :fetch_data) def fetch_data project_rows = [] next_page = nil loop do catch_gcp_errors do @projects = @gcp.gcp_project_client.list_projects(page_token: next_page) end return [] if !@projects || !@projects.projects @projects.projects.map do |project| project_rows += [{ project_id: project.project_id, project_name: project.name, project_number: project.project_number, lifecycle_state: project.lifecycle_state }] end next_page = @projects.next_page_token break unless next_page end @table = project_rows end end end ================================================ FILE: generate/libraries/google_pubsub_subscription.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/pubsub/property/subscription_expiration_policy' require 'google/pubsub/property/subscription_push_config' # A provider to manage Cloud Pub/Sub resources. class PubsubSubscription < GcpResourceBase name 'google_pubsub_subscription' desc 'Subscription' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :topic attr_reader :labels attr_reader :push_config attr_reader :ack_deadline_seconds attr_reader :message_retention_duration attr_reader :retain_acked_messages attr_reader :expiration_policy def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = name_from_self_link(@fetched['name']) @topic = @fetched['topic'] @labels = @fetched['labels'] @push_config = GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(@fetched['pushConfig'], to_s) @ack_deadline_seconds = @fetched['ackDeadlineSeconds'] @message_retention_duration = @fetched['messageRetentionDuration'] @retain_acked_messages = @fetched['retainAckedMessages'] @expiration_policy = GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(@fetched['expirationPolicy'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Subscription #{@params[:name]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'topic' => ->(x, _) { x.nil? ? [] : ["its('topic') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'push_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.un_parse(x, 'push_config') }, 'ack_deadline_seconds' => ->(x, _) { x.nil? ? [] : ["its('ack_deadline_seconds') { should cmp #{x.inspect} }"] }, 'message_retention_duration' => ->(x, _) { x.nil? ? [] : ["its('message_retention_duration') { should cmp #{x.inspect} }"] }, 'retain_acked_messages' => ->(x, _) { x.nil? ? [] : ["its('retain_acked_messages') { should cmp #{x.inspect} }"] }, 'expiration_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.un_parse(x, 'expiration_policy') }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Subscription' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_pubsub_subscription', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/subscriptions/{{name}}' end end ================================================ FILE: generate/libraries/google_pubsub_subscription_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Pub/Sub IAM Policy resources. class SubscriptionIamPolicy < GcpResourceBase name 'google_pubsub_subscription_iam_policy' desc 'Subscription Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Subscription IamPolicy #{@params[:name]}" end private def product_url 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/subscriptions/{{name}}:getIamPolicy' end end ================================================ FILE: generate/libraries/google_pubsub_subscriptions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class PubsubSubscriptions < GcpResourceBase name 'google_pubsub_subscriptions' desc 'Subscription plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:topics, field: :topic) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:push_configs, field: :push_config) filter_table_config.add(:ack_deadline_seconds, field: :ack_deadline_seconds) filter_table_config.add(:message_retention_durations, field: :message_retention_duration) filter_table_config.add(:retain_acked_messages, field: :retain_acked_messages) filter_table_config.add(:expiration_policies, field: :expiration_policy) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('subscriptions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, 'topic' => ->(obj) { [:topic, obj['topic']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'pushConfig' => ->(obj) { [:push_config, GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(obj['pushConfig'], to_s)] }, 'ackDeadlineSeconds' => ->(obj) { [:ack_deadline_seconds, obj['ackDeadlineSeconds']] }, 'messageRetentionDuration' => ->(obj) { [:message_retention_duration, obj['messageRetentionDuration']] }, 'retainAckedMessages' => ->(obj) { [:retain_acked_messages, obj['retainAckedMessages']] }, 'expirationPolicy' => ->(obj) { [:expiration_policy, GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(obj['expirationPolicy'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/subscriptions' end end ================================================ FILE: generate/libraries/google_pubsub_topic.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/pubsub/property/topic_message_storage_policy' # A provider to manage Cloud Pub/Sub resources. class PubsubTopic < GcpResourceBase name 'google_pubsub_topic' desc 'Topic' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :kms_key_name attr_reader :labels attr_reader :message_storage_policy def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = name_from_self_link(@fetched['name']) @kms_key_name = @fetched['kmsKeyName'] @labels = @fetched['labels'] @message_storage_policy = GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(@fetched['messageStoragePolicy'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Topic #{@params[:name]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'kms_key_name' => ->(x, _) { x.nil? ? [] : ["its('kms_key_name') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'message_storage_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.un_parse(x, 'message_storage_policy') }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Topic' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_pubsub_topic', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/topics/{{name}}' end end ================================================ FILE: generate/libraries/google_pubsub_topic_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Pub/Sub IAM Policy resources. class TopicIamPolicy < GcpResourceBase name 'google_pubsub_topic_iam_policy' desc 'Topic Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Topic IamPolicy #{@params[:name]}" end private def product_url 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/topics/{{name}}:getIamPolicy' end end ================================================ FILE: generate/libraries/google_pubsub_topics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class PubsubTopics < GcpResourceBase name 'google_pubsub_topics' desc 'Topic plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:kms_key_names, field: :kms_key_name) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:message_storage_policies, field: :message_storage_policy) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('topics') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, 'kmsKeyName' => ->(obj) { [:kms_key_name, obj['kmsKeyName']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'messageStoragePolicy' => ->(obj) { [:message_storage_policy, GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(obj['messageStoragePolicy'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/topics' end end ================================================ FILE: generate/libraries/google_redis_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud Memorystore resources. class RedisInstance < GcpResourceBase name 'google_redis_instance' desc 'Instance' supports platform: 'gcp' attr_reader :params attr_reader :alternative_location_id attr_reader :authorized_network attr_reader :create_time attr_reader :current_location_id attr_reader :display_name attr_reader :host attr_reader :labels attr_reader :redis_configs attr_reader :location_id attr_reader :name attr_reader :memory_size_gb attr_reader :port attr_reader :redis_version attr_reader :reserved_ip_range attr_reader :tier attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @alternative_location_id = @fetched['alternativeLocationId'] @authorized_network = @fetched['authorizedNetwork'] @create_time = parse_time_string(@fetched['createTime']) @current_location_id = @fetched['currentLocationId'] @display_name = @fetched['displayName'] @host = @fetched['host'] @labels = @fetched['labels'] @redis_configs = @fetched['redisConfigs'] @location_id = @fetched['locationId'] @name = @fetched['name'] @memory_size_gb = @fetched['memorySizeGb'] @port = @fetched['port'] @redis_version = @fetched['redisVersion'] @reserved_ip_range = @fetched['reservedIpRange'] @tier = @fetched['tier'] @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Instance #{@params[:name]}" end def un_parse { 'alternative_location_id' => ->(x, _) { x.nil? ? [] : ["its('alternative_location_id') { should cmp #{x.inspect} }"] }, 'authorized_network' => ->(x, _) { x.nil? ? [] : ["its('authorized_network') { should cmp #{x.inspect} }"] }, 'create_time' => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, 'current_location_id' => ->(x, _) { x.nil? ? [] : ["its('current_location_id') { should cmp #{x.inspect} }"] }, 'display_name' => ->(x, _) { x.nil? ? [] : ["its('display_name') { should cmp #{x.inspect} }"] }, 'host' => ->(x, _) { x.nil? ? [] : ["its('host') { should cmp #{x.inspect} }"] }, 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'redis_configs' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('redis_configs') { should include(#{k.inspect} => #{v.inspect}) }" } }, 'location_id' => ->(x, _) { x.nil? ? [] : ["its('location_id') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'memory_size_gb' => ->(x, _) { x.nil? ? [] : ["its('memory_size_gb') { should cmp #{x.inspect} }"] }, 'port' => ->(x, _) { x.nil? ? [] : ["its('port') { should cmp #{x.inspect} }"] }, 'redis_version' => ->(x, _) { x.nil? ? [] : ["its('redis_version') { should cmp #{x.inspect} }"] }, 'reserved_ip_range' => ->(x, _) { x.nil? ? [] : ["its('reserved_ip_range') { should cmp #{x.inspect} }"] }, 'tier' => ->(x, _) { x.nil? ? [] : ["its('tier') { should cmp #{x.inspect} }"] }, 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Instance' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_redis_instance', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://redis.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{region}}/instances/{{name}}' end end ================================================ FILE: generate/libraries/google_redis_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class RedisInstances < GcpResourceBase name 'google_redis_instances' desc 'Instance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:alternative_location_ids, field: :alternative_location_id) filter_table_config.add(:authorized_networks, field: :authorized_network) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:current_location_ids, field: :current_location_id) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:hosts, field: :host) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:redis_configs, field: :redis_configs) filter_table_config.add(:location_ids, field: :location_id) filter_table_config.add(:names, field: :name) filter_table_config.add(:memory_size_gbs, field: :memory_size_gb) filter_table_config.add(:ports, field: :port) filter_table_config.add(:redis_versions, field: :redis_version) filter_table_config.add(:reserved_ip_ranges, field: :reserved_ip_range) filter_table_config.add(:tiers, field: :tier) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('instances') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'alternativeLocationId' => ->(obj) { [:alternative_location_id, obj['alternativeLocationId']] }, 'authorizedNetwork' => ->(obj) { [:authorized_network, obj['authorizedNetwork']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'currentLocationId' => ->(obj) { [:current_location_id, obj['currentLocationId']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'host' => ->(obj) { [:host, obj['host']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'redisConfigs' => ->(obj) { [:redis_configs, obj['redisConfigs']] }, 'locationId' => ->(obj) { [:location_id, obj['locationId']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'memorySizeGb' => ->(obj) { [:memory_size_gb, obj['memorySizeGb']] }, 'port' => ->(obj) { [:port, obj['port']] }, 'redisVersion' => ->(obj) { [:redis_version, obj['redisVersion']] }, 'reservedIpRange' => ->(obj) { [:reserved_ip_range, obj['reservedIpRange']] }, 'tier' => ->(obj) { [:tier, obj['tier']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project region name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://redis.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{region}}/instances' end end ================================================ FILE: generate/libraries/google_resourcemanager_folder.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Resource Manager resources. class ResourceManagerFolder < GcpResourceBase name 'google_resourcemanager_folder' desc 'Folder' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :lifecycle_state attr_reader :create_time attr_reader :parent attr_reader :display_name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = @fetched['name'] @lifecycle_state = @fetched['lifecycleState'] @create_time = parse_time_string(@fetched['createTime']) @parent = @fetched['parent'] @display_name = @fetched['displayName'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Folder #{@params[:name]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'lifecycle_state' => ->(x, _) { x.nil? ? [] : ["its('lifecycle_state') { should cmp #{x.inspect} }"] }, 'create_time' => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, 'parent' => ->(x, _) { x.nil? ? [] : ["its('parent') { should cmp #{x.inspect} }"] }, 'display_name' => ->(x, _) { x.nil? ? [] : ["its('display_name') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Folder' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_resourcemanager_folder', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://cloudresourcemanager.googleapis.com/v2/' end def resource_base_url '{{name}}' end end ================================================ FILE: generate/libraries/google_resourcemanager_folders.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ResourceManagerFolders < GcpResourceBase name 'google_resourcemanager_folders' desc 'Folder plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:lifecycle_states, field: :lifecycle_state) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:parents, field: :parent) filter_table_config.add(:display_names, field: :display_name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('folders') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'lifecycleState' => ->(obj) { [:lifecycle_state, obj['lifecycleState']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://cloudresourcemanager.googleapis.com/v2/' end def resource_base_url 'folders?parent={{parent}}' end end ================================================ FILE: generate/libraries/google_resourcemanager_organization_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/resourcemanager/property/organizationpolicy_boolean_policy' require 'google/resourcemanager/property/organizationpolicy_list_policy' # A provider to manage Resource Manager resources. class OrganizationPolicy < GcpResourceBase name 'google_resourcemanager_organization_policy' desc 'OrganizationPolicy' supports platform: 'gcp' attr_reader :params attr_reader :version attr_reader :constraint attr_reader :update_time attr_reader :list_policy attr_reader :boolean_policy def initialize(opts) super(opts) @organization_name = opts[:organization_name] @constraint = opts[:constraint] catch_gcp_errors do org_policy_request = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest.new org_policy_request.constraint = opts[:constraint] @fetched = JSON.parse(@gcp.gcp_project_client.get_organization_org_policy(opts[:organization_name], org_policy_request).to_json) parse end end def parse @version = @fetched['version'] @constraint = @fetched['constraint'] @update_time = parse_time_string(@fetched['updateTime']) @list_policy = GoogleInSpec::ResourceManager::Property::OrganizationPolicyListPolicy.new(@fetched['listPolicy'], to_s) @boolean_policy = GoogleInSpec::ResourceManager::Property::OrganizationPolicyBooleanPolicy.new(@fetched['booleanPolicy'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "OrganizationPolicy #{@organization_name} Constraint #{@constraint}" end end ================================================ FILE: generate/libraries/google_resourcemanager_project_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Resource Manager IAM Policy resources. class ProjectIamPolicy < GcpResourceBase name 'google_resourcemanager_project_iam_policy' desc 'Project Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Project IamPolicy #{@params[:project_id]}" end private def product_url 'https://cloudresourcemanager.googleapis.com/v1/' end def resource_base_url 'projects/{{project_id}}:getIamPolicy' end end ================================================ FILE: generate/libraries/google_runtime_config_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud Runtime Configuration resources. class RuntimeConfigConfig < GcpResourceBase name 'google_runtime_config_config' desc 'Config' supports platform: 'gcp' attr_reader :params attr_reader :description attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @description = @fetched['description'] @name = @fetched['name'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Config #{@params[:name]}" end def un_parse { 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Config' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_runtime_config_config', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs/{{name}}' end end ================================================ FILE: generate/libraries/google_runtime_config_config_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Runtime Configuration IAM Policy resources. class ConfigIamPolicy < GcpResourceBase name 'google_runtime_config_config_iam_policy' desc 'Config Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Config IamPolicy #{@params[:name]}" end private def product_url 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs/{{name}}:getIamPolicy' end end ================================================ FILE: generate/libraries/google_runtime_config_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class RuntimeConfigConfigs < GcpResourceBase name 'google_runtime_config_configs' desc 'Config plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('configs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs' end end ================================================ FILE: generate/libraries/google_runtime_config_variable.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud Runtime Configuration resources. class RuntimeConfigVariable < GcpResourceBase name 'google_runtime_config_variable' desc 'Variable' supports platform: 'gcp' attr_reader :params attr_reader :value attr_reader :text attr_reader :name attr_reader :config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @value = @fetched['value'] @text = @fetched['text'] @name = @fetched['name'] @config = @fetched['config'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Variable #{@params[:name]}" end def un_parse { 'value' => ->(x, _) { x.nil? ? [] : ["its('value') { should cmp #{x.inspect} }"] }, 'text' => ->(x, _) { x.nil? ? [] : ["its('text') { should cmp #{x.inspect} }"] }, 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'config' => ->(x, _) { x.nil? ? [] : ["its('config') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Variable' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_runtime_config_variable', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs/{{config}}/variables/{{name}}' end end ================================================ FILE: generate/libraries/google_runtime_config_variables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class RuntimeConfigVariables < GcpResourceBase name 'google_runtime_config_variables' desc 'Variable plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:values, field: :value) filter_table_config.add(:texts, field: :text) filter_table_config.add(:names, field: :name) filter_table_config.add(:configs, field: :config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('variables') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'value' => ->(obj) { [:value, obj['value']] }, 'text' => ->(obj) { [:text, obj['text']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'config' => ->(obj) { [:config, obj['config']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project config name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs/{{config}}/variables?returnValues=true' end end ================================================ FILE: generate/libraries/google_service_account.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleServiceAccount < GcpResourceBase name 'google_service_account' desc 'Verifies settings for a project IAM Service Account' example " describe google_service_account(name: 'projects/spaterson-project/serviceAccounts/sample-account@spaterson-project.iam.gserviceaccount.com') do it { should exist } its('stage') { should eq 'GA' } end " def initialize(opts = {}) # Call the parent class constructor super(opts) catch_gcp_errors do @service_account = @gcp.gcp_iam_client.get_project_service_account(opts[:name]) create_resource_methods(@service_account) @display_name = @service_account.unique_id @display_name = @service_account.display_name if @service_account.display_name end end def exists? !@service_account.nil? end # Note this is done at the service account level not the individual key level because this metadata is not # returned by default when listing keys. def user_managed_keys raise Inspec::Exceptions::ResourceFailed, "Service Account #{@display_name} does not exist!" if not exists? @gcp.gcp_iam_client.list_project_service_account_keys(@service_account.name, key_types: ['USER_MANAGED']) end def has_user_managed_keys? return false if !user_managed_keys.keys true end def to_s "Service Account \"#{@display_name}\"" end end end ================================================ FILE: generate/libraries/google_service_account_key.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleServiceAccountKey < GcpResourceBase name 'google_service_account_key' desc 'Verifies settings for a GCP project service account key' example " describe google_service_account_key(name: 'projects/sample-project/serviceAccounts/test-sa@sample-project.iam.gserviceaccount.com/keys/c6bd986da9fac6d71178db41d1741cbe751a5080' ) do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name].split('/').last catch_gcp_errors do @sa_key = @gcp.gcp_iam_client.get_project_service_account_key(opts[:name]) create_resource_methods(@sa_key) end end def exists? !@sa_key.nil? end def to_s "Service Account Key #{@display_name}" end end end ================================================ FILE: generate/libraries/google_service_account_keys.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleServiceAccountKeys < GcpResourceBase name 'google_service_account_keys' desc 'Verifies settings for GCP service account keys in bulk' example " describe google_service_account_keys(service_account: 'projects/sample-project/serviceAccounts/sample-account@sample-project.iam.gserviceaccount.com') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @service_account = opts[:service_account] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:key_names, field: :key_name) filter_table_config.add(:valid_after_times, field: :valid_after_time) filter_table_config.add(:valid_before_times, field: :valid_before_time) filter_table_config.connect(self, :fetch_data) def fetch_data account_key_rows = [] catch_gcp_errors do # no pagination in the service API @service_account_keys = @gcp.gcp_iam_client.list_project_service_account_keys(@service_account) end return [] if !@service_account_keys || !@service_account_keys.keys @service_account_keys.keys.map do |sa_key| account_key_rows+=[{ key_name: sa_key.name, valid_after_time: Time.parse(sa_key.valid_after_time), valid_before_time: Time.parse(sa_key.valid_before_time) }] end @table = account_key_rows end end end ================================================ FILE: generate/libraries/google_service_accounts.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleServiceAccounts < GcpResourceBase name 'google_service_accounts' desc 'Verifies settings for GCP compute service accounts in bulk' example " describe google_service_accounts(project: 'chef-inspec-gcp') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:service_account_ids, field: :service_account_id) filter_table_config.add(:service_account_names, field: :service_account_name) filter_table_config.add(:service_account_display_names, field: :service_account_display_name) filter_table_config.add(:service_account_emails, field: :service_account_email) filter_table_config.connect(self, :fetch_data) def fetch_data service_account_rows = [] next_page = nil loop do catch_gcp_errors do @service_accounts = @gcp.gcp_iam_client.list_project_service_accounts("projects/#{@project}", page_token: next_page) end return [] if !@service_accounts || !@service_accounts.accounts @service_accounts.accounts.map do |service_account| service_account_rows+=[{ service_account_id: service_account.unique_id, service_account_name: service_account.name, service_account_display_name: service_account.display_name, service_account_email: service_account.email }] end next_page = @service_accounts.next_page_token break unless next_page end @table = service_account_rows end end end ================================================ FILE: generate/libraries/google_sourcerepo_repositories.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SourceRepoRepositorys < GcpResourceBase name 'google_sourcerepo_repositories' desc 'Repository plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:urls, field: :url) filter_table_config.add(:sizes, field: :size) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('repos') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'url' => ->(obj) { [:url, obj['url']] }, 'size' => ->(obj) { [:size, obj['size']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def identifiers params = %w{project name} result = [] @table.each do |item| combo = item.merge(@params) item_identifiers = {} params.each do |param| item_identifiers[param.to_sym] = combo[param.to_sym] end result.push(item_identifiers) end result end private def product_url 'https://sourcerepo.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/repos' end end ================================================ FILE: generate/libraries/google_sourcerepo_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud Source Repositories resources. class SourceRepoRepository < GcpResourceBase name 'google_sourcerepo_repository' desc 'Repository' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :url attr_reader :size def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? @params = params end def parse @name = @fetched['name'] @url = @fetched['url'] @size = @fetched['size'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Repository #{@params[:name]}" end def un_parse { 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, 'url' => ->(x, _) { x.nil? ? [] : ["its('url') { should cmp #{x.inspect} }"] }, 'size' => ->(x, _) { x.nil? ? [] : ["its('size') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) name = 'Repository' arr = un_parse.map do |k, v| next if ignored_fields.include?(k) v.call(method(k.to_sym).call, k) end template_vars = { name: name, arr: arr, type: 'google_sourcerepo_repository', identifiers: @params, number: test_number, } File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end private def product_url 'https://sourcerepo.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/repos/{{name}}' end end ================================================ FILE: generate/libraries/google_sql_database_instance.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/sqladmin_v1beta4' module Inspec::Resources class GoogleCloudSqlDatabaseInstance < GcpResourceBase name 'google_sql_database_instance' desc 'Verifies settings for a GCP Cloud SQL Database instance' example " describe google_sql_database_instance(project: 'chef-inspec-gcp', database: 'my-database') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:database] catch_gcp_errors do @database = @gcp.gcp_client(Google::Apis::SqladminV1beta4::SQLAdminService).get_instance(opts[:project], opts[:database]) create_resource_methods(@database) end end def exists? !@database.nil? end def has_ip_configuration_require_ssl? return false if !defined?(@database.settings.ip_configuration.require_ssl) return false if @database.settings.ip_configuration.require_ssl.nil? return true if @database.settings.ip_configuration.require_ssl.to_s.casecmp('true').zero? false end def authorized_networks return [] if !defined?(@database.settings.ip_configuration.authorized_networks) || @database.settings.ip_configuration.authorized_networks.nil? @database.settings.ip_configuration.authorized_networks.map(&:value) end def primary_ip_address return '' if !defined?(@database.ip_addresses[0].ip_address) || @database.ip_addresses[0].ip_address.nil? @database.ip_addresses[0].ip_address end def to_s "Database #{@display_name}" end end end ================================================ FILE: generate/libraries/google_sql_database_instances.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleCloudSqlDatabaseInstances < GcpResourceBase name 'google_sql_database_instances' desc 'Verifies settings for GCP Cloud SQL Database instances in bulk' example " describe google_sql_database_instances(project: 'chef-inspec-gcp') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:instance_names, field: :instance_name) filter_table_config.add(:instance_versions, field: :instance_version) filter_table_config.add(:instance_regions, field: :instance_region) filter_table_config.add(:instance_zones, field: :instance_zone) filter_table_config.add(:instance_states, field: :instance_state) filter_table_config.connect(self, :fetch_data) def fetch_data instance_rows = [] catch_gcp_errors do @databases = @gcp.gcp_client(Google::Apis::SqladminV1beta4::SQLAdminService).list_instances(opts[:project]) end return [] if !@databases || !@databases.items @databases.items.map do |instance| instance_rows+=[{ instance_name: instance.name, instance_version: instance.database_version, instance_region: instance.region, instance_zone: instance.gce_zone, instance_state: instance.state }] end @databases = instance_rows end end end ================================================ FILE: generate/libraries/google_sql_users.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleCloudSqlUsers < GcpResourceBase name 'google_sql_users' desc 'Verifies settings for GCP Cloud SQL Database users in bulk' example " describe google_sql_users(project: 'chef-inspec-gcp', database: 'database') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:user_names, field: :user_name) filter_table_config.add(:user_hosts, field: :user_host) filter_table_config.add(:user_instances, field: :user_instance) filter_table_config.connect(self, :fetch_data) def fetch_data user_rows = [] catch_gcp_errors do @users = @gcp.gcp_client(Google::Apis::SqladminV1beta4::SQLAdminService).list_users(opts[:project], opts[:database]) end return [] if !@users || !@users.items @users.items.map do |user| user_rows+=[{ user_name: user.name, user_host: user.host, user_instance: user.instance }] end @users = user_rows end end end ================================================ FILE: generate/libraries/google_storage_bucket.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleStorageBucket < GcpResourceBase name 'google_storage_bucket' desc 'Verifies settings for a bucket' example " describe google_storage_bucket(name: 'inspec-test-bucket') do it { should exist } its('storage_class') { should eq 'REGIONAL' } its('location') { should eq 'US-CENTRAL1' } its('lifecycle') { should eq 'enabled' } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:name] catch_gcp_errors do @bucket = @gcp.gcp_storage_client.get_bucket(opts[:name]) create_resource_methods(@bucket) end end def exists? !@bucket.nil? end def has_versioning_enabled? return false if !defined?(@bucket.versioning) return false if @bucket.versioning.nil? @bucket.versioning.enabled end def has_logging_enabled? return false if !defined?(@bucket.logging) return false if @bucket.logging.nil? true end def to_s "Bucket #{@display_name}" end end end ================================================ FILE: generate/libraries/google_storage_bucket_acl.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleStorageBucketAcl < GcpResourceBase name 'google_storage_bucket_acl' desc 'Verifies settings for a storage bucket ACL' example " describe google_storage_bucket_acl(bucket: 'bucket-buvsjjcndqz', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @bucket = opts[:bucket] @entity = opts[:entity] begin @acl = @gcp.gcp_storage_client.get_bucket_access_control(@bucket, @entity) create_resource_methods(@acl) # all non-existing entities raise a "Not Found" client error rescue Google::Apis::ClientError => e # re-raise the exception if the error is not "Not Found" raise e unless e.status_code == 404 @acl = nil @error = JSON.parse(e.body) end end def exists? !@acl.nil? end def to_s "Storage Bucket ACL #{@bucket}" end end end ================================================ FILE: generate/libraries/google_storage_bucket_iam_binding.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleStorageBucketIamBinding < GcpResourceBase name 'google_storage_bucket_iam_binding' desc 'Verifies settings for a storage bucket IAM binding' example " describe google_storage_bucket_iam_binding(bucket: 'bucket-buvsjjcndqz', role: 'roles/storage.objectViewer') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @bucket = opts[:bucket] @role = opts[:role] @iam_binding_exists = false @members_list=[] catch_gcp_errors do # NOTE: this is the same call as for the plural iam_bindings resource because there isn't an easy way to pull out a singular binding @iam_bindings = @gcp.gcp_storage_client.get_bucket_iam_policy(@bucket) raise Inspec::Exceptions::ResourceFailed, "google_storage_bucket_iam_binding is missing expected IAM policy 'bindings' property" if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.each do |binding| next if binding.role != @role @iam_binding_exists=true @members_list=binding.members end end end # return the list of users corresponding to the role def members @members_list end def exists? @iam_binding_exists end def to_s "Storage Bucket IAM Binding #{@role}" end end end ================================================ FILE: generate/libraries/google_storage_bucket_iam_bindings.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleStorageBucketIamBindings < GcpResourceBase name 'google_storage_bucket_iam_bindings' desc 'Verifies settings for GCP storage bucket IAM bindings in bulk' example " describe google_storage_bucket_iam_bindings(bucket: 'bucket-buvsjjcndqz') do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @bucket = opts[:bucket] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:iam_binding_roles, field: :iam_binding_role) filter_table_config.connect(self, :fetch_data) def fetch_data iam_binding_rows = [] catch_gcp_errors do @iam_bindings = @gcp.gcp_storage_client.get_bucket_iam_policy(@bucket) end return [] if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.map do |iam_binding| iam_binding_rows+=[{ iam_binding_role: iam_binding.role }] end @table = iam_binding_rows end end end ================================================ FILE: generate/libraries/google_storage_bucket_object.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'time' module Inspec::Resources class GoogleStorageBucketObject < GcpResourceBase name 'google_storage_bucket_object' desc 'Verifies settings for a storage bucket object' example " describe google_storage_bucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @bucket = opts[:bucket] @object = opts[:object] catch_gcp_errors do @bucket_object = @gcp.gcp_storage_client.get_object(@bucket, @object) @time_created = @bucket_object.time_created @time_updated = @bucket_object.updated @time_class_updated = @bucket_object.time_storage_class_updated create_resource_methods(@bucket_object) end end def updated_date return false if !defined?(@time_updated) || @time_updated.nil? Time.parse(@time_updated.to_s) end def time_storage_class_updated_date return false if !defined?(@time_class_updated) || @time_class_updated.nil? Time.parse(@time_class_updated.to_s) end def time_created_date return false if !defined?(@time_created) || @time_created.nil? Time.parse(@time_created.to_s) end def exists? !@bucket_object.nil? end def to_s "Bucket object #{@bucket}/#{@object}" end end end ================================================ FILE: generate/libraries/google_storage_bucket_objects.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleStorageBucketObjects < GcpResourceBase name 'google_storage_bucket_objects' desc 'Verifies settings for GCP storage bucket objects in bulk' example " describe google_storage_bucket_objects(bucket: 'bucket-name') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @bucket = opts[:bucket] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:object_names, field: :object_name) filter_table_config.add(:object_buckets, field: :object_bucket) filter_table_config.add(:object_created_times, field: :object_created_time) filter_table_config.connect(self, :fetch_data) def fetch_data bucket_object_rows = [] next_page = nil loop do catch_gcp_errors do @bucket_objects = @gcp.gcp_storage_client.list_objects(@bucket, page_token: next_page) end return [] if !@bucket_objects || !@bucket_objects.items @bucket_objects.items.map do |object| bucket_object_rows+=[{ object_name: object.name, object_bucket: object.bucket, object_created_time: Time.parse(object.time_created.to_s) }] end next_page = @bucket_objects.next_page_token break unless next_page end @table = bucket_object_rows end end end ================================================ FILE: generate/libraries/google_storage_buckets.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleStorageBuckets < GcpResourceBase name 'google_storage_buckets' desc 'Verifies settings for GCP storage buckets in bulk' example " describe google_storage_buckets(project: 'chef-inspec-gcp') do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:bucket_ids, field: :bucket_id) filter_table_config.add(:bucket_names, field: :bucket_name) filter_table_config.add(:bucket_project_numbers, field: :bucket_project_number) filter_table_config.add(:bucket_locations, field: :bucket_location) filter_table_config.connect(self, :fetch_data) def fetch_data bucket_rows = [] next_page = nil loop do catch_gcp_errors do @buckets = @gcp.gcp_storage_client.list_buckets(@project, page_token: next_page) end return [] if !@buckets || !@buckets.items @buckets.items.map do |bucket| bucket_rows+=[{ bucket_id: bucket.id, bucket_name: bucket.name, bucket_project_number: bucket.project_number, bucket_location: bucket.location }] end next_page = @buckets.next_page_token break unless next_page end @table = bucket_rows end end end ================================================ FILE: generate/libraries/google_storage_default_object_acl.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleStorageDefaultObjectAcl < GcpResourceBase name 'google_storage_default_object_acl' desc 'Verifies settings for a storage default object ACL' example " describe google_storage_default_object_acl(bucket: 'bucket-buvsjjcndqz', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @bucket = opts[:bucket] @entity = opts[:entity] begin @acl = @gcp.gcp_storage_client.get_default_object_access_control(@bucket, @entity) create_resource_methods(@acl) # all non-existing entities raise a "Not Found" client error rescue Google::Apis::ClientError => e @acl=nil @error=JSON.parse(e.body) end end def exists? !@acl.nil? end attr_reader :error def to_s "Storage Default Object ACL #{@bucket} #{@entity}" end end end ================================================ FILE: generate/libraries/google_storage_object_acl.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'json' module Inspec::Resources class GoogleStorageObjectAcl < GcpResourceBase name 'google_storage_object_acl' desc 'Verifies settings for a storage object ACL' example " describe google_storage_object_acl(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @bucket = opts[:bucket] @object = opts[:object] @entity = opts[:entity] begin @acl = @gcp.gcp_storage_client.get_object_access_control(@bucket, @object, @entity) create_resource_methods(@acl) # all non-existing entities raise a "Not Found" client error rescue Google::Apis::ClientError => e @acl=nil @error=JSON.parse(e.body) end end def exists? !@acl.nil? end attr_reader :error def to_s "Storage Object ACL #{@object} #{@entity}" end end end ================================================ FILE: generate/libraries/google_user.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/admin_directory_v1' module Inspec::Resources class GoogleUser < GcpResourceBase name 'google_user' desc 'Verifies settings for a GCP user' example " describe google_user(user_key: '110491234567894702010') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:user_key] catch_gcp_errors do @user = @gcp.gcp_admin_client.get_user(opts[:user_key]) create_resource_methods(@user) end end def exists? !@user.nil? end def suspended? return false if !defined?(@user.suspended) || @user.suspended.nil? @user.suspended end def has_mfa_enabled? return false if !defined?(@user.is_enrolled_in2_sv) || @user.is_enrolled_in2_sv.nil? @user.is_enrolled_in2_sv end def to_s "User #{@display_name}" end end end ================================================ FILE: generate/libraries/google_users.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/admin_directory_v1' module Inspec::Resources class GoogleUsers < GcpResourceBase name 'google_users' desc 'Verifies settings for GCP users in bulk' example " describe google_users(customer: 'my_customer') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @customer = opts[:customer] || 'my_customer' @domain = opts[:domain] || '' end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:user_ids, field: :user_id) filter_table_config.add(:user_full_names, field: :user_full_name) filter_table_config.add(:user_emails, field: :user_email) filter_table_config.connect(self, :fetch_data) def fetch_data user_rows = [] next_page = nil loop do catch_gcp_errors do @users = @gcp.gcp_admin_client.list_users(customer: @customer, domain: @domain, page_token: next_page) end return [] if !@users || !@users.users @users.users.map do |user| user_rows+=[{ user_id: user.id, user_name: user.name.full_name, user_email: user.primary_email }] end next_page = @users.next_page_token break unless next_page end @table = user_rows end end end ================================================ FILE: inspec.yml ================================================ name: inspec-gcp title: Google Cloud Platform Resource Pack maintainer: spaterson@chef.io,russell.seymour@turtlesystems.co.uk summary: This resource pack provides compliance resources_old_ignore for Google Cloud Platform copyright: spaterson@chef.io,russell.seymour@turtlesystems.co.uk copyright_email: spaterson@chef.io,russell.seymour@turtlesystems.co.uk version: 1.11.136 license: Apache-2.0 inspec_version: '>= 4.7.3' supports: - platform: gcp ================================================ FILE: libraries/gcp_backend.rb ================================================ # frozen_string_literal: true # GCP Inspec Backend Classes # # Based on the Azure Inspec classes by Russell Seymour # require 'json' require 'net/http' require 'googleauth' # Base class for GCP resources - depends on train GCP transport for connection # # module Inspec::Resources class GcpResourceBase < Inspec.resource(1) attr_reader :opts, :gcp def initialize(opts) @opts = opts # ensure we have a GCP connection, resources can choose which of the clients to instantiate @gcp = inspec.backend # Magic Modules generated resources use an alternate transport method # In the future this will be moved into the train-gcp plugin itself @connection = GcpApiConnection.new(self) if opts[:use_http_transport] end def failed_resource? @failed_resource end def resource_id @connection&.resource_id end # Intercept GCP exceptions def catch_gcp_errors yield # create custom messages as needed rescue Google::Apis::ClientError => e error = JSON.parse(e.body) fail_resource error['error']['message'] @failed_resource = true nil end def create_resource_methods(object) dm = GcpResourceDynamicMethods.new dm.create_methods(self, object) end def name_from_self_link(property) property&.split('/')&.last end end # end # Class to create methods on the calling object at run time. Heavily based on the Azure Inspec resources. # class GcpResourceDynamicMethods # Given the calling object and its data, create the methods on the object according # to the data that has been retrieved. Various types of data can be returned so the method # checks the type to ensure that the necessary methods are configured correctly # # @param GcpResourceProbe|GcpResource object The object on which the methods should be craeted # @param variant data The data from which the methods should be created def create_methods(object, data) # Check the type of data as this affects the setup of the methods # If it is an Gcp Generic Resource then setup methods for each of # the instance variables case data.class.to_s when /Google::Apis::.*/ # iterate around the instance variables data.instance_variables.each do |var| create_method(object, var.to_s.delete('@'), data.instance_variable_get(var)) end # When the data is a Hash object iterate around each of the key value pairs and # craete a method for each one. when 'Hash' data.each do |key, value| create_method(object, key, value) end end end private # Method that is responsible for creating the method on the calling object. This is # because some nesting maybe required. For example of the value is a Hash then it will # need to have an GcpResourceProbe create for each key, whereas if it is a simple # string then the value just needs to be returned # def create_method(object, name, value) # Create the necessary method based on the var that has been passed # Test the value for its type so that the method can be setup correctly case value.class.to_s when 'String', 'Integer', 'TrueClass', 'FalseClass', 'Fixnum' object.define_singleton_method name do value end when 'Hash' value.count.zero? ? return_value = value : return_value = GcpResourceProbe.new(value) object.define_singleton_method name do return_value end # there are nested Google API classes throughout when /Google::Apis::.*/ object.define_singleton_method name do if value.respond_to? :to_h value = value.to_h end GcpResourceProbe.new(value) end when 'Array' # Some things are just string or integer arrays # Check this by seeing if the first element is a string / integer / boolean or # a hashtable # This may not be the best method, but short of testing all elements in the array, this is # the quickest test # p value[0].class.to_s case value[0].class.to_s when 'String', 'Integer', 'TrueClass', 'FalseClass', 'Fixnum' probes = value else probes = [] value.each do |value_item| # p value_item if value_item.respond_to? :to_h value_item = value_item.to_h end probes << GcpResourceProbe.new(value_item) end end object.define_singleton_method name do probes end end end end # Class object that is created for each element that is returned by GCP. # This is what is interogated by Inspec. If they are nested hashes, then this results # in nested GcpResourceProbe objects. # # The methods for each of the classes are dynamically defined at run time and will # match the items that are retrieved from GCP. See the 'test/integration/verify/controls' for # examples # class GcpResourceProbe attr_reader :name, :type, :location, :item, :count # Initialize method for the class. Accepts an item, be it a scalar value, hash or GCP object # It will then create the necessary dynamic methods so that they can be called in the tests # This is accomplished by call the GcpResourceDynamicMethods # # @param varaint The item from which the class will be initialized # # @return GcpResourceProbe def initialize(item) dm = GcpResourceDynamicMethods.new dm.create_methods(self, item) # Set the item as a property on the class # This is so that it is possible to interrogate what has been added to the class and isolate them from # the standard methods that a Ruby class has. # This used for checking Tags on a resource for example # It also allows direct access if so required @item = item # Set how many items have been set @count = item.length if item.respond_to? :length end # Allows resources to respond to the include test # This means that things like tags can be checked for and then their value tested # # @param [String] key Name of the item to look for in the @item property def include?(key) @item.key?(key) end # Give a sting like `computer_name` return the camelCase version, e.g. # computerName # # @param string data Data that needs to be converted from snake_case to camelCase # # @return string def camel_case(data) camel_case_data = data.split('_').inject([]) { |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) }.join # Ensure that gb (as in gigabytes) is uppercased camel_case_data.gsub(/[gb]/, &:upcase) end end class GcpApiConnection attr_reader :resource def initialize(resource) @resource = resource config_name = Inspec::Config.cached.unpack_train_credentials[:host] ENV['CLOUDSDK_ACTIVE_CONFIG_NAME'] = config_name # deprecated active_support blank method @google_application_credentials = config_name.to_s.empty? && ENV['GOOGLE_APPLICATION_CREDENTIALS'] end def fetch_auth unless @google_application_credentials.nil? return Network::Authorization.new.for!( [ 'https://www.googleapis.com/auth/cloud-platform', ], ).from_google_credentials_json!( @google_application_credentials, ) end Network::Authorization.new.from_application_default! end def fetch(base_url, template, var_data, request_type = 'Get', body = nil) get_request = Network::Base.new( build_uri(base_url, template, var_data), fetch_auth, request_type, body, ) validate_response get_request.send end def validate_response(response) response.is_a?(Net::HTTPNotFound) || response.is_a?(Net::HTTPNoContent) ? nil : return_if_object(response) end def fetch_all(base_url, template, var_data, request_type = 'Get') next_page(build_uri(base_url, template, var_data), request_type) end def next_page(uri, request_type, token = nil) next_hash = {} next_hash['pageToken'] = token unless token.nil? current_params = Hash[URI.decode_www_form(uri.query || '')].merge(next_hash) uri.query = URI.encode_www_form(current_params) get_request = Network::Base.new( uri, fetch_auth, request_type, ) result = return_if_object(get_request.send) next_page_token = result['nextPageToken'] return [result] if next_page_token.nil? [result] + next_page(uri, request_type, next_page_token) end def return_if_object(response) unless response.is_a?(Net::HTTPSuccess) if response.is_a?(Net::HTTPResponse) body = response.body else body = response end result = parser(body) raise_if_errors result, 'message' end result = parser(response.body) fetch_id result result end def parser(json) JSON.parse(json) rescue JSON::ParserError raise StandardError, "Bad response: #{json}" \ end # @param result object on which look for id or name property def fetch_id(result) @resource_id = result['id'] || result['name'] if result.is_a?(Hash) end attr_reader :resource_id def raise_if_errors(response, msg_field) errors = if response['error']['message']&.nil? self.class.navigate(response, %w{error errors}) else self.class.navigate(response, %w{error message}) end resource.fail_resource errors resource.failed_resource = true raise_error(errors, msg_field) unless errors.nil? end def raise_error(errors, msg_field) raise IOError, ['Operation failed:', errors.map { |e| e[msg_field] }.join(', ')].join(' ') end def build_uri(base_url, template, var_data) is_region_included = base_url.include?('{{region}}') url = is_region_included ? base_url.gsub('{{region}}', var_data[:region]): base_url URI.join( "#{url}#{expand_variables(template, var_data)}", ) end # Allows fetching objects within a tree path. def self.navigate(source, path, default = nil) key = path.take(1)[0] path = path.drop(1) return default unless source.key?(key) result = source.fetch(key) return navigate(result, path, default) unless path.empty? result if path.empty? end def extract_variables(template) template.scan(/{{[^}]*}}/).map { |v| v.gsub(/{{([^}]*)}}/, '\1') } .map(&:to_sym) end def expand_variables(template, var_data) extract_variables(template).each do |v| unless var_data.key?(v) # Magic Modules uses % as an indicator that the param needs to be URL escaped v = v.to_s.gsub('%', '').to_sym raise "Missing variable :#{v} in #{var_data} on #{caller.join("\n")}}" unless var_data.key?(v) template.gsub!("{{%#{v}}}", CGI.escape(var_data[v].to_s)) end template.gsub!(/{{#{v}}}/, var_data[v].to_s) end template end end # A handler for authenticated network request module Network class Base def initialize(link, cred, request_type, body = nil) @link = link @cred = cred @request_type = request_type @body = body end def builder Net::HTTP.const_get(@request_type) end def send request = @cred.authorize(builder.new(@link)) request['User-Agent'] = generate_user_agent if @body request['Content-Type'] = 'application/json' request.body = @body end response = transport(request).request(request) unless ENV['GOOGLE_HTTP_VERBOSE'].nil? puts ["network(#{request}: [#{response.code}]", response.body.split("\n").map(&:strip).join(' ')].join(' ') end response end def transport(request) uri = request.uri puts "network(#{request}: #{uri})" \ unless ENV['GOOGLE_HTTP_VERBOSE'].nil? transport = Net::HTTP.new(uri.host, uri.port) transport.use_ssl = uri.is_a?(URI::HTTPS) transport.verify_mode = OpenSSL::SSL::VERIFY_PEER transport.set_debug_output $stderr \ unless ENV['GOOGLE_HTTP_DEBUG'].nil? transport end private def generate_user_agent 'inspec-google/1.0.0' end end # A class to aquire credentials and authorize Google API calls. class Authorization def initialize @authorization = nil @scopes = [] end def authorize(obj) raise ArgumentError, 'A from_* method needs to be called before' \ unless @authorization if obj.class <= URI::HTTPS || obj.class <= URI::HTTP authorize_uri obj elsif obj.class < Net::HTTPRequest authorize_http obj else obj.authorization = @authorization obj end end def for!(*scopes) @scopes = scopes self end def from_google_credentials_json!(credentials_file) raise 'Missing argument for scopes' if @scopes.empty? @authorization = ::Google::Auth::DefaultCredentials.make_creds( json_key_io: File.open(credentials_file), scope: @scopes, ) self end def from_application_default! @authorization = ::Google::Auth.get_application_default self end private def authorize_uri(obj) http = Net::HTTP.new(obj.host, obj.port) http.use_ssl = obj.instance_of?(URI::HTTPS) http.verify_mode = OpenSSL::SSL::VERIFY_PEER [http, authorize_http(Net::HTTP::Get.new(obj.request_uri))] end def authorize_http(req) req.extend TokenProperty auth = {} @authorization.apply!(auth) req['Authorization'] = auth[:authorization] req.token = auth[:authorization].split(' ')[1] req end end # Extension methods to enable retrieving the authentication token. module TokenProperty attr_accessor :token end end ================================================ FILE: libraries/google/accesscontextmanager/property/accesslevel_basic.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/accesscontextmanager/property/accesslevel_basic_conditions' module GoogleInSpec module AccessContextManager module Property class AccessLevelBasic attr_reader :combining_function attr_reader :conditions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @combining_function = args['combiningFunction'] @conditions = GoogleInSpec::AccessContextManager::Property::AccessLevelBasicConditionsArray.parse(args['conditions'], to_s) end def to_s "#{@parent_identifier} AccessLevelBasic" end end end end end ================================================ FILE: libraries/google/accesscontextmanager/property/accesslevel_basic_conditions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy' require 'google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints' module GoogleInSpec module AccessContextManager module Property class AccessLevelBasicConditions attr_reader :ip_subnetworks attr_reader :required_access_levels attr_reader :members attr_reader :negate attr_reader :device_policy attr_reader :regions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_subnetworks = args['ipSubnetworks'] @required_access_levels = args['requiredAccessLevels'] @members = args['members'] @negate = args['negate'] @device_policy = GoogleInSpec::AccessContextManager::Property::AccessLevelBasicConditionsDevicePolicy.new(args['devicePolicy'], to_s) @regions = args['regions'] end def to_s "#{@parent_identifier} AccessLevelBasicConditions" end end class AccessLevelBasicConditionsArray def self.parse(value, parent_identifier) return if value.nil? return AccessLevelBasicConditions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| AccessLevelBasicConditions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints' module GoogleInSpec module AccessContextManager module Property class AccessLevelBasicConditionsDevicePolicy attr_reader :require_screen_lock attr_reader :allowed_encryption_statuses attr_reader :allowed_device_management_levels attr_reader :os_constraints attr_reader :require_admin_approval attr_reader :require_corp_owned def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @require_screen_lock = args['requireScreenlock'] @allowed_encryption_statuses = args['allowedEncryptionStatuses'] @allowed_device_management_levels = args['allowedDeviceManagementLevels'] @os_constraints = GoogleInSpec::AccessContextManager::Property::AccessLevelBasicConditionsDevicePolicyOsConstraintsArray.parse(args['osConstraints'], to_s) @require_admin_approval = args['requireAdminApproval'] @require_corp_owned = args['requireCorpOwned'] end def to_s "#{@parent_identifier} AccessLevelBasicConditionsDevicePolicy" end end end end end ================================================ FILE: libraries/google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module AccessContextManager module Property class AccessLevelBasicConditionsDevicePolicyOsConstraints attr_reader :minimum_version attr_reader :os_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @minimum_version = args['minimumVersion'] @os_type = args['osType'] end def to_s "#{@parent_identifier} AccessLevelBasicConditionsDevicePolicyOsConstraints" end end class AccessLevelBasicConditionsDevicePolicyOsConstraintsArray def self.parse(value, parent_identifier) return if value.nil? return AccessLevelBasicConditionsDevicePolicyOsConstraints.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| AccessLevelBasicConditionsDevicePolicyOsConstraints.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/accesscontextmanager/property/accesslevel_custom.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/accesscontextmanager/property/accesslevel_custom_expr' module GoogleInSpec module AccessContextManager module Property class AccessLevelCustom attr_reader :expr def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @expr = GoogleInSpec::AccessContextManager::Property::AccessLevelCustomExpr.new(args['expr'], to_s) end def to_s "#{@parent_identifier} AccessLevelCustom" end end end end end ================================================ FILE: libraries/google/accesscontextmanager/property/accesslevel_custom_expr.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module AccessContextManager module Property class AccessLevelCustomExpr attr_reader :expression attr_reader :title attr_reader :description attr_reader :location def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @expression = args['expression'] @title = args['title'] @description = args['description'] @location = args['location'] end def to_s "#{@parent_identifier} AccessLevelCustomExpr" end end end end end ================================================ FILE: libraries/google/accesscontextmanager/property/serviceperimeter_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services' module GoogleInSpec module AccessContextManager module Property class ServicePerimeterSpec attr_reader :resources attr_reader :access_levels attr_reader :restricted_services attr_reader :vpc_accessible_services def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @resources = args['resources'] @access_levels = args['accessLevels'] @restricted_services = args['restrictedServices'] @vpc_accessible_services = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecVPCAccessibleServices.new(args['vpcAccessibleServices'], to_s) end def to_s "#{@parent_identifier} ServicePerimeterSpec" end end end end end ================================================ FILE: libraries/google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module AccessContextManager module Property class ServicePerimeterSpecVPCAccessibleServices attr_reader :enable_restriction attr_reader :allowed_services def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_restriction = args['enableRestriction'] @allowed_services = args['allowedServices'] end def to_s "#{@parent_identifier} ServicePerimeterSpecVPCAccessibleServices" end end end end end ================================================ FILE: libraries/google/accesscontextmanager/property/serviceperimeter_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services' module GoogleInSpec module AccessContextManager module Property class ServicePerimeterStatus attr_reader :resources attr_reader :access_levels attr_reader :restricted_services attr_reader :vpc_accessible_services def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @resources = args['resources'] @access_levels = args['accessLevels'] @restricted_services = args['restrictedServices'] @vpc_accessible_services = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusVPCAccessibleServices.new(args['vpcAccessibleServices'], to_s) end def to_s "#{@parent_identifier} ServicePerimeterStatus" end end end end end ================================================ FILE: libraries/google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module AccessContextManager module Property class ServicePerimeterStatusVPCAccessibleServices attr_reader :enable_restriction attr_reader :allowed_services def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_restriction = args['enableRestriction'] @allowed_services = args['allowedServices'] end def to_s "#{@parent_identifier} ServicePerimeterStatusVPCAccessibleServices" end end end end end ================================================ FILE: libraries/google/apigee/property/organization_addons_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/apigee/property/organization_addons_config_advanced_api_ops_config' require 'google/apigee/property/organization_addons_config_analytics_config' require 'google/apigee/property/organization_addons_config_api_security_config' require 'google/apigee/property/organization_addons_config_connectors_platform_config' require 'google/apigee/property/organization_addons_config_integration_config' require 'google/apigee/property/organization_addons_config_monetization_config' module GoogleInSpec module Apigee module Property class OrganizationAddonsConfig attr_reader :integration_config attr_reader :api_security_config attr_reader :monetization_config attr_reader :connectors_platform_config attr_reader :analytics_config attr_reader :advanced_api_ops_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @integration_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigIntegrationConfig.new(args['integrationConfig'], to_s) @api_security_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigApiSecurityConfig.new(args['apiSecurityConfig'], to_s) @monetization_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigMonetizationConfig.new(args['monetizationConfig'], to_s) @connectors_platform_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigConnectorsPlatformConfig.new(args['connectorsPlatformConfig'], to_s) @analytics_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigAnalyticsConfig.new(args['analyticsConfig'], to_s) @advanced_api_ops_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigAdvancedApiOpsConfig.new(args['advancedApiOpsConfig'], to_s) end def to_s "#{@parent_identifier} OrganizationAddonsConfig" end end end end end ================================================ FILE: libraries/google/apigee/property/organization_addons_config_advanced_api_ops_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Apigee module Property class OrganizationAddonsConfigAdvancedApiOpsConfig attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} OrganizationAddonsConfigAdvancedApiOpsConfig" end end end end end ================================================ FILE: libraries/google/apigee/property/organization_addons_config_analytics_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Apigee module Property class OrganizationAddonsConfigAnalyticsConfig attr_reader :expire_time_millis attr_reader :state attr_reader :enabled attr_reader :update_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @expire_time_millis = args['expireTimeMillis'] @state = args['state'] @enabled = args['enabled'] @update_time = args['updateTime'] end def to_s "#{@parent_identifier} OrganizationAddonsConfigAnalyticsConfig" end end end end end ================================================ FILE: libraries/google/apigee/property/organization_addons_config_api_security_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Apigee module Property class OrganizationAddonsConfigApiSecurityConfig attr_reader :enabled attr_reader :expires_at def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] @expires_at = args['expiresAt'] end def to_s "#{@parent_identifier} OrganizationAddonsConfigApiSecurityConfig" end end end end end ================================================ FILE: libraries/google/apigee/property/organization_addons_config_connectors_platform_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Apigee module Property class OrganizationAddonsConfigConnectorsPlatformConfig attr_reader :expires_at attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @expires_at = args['expiresAt'] @enabled = args['enabled'] end def to_s "#{@parent_identifier} OrganizationAddonsConfigConnectorsPlatformConfig" end end end end end ================================================ FILE: libraries/google/apigee/property/organization_addons_config_integration_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Apigee module Property class OrganizationAddonsConfigIntegrationConfig attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} OrganizationAddonsConfigIntegrationConfig" end end end end end ================================================ FILE: libraries/google/apigee/property/organization_addons_config_monetization_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Apigee module Property class OrganizationAddonsConfigMonetizationConfig attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} OrganizationAddonsConfigMonetizationConfig" end end end end end ================================================ FILE: libraries/google/apigee/property/organization_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/apigee/property/organization_properties_property' module GoogleInSpec module Apigee module Property class OrganizationProperties attr_reader :property def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @property = GoogleInSpec::Apigee::Property::OrganizationPropertiesPropertyArray.parse(args['property'], to_s) end def to_s "#{@parent_identifier} OrganizationProperties" end end end end end ================================================ FILE: libraries/google/apigee/property/organization_properties_property.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Apigee module Property class OrganizationPropertiesProperty attr_reader :value attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @value = args['value'] @name = args['name'] end def to_s "#{@parent_identifier} OrganizationPropertiesProperty" end end class OrganizationPropertiesPropertyArray def self.parse(value, parent_identifier) return if value.nil? return OrganizationPropertiesProperty.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| OrganizationPropertiesProperty.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/apigee/property/organizationapi_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Apigee module Property class OrganizationApiLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} OrganizationApiLabels" end end end end end ================================================ FILE: libraries/google/apigee/property/organizationapi_meta_data.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Apigee module Property class OrganizationApiMetaData attr_reader :last_modified_at attr_reader :created_at attr_reader :sub_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @last_modified_at = args['lastModifiedAt'] @created_at = args['createdAt'] @sub_type = args['subType'] end def to_s "#{@parent_identifier} OrganizationApiMetaData" end end end end end ================================================ FILE: libraries/google/appengine/property/standardappversion_automatic_scaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings' module GoogleInSpec module AppEngine module Property class StandardAppVersionAutomaticScaling attr_reader :max_concurrent_requests attr_reader :max_idle_instances attr_reader :max_pending_latency attr_reader :min_idle_instances attr_reader :min_pending_latency attr_reader :standard_scheduler_settings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_concurrent_requests = args['maxConcurrentRequests'] @max_idle_instances = args['maxIdleInstances'] @max_pending_latency = args['maxPendingLatency'] @min_idle_instances = args['minIdleInstances'] @min_pending_latency = args['minPendingLatency'] @standard_scheduler_settings = GoogleInSpec::AppEngine::Property::StandardAppVersionAutomaticScalingStandardSchedulerSettings.new(args['standardSchedulerSettings'], to_s) end def to_s "#{@parent_identifier} StandardAppVersionAutomaticScaling" end end end end end ================================================ FILE: libraries/google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module AppEngine module Property class StandardAppVersionAutomaticScalingStandardSchedulerSettings attr_reader :target_cpu_utilization attr_reader :target_throughput_utilization attr_reader :min_instances attr_reader :max_instances def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @target_cpu_utilization = args['targetCpuUtilization'] @target_throughput_utilization = args['targetThroughputUtilization'] @min_instances = args['minInstances'] @max_instances = args['maxInstances'] end def to_s "#{@parent_identifier} StandardAppVersionAutomaticScalingStandardSchedulerSettings" end end end end end ================================================ FILE: libraries/google/appengine/property/standardappversion_basic_scaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module AppEngine module Property class StandardAppVersionBasicScaling attr_reader :idle_timeout attr_reader :max_instances def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @idle_timeout = args['idleTimeout'] @max_instances = args['maxInstances'] end def to_s "#{@parent_identifier} StandardAppVersionBasicScaling" end end end end end ================================================ FILE: libraries/google/appengine/property/standardappversion_manual_scaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module AppEngine module Property class StandardAppVersionManualScaling attr_reader :instances def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instances = args['instances'] end def to_s "#{@parent_identifier} StandardAppVersionManualScaling" end end end end end ================================================ FILE: libraries/google/appengine/property/standardappversion_vpc_access_connector.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module AppEngine module Property class StandardAppVersionVPCAccessConnector attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} StandardAppVersionVPCAccessConnector" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_cleanup_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryCleanupPolicies attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryCleanupPolicies" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_docker_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryDockerConfig attr_reader :immutable_tags def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @immutable_tags = args['immutableTags'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryDockerConfig" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryLabels" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_maven_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryMavenConfig attr_reader :allow_snapshot_overwrites attr_reader :version_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allow_snapshot_overwrites = args['allowSnapshotOverwrites'] @version_policy = args['versionPolicy'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryMavenConfig" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials' require 'google/artifactregistry/property/projectlocationrepository_rrcucup_credentials' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository' module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfig attr_reader :docker_repository attr_reader :maven_repository attr_reader :npm_repository attr_reader :python_repository attr_reader :apt_repository attr_reader :yum_repository attr_reader :description attr_reader :upstream_credentials def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @docker_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigDockerRepository.new(args['dockerRepository'], to_s) @maven_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigMavenRepository.new(args['mavenRepository'], to_s) @npm_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigNpmRepository.new(args['npmRepository'], to_s) @python_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigPythonRepository.new(args['pythonRepository'], to_s) @apt_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigAptRepository.new(args['aptRepository'], to_s) @yum_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigYumRepository.new(args['yumRepository'], to_s) @description = args['description'] @upstream_credentials = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentials.new(args['upstreamCredentials'], to_s) end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfig" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository' module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfigAptRepository attr_reader :public_repository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @public_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigAptRepositoryPublicRepository.new(args['publicRepository'], to_s) end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigAptRepository" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfigAptRepositoryPublicRepository attr_reader :repository_base attr_reader :repository_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @repository_base = args['repositoryBase'] @repository_path = args['repositoryPath'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigAptRepositoryPublicRepository" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfigDockerRepository attr_reader :public_repository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @public_repository = args['publicRepository'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigDockerRepository" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfigMavenRepository attr_reader :public_repository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @public_repository = args['publicRepository'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigMavenRepository" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfigNpmRepository attr_reader :public_repository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @public_repository = args['publicRepository'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigNpmRepository" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfigPythonRepository attr_reader :public_repository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @public_repository = args['publicRepository'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigPythonRepository" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/artifactregistry/property/projectlocationrepository_rrcucup_credentials' module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentials attr_reader :username_password_credentials def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @username_password_credentials = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentials.new(args['usernamePasswordCredentials'], to_s) end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentials" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository' module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfigYumRepository attr_reader :public_repository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @public_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigYumRepositoryPublicRepository.new(args['publicRepository'], to_s) end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigYumRepository" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfigYumRepositoryPublicRepository attr_reader :repository_base attr_reader :repository_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @repository_base = args['repositoryBase'] @repository_path = args['repositoryPath'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigYumRepositoryPublicRepository" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_rrcucup_credentials.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentials attr_reader :username attr_reader :password_secret_version def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @username = args['username'] @password_secret_version = args['passwordSecretVersion'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentials" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies' module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryVirtualRepositoryConfig attr_reader :upstream_policies def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @upstream_policies = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPoliciesArray.parse(args['upstreamPolicies'], to_s) end def to_s "#{@parent_identifier} ProjectLocationRepositoryVirtualRepositoryConfig" end end end end end ================================================ FILE: libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Artifactregistry module Property class ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPolicies attr_reader :id attr_reader :repository attr_reader :priority def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @id = args['id'] @repository = args['repository'] @priority = args['priority'] end def to_s "#{@parent_identifier} ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPolicies" end end class ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPoliciesArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPolicies.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPolicies.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/bigquery/property/dataset_access.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/dataset_access_view' module GoogleInSpec module BigQuery module Property class DatasetAccess attr_reader :domain attr_reader :group_by_email attr_reader :role attr_reader :special_group attr_reader :user_by_email attr_reader :iam_member attr_reader :view def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @domain = args['domain'] @group_by_email = args['groupByEmail'] @role = args['role'] @special_group = args['specialGroup'] @user_by_email = args['userByEmail'] @iam_member = args['iamMember'] @view = GoogleInSpec::BigQuery::Property::DatasetAccessView.new(args['view'], to_s) end def to_s "#{@parent_identifier} DatasetAccess" end end class DatasetAccessArray def self.parse(value, parent_identifier) return if value.nil? return DatasetAccess.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| DatasetAccess.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/bigquery/property/dataset_access_view.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class DatasetAccessView attr_reader :dataset_id attr_reader :project_id attr_reader :table_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @dataset_id = args['datasetId'] @project_id = args['projectId'] @table_id = args['tableId'] end def to_s "#{@parent_identifier} DatasetAccessView" end end end end end ================================================ FILE: libraries/google/bigquery/property/dataset_dataset_reference.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class DatasetDatasetReference attr_reader :dataset_id attr_reader :project_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @dataset_id = args['datasetId'] @project_id = args['projectId'] end def to_s "#{@parent_identifier} DatasetDatasetReference" end end end end end ================================================ FILE: libraries/google/bigquery/property/dataset_default_encryption_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class DatasetDefaultEncryptionConfiguration attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} DatasetDefaultEncryptionConfiguration" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_encryption_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableEncryptionConfiguration attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} TableEncryptionConfiguration" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_external_data_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_external_data_configuration_bigtable_options' require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' require 'google/bigquery/property/table_external_data_configuration_csv_options' require 'google/bigquery/property/table_external_data_configuration_google_sheets_options' require 'google/bigquery/property/table_external_data_configuration_schema' require 'google/bigquery/property/table_external_data_configuration_schema_fields' module GoogleInSpec module BigQuery module Property class TableExternalDataConfiguration attr_reader :autodetect attr_reader :compression attr_reader :ignore_unknown_values attr_reader :max_bad_records attr_reader :source_format attr_reader :source_uris attr_reader :schema attr_reader :google_sheets_options attr_reader :csv_options attr_reader :bigtable_options def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @autodetect = args['autodetect'] @compression = args['compression'] @ignore_unknown_values = args['ignoreUnknownValues'] @max_bad_records = args['maxBadRecords'] @source_format = args['sourceFormat'] @source_uris = args['sourceUris'] @schema = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchema.new(args['schema'], to_s) @google_sheets_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationGoogleSheetsOptions.new(args['googleSheetsOptions'], to_s) @csv_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationCsvOptions.new(args['csvOptions'], to_s) @bigtable_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptions.new(args['bigtableOptions'], to_s) end def to_s "#{@parent_identifier} TableExternalDataConfiguration" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_external_data_configuration_bigtable_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationBigtableOptions attr_reader :ignore_unspecified_column_families attr_reader :read_rowkey_as_string attr_reader :column_families def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ignore_unspecified_column_families = args['ignoreUnspecifiedColumnFamilies'] @read_rowkey_as_string = args['readRowkeyAsString'] @column_families = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesArray.parse(args['columnFamilies'], to_s) end def to_s "#{@parent_identifier} TableExternalDataConfigurationBigtableOptions" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns' module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationBigtableOptionsColumnFamilies attr_reader :columns attr_reader :encoding attr_reader :family_id attr_reader :only_read_latest attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @columns = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumnsArray.parse(args['columns'], to_s) @encoding = args['encoding'] @family_id = args['familyId'] @only_read_latest = args['onlyReadLatest'] @type = args['type'] end def to_s "#{@parent_identifier} TableExternalDataConfigurationBigtableOptionsColumnFamilies" end end class TableExternalDataConfigurationBigtableOptionsColumnFamiliesArray def self.parse(value, parent_identifier) return if value.nil? return TableExternalDataConfigurationBigtableOptionsColumnFamilies.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TableExternalDataConfigurationBigtableOptionsColumnFamilies.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumns attr_reader :encoding attr_reader :field_name attr_reader :only_read_latest attr_reader :qualifier_string attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @encoding = args['encoding'] @field_name = args['fieldName'] @only_read_latest = args['onlyReadLatest'] @qualifier_string = args['qualifierString'] @type = args['type'] end def to_s "#{@parent_identifier} TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumns" end end class TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumnsArray def self.parse(value, parent_identifier) return if value.nil? return TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumns.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumns.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/bigquery/property/table_external_data_configuration_csv_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationCsvOptions attr_reader :allow_jagged_rows attr_reader :allow_quoted_newlines attr_reader :encoding attr_reader :field_delimiter attr_reader :quote attr_reader :skip_leading_rows def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allow_jagged_rows = args['allowJaggedRows'] @allow_quoted_newlines = args['allowQuotedNewlines'] @encoding = args['encoding'] @field_delimiter = args['fieldDelimiter'] @quote = args['quote'] @skip_leading_rows = args['skipLeadingRows'] end def to_s "#{@parent_identifier} TableExternalDataConfigurationCsvOptions" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_external_data_configuration_google_sheets_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationGoogleSheetsOptions attr_reader :skip_leading_rows def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @skip_leading_rows = args['skipLeadingRows'] end def to_s "#{@parent_identifier} TableExternalDataConfigurationGoogleSheetsOptions" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_external_data_configuration_schema.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_external_data_configuration_schema_fields' module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationSchema attr_reader :fields def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fields = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchemaFieldsArray.parse(args['fields'], to_s) end def to_s "#{@parent_identifier} TableExternalDataConfigurationSchema" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_external_data_configuration_schema_fields.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableExternalDataConfigurationSchemaFields attr_reader :description attr_reader :fields attr_reader :mode attr_reader :name attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @description = args['description'] @fields = args['fields'] @mode = args['mode'] @name = args['name'] @type = args['type'] end def to_s "#{@parent_identifier} TableExternalDataConfigurationSchemaFields" end end class TableExternalDataConfigurationSchemaFieldsArray def self.parse(value, parent_identifier) return if value.nil? return TableExternalDataConfigurationSchemaFields.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TableExternalDataConfigurationSchemaFields.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/bigquery/property/table_schema.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_schema_fields' module GoogleInSpec module BigQuery module Property class TableSchema attr_reader :fields def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fields = GoogleInSpec::BigQuery::Property::TableSchemaFieldsArray.parse(args['fields'], to_s) end def to_s "#{@parent_identifier} TableSchema" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_schema_fields.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableSchemaFields attr_reader :description attr_reader :fields attr_reader :mode attr_reader :name attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @description = args['description'] @fields = args['fields'] @mode = args['mode'] @name = args['name'] @type = args['type'] end def to_s "#{@parent_identifier} TableSchemaFields" end end class TableSchemaFieldsArray def self.parse(value, parent_identifier) return if value.nil? return TableSchemaFields.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TableSchemaFields.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/bigquery/property/table_streaming_buffer.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableStreamingBuffer attr_reader :estimated_bytes attr_reader :estimated_rows attr_reader :oldest_entry_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @estimated_bytes = args['estimatedBytes'] @estimated_rows = args['estimatedRows'] @oldest_entry_time = args['oldestEntryTime'] end def to_s "#{@parent_identifier} TableStreamingBuffer" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_table_reference.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableTableReference attr_reader :dataset_id attr_reader :project_id attr_reader :table_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @dataset_id = args['datasetId'] @project_id = args['projectId'] @table_id = args['tableId'] end def to_s "#{@parent_identifier} TableTableReference" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_time_partitioning.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableTimePartitioning attr_reader :expiration_ms attr_reader :field attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @expiration_ms = args['expirationMs'] @field = args['field'] @type = args['type'] end def to_s "#{@parent_identifier} TableTimePartitioning" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_view.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigquery/property/table_view_user_defined_function_resources' module GoogleInSpec module BigQuery module Property class TableView attr_reader :use_legacy_sql attr_reader :user_defined_function_resources def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @use_legacy_sql = args['useLegacySql'] @user_defined_function_resources = GoogleInSpec::BigQuery::Property::TableViewUserDefinedFunctionResourcesArray.parse(args['userDefinedFunctionResources'], to_s) end def to_s "#{@parent_identifier} TableView" end end end end end ================================================ FILE: libraries/google/bigquery/property/table_view_user_defined_function_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module BigQuery module Property class TableViewUserDefinedFunctionResources attr_reader :inline_code attr_reader :resource_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @inline_code = args['inlineCode'] @resource_uri = args['resourceUri'] end def to_s "#{@parent_identifier} TableViewUserDefinedFunctionResources" end end class TableViewUserDefinedFunctionResourcesArray def self.parse(value, parent_identifier) return if value.nil? return TableViewUserDefinedFunctionResources.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TableViewUserDefinedFunctionResources.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/cluster_cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config' require 'google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config_autoscaling_limits' require 'google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config_autoscaling_targets' module GoogleInSpec module Bigtableadmin module Property class ClusterClusterConfig attr_reader :cluster_autoscaling_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cluster_autoscaling_config = GoogleInSpec::Bigtableadmin::Property::ClusterClusterConfigClusterAutoscalingConfig.new(args['clusterAutoscalingConfig'], to_s) end def to_s "#{@parent_identifier} ClusterClusterConfig" end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config_autoscaling_limits' require 'google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config_autoscaling_targets' module GoogleInSpec module Bigtableadmin module Property class ClusterClusterConfigClusterAutoscalingConfig attr_reader :autoscaling_limits attr_reader :autoscaling_targets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @autoscaling_limits = GoogleInSpec::Bigtableadmin::Property::ClusterClusterConfigClusterAutoscalingConfigAutoscalingLimits.new(args['autoscalingLimits'], to_s) @autoscaling_targets = GoogleInSpec::Bigtableadmin::Property::ClusterClusterConfigClusterAutoscalingConfigAutoscalingTargets.new(args['autoscalingTargets'], to_s) end def to_s "#{@parent_identifier} ClusterClusterConfigClusterAutoscalingConfig" end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config_autoscaling_limits.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Bigtableadmin module Property class ClusterClusterConfigClusterAutoscalingConfigAutoscalingLimits attr_reader :min_serve_nodes attr_reader :max_serve_nodes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min_serve_nodes = args['minServeNodes'] @max_serve_nodes = args['maxServeNodes'] end def to_s "#{@parent_identifier} ClusterClusterConfigClusterAutoscalingConfigAutoscalingLimits" end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config_autoscaling_targets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Bigtableadmin module Property class ClusterClusterConfigClusterAutoscalingConfigAutoscalingTargets attr_reader :cpu_utilization_percent attr_reader :storage_utilization_gib_per_node def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cpu_utilization_percent = args['cpuUtilizationPercent'] @storage_utilization_gib_per_node = args['storageUtilizationGibPerNode'] end def to_s "#{@parent_identifier} ClusterClusterConfigClusterAutoscalingConfigAutoscalingTargets" end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/cluster_encryption_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Bigtableadmin module Property class ClusterEncryptionConfig attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} ClusterEncryptionConfig" end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/clusterbackup_encryption_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/bigtableadmin/property/clusterbackup_encryption_info_encryption_status' module GoogleInSpec module Bigtableadmin module Property class ClusterBackupEncryptionInfo attr_reader :encryption_type attr_reader :encryption_status attr_reader :kms_key_version def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @encryption_type = args['encryptionType'] @encryption_status = GoogleInSpec::Bigtableadmin::Property::ClusterBackupEncryptionInfoEncryptionStatus.new(args['encryptionStatus'], to_s) @kms_key_version = args['kmsKeyVersion'] end def to_s "#{@parent_identifier} ClusterBackupEncryptionInfo" end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/clusterbackup_encryption_info_encryption_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Bigtableadmin module Property class ClusterBackupEncryptionInfoEncryptionStatus attr_reader :code attr_reader :message attr_reader :details def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] @message = args['message'] @details = args['details'] end def to_s "#{@parent_identifier} ClusterBackupEncryptionInfoEncryptionStatus" end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/instanceappprofile_data_boost_isolation_read_only.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Bigtableadmin module Property class InstanceAppProfileDataBoostIsolationReadOnly attr_reader :compute_billing_owner def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @compute_billing_owner = args['computeBillingOwner'] end def to_s "#{@parent_identifier} InstanceAppProfileDataBoostIsolationReadOnly" end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/instanceappprofile_multi_cluster_routing_use_any.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Bigtableadmin module Property class InstanceAppProfileMultiClusterRoutingUseAny attr_reader :cluster_ids def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cluster_ids = args['clusterIds'] end def to_s "#{@parent_identifier} InstanceAppProfileMultiClusterRoutingUseAny" end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/instanceappprofile_single_cluster_routing.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Bigtableadmin module Property class InstanceAppProfileSingleClusterRouting attr_reader :cluster_id attr_reader :allow_transactional_writes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cluster_id = args['clusterId'] @allow_transactional_writes = args['allowTransactionalWrites'] end def to_s "#{@parent_identifier} InstanceAppProfileSingleClusterRouting" end end end end end ================================================ FILE: libraries/google/bigtableadmin/property/instanceappprofile_standard_isolation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Bigtableadmin module Property class InstanceAppProfileStandardIsolation attr_reader :priority def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @priority = args['priority'] end def to_s "#{@parent_identifier} InstanceAppProfileStandardIsolation" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudbuild/property/trigger_build_artifacts' require 'google/cloudbuild/property/trigger_build_artifacts_objects' require 'google/cloudbuild/property/trigger_build_artifacts_objects_timing' require 'google/cloudbuild/property/trigger_build_options' require 'google/cloudbuild/property/trigger_build_options_volumes' require 'google/cloudbuild/property/trigger_build_secrets' require 'google/cloudbuild/property/trigger_build_source' require 'google/cloudbuild/property/trigger_build_source_repo_source' require 'google/cloudbuild/property/trigger_build_source_storage_source' require 'google/cloudbuild/property/trigger_build_steps' module GoogleInSpec module CloudBuild module Property class TriggerBuild attr_reader :source attr_reader :tags attr_reader :images attr_reader :substitutions attr_reader :queue_ttl attr_reader :logs_bucket attr_reader :timeout attr_reader :secrets attr_reader :steps attr_reader :artifacts attr_reader :options def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @source = GoogleInSpec::CloudBuild::Property::TriggerBuildSource.new(args['source'], to_s) @tags = args['tags'] @images = args['images'] @substitutions = args['substitutions'] @queue_ttl = args['queueTtl'] @logs_bucket = args['logsBucket'] @timeout = args['timeout'] @secrets = GoogleInSpec::CloudBuild::Property::TriggerBuildSecretsArray.parse(args['secrets'], to_s) @steps = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsArray.parse(args['steps'], to_s) @artifacts = GoogleInSpec::CloudBuild::Property::TriggerBuildArtifacts.new(args['artifacts'], to_s) @options = GoogleInSpec::CloudBuild::Property::TriggerBuildOptions.new(args['options'], to_s) end def to_s "#{@parent_identifier} TriggerBuild" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_artifacts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudbuild/property/trigger_build_artifacts_objects' require 'google/cloudbuild/property/trigger_build_artifacts_objects_timing' module GoogleInSpec module CloudBuild module Property class TriggerBuildArtifacts attr_reader :images attr_reader :objects def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @images = args['images'] @objects = GoogleInSpec::CloudBuild::Property::TriggerBuildArtifactsObjects.new(args['objects'], to_s) end def to_s "#{@parent_identifier} TriggerBuildArtifacts" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_artifacts_objects.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudbuild/property/trigger_build_artifacts_objects_timing' module GoogleInSpec module CloudBuild module Property class TriggerBuildArtifactsObjects attr_reader :location attr_reader :paths attr_reader :timing def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @location = args['location'] @paths = args['paths'] @timing = GoogleInSpec::CloudBuild::Property::TriggerBuildArtifactsObjectsTiming.new(args['timing'], to_s) end def to_s "#{@parent_identifier} TriggerBuildArtifactsObjects" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_artifacts_objects_timing.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerBuildArtifactsObjectsTiming attr_reader :start_time attr_reader :end_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @start_time = args['startTime'] @end_time = args['endTime'] end def to_s "#{@parent_identifier} TriggerBuildArtifactsObjectsTiming" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudbuild/property/trigger_build_options_volumes' module GoogleInSpec module CloudBuild module Property class TriggerBuildOptions attr_reader :source_provenance_hash attr_reader :requested_verify_option attr_reader :machine_type attr_reader :disk_size_gb attr_reader :substitution_option attr_reader :dynamic_substitutions attr_reader :log_streaming_option attr_reader :worker_pool attr_reader :logging attr_reader :env attr_reader :secret_env attr_reader :volumes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @source_provenance_hash = args['sourceProvenanceHash'] @requested_verify_option = args['requestedVerifyOption'] @machine_type = args['machineType'] @disk_size_gb = args['diskSizeGb'] @substitution_option = args['substitutionOption'] @dynamic_substitutions = args['dynamicSubstitutions'] @log_streaming_option = args['logStreamingOption'] @worker_pool = args['workerPool'] @logging = args['logging'] @env = args['env'] @secret_env = args['secretEnv'] @volumes = GoogleInSpec::CloudBuild::Property::TriggerBuildOptionsVolumesArray.parse(args['volumes'], to_s) end def to_s "#{@parent_identifier} TriggerBuildOptions" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_options_volumes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerBuildOptionsVolumes attr_reader :name attr_reader :path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @path = args['path'] end def to_s "#{@parent_identifier} TriggerBuildOptionsVolumes" end end class TriggerBuildOptionsVolumesArray def self.parse(value, parent_identifier) return if value.nil? return TriggerBuildOptionsVolumes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TriggerBuildOptionsVolumes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_secrets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerBuildSecrets attr_reader :kms_key_name attr_reader :secret_env def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] @secret_env = args['secretEnv'] end def to_s "#{@parent_identifier} TriggerBuildSecrets" end end class TriggerBuildSecretsArray def self.parse(value, parent_identifier) return if value.nil? return TriggerBuildSecrets.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TriggerBuildSecrets.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudbuild/property/trigger_build_source_repo_source' require 'google/cloudbuild/property/trigger_build_source_storage_source' module GoogleInSpec module CloudBuild module Property class TriggerBuildSource attr_reader :storage_source attr_reader :repo_source def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @storage_source = GoogleInSpec::CloudBuild::Property::TriggerBuildSourceStorageSource.new(args['storageSource'], to_s) @repo_source = GoogleInSpec::CloudBuild::Property::TriggerBuildSourceRepoSource.new(args['repoSource'], to_s) end def to_s "#{@parent_identifier} TriggerBuildSource" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_source_repo_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerBuildSourceRepoSource attr_reader :project_id attr_reader :repo_name attr_reader :dir attr_reader :invert_regex attr_reader :substitutions attr_reader :branch_name attr_reader :tag_name attr_reader :commit_sha def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_id = args['projectId'] @repo_name = args['repoName'] @dir = args['dir'] @invert_regex = args['invertRegex'] @substitutions = args['substitutions'] @branch_name = args['branchName'] @tag_name = args['tagName'] @commit_sha = args['commitSha'] end def to_s "#{@parent_identifier} TriggerBuildSourceRepoSource" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_source_storage_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerBuildSourceStorageSource attr_reader :bucket attr_reader :object attr_reader :generation def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @bucket = args['bucket'] @object = args['object'] @generation = args['generation'] end def to_s "#{@parent_identifier} TriggerBuildSourceStorageSource" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_steps.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudbuild/property/trigger_build_steps_volumes' module GoogleInSpec module CloudBuild module Property class TriggerBuildSteps attr_reader :name attr_reader :args attr_reader :env attr_reader :id attr_reader :entrypoint attr_reader :dir attr_reader :secret_env attr_reader :timeout attr_reader :timing attr_reader :volumes attr_reader :wait_for def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @args = args['args'] @env = args['env'] @id = args['id'] @entrypoint = args['entrypoint'] @dir = args['dir'] @secret_env = args['secretEnv'] @timeout = args['timeout'] @timing = args['timing'] @volumes = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsVolumesArray.parse(args['volumes'], to_s) @wait_for = args['waitFor'] end def to_s "#{@parent_identifier} TriggerBuildSteps" end end class TriggerBuildStepsArray def self.parse(value, parent_identifier) return if value.nil? return TriggerBuildSteps.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TriggerBuildSteps.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_build_steps_volumes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerBuildStepsVolumes attr_reader :name attr_reader :path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @path = args['path'] end def to_s "#{@parent_identifier} TriggerBuildStepsVolumes" end end class TriggerBuildStepsVolumesArray def self.parse(value, parent_identifier) return if value.nil? return TriggerBuildStepsVolumes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TriggerBuildStepsVolumes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_github.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudbuild/property/trigger_github_pull_request' require 'google/cloudbuild/property/trigger_github_push' module GoogleInSpec module CloudBuild module Property class TriggerGithub attr_reader :owner attr_reader :name attr_reader :pull_request attr_reader :push def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @owner = args['owner'] @name = args['name'] @pull_request = GoogleInSpec::CloudBuild::Property::TriggerGithubPullRequest.new(args['pullRequest'], to_s) @push = GoogleInSpec::CloudBuild::Property::TriggerGithubPush.new(args['push'], to_s) end def to_s "#{@parent_identifier} TriggerGithub" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_github_pull_request.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerGithubPullRequest attr_reader :branch attr_reader :comment_control attr_reader :invert_regex def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @branch = args['branch'] @comment_control = args['commentControl'] @invert_regex = args['invertRegex'] end def to_s "#{@parent_identifier} TriggerGithubPullRequest" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_github_push.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerGithubPush attr_reader :invert_regex attr_reader :branch attr_reader :tag def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @invert_regex = args['invertRegex'] @branch = args['branch'] @tag = args['tag'] end def to_s "#{@parent_identifier} TriggerGithubPush" end end end end end ================================================ FILE: libraries/google/cloudbuild/property/trigger_trigger_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudBuild module Property class TriggerTriggerTemplate attr_reader :project_id attr_reader :repo_name attr_reader :dir attr_reader :invert_regex attr_reader :branch_name attr_reader :tag_name attr_reader :commit_sha def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_id = args['projectId'] @repo_name = args['repoName'] @dir = args['dir'] @invert_regex = args['invertRegex'] @branch_name = args['branchName'] @tag_name = args['tagName'] @commit_sha = args['commitSha'] end def to_s "#{@parent_identifier} TriggerTriggerTemplate" end end end end end ================================================ FILE: libraries/google/cloudfunctions/property/cloudfunction_event_trigger.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudFunctions module Property class CloudFunctionEventTrigger attr_reader :event_type attr_reader :resource attr_reader :service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @event_type = args['eventType'] @resource = args['resource'] @service = args['service'] end def to_s "#{@parent_identifier} CloudFunctionEventTrigger" end end end end end ================================================ FILE: libraries/google/cloudfunctions/property/cloudfunction_https_trigger.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudFunctions module Property class CloudFunctionHttpsTrigger attr_reader :url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @url = args['url'] end def to_s "#{@parent_identifier} CloudFunctionHttpsTrigger" end end end end end ================================================ FILE: libraries/google/cloudfunctions/property/cloudfunction_source_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudFunctions module Property class CloudFunctionSourceRepository attr_reader :url attr_reader :deployed_url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @url = args['url'] @deployed_url = args['deployedUrl'] end def to_s "#{@parent_identifier} CloudFunctionSourceRepository" end end end end end ================================================ FILE: libraries/google/cloudscheduler/property/job_app_engine_http_target.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing' module GoogleInSpec module CloudScheduler module Property class JobAppEngineHttpTarget attr_reader :http_method attr_reader :app_engine_routing attr_reader :relative_uri attr_reader :body attr_reader :headers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_method = args['httpMethod'] @app_engine_routing = GoogleInSpec::CloudScheduler::Property::JobAppEngineHttpTargetAppEngineRouting.new(args['appEngineRouting'], to_s) @relative_uri = args['relativeUri'] @body = args['body'] @headers = args['headers'] end def to_s "#{@parent_identifier} JobAppEngineHttpTarget" end end end end end ================================================ FILE: libraries/google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudScheduler module Property class JobAppEngineHttpTargetAppEngineRouting attr_reader :service attr_reader :version attr_reader :instance def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service = args['service'] @version = args['version'] @instance = args['instance'] end def to_s "#{@parent_identifier} JobAppEngineHttpTargetAppEngineRouting" end end end end end ================================================ FILE: libraries/google/cloudscheduler/property/job_http_target.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/cloudscheduler/property/job_http_target_oauth_token' require 'google/cloudscheduler/property/job_http_target_oidc_token' module GoogleInSpec module CloudScheduler module Property class JobHttpTarget attr_reader :uri attr_reader :http_method attr_reader :body attr_reader :headers attr_reader :oauth_token attr_reader :oidc_token def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @uri = args['uri'] @http_method = args['httpMethod'] @body = args['body'] @headers = args['headers'] @oauth_token = GoogleInSpec::CloudScheduler::Property::JobHttpTargetOauthToken.new(args['oauthToken'], to_s) @oidc_token = GoogleInSpec::CloudScheduler::Property::JobHttpTargetOidcToken.new(args['oidcToken'], to_s) end def to_s "#{@parent_identifier} JobHttpTarget" end end end end end ================================================ FILE: libraries/google/cloudscheduler/property/job_http_target_oauth_token.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudScheduler module Property class JobHttpTargetOauthToken attr_reader :service_account_email attr_reader :scope def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service_account_email = args['serviceAccountEmail'] @scope = args['scope'] end def to_s "#{@parent_identifier} JobHttpTargetOauthToken" end end end end end ================================================ FILE: libraries/google/cloudscheduler/property/job_http_target_oidc_token.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudScheduler module Property class JobHttpTargetOidcToken attr_reader :service_account_email attr_reader :audience def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service_account_email = args['serviceAccountEmail'] @audience = args['audience'] end def to_s "#{@parent_identifier} JobHttpTargetOidcToken" end end end end end ================================================ FILE: libraries/google/cloudscheduler/property/job_pubsub_target.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudScheduler module Property class JobPubsubTarget attr_reader :topic_name attr_reader :data attr_reader :attributes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @topic_name = args['topicName'] @data = args['data'] @attributes = args['attributes'] end def to_s "#{@parent_identifier} JobPubsubTarget" end end end end end ================================================ FILE: libraries/google/cloudscheduler/property/job_retry_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module CloudScheduler module Property class JobRetryConfig attr_reader :retry_count attr_reader :max_retry_duration attr_reader :min_backoff_duration attr_reader :max_backoff_duration attr_reader :max_doublings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @retry_count = args['retryCount'] @max_retry_duration = args['maxRetryDuration'] @min_backoff_duration = args['minBackoffDuration'] @max_backoff_duration = args['maxBackoffDuration'] @max_doublings = args['maxDoublings'] end def to_s "#{@parent_identifier} JobRetryConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/composer/property/projectlocationenvironment_config_database_config' require 'google/composer/property/projectlocationenvironment_config_encryption_config' require 'google/composer/property/projectlocationenvironment_config_maintenance_window' require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config' require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks' require 'google/composer/property/projectlocationenvironment_config_node_config' require 'google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy' require 'google/composer/property/projectlocationenvironment_config_private_environment_config' require 'google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config' require 'google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config' require 'google/composer/property/projectlocationenvironment_config_recovery_config' require 'google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config' require 'google/composer/property/projectlocationenvironment_config_software_config' require 'google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides' require 'google/composer/property/projectlocationenvironment_config_software_config_env_variables' require 'google/composer/property/projectlocationenvironment_config_software_config_pypi_packages' require 'google/composer/property/projectlocationenvironment_config_web_server_config' require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control' require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges' require 'google/composer/property/projectlocationenvironment_config_workloads_config' require 'google/composer/property/projectlocationenvironment_config_workloads_config_scheduler' require 'google/composer/property/projectlocationenvironment_config_workloads_config_triggerer' require 'google/composer/property/projectlocationenvironment_config_workloads_config_web_server' require 'google/composer/property/projectlocationenvironment_config_workloads_config_worker' module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfig attr_reader :gke_cluster attr_reader :dag_gcs_prefix attr_reader :node_count attr_reader :software_config attr_reader :node_config attr_reader :private_environment_config attr_reader :web_server_network_access_control attr_reader :database_config attr_reader :web_server_config attr_reader :encryption_config attr_reader :maintenance_window attr_reader :workloads_config attr_reader :environment_size attr_reader :airflow_uri attr_reader :airflow_byoid_uri attr_reader :master_authorized_networks_config attr_reader :recovery_config attr_reader :resilience_mode def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gke_cluster = args['gkeCluster'] @dag_gcs_prefix = args['dagGcsPrefix'] @node_count = args['nodeCount'] @software_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfig.new(args['softwareConfig'], to_s) @node_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigNodeConfig.new(args['nodeConfig'], to_s) @private_environment_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigPrivateEnvironmentConfig.new(args['privateEnvironmentConfig'], to_s) @web_server_network_access_control = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerNetworkAccessControl.new(args['webServerNetworkAccessControl'], to_s) @database_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigDatabaseConfig.new(args['databaseConfig'], to_s) @web_server_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerConfig.new(args['webServerConfig'], to_s) @encryption_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigEncryptionConfig.new(args['encryptionConfig'], to_s) @maintenance_window = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMaintenanceWindow.new(args['maintenanceWindow'], to_s) @workloads_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfig.new(args['workloadsConfig'], to_s) @environment_size = args['environmentSize'] @airflow_uri = args['airflowUri'] @airflow_byoid_uri = args['airflowByoidUri'] @master_authorized_networks_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig.new(args['masterAuthorizedNetworksConfig'], to_s) @recovery_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigRecoveryConfig.new(args['recoveryConfig'], to_s) @resilience_mode = args['resilienceMode'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_database_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigDatabaseConfig attr_reader :machine_type attr_reader :zone def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] @zone = args['zone'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigDatabaseConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_encryption_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigEncryptionConfig attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigEncryptionConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_maintenance_window.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigMaintenanceWindow attr_reader :start_time attr_reader :end_time attr_reader :recurrence def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @start_time = args['startTime'] @end_time = args['endTime'] @recurrence = args['recurrence'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigMaintenanceWindow" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks' module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig attr_reader :enabled attr_reader :cidr_blocks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] @cidr_blocks = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocksArray.parse(args['cidrBlocks'], to_s) end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocks attr_reader :display_name attr_reader :cidr_block def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @display_name = args['displayName'] @cidr_block = args['cidrBlock'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocks" end end class ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocksArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_node_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy' module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigNodeConfig attr_reader :location attr_reader :machine_type attr_reader :network attr_reader :subnetwork attr_reader :disk_size_gb attr_reader :oauth_scopes attr_reader :service_account attr_reader :tags attr_reader :ip_allocation_policy attr_reader :enable_ip_masq_agent def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @location = args['location'] @machine_type = args['machineType'] @network = args['network'] @subnetwork = args['subnetwork'] @disk_size_gb = args['diskSizeGb'] @oauth_scopes = args['oauthScopes'] @service_account = args['serviceAccount'] @tags = args['tags'] @ip_allocation_policy = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigNodeConfigIpAllocationPolicy.new(args['ipAllocationPolicy'], to_s) @enable_ip_masq_agent = args['enableIpMasqAgent'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigNodeConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigNodeConfigIpAllocationPolicy attr_reader :use_ip_aliases attr_reader :cluster_secondary_range_name attr_reader :cluster_ipv4_cidr_block attr_reader :services_secondary_range_name attr_reader :services_ipv4_cidr_block def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @use_ip_aliases = args['useIpAliases'] @cluster_secondary_range_name = args['clusterSecondaryRangeName'] @cluster_ipv4_cidr_block = args['clusterIpv4CidrBlock'] @services_secondary_range_name = args['servicesSecondaryRangeName'] @services_ipv4_cidr_block = args['servicesIpv4CidrBlock'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigNodeConfigIpAllocationPolicy" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_private_environment_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config' require 'google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config' module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigPrivateEnvironmentConfig attr_reader :enable_private_environment attr_reader :private_cluster_config attr_reader :web_server_ipv4_cidr_block attr_reader :cloud_sql_ipv4_cidr_block attr_reader :web_server_ipv4_reserved_range attr_reader :cloud_composer_network_ipv4_cidr_block attr_reader :cloud_composer_network_ipv4_reserved_range attr_reader :enable_privately_used_public_ips attr_reader :cloud_composer_connection_subnetwork attr_reader :networking_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_private_environment = args['enablePrivateEnvironment'] @private_cluster_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigPrivateEnvironmentConfigPrivateClusterConfig.new(args['privateClusterConfig'], to_s) @web_server_ipv4_cidr_block = args['webServerIpv4CidrBlock'] @cloud_sql_ipv4_cidr_block = args['cloudSqlIpv4CidrBlock'] @web_server_ipv4_reserved_range = args['webServerIpv4ReservedRange'] @cloud_composer_network_ipv4_cidr_block = args['cloudComposerNetworkIpv4CidrBlock'] @cloud_composer_network_ipv4_reserved_range = args['cloudComposerNetworkIpv4ReservedRange'] @enable_privately_used_public_ips = args['enablePrivatelyUsedPublicIps'] @cloud_composer_connection_subnetwork = args['cloudComposerConnectionSubnetwork'] @networking_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigPrivateEnvironmentConfigNetworkingConfig.new(args['networkingConfig'], to_s) end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigPrivateEnvironmentConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigPrivateEnvironmentConfigNetworkingConfig attr_reader :connection_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @connection_type = args['connectionType'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigPrivateEnvironmentConfigNetworkingConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigPrivateEnvironmentConfigPrivateClusterConfig attr_reader :enable_private_endpoint attr_reader :master_ipv4_cidr_block attr_reader :master_ipv4_reserved_range def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_private_endpoint = args['enablePrivateEndpoint'] @master_ipv4_cidr_block = args['masterIpv4CidrBlock'] @master_ipv4_reserved_range = args['masterIpv4ReservedRange'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigPrivateEnvironmentConfigPrivateClusterConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_recovery_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config' module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigRecoveryConfig attr_reader :scheduled_snapshots_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @scheduled_snapshots_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigRecoveryConfigScheduledSnapshotsConfig.new(args['scheduledSnapshotsConfig'], to_s) end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigRecoveryConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigRecoveryConfigScheduledSnapshotsConfig attr_reader :enabled attr_reader :snapshot_location attr_reader :snapshot_creation_schedule attr_reader :time_zone def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] @snapshot_location = args['snapshotLocation'] @snapshot_creation_schedule = args['snapshotCreationSchedule'] @time_zone = args['timeZone'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigRecoveryConfigScheduledSnapshotsConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_software_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides' require 'google/composer/property/projectlocationenvironment_config_software_config_env_variables' require 'google/composer/property/projectlocationenvironment_config_software_config_pypi_packages' module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigSoftwareConfig attr_reader :image_version attr_reader :airflow_config_overrides attr_reader :pypi_packages attr_reader :env_variables attr_reader :python_version attr_reader :scheduler_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @image_version = args['imageVersion'] @airflow_config_overrides = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfigAirflowConfigOverrides.new(args['airflowConfigOverrides'], to_s) @pypi_packages = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfigPypiPackages.new(args['pypiPackages'], to_s) @env_variables = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfigEnvVariables.new(args['envVariables'], to_s) @python_version = args['pythonVersion'] @scheduler_count = args['schedulerCount'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigSoftwareConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigSoftwareConfigAirflowConfigOverrides attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigSoftwareConfigAirflowConfigOverrides" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_software_config_env_variables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigSoftwareConfigEnvVariables attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigSoftwareConfigEnvVariables" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_software_config_pypi_packages.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigSoftwareConfigPypiPackages attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigSoftwareConfigPypiPackages" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_web_server_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigWebServerConfig attr_reader :machine_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigWebServerConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges' module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigWebServerNetworkAccessControl attr_reader :allowed_ip_ranges def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allowed_ip_ranges = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRangesArray.parse(args['allowedIpRanges'], to_s) end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigWebServerNetworkAccessControl" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRanges attr_reader :value attr_reader :description def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @value = args['value'] @description = args['description'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRanges" end end class ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRangesArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRanges.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_workloads_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/composer/property/projectlocationenvironment_config_workloads_config_scheduler' require 'google/composer/property/projectlocationenvironment_config_workloads_config_triggerer' require 'google/composer/property/projectlocationenvironment_config_workloads_config_web_server' require 'google/composer/property/projectlocationenvironment_config_workloads_config_worker' module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigWorkloadsConfig attr_reader :scheduler attr_reader :web_server attr_reader :worker attr_reader :triggerer def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @scheduler = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigScheduler.new(args['scheduler'], to_s) @web_server = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigWebServer.new(args['webServer'], to_s) @worker = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigWorker.new(args['worker'], to_s) @triggerer = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigTriggerer.new(args['triggerer'], to_s) end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigWorkloadsConfig" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_workloads_config_scheduler.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigWorkloadsConfigScheduler attr_reader :cpu attr_reader :memory_gb attr_reader :storage_gb attr_reader :count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cpu = args['cpu'] @memory_gb = args['memoryGb'] @storage_gb = args['storageGb'] @count = args['count'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigWorkloadsConfigScheduler" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_workloads_config_triggerer.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigWorkloadsConfigTriggerer attr_reader :count attr_reader :cpu attr_reader :memory_gb def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @count = args['count'] @cpu = args['cpu'] @memory_gb = args['memoryGb'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigWorkloadsConfigTriggerer" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_workloads_config_web_server.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigWorkloadsConfigWebServer attr_reader :cpu attr_reader :memory_gb attr_reader :storage_gb def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cpu = args['cpu'] @memory_gb = args['memoryGb'] @storage_gb = args['storageGb'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigWorkloadsConfigWebServer" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_config_workloads_config_worker.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentConfigWorkloadsConfigWorker attr_reader :cpu attr_reader :memory_gb attr_reader :storage_gb attr_reader :min_count attr_reader :max_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cpu = args['cpu'] @memory_gb = args['memoryGb'] @storage_gb = args['storageGb'] @min_count = args['minCount'] @max_count = args['maxCount'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentConfigWorkloadsConfigWorker" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args end def to_s "#{@parent_identifier} ProjectLocationEnvironmentLabels" end end end end end ================================================ FILE: libraries/google/composer/property/projectlocationenvironment_storage_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Composer module Property class ProjectLocationEnvironmentStorageConfig attr_reader :bucket def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @bucket = args['bucket'] end def to_s "#{@parent_identifier} ProjectLocationEnvironmentStorageConfig" end end end end end ================================================ FILE: libraries/google/compute/property/acceleratortype_deprecated.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class AcceleratorTypeDeprecated attr_reader :state attr_reader :deprecated attr_reader :obsolete attr_reader :replacement def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @state = parse_time_string(args['state']) @deprecated = parse_time_string(args['deprecated']) @obsolete = parse_time_string(args['obsolete']) @replacement = args['replacement'] @state = args['state'] end def to_s "#{@parent_identifier} AcceleratorTypeDeprecated" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/compute/property/autoscaler_autoscaling_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/autoscaler_autoscaling_policy_cpu_utilization' require 'google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations' require 'google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization' require 'google/compute/property/autoscaler_autoscaling_policy_scale_down_control' require 'google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas' require 'google/compute/property/autoscaler_autoscaling_policy_scale_in_control' require 'google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas' require 'google/compute/property/autoscaler_autoscaling_policy_scaling_schedules' module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicy attr_reader :min_num_replicas attr_reader :max_num_replicas attr_reader :cool_down_period_sec attr_reader :mode attr_reader :scale_down_control attr_reader :scale_in_control attr_reader :cpu_utilization attr_reader :custom_metric_utilizations attr_reader :load_balancing_utilization attr_reader :scaling_schedules def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min_num_replicas = args['minNumReplicas'] @max_num_replicas = args['maxNumReplicas'] @cool_down_period_sec = args['coolDownPeriodSec'] @mode = args['mode'] @scale_down_control = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleDownControl.new(args['scaleDownControl'], to_s) @scale_in_control = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleInControl.new(args['scaleInControl'], to_s) @cpu_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCpuUtilization.new(args['cpuUtilization'], to_s) @custom_metric_utilizations = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCustomMetricUtilizationsArray.parse(args['customMetricUtilizations'], to_s) @load_balancing_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyLoadBalancingUtilization.new(args['loadBalancingUtilization'], to_s) @scaling_schedules = args['scalingSchedules'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/autoscaler_autoscaling_policy_cpu_utilization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyCpuUtilization attr_reader :utilization_target attr_reader :predictive_method def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @utilization_target = args['utilizationTarget'] @predictive_method = args['predictiveMethod'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyCpuUtilization" end end end end end ================================================ FILE: libraries/google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyCustomMetricUtilizations attr_reader :metric attr_reader :single_instance_assignment attr_reader :utilization_target attr_reader :utilization_target_type attr_reader :filter def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric = args['metric'] @single_instance_assignment = args['singleInstanceAssignment'] @utilization_target = args['utilizationTarget'] @utilization_target_type = args['utilizationTargetType'] @filter = args['filter'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyCustomMetricUtilizations" end end class AutoscalerAutoscalingPolicyCustomMetricUtilizationsArray def self.parse(value, parent_identifier) return if value.nil? return AutoscalerAutoscalingPolicyCustomMetricUtilizations.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| AutoscalerAutoscalingPolicyCustomMetricUtilizations.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyLoadBalancingUtilization attr_reader :utilization_target def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @utilization_target = args['utilizationTarget'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyLoadBalancingUtilization" end end end end end ================================================ FILE: libraries/google/compute/property/autoscaler_autoscaling_policy_scale_down_control.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas' module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyScaleDownControl attr_reader :max_scaled_down_replicas attr_reader :time_window_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_scaled_down_replicas = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas.new(args['maxScaledDownReplicas'], to_s) @time_window_sec = args['timeWindowSec'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyScaleDownControl" end end end end end ================================================ FILE: libraries/google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas attr_reader :fixed attr_reader :percent def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed = args['fixed'] @percent = args['percent'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas" end end end end end ================================================ FILE: libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas' module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyScaleInControl attr_reader :max_scaled_in_replicas attr_reader :time_window_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_scaled_in_replicas = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas.new(args['maxScaledInReplicas'], to_s) @time_window_sec = args['timeWindowSec'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyScaleInControl" end end end end end ================================================ FILE: libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas attr_reader :fixed attr_reader :percent def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed = args['fixed'] @percent = args['percent'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas" end end end end end ================================================ FILE: libraries/google/compute/property/autoscaler_autoscaling_policy_scaling_schedules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class AutoscalerAutoscalingPolicyScalingSchedules attr_reader :min_required_replicas attr_reader :schedule attr_reader :time_zone attr_reader :duration_sec attr_reader :disabled attr_reader :description def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min_required_replicas = args['minRequiredReplicas'] @schedule = args['schedule'] @time_zone = args['timeZone'] @duration_sec = args['durationSec'] @disabled = args['disabled'] @description = args['description'] end def to_s "#{@parent_identifier} AutoscalerAutoscalingPolicyScalingSchedules" end end end end end ================================================ FILE: libraries/google/compute/property/backendbucket_cdn_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/backendbucket_cdn_policy_negative_caching_policy' module GoogleInSpec module Compute module Property class BackendBucketCdnPolicy attr_reader :signed_url_cache_max_age_sec attr_reader :default_ttl attr_reader :max_ttl attr_reader :client_ttl attr_reader :negative_caching attr_reader :negative_caching_policy attr_reader :cache_mode attr_reader :serve_while_stale def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @signed_url_cache_max_age_sec = args['signedUrlCacheMaxAgeSec'] @default_ttl = args['defaultTtl'] @max_ttl = args['maxTtl'] @client_ttl = args['clientTtl'] @negative_caching = args['negativeCaching'] @negative_caching_policy = GoogleInSpec::Compute::Property::BackendBucketCdnPolicyNegativeCachingPolicyArray.parse(args['negativeCachingPolicy'], to_s) @cache_mode = args['cacheMode'] @serve_while_stale = args['serveWhileStale'] end def to_s "#{@parent_identifier} BackendBucketCdnPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/backendbucket_cdn_policy_negative_caching_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendBucketCdnPolicyNegativeCachingPolicy attr_reader :code attr_reader :ttl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] @ttl = args['ttl'] end def to_s "#{@parent_identifier} BackendBucketCdnPolicyNegativeCachingPolicy" end end class BackendBucketCdnPolicyNegativeCachingPolicyArray def self.parse(value, parent_identifier) return if value.nil? return BackendBucketCdnPolicyNegativeCachingPolicy.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BackendBucketCdnPolicyNegativeCachingPolicy.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_backends.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceBackends attr_reader :balancing_mode attr_reader :capacity_scaler attr_reader :description attr_reader :group attr_reader :max_connections attr_reader :max_connections_per_instance attr_reader :max_connections_per_endpoint attr_reader :max_rate attr_reader :max_rate_per_instance attr_reader :max_rate_per_endpoint attr_reader :max_utilization def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @balancing_mode = args['balancingMode'] @capacity_scaler = args['capacityScaler'] @description = args['description'] @group = args['group'] @max_connections = args['maxConnections'] @max_connections_per_instance = args['maxConnectionsPerInstance'] @max_connections_per_endpoint = args['maxConnectionsPerEndpoint'] @max_rate = args['maxRate'] @max_rate_per_instance = args['maxRatePerInstance'] @max_rate_per_endpoint = args['maxRatePerEndpoint'] @max_utilization = args['maxUtilization'] end def to_s "#{@parent_identifier} BackendServiceBackends" end end class BackendServiceBackendsArray def self.parse(value, parent_identifier) return if value.nil? return BackendServiceBackends.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BackendServiceBackends.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_cdn_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/backendservice_cdn_policy_cache_key_policy' require 'google/compute/property/backendservice_cdn_policy_negative_caching_policy' module GoogleInSpec module Compute module Property class BackendServiceCdnPolicy attr_reader :cache_key_policy attr_reader :signed_url_cache_max_age_sec attr_reader :default_ttl attr_reader :max_ttl attr_reader :client_ttl attr_reader :negative_caching attr_reader :negative_caching_policy attr_reader :cache_mode attr_reader :serve_while_stale def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cache_key_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicyCacheKeyPolicy.new(args['cacheKeyPolicy'], to_s) @signed_url_cache_max_age_sec = args['signedUrlCacheMaxAgeSec'] @default_ttl = args['defaultTtl'] @max_ttl = args['maxTtl'] @client_ttl = args['clientTtl'] @negative_caching = args['negativeCaching'] @negative_caching_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicyNegativeCachingPolicyArray.parse(args['negativeCachingPolicy'], to_s) @cache_mode = args['cacheMode'] @serve_while_stale = args['serveWhileStale'] end def to_s "#{@parent_identifier} BackendServiceCdnPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_cdn_policy_cache_key_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceCdnPolicyCacheKeyPolicy attr_reader :include_host attr_reader :include_protocol attr_reader :include_query_string attr_reader :query_string_blacklist attr_reader :query_string_whitelist def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @include_host = args['includeHost'] @include_protocol = args['includeProtocol'] @include_query_string = args['includeQueryString'] @query_string_blacklist = args['queryStringBlacklist'] @query_string_whitelist = args['queryStringWhitelist'] end def to_s "#{@parent_identifier} BackendServiceCdnPolicyCacheKeyPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_cdn_policy_negative_caching_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceCdnPolicyNegativeCachingPolicy attr_reader :code attr_reader :ttl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] @ttl = args['ttl'] end def to_s "#{@parent_identifier} BackendServiceCdnPolicyNegativeCachingPolicy" end end class BackendServiceCdnPolicyNegativeCachingPolicyArray def self.parse(value, parent_identifier) return if value.nil? return BackendServiceCdnPolicyNegativeCachingPolicy.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BackendServiceCdnPolicyNegativeCachingPolicy.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_circuit_breakers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/backendservice_circuit_breakers_connect_timeout' module GoogleInSpec module Compute module Property class BackendServiceCircuitBreakers attr_reader :connect_timeout attr_reader :max_requests_per_connection attr_reader :max_connections attr_reader :max_pending_requests attr_reader :max_requests attr_reader :max_retries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @connect_timeout = GoogleInSpec::Compute::Property::BackendServiceCircuitBreakersConnectTimeout.new(args['connectTimeout'], to_s) @max_requests_per_connection = args['maxRequestsPerConnection'] @max_connections = args['maxConnections'] @max_pending_requests = args['maxPendingRequests'] @max_requests = args['maxRequests'] @max_retries = args['maxRetries'] end def to_s "#{@parent_identifier} BackendServiceCircuitBreakers" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_circuit_breakers_connect_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceCircuitBreakersConnectTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} BackendServiceCircuitBreakersConnectTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_connection_draining.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceConnectionDraining attr_reader :draining_timeout_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @draining_timeout_sec = args['drainingTimeoutSec'] end def to_s "#{@parent_identifier} BackendServiceConnectionDraining" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_consistent_hash.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/backendservice_consistent_hash_http_cookie' require 'google/compute/property/backendservice_consistent_hash_http_cookie_ttl' module GoogleInSpec module Compute module Property class BackendServiceConsistentHash attr_reader :http_cookie attr_reader :http_header_name attr_reader :minimum_ring_size def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_cookie = GoogleInSpec::Compute::Property::BackendServiceConsistentHashHttpCookie.new(args['httpCookie'], to_s) @http_header_name = args['httpHeaderName'] @minimum_ring_size = args['minimumRingSize'] end def to_s "#{@parent_identifier} BackendServiceConsistentHash" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_consistent_hash_http_cookie.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/backendservice_consistent_hash_http_cookie_ttl' module GoogleInSpec module Compute module Property class BackendServiceConsistentHashHttpCookie attr_reader :ttl attr_reader :name attr_reader :path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ttl = GoogleInSpec::Compute::Property::BackendServiceConsistentHashHttpCookieTtl.new(args['ttl'], to_s) @name = args['name'] @path = args['path'] end def to_s "#{@parent_identifier} BackendServiceConsistentHashHttpCookie" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_consistent_hash_http_cookie_ttl.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceConsistentHashHttpCookieTtl attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} BackendServiceConsistentHashHttpCookieTtl" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_iap.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceIap attr_reader :enabled attr_reader :oauth2_client_id attr_reader :oauth2_client_secret attr_reader :oauth2_client_secret_sha256 def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] @oauth2_client_id = args['oauth2ClientId'] @oauth2_client_secret = args['oauth2ClientSecret'] @oauth2_client_secret_sha256 = args['oauth2ClientSecretSha256'] end def to_s "#{@parent_identifier} BackendServiceIap" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_log_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceLogConfig attr_reader :enable attr_reader :sample_rate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable = args['enable'] @sample_rate = args['sampleRate'] end def to_s "#{@parent_identifier} BackendServiceLogConfig" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_outlier_detection.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/backendservice_outlier_detection_base_ejection_time' require 'google/compute/property/backendservice_outlier_detection_interval' module GoogleInSpec module Compute module Property class BackendServiceOutlierDetection attr_reader :base_ejection_time attr_reader :consecutive_errors attr_reader :consecutive_gateway_failure attr_reader :enforcing_consecutive_errors attr_reader :enforcing_consecutive_gateway_failure attr_reader :enforcing_success_rate attr_reader :interval attr_reader :max_ejection_percent attr_reader :success_rate_minimum_hosts attr_reader :success_rate_request_volume attr_reader :success_rate_stdev_factor def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @base_ejection_time = GoogleInSpec::Compute::Property::BackendServiceOutlierDetectionBaseEjectionTime.new(args['baseEjectionTime'], to_s) @consecutive_errors = args['consecutiveErrors'] @consecutive_gateway_failure = args['consecutiveGatewayFailure'] @enforcing_consecutive_errors = args['enforcingConsecutiveErrors'] @enforcing_consecutive_gateway_failure = args['enforcingConsecutiveGatewayFailure'] @enforcing_success_rate = args['enforcingSuccessRate'] @interval = GoogleInSpec::Compute::Property::BackendServiceOutlierDetectionInterval.new(args['interval'], to_s) @max_ejection_percent = args['maxEjectionPercent'] @success_rate_minimum_hosts = args['successRateMinimumHosts'] @success_rate_request_volume = args['successRateRequestVolume'] @success_rate_stdev_factor = args['successRateStdevFactor'] end def to_s "#{@parent_identifier} BackendServiceOutlierDetection" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_outlier_detection_base_ejection_time.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceOutlierDetectionBaseEjectionTime attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} BackendServiceOutlierDetectionBaseEjectionTime" end end end end end ================================================ FILE: libraries/google/compute/property/backendservice_outlier_detection_interval.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class BackendServiceOutlierDetectionInterval attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} BackendServiceOutlierDetectionInterval" end end end end end ================================================ FILE: libraries/google/compute/property/disk_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class DiskDiskEncryptionKey attr_reader :raw_key attr_reader :sha256 attr_reader :kms_key_name attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @sha256 = args['sha256'] @kms_key_name = args['kmsKeyName'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} DiskDiskEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/disk_source_image_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class DiskSourceImageEncryptionKey attr_reader :raw_key attr_reader :sha256 attr_reader :kms_key_name attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @sha256 = args['sha256'] @kms_key_name = args['kmsKeyName'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} DiskSourceImageEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/disk_source_snapshot_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class DiskSourceSnapshotEncryptionKey attr_reader :raw_key attr_reader :kms_key_name attr_reader :sha256 attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @kms_key_name = args['kmsKeyName'] @sha256 = args['sha256'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} DiskSourceSnapshotEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/disktype_deprecated.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class DiskTypeDeprecated attr_reader :deleted attr_reader :deprecated attr_reader :obsolete attr_reader :replacement attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @deleted = parse_time_string(args['deleted']) @deprecated = parse_time_string(args['deprecated']) @obsolete = parse_time_string(args['obsolete']) @replacement = args['replacement'] @state = args['state'] end def to_s "#{@parent_identifier} DiskTypeDeprecated" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/compute/property/externalvpngateway_interfaces.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ExternalVpnGatewayInterfaces attr_reader :id attr_reader :ip_address def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @id = args['id'] @ip_address = args['ipAddress'] end def to_s "#{@parent_identifier} ExternalVpnGatewayInterfaces" end end class ExternalVpnGatewayInterfacesArray def self.parse(value, parent_identifier) return if value.nil? return ExternalVpnGatewayInterfaces.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ExternalVpnGatewayInterfaces.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/firewall_allowed.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class FirewallAllowed attr_reader :ip_protocol attr_reader :ports def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_protocol = args['IPProtocol'] @ports = args['ports'] end def to_s "#{@parent_identifier} FirewallAllowed" end end class FirewallAllowedArray def self.parse(value, parent_identifier) return if value.nil? return FirewallAllowed.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| FirewallAllowed.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/firewall_denied.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class FirewallDenied attr_reader :ip_protocol attr_reader :ports def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_protocol = args['IPProtocol'] @ports = args['ports'] end def to_s "#{@parent_identifier} FirewallDenied" end end class FirewallDeniedArray def self.parse(value, parent_identifier) return if value.nil? return FirewallDenied.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| FirewallDenied.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/firewall_log_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class FirewallLogConfig attr_reader :enable attr_reader :metadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable = args['enable'] @metadata = args['metadata'] end def to_s "#{@parent_identifier} FirewallLogConfig" end end end end end ================================================ FILE: libraries/google/compute/property/globalforwardingrule_metadata_filters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/globalforwardingrule_metadata_filters_filter_labels' module GoogleInSpec module Compute module Property class GlobalForwardingRuleMetadataFilters attr_reader :filter_match_criteria attr_reader :filter_labels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @filter_match_criteria = args['filterMatchCriteria'] @filter_labels = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersFilterLabelsArray.parse(args['filterLabels'], to_s) end def to_s "#{@parent_identifier} GlobalForwardingRuleMetadataFilters" end end class GlobalForwardingRuleMetadataFiltersArray def self.parse(value, parent_identifier) return if value.nil? return GlobalForwardingRuleMetadataFilters.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| GlobalForwardingRuleMetadataFilters.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class GlobalForwardingRuleMetadataFiltersFilterLabels attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} GlobalForwardingRuleMetadataFiltersFilterLabels" end end class GlobalForwardingRuleMetadataFiltersFilterLabelsArray def self.parse(value, parent_identifier) return if value.nil? return GlobalForwardingRuleMetadataFiltersFilterLabels.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| GlobalForwardingRuleMetadataFiltersFilterLabels.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/globalnetworkendpointgroup_annotations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class GlobalNetworkEndpointGroupAnnotations attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} GlobalNetworkEndpointGroupAnnotations" end end end end end ================================================ FILE: libraries/google/compute/property/globalnetworkendpointgroup_app_engine.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class GlobalNetworkEndpointGroupAppEngine attr_reader :service attr_reader :version attr_reader :url_mask def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service = args['service'] @version = args['version'] @url_mask = args['urlMask'] end def to_s "#{@parent_identifier} GlobalNetworkEndpointGroupAppEngine" end end end end end ================================================ FILE: libraries/google/compute/property/globalnetworkendpointgroup_cloud_function.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class GlobalNetworkEndpointGroupCloudFunction attr_reader :function attr_reader :url_mask def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @function = args['function'] @url_mask = args['urlMask'] end def to_s "#{@parent_identifier} GlobalNetworkEndpointGroupCloudFunction" end end end end end ================================================ FILE: libraries/google/compute/property/globalnetworkendpointgroup_cloud_run.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class GlobalNetworkEndpointGroupCloudRun attr_reader :service attr_reader :tag attr_reader :url_mask def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service = args['service'] @tag = args['tag'] @url_mask = args['urlMask'] end def to_s "#{@parent_identifier} GlobalNetworkEndpointGroupCloudRun" end end end end end ================================================ FILE: libraries/google/compute/property/globalnetworkendpointgroup_psc_data.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class GlobalNetworkEndpointGroupPscData attr_reader :consumer_psc_address attr_reader :psc_connection_id attr_reader :psc_connection_status def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @consumer_psc_address = args['consumerPscAddress'] @psc_connection_id = args['pscConnectionId'] @psc_connection_status = args['pscConnectionStatus'] end def to_s "#{@parent_identifier} GlobalNetworkEndpointGroupPscData" end end end end end ================================================ FILE: libraries/google/compute/property/healthcheck_grpc_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckGrpcHealthCheck attr_reader :port attr_reader :port_name attr_reader :port_specification attr_reader :grpc_service_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @port = args['port'] @port_name = args['portName'] @port_specification = args['portSpecification'] @grpc_service_name = args['grpcServiceName'] end def to_s "#{@parent_identifier} HealthCheckGrpcHealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/healthcheck_http2_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckHttp2HealthCheck attr_reader :host attr_reader :request_path attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host = args['host'] @request_path = args['requestPath'] @response = args['response'] @port = args['port'] @port_name = args['portName'] @proxy_header = args['proxyHeader'] @port_specification = args['portSpecification'] end def to_s "#{@parent_identifier} HealthCheckHttp2HealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/healthcheck_http_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckHttpHealthCheck attr_reader :host attr_reader :request_path attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host = args['host'] @request_path = args['requestPath'] @response = args['response'] @port = args['port'] @port_name = args['portName'] @proxy_header = args['proxyHeader'] @port_specification = args['portSpecification'] end def to_s "#{@parent_identifier} HealthCheckHttpHealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/healthcheck_https_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckHttpsHealthCheck attr_reader :host attr_reader :request_path attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host = args['host'] @request_path = args['requestPath'] @response = args['response'] @port = args['port'] @port_name = args['portName'] @proxy_header = args['proxyHeader'] @port_specification = args['portSpecification'] end def to_s "#{@parent_identifier} HealthCheckHttpsHealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/healthcheck_log_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckLogConfig attr_reader :enable def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable = args['enable'] end def to_s "#{@parent_identifier} HealthCheckLogConfig" end end end end end ================================================ FILE: libraries/google/compute/property/healthcheck_ssl_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckSslHealthCheck attr_reader :request attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request = args['request'] @response = args['response'] @port = args['port'] @port_name = args['portName'] @proxy_header = args['proxyHeader'] @port_specification = args['portSpecification'] end def to_s "#{@parent_identifier} HealthCheckSslHealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/healthcheck_tcp_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class HealthCheckTcpHealthCheck attr_reader :request attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request = args['request'] @response = args['response'] @port = args['port'] @port_name = args['portName'] @proxy_header = args['proxyHeader'] @port_specification = args['portSpecification'] end def to_s "#{@parent_identifier} HealthCheckTcpHealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/image_deprecated.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageDeprecated attr_reader :deleted attr_reader :deprecated attr_reader :obsolete attr_reader :replacement attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @deleted = parse_time_string(args['deleted']) @deprecated = parse_time_string(args['deprecated']) @obsolete = parse_time_string(args['obsolete']) @replacement = args['replacement'] @state = args['state'] end def to_s "#{@parent_identifier} ImageDeprecated" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/compute/property/image_guest_os_features.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageGuestOsFeatures attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] end def to_s "#{@parent_identifier} ImageGuestOsFeatures" end end class ImageGuestOsFeaturesArray def self.parse(value, parent_identifier) return if value.nil? return ImageGuestOsFeatures.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ImageGuestOsFeatures.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/image_image_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageImageEncryptionKey attr_reader :raw_key attr_reader :sha256 attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @sha256 = args['sha256'] @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} ImageImageEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/image_raw_disk.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageRawDisk attr_reader :container_type attr_reader :sha1_checksum attr_reader :source def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @container_type = args['containerType'] @sha1_checksum = args['sha1Checksum'] @source = args['source'] end def to_s "#{@parent_identifier} ImageRawDisk" end end end end end ================================================ FILE: libraries/google/compute/property/image_source_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageSourceDiskEncryptionKey attr_reader :raw_key attr_reader :sha256 attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @sha256 = args['sha256'] @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} ImageSourceDiskEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/imagefamilyview_image.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/imagefamilyview_image_deprecated' require 'google/compute/property/imagefamilyview_image_image_encryption_key' require 'google/compute/property/imagefamilyview_image_raw_disk' require 'google/compute/property/imagefamilyview_image_source_disk_encryption_key' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk' module GoogleInSpec module Compute module Property class ImageFamilyViewImage attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :source_type attr_reader :deprecated attr_reader :raw_disk attr_reader :status attr_reader :archive_size_bytes attr_reader :disk_size_gb attr_reader :source_disk attr_reader :source_disk_id attr_reader :licenses attr_reader :storage_locations attr_reader :family attr_reader :image_encryption_key attr_reader :source_disk_encryption_key attr_reader :source_snapshot_encryption_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @creation_timestamp = parse_time_string(args['creationTimestamp']) @description = args['description'] @id = args['id'] @name = args['name'] @source_type = args['sourceType'] @deprecated = GoogleInSpec::Compute::Property::ImageFamilyViewImageDeprecated.new(args['deprecated'], to_s) @raw_disk = GoogleInSpec::Compute::Property::ImageFamilyViewImageRawDisk.new(args['rawDisk'], to_s) @status = args['status'] @archive_size_bytes = args['archiveSizeBytes'] @disk_size_gb = args['diskSizeGb'] @source_disk = args['sourceDisk'] @source_disk_id = args['sourceDiskId'] @licenses = args['licenses'] @storage_locations = args['storageLocations'] @family = args['family'] @image_encryption_key = GoogleInSpec::Compute::Property::ImageFamilyViewImageImageEncryptionKey.new(args['imageEncryptionKey'], to_s) @source_disk_encryption_key = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceDiskEncryptionKey.new(args['sourceDiskEncryptionKey'], to_s) @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKey.new(args['sourceSnapshotEncryptionKey'], to_s) end def to_s "#{@parent_identifier} ImageFamilyViewImage" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/compute/property/imagefamilyview_image_deprecated.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageFamilyViewImageDeprecated attr_reader :deleted attr_reader :deprecated attr_reader :obsolete attr_reader :replacement attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @deleted = parse_time_string(args['deleted']) @deprecated = parse_time_string(args['deprecated']) @obsolete = parse_time_string(args['obsolete']) @replacement = args['replacement'] @state = args['state'] end def to_s "#{@parent_identifier} ImageFamilyViewImageDeprecated" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/compute/property/imagefamilyview_image_image_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageFamilyViewImageImageEncryptionKey attr_reader :sha256 attr_reader :kms_key_service_account attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @sha256 = args['sha256'] @kms_key_service_account = args['kmsKeyServiceAccount'] @raw_key = args['rawKey'] @rsa_encrypted_key = args['rsaEncryptedKey'] @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} ImageFamilyViewImageImageEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/imagefamilyview_image_raw_disk.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageFamilyViewImageRawDisk attr_reader :source attr_reader :sha1_checksum attr_reader :container_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @source = args['source'] @sha1_checksum = args['sha1Checksum'] @container_type = args['containerType'] end def to_s "#{@parent_identifier} ImageFamilyViewImageRawDisk" end end end end end ================================================ FILE: libraries/google/compute/property/imagefamilyview_image_source_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageFamilyViewImageSourceDiskEncryptionKey attr_reader :sha256 attr_reader :kms_key_service_account attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @sha256 = args['sha256'] @kms_key_service_account = args['kmsKeyServiceAccount'] @raw_key = args['rawKey'] @rsa_encrypted_key = args['rsaEncryptedKey'] @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} ImageFamilyViewImageSourceDiskEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk' module GoogleInSpec module Compute module Property class ImageFamilyViewImageSourceSnapshotEncryptionKey attr_reader :pk attr_reader :keks attr_reader :dbs attr_reader :dbxs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pk = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyPk.new(args['pk'], to_s) @keks = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyKeksArray.parse(args['keks'], to_s) @dbs = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyDbsArray.parse(args['dbs'], to_s) @dbxs = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyDbxsArray.parse(args['dbxs'], to_s) end def to_s "#{@parent_identifier} ImageFamilyViewImageSourceSnapshotEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageFamilyViewImageSourceSnapshotEncryptionKeyDbs attr_reader :content attr_reader :file_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @content = args['content'] @file_type = args['fileType'] end def to_s "#{@parent_identifier} ImageFamilyViewImageSourceSnapshotEncryptionKeyDbs" end end class ImageFamilyViewImageSourceSnapshotEncryptionKeyDbsArray def self.parse(value, parent_identifier) return if value.nil? return ImageFamilyViewImageSourceSnapshotEncryptionKeyDbs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ImageFamilyViewImageSourceSnapshotEncryptionKeyDbs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageFamilyViewImageSourceSnapshotEncryptionKeyDbxs attr_reader :content attr_reader :file_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @content = args['content'] @file_type = args['fileType'] end def to_s "#{@parent_identifier} ImageFamilyViewImageSourceSnapshotEncryptionKeyDbxs" end end class ImageFamilyViewImageSourceSnapshotEncryptionKeyDbxsArray def self.parse(value, parent_identifier) return if value.nil? return ImageFamilyViewImageSourceSnapshotEncryptionKeyDbxs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ImageFamilyViewImageSourceSnapshotEncryptionKeyDbxs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageFamilyViewImageSourceSnapshotEncryptionKeyKeks attr_reader :content attr_reader :file_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @content = args['content'] @file_type = args['fileType'] end def to_s "#{@parent_identifier} ImageFamilyViewImageSourceSnapshotEncryptionKeyKeks" end end class ImageFamilyViewImageSourceSnapshotEncryptionKeyKeksArray def self.parse(value, parent_identifier) return if value.nil? return ImageFamilyViewImageSourceSnapshotEncryptionKeyKeks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ImageFamilyViewImageSourceSnapshotEncryptionKeyKeks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ImageFamilyViewImageSourceSnapshotEncryptionKeyPk attr_reader :content attr_reader :file_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @content = args['content'] @file_type = args['fileType'] end def to_s "#{@parent_identifier} ImageFamilyViewImageSourceSnapshotEncryptionKeyPk" end end end end end ================================================ FILE: libraries/google/compute/property/instance_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instance_disks_disk_encryption_key' require 'google/compute/property/instance_disks_initialize_params' require 'google/compute/property/instance_disks_initialize_params_source_image_encryption_key' module GoogleInSpec module Compute module Property class InstanceDisks attr_reader :auto_delete attr_reader :boot attr_reader :device_name attr_reader :disk_encryption_key attr_reader :index attr_reader :initialize_params attr_reader :interface attr_reader :mode attr_reader :source attr_reader :type attr_reader :licenses def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @auto_delete = args['autoDelete'] @boot = args['boot'] @device_name = args['deviceName'] @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksDiskEncryptionKey.new(args['diskEncryptionKey'], to_s) @index = args['index'] @initialize_params = GoogleInSpec::Compute::Property::InstanceDisksInitializeParams.new(args['initializeParams'], to_s) @interface = args['interface'] @mode = args['mode'] @source = args['source'] @type = args['type'] @licenses = args['licenses'] end def to_s "#{@parent_identifier} InstanceDisks" end end class InstanceDisksArray def self.parse(value, parent_identifier) return if value.nil? return InstanceDisks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceDisks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instance_disks_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceDisksDiskEncryptionKey attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :sha256 def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @rsa_encrypted_key = args['rsaEncryptedKey'] @sha256 = args['sha256'] end def to_s "#{@parent_identifier} InstanceDisksDiskEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/instance_disks_initialize_params.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instance_disks_initialize_params_source_image_encryption_key' module GoogleInSpec module Compute module Property class InstanceDisksInitializeParams attr_reader :disk_name attr_reader :disk_size_gb attr_reader :disk_type attr_reader :source_image attr_reader :source_image_encryption_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disk_name = args['diskName'] @disk_size_gb = args['diskSizeGb'] @disk_type = args['diskType'] @source_image = args['sourceImage'] @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksInitializeParamsSourceImageEncryptionKey.new(args['sourceImageEncryptionKey'], to_s) end def to_s "#{@parent_identifier} InstanceDisksInitializeParams" end end end end end ================================================ FILE: libraries/google/compute/property/instance_disks_initialize_params_source_image_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceDisksInitializeParamsSourceImageEncryptionKey attr_reader :raw_key attr_reader :sha256 def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @sha256 = args['sha256'] end def to_s "#{@parent_identifier} InstanceDisksInitializeParamsSourceImageEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/instance_guest_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceGuestAccelerators attr_reader :accelerator_count attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_count = args['acceleratorCount'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} InstanceGuestAccelerators" end end class InstanceGuestAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceGuestAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceGuestAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instance_network_interfaces.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instance_network_interfaces_access_configs' require 'google/compute/property/instance_network_interfaces_alias_ip_ranges' module GoogleInSpec module Compute module Property class InstanceNetworkInterfaces attr_reader :access_configs attr_reader :alias_ip_ranges attr_reader :name attr_reader :network attr_reader :network_ip attr_reader :subnetwork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @access_configs = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAccessConfigsArray.parse(args['accessConfigs'], to_s) @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAliasIpRangesArray.parse(args['aliasIpRanges'], to_s) @name = args['name'] @network = args['network'] @network_ip = args['networkIP'] @subnetwork = args['subnetwork'] end def to_s "#{@parent_identifier} InstanceNetworkInterfaces" end end class InstanceNetworkInterfacesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceNetworkInterfaces.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceNetworkInterfaces.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instance_network_interfaces_access_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceNetworkInterfacesAccessConfigs attr_reader :name attr_reader :nat_ip attr_reader :type attr_reader :set_public_ptr attr_reader :public_ptr_domain_name attr_reader :network_tier def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @nat_ip = args['natIP'] @type = args['type'] @set_public_ptr = args['setPublicPtr'] @public_ptr_domain_name = args['publicPtrDomainName'] @network_tier = args['networkTier'] end def to_s "#{@parent_identifier} InstanceNetworkInterfacesAccessConfigs" end end class InstanceNetworkInterfacesAccessConfigsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceNetworkInterfacesAccessConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceNetworkInterfacesAccessConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instance_network_interfaces_alias_ip_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceNetworkInterfacesAliasIpRanges attr_reader :ip_cidr_range attr_reader :subnetwork_range_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_cidr_range = args['ipCidrRange'] @subnetwork_range_name = args['subnetworkRangeName'] end def to_s "#{@parent_identifier} InstanceNetworkInterfacesAliasIpRanges" end end class InstanceNetworkInterfacesAliasIpRangesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceNetworkInterfacesAliasIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceNetworkInterfacesAliasIpRanges.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instance_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceScheduling attr_reader :automatic_restart attr_reader :on_host_maintenance attr_reader :preemptible def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @automatic_restart = args['automaticRestart'] @on_host_maintenance = args['onHostMaintenance'] @preemptible = args['preemptible'] end def to_s "#{@parent_identifier} InstanceScheduling" end end end end end ================================================ FILE: libraries/google/compute/property/instance_service_accounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceServiceAccounts attr_reader :email attr_reader :scopes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @email = args['email'] @scopes = args['scopes'] end def to_s "#{@parent_identifier} InstanceServiceAccounts" end end class InstanceServiceAccountsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceServiceAccounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceServiceAccounts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instance_shielded_instance_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceShieldedInstanceConfig attr_reader :enable_secure_boot attr_reader :enable_vtpm attr_reader :enable_integrity_monitoring def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_secure_boot = args['enableSecureBoot'] @enable_vtpm = args['enableVtpm'] @enable_integrity_monitoring = args['enableIntegrityMonitoring'] end def to_s "#{@parent_identifier} InstanceShieldedInstanceConfig" end end end end end ================================================ FILE: libraries/google/compute/property/instance_tags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTags attr_reader :fingerprint attr_reader :items def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fingerprint = args['fingerprint'] @items = args['items'] end def to_s "#{@parent_identifier} InstanceTags" end end end end end ================================================ FILE: libraries/google/compute/property/instancegroup_named_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceGroupNamedPorts attr_reader :name attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @port = args['port'] end def to_s "#{@parent_identifier} InstanceGroupNamedPorts" end end class InstanceGroupNamedPortsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceGroupNamedPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceGroupNamedPorts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instancegroupmanager_current_actions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceGroupManagerCurrentActions attr_reader :abandoning attr_reader :creating attr_reader :creating_without_retries attr_reader :deleting attr_reader :none attr_reader :recreating attr_reader :refreshing attr_reader :restarting def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @abandoning = args['abandoning'] @creating = args['creating'] @creating_without_retries = args['creatingWithoutRetries'] @deleting = args['deleting'] @none = args['none'] @recreating = args['recreating'] @refreshing = args['refreshing'] @restarting = args['restarting'] end def to_s "#{@parent_identifier} InstanceGroupManagerCurrentActions" end end end end end ================================================ FILE: libraries/google/compute/property/instancegroupmanager_named_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceGroupManagerNamedPorts attr_reader :name attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @port = args['port'] end def to_s "#{@parent_identifier} InstanceGroupManagerNamedPorts" end end class InstanceGroupManagerNamedPortsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceGroupManagerNamedPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceGroupManagerNamedPorts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instancetemplate_properties_disks' require 'google/compute/property/instancetemplate_properties_guest_accelerators' require 'google/compute/property/instancetemplate_properties_network_interfaces' require 'google/compute/property/instancetemplate_properties_scheduling' require 'google/compute/property/instancetemplate_properties_service_accounts' require 'google/compute/property/instancetemplate_properties_tags' module GoogleInSpec module Compute module Property class InstanceTemplateProperties attr_reader :can_ip_forward attr_reader :description attr_reader :disks attr_reader :labels attr_reader :machine_type attr_reader :min_cpu_platform attr_reader :metadata attr_reader :guest_accelerators attr_reader :network_interfaces attr_reader :scheduling attr_reader :service_accounts attr_reader :tags def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @can_ip_forward = args['canIpForward'] @description = args['description'] @disks = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksArray.parse(args['disks'], to_s) @labels = args['labels'] @machine_type = args['machineType'] @min_cpu_platform = args['minCpuPlatform'] @metadata = args['metadata'] @guest_accelerators = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesGuestAcceleratorsArray.parse(args['guestAccelerators'], to_s) @network_interfaces = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesArray.parse(args['networkInterfaces'], to_s) @scheduling = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesScheduling.new(args['scheduling'], to_s) @service_accounts = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesServiceAccountsArray.parse(args['serviceAccounts'], to_s) @tags = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesTags.new(args['tags'], to_s) end def to_s "#{@parent_identifier} InstanceTemplateProperties" end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instancetemplate_properties_disks_disk_encryption_key' require 'google/compute/property/instancetemplate_properties_disks_initialize_params' require 'google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key' module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesDisks attr_reader :licenses attr_reader :auto_delete attr_reader :boot attr_reader :device_name attr_reader :disk_encryption_key attr_reader :index attr_reader :initialize_params attr_reader :interface attr_reader :mode attr_reader :source attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @licenses = args['licenses'] @auto_delete = args['autoDelete'] @boot = args['boot'] @device_name = args['deviceName'] @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksDiskEncryptionKey.new(args['diskEncryptionKey'], to_s) @index = args['index'] @initialize_params = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParams.new(args['initializeParams'], to_s) @interface = args['interface'] @mode = args['mode'] @source = args['source'] @type = args['type'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesDisks" end end class InstanceTemplatePropertiesDisksArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesDisks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesDisks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_disks_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesDisksDiskEncryptionKey attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :sha256 def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @rsa_encrypted_key = args['rsaEncryptedKey'] @sha256 = args['sha256'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesDisksDiskEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_disks_initialize_params.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key' module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesDisksInitializeParams attr_reader :disk_name attr_reader :disk_size_gb attr_reader :disk_type attr_reader :source_image attr_reader :source_image_encryption_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disk_name = args['diskName'] @disk_size_gb = args['diskSizeGb'] @disk_type = args['diskType'] @source_image = args['sourceImage'] @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey.new(args['sourceImageEncryptionKey'], to_s) end def to_s "#{@parent_identifier} InstanceTemplatePropertiesDisksInitializeParams" end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey attr_reader :raw_key attr_reader :sha256 def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @sha256 = args['sha256'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_guest_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesGuestAccelerators attr_reader :accelerator_count attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_count = args['acceleratorCount'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesGuestAccelerators" end end class InstanceTemplatePropertiesGuestAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesGuestAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesGuestAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_network_interfaces.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/instancetemplate_properties_network_interfaces_access_configs' require 'google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges' module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesNetworkInterfaces attr_reader :access_configs attr_reader :alias_ip_ranges attr_reader :name attr_reader :network attr_reader :network_ip attr_reader :subnetwork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @access_configs = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAccessConfigsArray.parse(args['accessConfigs'], to_s) @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAliasIpRangesArray.parse(args['aliasIpRanges'], to_s) @name = args['name'] @network = args['network'] @network_ip = args['networkIP'] @subnetwork = args['subnetwork'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesNetworkInterfaces" end end class InstanceTemplatePropertiesNetworkInterfacesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesNetworkInterfaces.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesNetworkInterfaces.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_network_interfaces_access_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesNetworkInterfacesAccessConfigs attr_reader :name attr_reader :nat_ip attr_reader :type attr_reader :set_public_ptr attr_reader :public_ptr_domain_name attr_reader :network_tier def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @nat_ip = args['natIP'] @type = args['type'] @set_public_ptr = args['setPublicPtr'] @public_ptr_domain_name = args['publicPtrDomainName'] @network_tier = args['networkTier'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesNetworkInterfacesAccessConfigs" end end class InstanceTemplatePropertiesNetworkInterfacesAccessConfigsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesNetworkInterfacesAccessConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesNetworkInterfacesAccessConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesNetworkInterfacesAliasIpRanges attr_reader :ip_cidr_range attr_reader :subnetwork_range_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_cidr_range = args['ipCidrRange'] @subnetwork_range_name = args['subnetworkRangeName'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesNetworkInterfacesAliasIpRanges" end end class InstanceTemplatePropertiesNetworkInterfacesAliasIpRangesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesNetworkInterfacesAliasIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesNetworkInterfacesAliasIpRanges.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesScheduling attr_reader :automatic_restart attr_reader :on_host_maintenance attr_reader :preemptible def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @automatic_restart = args['automaticRestart'] @on_host_maintenance = args['onHostMaintenance'] @preemptible = args['preemptible'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesScheduling" end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_service_accounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesServiceAccounts attr_reader :email attr_reader :scopes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @email = args['email'] @scopes = args['scopes'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesServiceAccounts" end end class InstanceTemplatePropertiesServiceAccountsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceTemplatePropertiesServiceAccounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceTemplatePropertiesServiceAccounts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/instancetemplate_properties_tags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InstanceTemplatePropertiesTags attr_reader :fingerprint attr_reader :items def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fingerprint = args['fingerprint'] @items = args['items'] end def to_s "#{@parent_identifier} InstanceTemplatePropertiesTags" end end end end end ================================================ FILE: libraries/google/compute/property/interconnect_circuit_infos.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InterconnectCircuitInfos attr_reader :google_circuit_id attr_reader :google_demarc_id attr_reader :customer_demarc_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @google_circuit_id = args['googleCircuitId'] @google_demarc_id = args['googleDemarcId'] @customer_demarc_id = args['customerDemarcId'] end def to_s "#{@parent_identifier} InterconnectCircuitInfos" end end class InterconnectCircuitInfosArray def self.parse(value, parent_identifier) return if value.nil? return InterconnectCircuitInfos.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InterconnectCircuitInfos.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/interconnect_expected_outages.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InterconnectExpectedOutages attr_reader :name attr_reader :description attr_reader :source attr_reader :state attr_reader :issue_type attr_reader :affected_circuits attr_reader :start_time attr_reader :end_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @description = args['description'] @source = args['source'] @state = args['state'] @issue_type = args['issueType'] @affected_circuits = args['affectedCircuits'] @start_time = parse_time_string(args['startTime']) @end_time = parse_time_string(args['endTime']) end def to_s "#{@parent_identifier} InterconnectExpectedOutages" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end class InterconnectExpectedOutagesArray def self.parse(value, parent_identifier) return if value.nil? return InterconnectExpectedOutages.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InterconnectExpectedOutages.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/interconnectattachment_configuration_constraints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/interconnectattachment_configuration_constraints_bgp_peer_asn_ranges' module GoogleInSpec module Compute module Property class InterconnectAttachmentConfigurationConstraints attr_reader :bgp_md5 attr_reader :bgp_peer_asn_ranges def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @bgp_md5 = args['bgpMd5'] @bgp_peer_asn_ranges = GoogleInSpec::Compute::Property::InterconnectAttachmentConfigurationConstraintsBgpPeerAsnRangesArray.parse(args['bgpPeerAsnRanges'], to_s) end def to_s "#{@parent_identifier} InterconnectAttachmentConfigurationConstraints" end end end end end ================================================ FILE: libraries/google/compute/property/interconnectattachment_configuration_constraints_bgp_peer_asn_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InterconnectAttachmentConfigurationConstraintsBgpPeerAsnRanges attr_reader :min attr_reader :max def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min = args['min'] @max = args['max'] end def to_s "#{@parent_identifier} InterconnectAttachmentConfigurationConstraintsBgpPeerAsnRanges" end end class InterconnectAttachmentConfigurationConstraintsBgpPeerAsnRangesArray def self.parse(value, parent_identifier) return if value.nil? return InterconnectAttachmentConfigurationConstraintsBgpPeerAsnRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InterconnectAttachmentConfigurationConstraintsBgpPeerAsnRanges.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/interconnectattachment_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InterconnectAttachmentLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} InterconnectAttachmentLabels" end end end end end ================================================ FILE: libraries/google/compute/property/interconnectattachment_partner_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InterconnectAttachmentPartnerMetadata attr_reader :partner_name attr_reader :interconnect_name attr_reader :portal_url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @partner_name = args['partnerName'] @interconnect_name = args['interconnectName'] @portal_url = args['portalUrl'] end def to_s "#{@parent_identifier} InterconnectAttachmentPartnerMetadata" end end end end end ================================================ FILE: libraries/google/compute/property/interconnectattachment_private_interconnect_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class InterconnectAttachmentPrivateInterconnectInfo attr_reader :tag8021q def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @tag8021q = args['tag8021q'] end def to_s "#{@parent_identifier} InterconnectAttachmentPrivateInterconnectInfo" end end end end end ================================================ FILE: libraries/google/compute/property/license_resource_requirements.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class LicenseResourceRequirements attr_reader :min_guest_cpu_count attr_reader :min_memory_mb def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min_guest_cpu_count = args['minGuestCpuCount'] @min_memory_mb = args['minMemoryMb'] end def to_s "#{@parent_identifier} LicenseResourceRequirements" end end end end end ================================================ FILE: libraries/google/compute/property/licensecode_license_alias.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class LicenseCodeLicenseAlias attr_reader :self_link attr_reader :description def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @self_link = args['selfLink'] @description = args['description'] end def to_s "#{@parent_identifier} LicenseCodeLicenseAlias" end end class LicenseCodeLicenseAliasArray def self.parse(value, parent_identifier) return if value.nil? return LicenseCodeLicenseAlias.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| LicenseCodeLicenseAlias.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_instance_properties_advanced_machine_features' require 'google/compute/property/machineimage_instance_properties_confidential_instance_config' require 'google/compute/property/machineimage_instance_properties_disks' require 'google/compute/property/machineimage_instance_properties_guest_accelerators' require 'google/compute/property/machineimage_instance_properties_labels' require 'google/compute/property/machineimage_instance_properties_metadata' require 'google/compute/property/machineimage_instance_properties_metadata_items' require 'google/compute/property/machineimage_instance_properties_network_interfaces' require 'google/compute/property/machineimage_instance_properties_network_performance_config' require 'google/compute/property/machineimage_instance_properties_reservation_affinity' require 'google/compute/property/machineimage_instance_properties_resource_manager_tags' require 'google/compute/property/machineimage_instance_properties_scheduling' require 'google/compute/property/machineimage_instance_properties_scheduling_local_ssd_recovery_timeout' require 'google/compute/property/machineimage_instance_properties_scheduling_node_affinities' require 'google/compute/property/machineimage_instance_properties_service_accounts' require 'google/compute/property/machineimage_instance_properties_shielded_instance_config' require 'google/compute/property/machineimage_instance_properties_tags' module GoogleInSpec module Compute module Property class MachineImageInstanceProperties attr_reader :description attr_reader :tags attr_reader :resource_manager_tags attr_reader :machine_type attr_reader :can_ip_forward attr_reader :network_interfaces attr_reader :disks attr_reader :metadata attr_reader :service_accounts attr_reader :scheduling attr_reader :labels attr_reader :guest_accelerators attr_reader :min_cpu_platform attr_reader :reservation_affinity attr_reader :shielded_instance_config attr_reader :resource_policies attr_reader :confidential_instance_config attr_reader :private_ipv6_google_access attr_reader :advanced_machine_features attr_reader :network_performance_config attr_reader :key_revocation_action_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @description = args['description'] @tags = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesTags.new(args['tags'], to_s) @resource_manager_tags = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesResourceManagerTags.new(args['resourceManagerTags'], to_s) @machine_type = args['machineType'] @can_ip_forward = args['canIpForward'] @network_interfaces = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesNetworkInterfacesArray.parse(args['networkInterfaces'], to_s) @disks = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksArray.parse(args['disks'], to_s) @metadata = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesMetadata.new(args['metadata'], to_s) @service_accounts = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesServiceAccountsArray.parse(args['serviceAccounts'], to_s) @scheduling = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesScheduling.new(args['scheduling'], to_s) @labels = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesLabels.new(args['labels'], to_s) @guest_accelerators = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesGuestAcceleratorsArray.parse(args['guestAccelerators'], to_s) @min_cpu_platform = args['minCpuPlatform'] @reservation_affinity = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesReservationAffinity.new(args['reservationAffinity'], to_s) @shielded_instance_config = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesShieldedInstanceConfig.new(args['shieldedInstanceConfig'], to_s) @resource_policies = args['resourcePolicies'] @confidential_instance_config = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesConfidentialInstanceConfig.new(args['confidentialInstanceConfig'], to_s) @private_ipv6_google_access = args['privateIpv6GoogleAccess'] @advanced_machine_features = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesAdvancedMachineFeatures.new(args['advancedMachineFeatures'], to_s) @network_performance_config = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesNetworkPerformanceConfig.new(args['networkPerformanceConfig'], to_s) @key_revocation_action_type = args['keyRevocationActionType'] end def to_s "#{@parent_identifier} MachineImageInstanceProperties" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_advanced_machine_features.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesAdvancedMachineFeatures attr_reader :enable_nested_virtualization attr_reader :threads_per_core attr_reader :visible_core_count attr_reader :enable_uefi_networking def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_nested_virtualization = args['enableNestedVirtualization'] @threads_per_core = args['threadsPerCore'] @visible_core_count = args['visibleCoreCount'] @enable_uefi_networking = args['enableUefiNetworking'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesAdvancedMachineFeatures" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_confidential_instance_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesConfidentialInstanceConfig attr_reader :enable_confidential_compute def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_confidential_compute = args['enableConfidentialCompute'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesConfidentialInstanceConfig" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_instance_properties_disks_disk_encryption_key' require 'google/compute/property/machineimage_instance_properties_disks_guest_os_features' require 'google/compute/property/machineimage_instance_properties_disks_initialize_params' require 'google/compute/property/machineimage_instance_properties_disks_initialize_params_labels' require 'google/compute/property/machineimage_instance_properties_disks_initialize_params_resource_manager_tags' require 'google/compute/property/machineimage_instance_properties_disks_initialize_params_source_image_encryption_key' require 'google/compute/property/machineimage_instance_properties_disks_initialize_params_source_snapshot_encryption_key' require 'google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state' require 'google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_dbs' require 'google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_dbxs' require 'google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_keks' require 'google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_pk' module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisks attr_reader :kind attr_reader :type attr_reader :mode attr_reader :saved_state attr_reader :source attr_reader :device_name attr_reader :index attr_reader :boot attr_reader :initialize_params attr_reader :auto_delete attr_reader :licenses attr_reader :interface attr_reader :guest_os_features attr_reader :disk_encryption_key attr_reader :disk_size_gb attr_reader :shielded_instance_initial_state attr_reader :force_attach attr_reader :architecture def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @type = args['type'] @mode = args['mode'] @saved_state = args['savedState'] @source = args['source'] @device_name = args['deviceName'] @index = args['index'] @boot = args['boot'] @initialize_params = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksInitializeParams.new(args['initializeParams'], to_s) @auto_delete = args['autoDelete'] @licenses = args['licenses'] @interface = args['interface'] @guest_os_features = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksGuestOsFeaturesArray.parse(args['guestOsFeatures'], to_s) @disk_encryption_key = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksDiskEncryptionKey.new(args['diskEncryptionKey'], to_s) @disk_size_gb = args['diskSizeGb'] @shielded_instance_initial_state = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksShieldedInstanceInitialState.new(args['shieldedInstanceInitialState'], to_s) @force_attach = args['forceAttach'] @architecture = args['architecture'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisks" end end class MachineImageInstancePropertiesDisksArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesDisks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesDisks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksDiskEncryptionKey attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :kms_key_name attr_reader :sha256 attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @rsa_encrypted_key = args['rsaEncryptedKey'] @kms_key_name = args['kmsKeyName'] @sha256 = args['sha256'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksDiskEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_guest_os_features.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksGuestOsFeatures attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksGuestOsFeatures" end end class MachineImageInstancePropertiesDisksGuestOsFeaturesArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesDisksGuestOsFeatures.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesDisksGuestOsFeatures.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_initialize_params.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_instance_properties_disks_initialize_params_labels' require 'google/compute/property/machineimage_instance_properties_disks_initialize_params_resource_manager_tags' require 'google/compute/property/machineimage_instance_properties_disks_initialize_params_source_image_encryption_key' require 'google/compute/property/machineimage_instance_properties_disks_initialize_params_source_snapshot_encryption_key' module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksInitializeParams attr_reader :disk_name attr_reader :source_image attr_reader :disk_size_gb attr_reader :disk_type attr_reader :source_image_encryption_key attr_reader :labels attr_reader :source_snapshot attr_reader :source_snapshot_encryption_key attr_reader :description attr_reader :replica_zones attr_reader :resource_policies attr_reader :on_update_action attr_reader :provisioned_iops attr_reader :licenses attr_reader :architecture attr_reader :resource_manager_tags attr_reader :provisioned_throughput def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disk_name = args['diskName'] @source_image = args['sourceImage'] @disk_size_gb = args['diskSizeGb'] @disk_type = args['diskType'] @source_image_encryption_key = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksInitializeParamsSourceImageEncryptionKey.new(args['sourceImageEncryptionKey'], to_s) @labels = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksInitializeParamsLabels.new(args['labels'], to_s) @source_snapshot = args['sourceSnapshot'] @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksInitializeParamsSourceSnapshotEncryptionKey.new(args['sourceSnapshotEncryptionKey'], to_s) @description = args['description'] @replica_zones = args['replicaZones'] @resource_policies = args['resourcePolicies'] @on_update_action = args['onUpdateAction'] @provisioned_iops = args['provisionedIops'] @licenses = args['licenses'] @architecture = args['architecture'] @resource_manager_tags = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksInitializeParamsResourceManagerTags.new(args['resourceManagerTags'], to_s) @provisioned_throughput = args['provisionedThroughput'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksInitializeParams" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_initialize_params_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksInitializeParamsLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksInitializeParamsLabels" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_initialize_params_resource_manager_tags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksInitializeParamsResourceManagerTags attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksInitializeParamsResourceManagerTags" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_initialize_params_source_image_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksInitializeParamsSourceImageEncryptionKey attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :kms_key_name attr_reader :sha256 attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @rsa_encrypted_key = args['rsaEncryptedKey'] @kms_key_name = args['kmsKeyName'] @sha256 = args['sha256'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksInitializeParamsSourceImageEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_initialize_params_source_snapshot_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksInitializeParamsSourceSnapshotEncryptionKey attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :kms_key_name attr_reader :sha256 attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @rsa_encrypted_key = args['rsaEncryptedKey'] @kms_key_name = args['kmsKeyName'] @sha256 = args['sha256'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksInitializeParamsSourceSnapshotEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_dbs' require 'google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_dbxs' require 'google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_keks' require 'google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_pk' module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksShieldedInstanceInitialState attr_reader :pk attr_reader :keks attr_reader :dbs attr_reader :dbxs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pk = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksShieldedInstanceInitialStatePk.new(args['pk'], to_s) @keks = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksShieldedInstanceInitialStateKeksArray.parse(args['keks'], to_s) @dbs = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbsArray.parse(args['dbs'], to_s) @dbxs = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbxsArray.parse(args['dbxs'], to_s) end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksShieldedInstanceInitialState" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_dbs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbs attr_reader :content attr_reader :file_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @content = args['content'] @file_type = args['fileType'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbs" end end class MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_dbxs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbxs attr_reader :content attr_reader :file_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @content = args['content'] @file_type = args['fileType'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbxs" end end class MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbxsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbxs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesDisksShieldedInstanceInitialStateDbxs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_keks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksShieldedInstanceInitialStateKeks attr_reader :content attr_reader :file_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @content = args['content'] @file_type = args['fileType'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksShieldedInstanceInitialStateKeks" end end class MachineImageInstancePropertiesDisksShieldedInstanceInitialStateKeksArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesDisksShieldedInstanceInitialStateKeks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesDisksShieldedInstanceInitialStateKeks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_disks_shielded_instance_initial_state_pk.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesDisksShieldedInstanceInitialStatePk attr_reader :content attr_reader :file_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @content = args['content'] @file_type = args['fileType'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesDisksShieldedInstanceInitialStatePk" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_guest_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesGuestAccelerators attr_reader :accelerator_type attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesGuestAccelerators" end end class MachineImageInstancePropertiesGuestAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesGuestAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesGuestAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesLabels" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_instance_properties_metadata_items' module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesMetadata attr_reader :kind attr_reader :fingerprint attr_reader :items def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @fingerprint = args['fingerprint'] @items = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesMetadataItemsArray.parse(args['items'], to_s) end def to_s "#{@parent_identifier} MachineImageInstancePropertiesMetadata" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_metadata_items.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesMetadataItems attr_reader :key attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @value = args['value'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesMetadataItems" end end class MachineImageInstancePropertiesMetadataItemsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesMetadataItems.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesMetadataItems.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_network_interfaces.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_instance_properties_network_interfaces_access_configs' require 'google/compute/property/machineimage_instance_properties_network_interfaces_alias_ip_ranges' require 'google/compute/property/machineimage_instance_properties_network_interfaces_ipv6_access_configs' module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesNetworkInterfaces attr_reader :kind attr_reader :network attr_reader :subnetwork attr_reader :network_ip attr_reader :ipv6_address attr_reader :internal_ipv6_prefix_length attr_reader :name attr_reader :access_configs attr_reader :ipv6_access_configs attr_reader :alias_ip_ranges attr_reader :fingerprint attr_reader :stack_type attr_reader :ipv6_access_type attr_reader :queue_count attr_reader :nic_type attr_reader :network_attachment def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @network = args['network'] @subnetwork = args['subnetwork'] @network_ip = args['networkIP'] @ipv6_address = args['ipv6Address'] @internal_ipv6_prefix_length = args['internalIpv6PrefixLength'] @name = args['name'] @access_configs = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesNetworkInterfacesAccessConfigsArray.parse(args['accessConfigs'], to_s) @ipv6_access_configs = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesNetworkInterfacesIpv6AccessConfigsArray.parse(args['ipv6AccessConfigs'], to_s) @alias_ip_ranges = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesNetworkInterfacesAliasIpRangesArray.parse(args['aliasIpRanges'], to_s) @fingerprint = args['fingerprint'] @stack_type = args['stackType'] @ipv6_access_type = args['ipv6AccessType'] @queue_count = args['queueCount'] @nic_type = args['nicType'] @network_attachment = args['networkAttachment'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesNetworkInterfaces" end end class MachineImageInstancePropertiesNetworkInterfacesArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesNetworkInterfaces.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesNetworkInterfaces.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_network_interfaces_access_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesNetworkInterfacesAccessConfigs attr_reader :kind attr_reader :type attr_reader :name attr_reader :nat_ip attr_reader :external_ipv6 attr_reader :external_ipv6_prefix_length attr_reader :set_public_ptr attr_reader :public_ptr_domain_name attr_reader :network_tier attr_reader :security_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @type = args['type'] @name = args['name'] @nat_ip = args['natIP'] @external_ipv6 = args['externalIpv6'] @external_ipv6_prefix_length = args['externalIpv6PrefixLength'] @set_public_ptr = args['setPublicPtr'] @public_ptr_domain_name = args['publicPtrDomainName'] @network_tier = args['networkTier'] @security_policy = args['securityPolicy'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesNetworkInterfacesAccessConfigs" end end class MachineImageInstancePropertiesNetworkInterfacesAccessConfigsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesNetworkInterfacesAccessConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesNetworkInterfacesAccessConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_network_interfaces_alias_ip_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesNetworkInterfacesAliasIpRanges attr_reader :ip_cidr_range attr_reader :subnetwork_range_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_cidr_range = args['ipCidrRange'] @subnetwork_range_name = args['subnetworkRangeName'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesNetworkInterfacesAliasIpRanges" end end class MachineImageInstancePropertiesNetworkInterfacesAliasIpRangesArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesNetworkInterfacesAliasIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesNetworkInterfacesAliasIpRanges.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_network_interfaces_ipv6_access_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesNetworkInterfacesIpv6AccessConfigs attr_reader :kind attr_reader :type attr_reader :name attr_reader :nat_ip attr_reader :external_ipv6 attr_reader :external_ipv6_prefix_length attr_reader :set_public_ptr attr_reader :public_ptr_domain_name attr_reader :network_tier attr_reader :security_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @type = args['type'] @name = args['name'] @nat_ip = args['natIP'] @external_ipv6 = args['externalIpv6'] @external_ipv6_prefix_length = args['externalIpv6PrefixLength'] @set_public_ptr = args['setPublicPtr'] @public_ptr_domain_name = args['publicPtrDomainName'] @network_tier = args['networkTier'] @security_policy = args['securityPolicy'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesNetworkInterfacesIpv6AccessConfigs" end end class MachineImageInstancePropertiesNetworkInterfacesIpv6AccessConfigsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesNetworkInterfacesIpv6AccessConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesNetworkInterfacesIpv6AccessConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_network_performance_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesNetworkPerformanceConfig attr_reader :total_egress_bandwidth_tier def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @total_egress_bandwidth_tier = args['totalEgressBandwidthTier'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesNetworkPerformanceConfig" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_reservation_affinity.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesReservationAffinity attr_reader :consume_reservation_type attr_reader :key attr_reader :values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @consume_reservation_type = args['consumeReservationType'] @key = args['key'] @values = args['values'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesReservationAffinity" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_resource_manager_tags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesResourceManagerTags attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesResourceManagerTags" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_instance_properties_scheduling_local_ssd_recovery_timeout' require 'google/compute/property/machineimage_instance_properties_scheduling_node_affinities' module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesScheduling attr_reader :on_host_maintenance attr_reader :automatic_restart attr_reader :preemptible attr_reader :node_affinities attr_reader :min_node_cpus attr_reader :location_hint attr_reader :provisioning_model attr_reader :instance_termination_action attr_reader :local_ssd_recovery_timeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @on_host_maintenance = args['onHostMaintenance'] @automatic_restart = args['automaticRestart'] @preemptible = args['preemptible'] @node_affinities = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesSchedulingNodeAffinitiesArray.parse(args['nodeAffinities'], to_s) @min_node_cpus = args['minNodeCpus'] @location_hint = args['locationHint'] @provisioning_model = args['provisioningModel'] @instance_termination_action = args['instanceTerminationAction'] @local_ssd_recovery_timeout = GoogleInSpec::Compute::Property::MachineImageInstancePropertiesSchedulingLocalSsdRecoveryTimeout.new(args['localSsdRecoveryTimeout'], to_s) end def to_s "#{@parent_identifier} MachineImageInstancePropertiesScheduling" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_scheduling_local_ssd_recovery_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesSchedulingLocalSsdRecoveryTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesSchedulingLocalSsdRecoveryTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_scheduling_node_affinities.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesSchedulingNodeAffinities attr_reader :key attr_reader :operator attr_reader :values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @operator = args['operator'] @values = args['values'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesSchedulingNodeAffinities" end end class MachineImageInstancePropertiesSchedulingNodeAffinitiesArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesSchedulingNodeAffinities.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesSchedulingNodeAffinities.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_service_accounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesServiceAccounts attr_reader :email attr_reader :scopes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @email = args['email'] @scopes = args['scopes'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesServiceAccounts" end end class MachineImageInstancePropertiesServiceAccountsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageInstancePropertiesServiceAccounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageInstancePropertiesServiceAccounts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_shielded_instance_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesShieldedInstanceConfig attr_reader :enable_secure_boot attr_reader :enable_vtpm attr_reader :enable_integrity_monitoring def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_secure_boot = args['enableSecureBoot'] @enable_vtpm = args['enableVtpm'] @enable_integrity_monitoring = args['enableIntegrityMonitoring'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesShieldedInstanceConfig" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_instance_properties_tags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageInstancePropertiesTags attr_reader :items attr_reader :fingerprint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @items = args['items'] @fingerprint = args['fingerprint'] end def to_s "#{@parent_identifier} MachineImageInstancePropertiesTags" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_machine_image_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageMachineImageEncryptionKey attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :kms_key_name attr_reader :sha256 attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @rsa_encrypted_key = args['rsaEncryptedKey'] @kms_key_name = args['kmsKeyName'] @sha256 = args['sha256'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} MachineImageMachineImageEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_saved_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSavedDisks attr_reader :kind attr_reader :source_disk attr_reader :storage_bytes attr_reader :storage_bytes_status attr_reader :architecture def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @source_disk = args['sourceDisk'] @storage_bytes = args['storageBytes'] @storage_bytes_status = args['storageBytesStatus'] @architecture = args['architecture'] end def to_s "#{@parent_identifier} MachineImageSavedDisks" end end class MachineImageSavedDisksArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSavedDisks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSavedDisks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_disk_encryption_keys.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_source_disk_encryption_keys_disk_encryption_key' module GoogleInSpec module Compute module Property class MachineImageSourceDiskEncryptionKeys attr_reader :source_disk attr_reader :disk_encryption_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @source_disk = args['sourceDisk'] @disk_encryption_key = GoogleInSpec::Compute::Property::MachineImageSourceDiskEncryptionKeysDiskEncryptionKey.new(args['diskEncryptionKey'], to_s) end def to_s "#{@parent_identifier} MachineImageSourceDiskEncryptionKeys" end end class MachineImageSourceDiskEncryptionKeysArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceDiskEncryptionKeys.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceDiskEncryptionKeys.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_disk_encryption_keys_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceDiskEncryptionKeysDiskEncryptionKey attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :kms_key_name attr_reader :sha256 attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @rsa_encrypted_key = args['rsaEncryptedKey'] @kms_key_name = args['kmsKeyName'] @sha256 = args['sha256'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} MachineImageSourceDiskEncryptionKeysDiskEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_source_instance_properties_disks' require 'google/compute/property/machineimage_source_instance_properties_guest_accelerators' require 'google/compute/property/machineimage_source_instance_properties_labels' require 'google/compute/property/machineimage_source_instance_properties_metadata' require 'google/compute/property/machineimage_source_instance_properties_metadata_items' require 'google/compute/property/machineimage_source_instance_properties_network_interfaces' require 'google/compute/property/machineimage_source_instance_properties_scheduling' require 'google/compute/property/machineimage_source_instance_properties_scheduling_local_ssd_recovery_timeout' require 'google/compute/property/machineimage_source_instance_properties_scheduling_node_affinities' require 'google/compute/property/machineimage_source_instance_properties_service_accounts' require 'google/compute/property/machineimage_source_instance_properties_tags' module GoogleInSpec module Compute module Property class MachineImageSourceInstanceProperties attr_reader :description attr_reader :tags attr_reader :machine_type attr_reader :can_ip_forward attr_reader :network_interfaces attr_reader :disks attr_reader :metadata attr_reader :service_accounts attr_reader :scheduling attr_reader :labels attr_reader :guest_accelerators attr_reader :min_cpu_platform attr_reader :deletion_protection attr_reader :key_revocation_action_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @description = args['description'] @tags = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesTags.new(args['tags'], to_s) @machine_type = args['machineType'] @can_ip_forward = args['canIpForward'] @network_interfaces = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesNetworkInterfacesArray.parse(args['networkInterfaces'], to_s) @disks = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesDisksArray.parse(args['disks'], to_s) @metadata = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesMetadata.new(args['metadata'], to_s) @service_accounts = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesServiceAccountsArray.parse(args['serviceAccounts'], to_s) @scheduling = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesScheduling.new(args['scheduling'], to_s) @labels = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesLabels.new(args['labels'], to_s) @guest_accelerators = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesGuestAcceleratorsArray.parse(args['guestAccelerators'], to_s) @min_cpu_platform = args['minCpuPlatform'] @deletion_protection = args['deletionProtection'] @key_revocation_action_type = args['keyRevocationActionType'] end def to_s "#{@parent_identifier} MachineImageSourceInstanceProperties" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_source_instance_properties_disks_disk_encryption_key' require 'google/compute/property/machineimage_source_instance_properties_disks_guest_os_features' module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesDisks attr_reader :kind attr_reader :type attr_reader :mode attr_reader :source attr_reader :device_name attr_reader :index attr_reader :boot attr_reader :auto_delete attr_reader :licenses attr_reader :interface attr_reader :guest_os_features attr_reader :disk_encryption_key attr_reader :disk_size_gb attr_reader :storage_bytes attr_reader :storage_bytes_status attr_reader :disk_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @type = args['type'] @mode = args['mode'] @source = args['source'] @device_name = args['deviceName'] @index = args['index'] @boot = args['boot'] @auto_delete = args['autoDelete'] @licenses = args['licenses'] @interface = args['interface'] @guest_os_features = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesDisksGuestOsFeaturesArray.parse(args['guestOsFeatures'], to_s) @disk_encryption_key = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesDisksDiskEncryptionKey.new(args['diskEncryptionKey'], to_s) @disk_size_gb = args['diskSizeGb'] @storage_bytes = args['storageBytes'] @storage_bytes_status = args['storageBytesStatus'] @disk_type = args['diskType'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesDisks" end end class MachineImageSourceInstancePropertiesDisksArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceInstancePropertiesDisks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceInstancePropertiesDisks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_disks_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesDisksDiskEncryptionKey attr_reader :raw_key attr_reader :rsa_encrypted_key attr_reader :kms_key_name attr_reader :sha256 attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @rsa_encrypted_key = args['rsaEncryptedKey'] @kms_key_name = args['kmsKeyName'] @sha256 = args['sha256'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesDisksDiskEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_disks_guest_os_features.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesDisksGuestOsFeatures attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesDisksGuestOsFeatures" end end class MachineImageSourceInstancePropertiesDisksGuestOsFeaturesArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceInstancePropertiesDisksGuestOsFeatures.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceInstancePropertiesDisksGuestOsFeatures.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_guest_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesGuestAccelerators attr_reader :accelerator_type attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesGuestAccelerators" end end class MachineImageSourceInstancePropertiesGuestAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceInstancePropertiesGuestAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceInstancePropertiesGuestAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesLabels" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_source_instance_properties_metadata_items' module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesMetadata attr_reader :kind attr_reader :fingerprint attr_reader :items def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @fingerprint = args['fingerprint'] @items = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesMetadataItemsArray.parse(args['items'], to_s) end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesMetadata" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_metadata_items.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesMetadataItems attr_reader :key attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @value = args['value'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesMetadataItems" end end class MachineImageSourceInstancePropertiesMetadataItemsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceInstancePropertiesMetadataItems.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceInstancePropertiesMetadataItems.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_network_interfaces.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_source_instance_properties_network_interfaces_access_configs' require 'google/compute/property/machineimage_source_instance_properties_network_interfaces_alias_ip_ranges' require 'google/compute/property/machineimage_source_instance_properties_network_interfaces_ipv6_access_configs' module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesNetworkInterfaces attr_reader :kind attr_reader :network attr_reader :subnetwork attr_reader :network_ip attr_reader :ipv6_address attr_reader :internal_ipv6_prefix_length attr_reader :name attr_reader :access_configs attr_reader :ipv6_access_configs attr_reader :alias_ip_ranges attr_reader :fingerprint attr_reader :stack_type attr_reader :ipv6_access_type attr_reader :queue_count attr_reader :nic_type attr_reader :network_attachment def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @network = args['network'] @subnetwork = args['subnetwork'] @network_ip = args['networkIP'] @ipv6_address = args['ipv6Address'] @internal_ipv6_prefix_length = args['internalIpv6PrefixLength'] @name = args['name'] @access_configs = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesNetworkInterfacesAccessConfigsArray.parse(args['accessConfigs'], to_s) @ipv6_access_configs = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesNetworkInterfacesIpv6AccessConfigsArray.parse(args['ipv6AccessConfigs'], to_s) @alias_ip_ranges = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesNetworkInterfacesAliasIpRangesArray.parse(args['aliasIpRanges'], to_s) @fingerprint = args['fingerprint'] @stack_type = args['stackType'] @ipv6_access_type = args['ipv6AccessType'] @queue_count = args['queueCount'] @nic_type = args['nicType'] @network_attachment = args['networkAttachment'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesNetworkInterfaces" end end class MachineImageSourceInstancePropertiesNetworkInterfacesArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceInstancePropertiesNetworkInterfaces.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceInstancePropertiesNetworkInterfaces.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_network_interfaces_access_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesNetworkInterfacesAccessConfigs attr_reader :kind attr_reader :type attr_reader :name attr_reader :nat_ip attr_reader :external_ipv6 attr_reader :external_ipv6_prefix_length attr_reader :set_public_ptr attr_reader :public_ptr_domain_name attr_reader :network_tier attr_reader :security_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @type = args['type'] @name = args['name'] @nat_ip = args['natIP'] @external_ipv6 = args['externalIpv6'] @external_ipv6_prefix_length = args['externalIpv6PrefixLength'] @set_public_ptr = args['setPublicPtr'] @public_ptr_domain_name = args['publicPtrDomainName'] @network_tier = args['networkTier'] @security_policy = args['securityPolicy'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesNetworkInterfacesAccessConfigs" end end class MachineImageSourceInstancePropertiesNetworkInterfacesAccessConfigsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceInstancePropertiesNetworkInterfacesAccessConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceInstancePropertiesNetworkInterfacesAccessConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_network_interfaces_alias_ip_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesNetworkInterfacesAliasIpRanges attr_reader :ip_cidr_range attr_reader :subnetwork_range_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_cidr_range = args['ipCidrRange'] @subnetwork_range_name = args['subnetworkRangeName'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesNetworkInterfacesAliasIpRanges" end end class MachineImageSourceInstancePropertiesNetworkInterfacesAliasIpRangesArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceInstancePropertiesNetworkInterfacesAliasIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceInstancePropertiesNetworkInterfacesAliasIpRanges.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_network_interfaces_ipv6_access_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesNetworkInterfacesIpv6AccessConfigs attr_reader :kind attr_reader :type attr_reader :name attr_reader :nat_ip attr_reader :external_ipv6 attr_reader :external_ipv6_prefix_length attr_reader :set_public_ptr attr_reader :public_ptr_domain_name attr_reader :network_tier attr_reader :security_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @type = args['type'] @name = args['name'] @nat_ip = args['natIP'] @external_ipv6 = args['externalIpv6'] @external_ipv6_prefix_length = args['externalIpv6PrefixLength'] @set_public_ptr = args['setPublicPtr'] @public_ptr_domain_name = args['publicPtrDomainName'] @network_tier = args['networkTier'] @security_policy = args['securityPolicy'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesNetworkInterfacesIpv6AccessConfigs" end end class MachineImageSourceInstancePropertiesNetworkInterfacesIpv6AccessConfigsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceInstancePropertiesNetworkInterfacesIpv6AccessConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceInstancePropertiesNetworkInterfacesIpv6AccessConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/machineimage_source_instance_properties_scheduling_local_ssd_recovery_timeout' require 'google/compute/property/machineimage_source_instance_properties_scheduling_node_affinities' module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesScheduling attr_reader :on_host_maintenance attr_reader :automatic_restart attr_reader :preemptible attr_reader :node_affinities attr_reader :min_node_cpus attr_reader :location_hint attr_reader :provisioning_model attr_reader :instance_termination_action attr_reader :local_ssd_recovery_timeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @on_host_maintenance = args['onHostMaintenance'] @automatic_restart = args['automaticRestart'] @preemptible = args['preemptible'] @node_affinities = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesSchedulingNodeAffinitiesArray.parse(args['nodeAffinities'], to_s) @min_node_cpus = args['minNodeCpus'] @location_hint = args['locationHint'] @provisioning_model = args['provisioningModel'] @instance_termination_action = args['instanceTerminationAction'] @local_ssd_recovery_timeout = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesSchedulingLocalSsdRecoveryTimeout.new(args['localSsdRecoveryTimeout'], to_s) end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesScheduling" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_scheduling_local_ssd_recovery_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesSchedulingLocalSsdRecoveryTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesSchedulingLocalSsdRecoveryTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_scheduling_node_affinities.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesSchedulingNodeAffinities attr_reader :key attr_reader :operator attr_reader :values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @operator = args['operator'] @values = args['values'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesSchedulingNodeAffinities" end end class MachineImageSourceInstancePropertiesSchedulingNodeAffinitiesArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceInstancePropertiesSchedulingNodeAffinities.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceInstancePropertiesSchedulingNodeAffinities.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_service_accounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesServiceAccounts attr_reader :email attr_reader :scopes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @email = args['email'] @scopes = args['scopes'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesServiceAccounts" end end class MachineImageSourceInstancePropertiesServiceAccountsArray def self.parse(value, parent_identifier) return if value.nil? return MachineImageSourceInstancePropertiesServiceAccounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineImageSourceInstancePropertiesServiceAccounts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machineimage_source_instance_properties_tags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineImageSourceInstancePropertiesTags attr_reader :items attr_reader :fingerprint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @items = args['items'] @fingerprint = args['fingerprint'] end def to_s "#{@parent_identifier} MachineImageSourceInstancePropertiesTags" end end end end end ================================================ FILE: libraries/google/compute/property/machinetype_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineTypeAccelerators attr_reader :guest_accelerator_type attr_reader :guest_accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @guest_accelerator_type = args['guestAcceleratorType'] @guest_accelerator_count = args['guestAcceleratorCount'] end def to_s "#{@parent_identifier} MachineTypeAccelerators" end end class MachineTypeAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return MachineTypeAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineTypeAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/machinetype_deprecated.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineTypeDeprecated attr_reader :state attr_reader :replacement attr_reader :deprecated attr_reader :obsolete attr_reader :deleted def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @state = args['state'] @replacement = args['replacement'] @deprecated = args['deprecated'] @obsolete = args['obsolete'] @deleted = args['deleted'] end def to_s "#{@parent_identifier} MachineTypeDeprecated" end end end end end ================================================ FILE: libraries/google/compute/property/machinetype_scratch_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class MachineTypeScratchDisks attr_reader :disk_gb def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disk_gb = args['diskGb'] end def to_s "#{@parent_identifier} MachineTypeScratchDisks" end end class MachineTypeScratchDisksArray def self.parse(value, parent_identifier) return if value.nil? return MachineTypeScratchDisks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MachineTypeScratchDisks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/network_peerings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NetworkPeerings attr_reader :name attr_reader :state attr_reader :state_details attr_reader :network attr_reader :export_custom_routes attr_reader :import_custom_routes attr_reader :peer_mtu def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @state = args['state'] @state_details = args['stateDetails'] @network = args['network'] @export_custom_routes = args['exportCustomRoutes'] @import_custom_routes = args['importCustomRoutes'] @peer_mtu = args['peerMtu'] end def to_s "#{@parent_identifier} NetworkPeerings" end end class NetworkPeeringsArray def self.parse(value, parent_identifier) return if value.nil? return NetworkPeerings.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NetworkPeerings.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/network_routing_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NetworkRoutingConfig attr_reader :routing_mode def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @routing_mode = args['routingMode'] end def to_s "#{@parent_identifier} NetworkRoutingConfig" end end end end end ================================================ FILE: libraries/google/compute/property/networkattachment_connection_endpoints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NetworkAttachmentConnectionEndpoints attr_reader :status attr_reader :project_id_or_num attr_reader :subnetwork attr_reader :ip_address attr_reader :ipv6_address attr_reader :secondary_ip_cidr_ranges attr_reader :subnetwork_cidr_range def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @status = args['status'] @project_id_or_num = args['projectIdOrNum'] @subnetwork = args['subnetwork'] @ip_address = args['ipAddress'] @ipv6_address = args['ipv6Address'] @secondary_ip_cidr_ranges = args['secondaryIpCidrRanges'] @subnetwork_cidr_range = args['subnetworkCidrRange'] end def to_s "#{@parent_identifier} NetworkAttachmentConnectionEndpoints" end end class NetworkAttachmentConnectionEndpointsArray def self.parse(value, parent_identifier) return if value.nil? return NetworkAttachmentConnectionEndpoints.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NetworkAttachmentConnectionEndpoints.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/networkfirewallpolicy_associations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NetworkFirewallPolicyAssociations attr_reader :name attr_reader :attachment_target attr_reader :firewall_policy_id attr_reader :short_name attr_reader :display_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @attachment_target = args['attachmentTarget'] @firewall_policy_id = args['firewallPolicyId'] @short_name = args['shortName'] @display_name = args['displayName'] end def to_s "#{@parent_identifier} NetworkFirewallPolicyAssociations" end end class NetworkFirewallPolicyAssociationsArray def self.parse(value, parent_identifier) return if value.nil? return NetworkFirewallPolicyAssociations.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NetworkFirewallPolicyAssociations.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/networkfirewallpolicy_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/networkfirewallpolicy_rules_match' require 'google/compute/property/networkfirewallpolicy_rules_match_layer4_configs' require 'google/compute/property/networkfirewallpolicy_rules_match_src_secure_tags' require 'google/compute/property/networkfirewallpolicy_rules_target_secure_tags' module GoogleInSpec module Compute module Property class NetworkFirewallPolicyRules attr_reader :kind attr_reader :rule_name attr_reader :description attr_reader :priority attr_reader :match attr_reader :action attr_reader :direction attr_reader :target_resources attr_reader :enable_logging attr_reader :rule_tuple_count attr_reader :target_service_accounts attr_reader :target_secure_tags attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @rule_name = args['ruleName'] @description = args['description'] @priority = args['priority'] @match = GoogleInSpec::Compute::Property::NetworkFirewallPolicyRulesMatch.new(args['match'], to_s) @action = args['action'] @direction = args['direction'] @target_resources = args['targetResources'] @enable_logging = args['enableLogging'] @rule_tuple_count = args['ruleTupleCount'] @target_service_accounts = args['targetServiceAccounts'] @target_secure_tags = GoogleInSpec::Compute::Property::NetworkFirewallPolicyRulesTargetSecureTagsArray.parse(args['targetSecureTags'], to_s) @disabled = args['disabled'] end def to_s "#{@parent_identifier} NetworkFirewallPolicyRules" end end class NetworkFirewallPolicyRulesArray def self.parse(value, parent_identifier) return if value.nil? return NetworkFirewallPolicyRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NetworkFirewallPolicyRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/networkfirewallpolicy_rules_match.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/networkfirewallpolicy_rules_match_layer4_configs' require 'google/compute/property/networkfirewallpolicy_rules_match_src_secure_tags' module GoogleInSpec module Compute module Property class NetworkFirewallPolicyRulesMatch attr_reader :src_ip_ranges attr_reader :dest_ip_ranges attr_reader :layer4_configs attr_reader :src_secure_tags attr_reader :dest_address_groups attr_reader :src_address_groups attr_reader :src_fqdns attr_reader :dest_fqdns attr_reader :src_region_codes attr_reader :dest_region_codes attr_reader :dest_threat_intelligences attr_reader :src_threat_intelligences def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @src_ip_ranges = args['srcIpRanges'] @dest_ip_ranges = args['destIpRanges'] @layer4_configs = GoogleInSpec::Compute::Property::NetworkFirewallPolicyRulesMatchLayer4ConfigsArray.parse(args['layer4Configs'], to_s) @src_secure_tags = GoogleInSpec::Compute::Property::NetworkFirewallPolicyRulesMatchSrcSecureTagsArray.parse(args['srcSecureTags'], to_s) @dest_address_groups = args['destAddressGroups'] @src_address_groups = args['srcAddressGroups'] @src_fqdns = args['srcFqdns'] @dest_fqdns = args['destFqdns'] @src_region_codes = args['srcRegionCodes'] @dest_region_codes = args['destRegionCodes'] @dest_threat_intelligences = args['destThreatIntelligences'] @src_threat_intelligences = args['srcThreatIntelligences'] end def to_s "#{@parent_identifier} NetworkFirewallPolicyRulesMatch" end end end end end ================================================ FILE: libraries/google/compute/property/networkfirewallpolicy_rules_match_layer4_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NetworkFirewallPolicyRulesMatchLayer4Configs attr_reader :ip_protocol attr_reader :ports def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_protocol = args['ipProtocol'] @ports = args['ports'] end def to_s "#{@parent_identifier} NetworkFirewallPolicyRulesMatchLayer4Configs" end end class NetworkFirewallPolicyRulesMatchLayer4ConfigsArray def self.parse(value, parent_identifier) return if value.nil? return NetworkFirewallPolicyRulesMatchLayer4Configs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NetworkFirewallPolicyRulesMatchLayer4Configs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/networkfirewallpolicy_rules_match_src_secure_tags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NetworkFirewallPolicyRulesMatchSrcSecureTags attr_reader :name attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @state = args['state'] end def to_s "#{@parent_identifier} NetworkFirewallPolicyRulesMatchSrcSecureTags" end end class NetworkFirewallPolicyRulesMatchSrcSecureTagsArray def self.parse(value, parent_identifier) return if value.nil? return NetworkFirewallPolicyRulesMatchSrcSecureTags.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NetworkFirewallPolicyRulesMatchSrcSecureTags.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/networkfirewallpolicy_rules_target_secure_tags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NetworkFirewallPolicyRulesTargetSecureTags attr_reader :name attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @state = args['state'] end def to_s "#{@parent_identifier} NetworkFirewallPolicyRulesTargetSecureTags" end end class NetworkFirewallPolicyRulesTargetSecureTagsArray def self.parse(value, parent_identifier) return if value.nil? return NetworkFirewallPolicyRulesTargetSecureTags.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NetworkFirewallPolicyRulesTargetSecureTags.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/nodegroup_autoscaling_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NodeGroupAutoscalingPolicy attr_reader :mode attr_reader :min_nodes attr_reader :max_nodes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @mode = args['mode'] @min_nodes = args['minNodes'] @max_nodes = args['maxNodes'] end def to_s "#{@parent_identifier} NodeGroupAutoscalingPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/nodetemplate_node_type_flexibility.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NodeTemplateNodeTypeFlexibility attr_reader :cpus attr_reader :memory attr_reader :local_ssd def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cpus = args['cpus'] @memory = args['memory'] @local_ssd = args['localSsd'] end def to_s "#{@parent_identifier} NodeTemplateNodeTypeFlexibility" end end end end end ================================================ FILE: libraries/google/compute/property/nodetemplate_server_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NodeTemplateServerBinding attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] end def to_s "#{@parent_identifier} NodeTemplateServerBinding" end end end end end ================================================ FILE: libraries/google/compute/property/nodetype_deprecated.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class NodeTypeDeprecated attr_reader :state attr_reader :replacement attr_reader :deprecated attr_reader :obsolete attr_reader :deleted def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @state = args['state'] @replacement = args['replacement'] @deprecated = args['deprecated'] @obsolete = args['obsolete'] @deleted = args['deleted'] end def to_s "#{@parent_identifier} NodeTypeDeprecated" end end end end end ================================================ FILE: libraries/google/compute/property/packetmirroring_collector_ilb.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class PacketMirroringCollectorIlb attr_reader :url attr_reader :canonical_url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @url = args['url'] @canonical_url = args['canonicalUrl'] end def to_s "#{@parent_identifier} PacketMirroringCollectorIlb" end end end end end ================================================ FILE: libraries/google/compute/property/packetmirroring_filter.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class PacketMirroringFilter attr_reader :cidr_ranges attr_reader :ip_protocols attr_reader :direction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cidr_ranges = args['cidrRanges'] @ip_protocols = args['IPProtocols'] @direction = args['direction'] end def to_s "#{@parent_identifier} PacketMirroringFilter" end end end end end ================================================ FILE: libraries/google/compute/property/packetmirroring_mirrored_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/packetmirroring_mirrored_resources_instances' require 'google/compute/property/packetmirroring_mirrored_resources_subnetworks' module GoogleInSpec module Compute module Property class PacketMirroringMirroredResources attr_reader :subnetworks attr_reader :instances attr_reader :tags def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @subnetworks = GoogleInSpec::Compute::Property::PacketMirroringMirroredResourcesSubnetworksArray.parse(args['subnetworks'], to_s) @instances = GoogleInSpec::Compute::Property::PacketMirroringMirroredResourcesInstancesArray.parse(args['instances'], to_s) @tags = args['tags'] end def to_s "#{@parent_identifier} PacketMirroringMirroredResources" end end end end end ================================================ FILE: libraries/google/compute/property/packetmirroring_mirrored_resources_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class PacketMirroringMirroredResourcesInstances attr_reader :url attr_reader :canonical_url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @url = args['url'] @canonical_url = args['canonicalUrl'] end def to_s "#{@parent_identifier} PacketMirroringMirroredResourcesInstances" end end class PacketMirroringMirroredResourcesInstancesArray def self.parse(value, parent_identifier) return if value.nil? return PacketMirroringMirroredResourcesInstances.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| PacketMirroringMirroredResourcesInstances.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/packetmirroring_mirrored_resources_subnetworks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class PacketMirroringMirroredResourcesSubnetworks attr_reader :url attr_reader :canonical_url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @url = args['url'] @canonical_url = args['canonicalUrl'] end def to_s "#{@parent_identifier} PacketMirroringMirroredResourcesSubnetworks" end end class PacketMirroringMirroredResourcesSubnetworksArray def self.parse(value, parent_identifier) return if value.nil? return PacketMirroringMirroredResourcesSubnetworks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| PacketMirroringMirroredResourcesSubnetworks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/packetmirroring_network.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class PacketMirroringNetwork attr_reader :url attr_reader :canonical_url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @url = args['url'] @canonical_url = args['canonicalUrl'] end def to_s "#{@parent_identifier} PacketMirroringNetwork" end end end end end ================================================ FILE: libraries/google/compute/property/projectinfo_common_instance_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/projectinfo_common_instance_metadata_items' module GoogleInSpec module Compute module Property class ProjectInfoCommonInstanceMetadata attr_reader :items def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @items = GoogleInSpec::Compute::Property::ProjectInfoCommonInstanceMetadataItemsArray.parse(args['items'], to_s) end def to_s "#{@parent_identifier} ProjectInfoCommonInstanceMetadata" end end end end end ================================================ FILE: libraries/google/compute/property/projectinfo_common_instance_metadata_items.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ProjectInfoCommonInstanceMetadataItems attr_reader :key attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @value = args['value'] end def to_s "#{@parent_identifier} ProjectInfoCommonInstanceMetadataItems" end end class ProjectInfoCommonInstanceMetadataItemsArray def self.parse(value, parent_identifier) return if value.nil? return ProjectInfoCommonInstanceMetadataItems.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectInfoCommonInstanceMetadataItems.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/projectinfo_quotas.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ProjectInfoQuotas attr_reader :metric attr_reader :limit attr_reader :usage attr_reader :owner def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric = args['metric'] @limit = args['limit'] @usage = args['usage'] @owner = args['owner'] end def to_s "#{@parent_identifier} ProjectInfoQuotas" end end class ProjectInfoQuotasArray def self.parse(value, parent_identifier) return if value.nil? return ProjectInfoQuotas.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectInfoQuotas.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/region_deprecated.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionDeprecated attr_reader :deleted attr_reader :deprecated attr_reader :obsolete attr_reader :replacement attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @deleted = parse_time_string(args['deleted']) @deprecated = parse_time_string(args['deprecated']) @obsolete = parse_time_string(args['obsolete']) @replacement = args['replacement'] @state = args['state'] end def to_s "#{@parent_identifier} RegionDeprecated" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/compute/property/region_quotas.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionQuotas attr_reader :metric attr_reader :limit attr_reader :usage attr_reader :owner def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric = args['metric'] @limit = args['limit'] @usage = args['usage'] @owner = args['owner'] end def to_s "#{@parent_identifier} RegionQuotas" end end class RegionQuotasArray def self.parse(value, parent_identifier) return if value.nil? return RegionQuotas.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionQuotas.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_autoscaling_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionautoscaler_autoscaling_policy_cpu_utilization' require 'google/compute/property/regionautoscaler_autoscaling_policy_custom_metric_utilizations' require 'google/compute/property/regionautoscaler_autoscaling_policy_load_balancing_utilization' require 'google/compute/property/regionautoscaler_autoscaling_policy_scale_down_control' require 'google/compute/property/regionautoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas' require 'google/compute/property/regionautoscaler_autoscaling_policy_scale_in_control' require 'google/compute/property/regionautoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas' require 'google/compute/property/regionautoscaler_autoscaling_policy_scaling_schedules' module GoogleInSpec module Compute module Property class RegionAutoscalerAutoscalingPolicy attr_reader :min_num_replicas attr_reader :max_num_replicas attr_reader :scale_down_control attr_reader :scale_in_control attr_reader :cool_down_period_sec attr_reader :cpu_utilization attr_reader :custom_metric_utilizations attr_reader :load_balancing_utilization attr_reader :mode attr_reader :scaling_schedules def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min_num_replicas = args['minNumReplicas'] @max_num_replicas = args['maxNumReplicas'] @scale_down_control = GoogleInSpec::Compute::Property::RegionAutoscalerAutoscalingPolicyScaleDownControl.new(args['scaleDownControl'], to_s) @scale_in_control = GoogleInSpec::Compute::Property::RegionAutoscalerAutoscalingPolicyScaleInControl.new(args['scaleInControl'], to_s) @cool_down_period_sec = args['coolDownPeriodSec'] @cpu_utilization = GoogleInSpec::Compute::Property::RegionAutoscalerAutoscalingPolicyCpuUtilization.new(args['cpuUtilization'], to_s) @custom_metric_utilizations = GoogleInSpec::Compute::Property::RegionAutoscalerAutoscalingPolicyCustomMetricUtilizationsArray.parse(args['customMetricUtilizations'], to_s) @load_balancing_utilization = GoogleInSpec::Compute::Property::RegionAutoscalerAutoscalingPolicyLoadBalancingUtilization.new(args['loadBalancingUtilization'], to_s) @mode = args['mode'] @scaling_schedules = GoogleInSpec::Compute::Property::RegionAutoscalerAutoscalingPolicyScalingSchedules.new(args['scalingSchedules'], to_s) end def to_s "#{@parent_identifier} RegionAutoscalerAutoscalingPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_autoscaling_policy_cpu_utilization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionAutoscalerAutoscalingPolicyCpuUtilization attr_reader :utilization_target attr_reader :predictive_method def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @utilization_target = args['utilizationTarget'] @predictive_method = args['predictiveMethod'] end def to_s "#{@parent_identifier} RegionAutoscalerAutoscalingPolicyCpuUtilization" end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_autoscaling_policy_custom_metric_utilizations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionAutoscalerAutoscalingPolicyCustomMetricUtilizations attr_reader :metric attr_reader :filter attr_reader :utilization_target attr_reader :single_instance_assignment attr_reader :utilization_target_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric = args['metric'] @filter = args['filter'] @utilization_target = args['utilizationTarget'] @single_instance_assignment = args['singleInstanceAssignment'] @utilization_target_type = args['utilizationTargetType'] end def to_s "#{@parent_identifier} RegionAutoscalerAutoscalingPolicyCustomMetricUtilizations" end end class RegionAutoscalerAutoscalingPolicyCustomMetricUtilizationsArray def self.parse(value, parent_identifier) return if value.nil? return RegionAutoscalerAutoscalingPolicyCustomMetricUtilizations.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionAutoscalerAutoscalingPolicyCustomMetricUtilizations.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_autoscaling_policy_load_balancing_utilization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionAutoscalerAutoscalingPolicyLoadBalancingUtilization attr_reader :utilization_target def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @utilization_target = args['utilizationTarget'] end def to_s "#{@parent_identifier} RegionAutoscalerAutoscalingPolicyLoadBalancingUtilization" end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_autoscaling_policy_scale_down_control.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionautoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas' module GoogleInSpec module Compute module Property class RegionAutoscalerAutoscalingPolicyScaleDownControl attr_reader :max_scaled_down_replicas attr_reader :time_window_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_scaled_down_replicas = GoogleInSpec::Compute::Property::RegionAutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas.new(args['maxScaledDownReplicas'], to_s) @time_window_sec = args['timeWindowSec'] end def to_s "#{@parent_identifier} RegionAutoscalerAutoscalingPolicyScaleDownControl" end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionAutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas attr_reader :fixed attr_reader :percent attr_reader :calculated def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed = args['fixed'] @percent = args['percent'] @calculated = args['calculated'] end def to_s "#{@parent_identifier} RegionAutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas" end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_autoscaling_policy_scale_in_control.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionautoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas' module GoogleInSpec module Compute module Property class RegionAutoscalerAutoscalingPolicyScaleInControl attr_reader :max_scaled_in_replicas attr_reader :time_window_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_scaled_in_replicas = GoogleInSpec::Compute::Property::RegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas.new(args['maxScaledInReplicas'], to_s) @time_window_sec = args['timeWindowSec'] end def to_s "#{@parent_identifier} RegionAutoscalerAutoscalingPolicyScaleInControl" end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas attr_reader :fixed attr_reader :percent attr_reader :calculated def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed = args['fixed'] @percent = args['percent'] @calculated = args['calculated'] end def to_s "#{@parent_identifier} RegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas" end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_autoscaling_policy_scaling_schedules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionAutoscalerAutoscalingPolicyScalingSchedules attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} RegionAutoscalerAutoscalingPolicyScalingSchedules" end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_scaling_schedule_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionAutoscalerScalingScheduleStatus attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} RegionAutoscalerScalingScheduleStatus" end end end end end ================================================ FILE: libraries/google/compute/property/regionautoscaler_status_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionAutoscalerStatusDetails attr_reader :message attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @message = args['message'] @type = args['type'] end def to_s "#{@parent_identifier} RegionAutoscalerStatusDetails" end end class RegionAutoscalerStatusDetailsArray def self.parse(value, parent_identifier) return if value.nil? return RegionAutoscalerStatusDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionAutoscalerStatusDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_backends.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceBackends attr_reader :balancing_mode attr_reader :capacity_scaler attr_reader :description attr_reader :failover attr_reader :group attr_reader :max_connections attr_reader :max_connections_per_instance attr_reader :max_connections_per_endpoint attr_reader :max_rate attr_reader :max_rate_per_instance attr_reader :max_rate_per_endpoint attr_reader :max_utilization def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @balancing_mode = args['balancingMode'] @capacity_scaler = args['capacityScaler'] @description = args['description'] @failover = args['failover'] @group = args['group'] @max_connections = args['maxConnections'] @max_connections_per_instance = args['maxConnectionsPerInstance'] @max_connections_per_endpoint = args['maxConnectionsPerEndpoint'] @max_rate = args['maxRate'] @max_rate_per_instance = args['maxRatePerInstance'] @max_rate_per_endpoint = args['maxRatePerEndpoint'] @max_utilization = args['maxUtilization'] end def to_s "#{@parent_identifier} RegionBackendServiceBackends" end end class RegionBackendServiceBackendsArray def self.parse(value, parent_identifier) return if value.nil? return RegionBackendServiceBackends.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionBackendServiceBackends.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_cdn_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionbackendservice_cdn_policy_cache_key_policy' require 'google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy' module GoogleInSpec module Compute module Property class RegionBackendServiceCdnPolicy attr_reader :cache_key_policy attr_reader :signed_url_cache_max_age_sec attr_reader :default_ttl attr_reader :max_ttl attr_reader :client_ttl attr_reader :negative_caching attr_reader :negative_caching_policy attr_reader :cache_mode attr_reader :serve_while_stale def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cache_key_policy = GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicyCacheKeyPolicy.new(args['cacheKeyPolicy'], to_s) @signed_url_cache_max_age_sec = args['signedUrlCacheMaxAgeSec'] @default_ttl = args['defaultTtl'] @max_ttl = args['maxTtl'] @client_ttl = args['clientTtl'] @negative_caching = args['negativeCaching'] @negative_caching_policy = GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicyNegativeCachingPolicyArray.parse(args['negativeCachingPolicy'], to_s) @cache_mode = args['cacheMode'] @serve_while_stale = args['serveWhileStale'] end def to_s "#{@parent_identifier} RegionBackendServiceCdnPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_cdn_policy_cache_key_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceCdnPolicyCacheKeyPolicy attr_reader :include_host attr_reader :include_protocol attr_reader :include_query_string attr_reader :query_string_blacklist attr_reader :query_string_whitelist def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @include_host = args['includeHost'] @include_protocol = args['includeProtocol'] @include_query_string = args['includeQueryString'] @query_string_blacklist = args['queryStringBlacklist'] @query_string_whitelist = args['queryStringWhitelist'] end def to_s "#{@parent_identifier} RegionBackendServiceCdnPolicyCacheKeyPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceCdnPolicyNegativeCachingPolicy attr_reader :code attr_reader :ttl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] @ttl = args['ttl'] end def to_s "#{@parent_identifier} RegionBackendServiceCdnPolicyNegativeCachingPolicy" end end class RegionBackendServiceCdnPolicyNegativeCachingPolicyArray def self.parse(value, parent_identifier) return if value.nil? return RegionBackendServiceCdnPolicyNegativeCachingPolicy.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionBackendServiceCdnPolicyNegativeCachingPolicy.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_circuit_breakers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionbackendservice_circuit_breakers_connect_timeout' module GoogleInSpec module Compute module Property class RegionBackendServiceCircuitBreakers attr_reader :connect_timeout attr_reader :max_requests_per_connection attr_reader :max_connections attr_reader :max_pending_requests attr_reader :max_requests attr_reader :max_retries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @connect_timeout = GoogleInSpec::Compute::Property::RegionBackendServiceCircuitBreakersConnectTimeout.new(args['connectTimeout'], to_s) @max_requests_per_connection = args['maxRequestsPerConnection'] @max_connections = args['maxConnections'] @max_pending_requests = args['maxPendingRequests'] @max_requests = args['maxRequests'] @max_retries = args['maxRetries'] end def to_s "#{@parent_identifier} RegionBackendServiceCircuitBreakers" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_circuit_breakers_connect_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceCircuitBreakersConnectTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionBackendServiceCircuitBreakersConnectTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_connection_draining.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceConnectionDraining attr_reader :draining_timeout_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @draining_timeout_sec = args['drainingTimeoutSec'] end def to_s "#{@parent_identifier} RegionBackendServiceConnectionDraining" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_consistent_hash.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionbackendservice_consistent_hash_http_cookie' require 'google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl' module GoogleInSpec module Compute module Property class RegionBackendServiceConsistentHash attr_reader :http_cookie attr_reader :http_header_name attr_reader :minimum_ring_size def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_cookie = GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHashHttpCookie.new(args['httpCookie'], to_s) @http_header_name = args['httpHeaderName'] @minimum_ring_size = args['minimumRingSize'] end def to_s "#{@parent_identifier} RegionBackendServiceConsistentHash" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_consistent_hash_http_cookie.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl' module GoogleInSpec module Compute module Property class RegionBackendServiceConsistentHashHttpCookie attr_reader :ttl attr_reader :name attr_reader :path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ttl = GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHashHttpCookieTtl.new(args['ttl'], to_s) @name = args['name'] @path = args['path'] end def to_s "#{@parent_identifier} RegionBackendServiceConsistentHashHttpCookie" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceConsistentHashHttpCookieTtl attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionBackendServiceConsistentHashHttpCookieTtl" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_failover_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceFailoverPolicy attr_reader :disable_connection_drain_on_failover attr_reader :drop_traffic_if_unhealthy attr_reader :failover_ratio def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disable_connection_drain_on_failover = args['disableConnectionDrainOnFailover'] @drop_traffic_if_unhealthy = args['dropTrafficIfUnhealthy'] @failover_ratio = args['failoverRatio'] end def to_s "#{@parent_identifier} RegionBackendServiceFailoverPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_log_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceLogConfig attr_reader :enable attr_reader :sample_rate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable = args['enable'] @sample_rate = args['sampleRate'] end def to_s "#{@parent_identifier} RegionBackendServiceLogConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_outlier_detection.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionbackendservice_outlier_detection_base_ejection_time' require 'google/compute/property/regionbackendservice_outlier_detection_interval' module GoogleInSpec module Compute module Property class RegionBackendServiceOutlierDetection attr_reader :base_ejection_time attr_reader :consecutive_errors attr_reader :consecutive_gateway_failure attr_reader :enforcing_consecutive_errors attr_reader :enforcing_consecutive_gateway_failure attr_reader :enforcing_success_rate attr_reader :interval attr_reader :max_ejection_percent attr_reader :success_rate_minimum_hosts attr_reader :success_rate_request_volume attr_reader :success_rate_stdev_factor def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @base_ejection_time = GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetectionBaseEjectionTime.new(args['baseEjectionTime'], to_s) @consecutive_errors = args['consecutiveErrors'] @consecutive_gateway_failure = args['consecutiveGatewayFailure'] @enforcing_consecutive_errors = args['enforcingConsecutiveErrors'] @enforcing_consecutive_gateway_failure = args['enforcingConsecutiveGatewayFailure'] @enforcing_success_rate = args['enforcingSuccessRate'] @interval = GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetectionInterval.new(args['interval'], to_s) @max_ejection_percent = args['maxEjectionPercent'] @success_rate_minimum_hosts = args['successRateMinimumHosts'] @success_rate_request_volume = args['successRateRequestVolume'] @success_rate_stdev_factor = args['successRateStdevFactor'] end def to_s "#{@parent_identifier} RegionBackendServiceOutlierDetection" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_outlier_detection_base_ejection_time.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceOutlierDetectionBaseEjectionTime attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionBackendServiceOutlierDetectionBaseEjectionTime" end end end end end ================================================ FILE: libraries/google/compute/property/regionbackendservice_outlier_detection_interval.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionBackendServiceOutlierDetectionInterval attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionBackendServiceOutlierDetectionInterval" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_license_resource.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentLicenseResource attr_reader :license attr_reader :amount attr_reader :cores_per_license def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @license = args['license'] @amount = args['amount'] @cores_per_license = args['coresPerLicense'] end def to_s "#{@parent_identifier} RegionCommitmentLicenseResource" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regioncommitment_reservations_aggregate_reservation' require 'google/compute/property/regioncommitment_reservations_aggregate_reservation_in_use_resources' require 'google/compute/property/regioncommitment_reservations_aggregate_reservation_reserved_resources' require 'google/compute/property/regioncommitment_reservations_delete_after_duration' require 'google/compute/property/regioncommitment_reservations_resource_policies' require 'google/compute/property/regioncommitment_reservations_resource_status' require 'google/compute/property/regioncommitment_reservations_resource_status_specific_sku_allocation' require 'google/compute/property/regioncommitment_reservations_share_settings' require 'google/compute/property/regioncommitment_reservations_share_settings_folder_map' require 'google/compute/property/regioncommitment_reservations_share_settings_project_map' require 'google/compute/property/regioncommitment_reservations_specific_reservation' require 'google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties' require 'google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties_guest_accelerators' require 'google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties_local_ssds' module GoogleInSpec module Compute module Property class RegionCommitmentReservations attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :self_link attr_reader :self_link_with_id attr_reader :zone attr_reader :description attr_reader :name attr_reader :specific_reservation attr_reader :aggregate_reservation attr_reader :commitment attr_reader :specific_reservation_required attr_reader :status attr_reader :share_settings attr_reader :satisfies_pzs attr_reader :resource_policies attr_reader :resource_status attr_reader :delete_at_time attr_reader :delete_after_duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @id = args['id'] @creation_timestamp = args['creationTimestamp'] @self_link = args['selfLink'] @self_link_with_id = args['selfLinkWithId'] @zone = args['zone'] @description = args['description'] @name = args['name'] @specific_reservation = GoogleInSpec::Compute::Property::RegionCommitmentReservationsSpecificReservation.new(args['specificReservation'], to_s) @aggregate_reservation = GoogleInSpec::Compute::Property::RegionCommitmentReservationsAggregateReservation.new(args['aggregateReservation'], to_s) @commitment = args['commitment'] @specific_reservation_required = args['specificReservationRequired'] @status = args['status'] @share_settings = GoogleInSpec::Compute::Property::RegionCommitmentReservationsShareSettings.new(args['shareSettings'], to_s) @satisfies_pzs = args['satisfiesPzs'] @resource_policies = GoogleInSpec::Compute::Property::RegionCommitmentReservationsResourcePolicies.new(args['resourcePolicies'], to_s) @resource_status = GoogleInSpec::Compute::Property::RegionCommitmentReservationsResourceStatus.new(args['resourceStatus'], to_s) @delete_at_time = args['deleteAtTime'] @delete_after_duration = GoogleInSpec::Compute::Property::RegionCommitmentReservationsDeleteAfterDuration.new(args['deleteAfterDuration'], to_s) end def to_s "#{@parent_identifier} RegionCommitmentReservations" end end class RegionCommitmentReservationsArray def self.parse(value, parent_identifier) return if value.nil? return RegionCommitmentReservations.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionCommitmentReservations.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_aggregate_reservation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regioncommitment_reservations_aggregate_reservation_in_use_resources' require 'google/compute/property/regioncommitment_reservations_aggregate_reservation_reserved_resources' module GoogleInSpec module Compute module Property class RegionCommitmentReservationsAggregateReservation attr_reader :vm_family attr_reader :reserved_resources attr_reader :in_use_resources attr_reader :workload_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @vm_family = args['vmFamily'] @reserved_resources = GoogleInSpec::Compute::Property::RegionCommitmentReservationsAggregateReservationReservedResourcesArray.parse(args['reservedResources'], to_s) @in_use_resources = GoogleInSpec::Compute::Property::RegionCommitmentReservationsAggregateReservationInUseResourcesArray.parse(args['inUseResources'], to_s) @workload_type = args['workloadType'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsAggregateReservation" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_aggregate_reservation_in_use_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regioncommitment_reservations_aggregate_reservation_in_use_resources_accelerator' module GoogleInSpec module Compute module Property class RegionCommitmentReservationsAggregateReservationInUseResources attr_reader :accelerator def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator = GoogleInSpec::Compute::Property::RegionCommitmentReservationsAggregateReservationInUseResourcesAccelerator.new(args['accelerator'], to_s) end def to_s "#{@parent_identifier} RegionCommitmentReservationsAggregateReservationInUseResources" end end class RegionCommitmentReservationsAggregateReservationInUseResourcesArray def self.parse(value, parent_identifier) return if value.nil? return RegionCommitmentReservationsAggregateReservationInUseResources.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionCommitmentReservationsAggregateReservationInUseResources.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_aggregate_reservation_in_use_resources_accelerator.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentReservationsAggregateReservationInUseResourcesAccelerator attr_reader :accelerator_count attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_count = args['acceleratorCount'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsAggregateReservationInUseResourcesAccelerator" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_aggregate_reservation_reserved_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regioncommitment_reservations_aggregate_reservation_reserved_resources_accelerator' module GoogleInSpec module Compute module Property class RegionCommitmentReservationsAggregateReservationReservedResources attr_reader :accelerator def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator = GoogleInSpec::Compute::Property::RegionCommitmentReservationsAggregateReservationReservedResourcesAccelerator.new(args['accelerator'], to_s) end def to_s "#{@parent_identifier} RegionCommitmentReservationsAggregateReservationReservedResources" end end class RegionCommitmentReservationsAggregateReservationReservedResourcesArray def self.parse(value, parent_identifier) return if value.nil? return RegionCommitmentReservationsAggregateReservationReservedResources.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionCommitmentReservationsAggregateReservationReservedResources.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_aggregate_reservation_reserved_resources_accelerator.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentReservationsAggregateReservationReservedResourcesAccelerator attr_reader :accelerator_count attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_count = args['acceleratorCount'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsAggregateReservationReservedResourcesAccelerator" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_delete_after_duration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentReservationsDeleteAfterDuration attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsDeleteAfterDuration" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_resource_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentReservationsResourcePolicies attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsResourcePolicies" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_resource_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regioncommitment_reservations_resource_status_specific_sku_allocation' module GoogleInSpec module Compute module Property class RegionCommitmentReservationsResourceStatus attr_reader :specific_sku_allocation def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @specific_sku_allocation = GoogleInSpec::Compute::Property::RegionCommitmentReservationsResourceStatusSpecificSkuAllocation.new(args['specificSkuAllocation'], to_s) end def to_s "#{@parent_identifier} RegionCommitmentReservationsResourceStatus" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_resource_status_specific_sku_allocation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentReservationsResourceStatusSpecificSkuAllocation attr_reader :source_instance_template_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @source_instance_template_id = args['sourceInstanceTemplateId'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsResourceStatusSpecificSkuAllocation" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_share_settings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regioncommitment_reservations_share_settings_folder_map' require 'google/compute/property/regioncommitment_reservations_share_settings_project_map' module GoogleInSpec module Compute module Property class RegionCommitmentReservationsShareSettings attr_reader :share_type attr_reader :projects attr_reader :project_map attr_reader :folder_map def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @share_type = args['shareType'] @projects = args['projects'] @project_map = GoogleInSpec::Compute::Property::RegionCommitmentReservationsShareSettingsProjectMap.new(args['projectMap'], to_s) @folder_map = GoogleInSpec::Compute::Property::RegionCommitmentReservationsShareSettingsFolderMap.new(args['folderMap'], to_s) end def to_s "#{@parent_identifier} RegionCommitmentReservationsShareSettings" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_share_settings_folder_map.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentReservationsShareSettingsFolderMap attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsShareSettingsFolderMap" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_share_settings_project_map.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentReservationsShareSettingsProjectMap attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsShareSettingsProjectMap" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_specific_reservation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties' require 'google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties_guest_accelerators' require 'google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties_local_ssds' module GoogleInSpec module Compute module Property class RegionCommitmentReservationsSpecificReservation attr_reader :instance_properties attr_reader :count attr_reader :in_use_count attr_reader :assured_count attr_reader :source_instance_template def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_properties = GoogleInSpec::Compute::Property::RegionCommitmentReservationsSpecificReservationInstanceProperties.new(args['instanceProperties'], to_s) @count = args['count'] @in_use_count = args['inUseCount'] @assured_count = args['assuredCount'] @source_instance_template = args['sourceInstanceTemplate'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsSpecificReservation" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties_guest_accelerators' require 'google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties_local_ssds' module GoogleInSpec module Compute module Property class RegionCommitmentReservationsSpecificReservationInstanceProperties attr_reader :machine_type attr_reader :guest_accelerators attr_reader :min_cpu_platform attr_reader :local_ssds attr_reader :maintenance_freeze_duration_hours attr_reader :location_hint attr_reader :maintenance_interval def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] @guest_accelerators = GoogleInSpec::Compute::Property::RegionCommitmentReservationsSpecificReservationInstancePropertiesGuestAcceleratorsArray.parse(args['guestAccelerators'], to_s) @min_cpu_platform = args['minCpuPlatform'] @local_ssds = GoogleInSpec::Compute::Property::RegionCommitmentReservationsSpecificReservationInstancePropertiesLocalSsdsArray.parse(args['localSsds'], to_s) @maintenance_freeze_duration_hours = args['maintenanceFreezeDurationHours'] @location_hint = args['locationHint'] @maintenance_interval = args['maintenanceInterval'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsSpecificReservationInstanceProperties" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties_guest_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentReservationsSpecificReservationInstancePropertiesGuestAccelerators attr_reader :accelerator_type attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsSpecificReservationInstancePropertiesGuestAccelerators" end end class RegionCommitmentReservationsSpecificReservationInstancePropertiesGuestAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return RegionCommitmentReservationsSpecificReservationInstancePropertiesGuestAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionCommitmentReservationsSpecificReservationInstancePropertiesGuestAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_reservations_specific_reservation_instance_properties_local_ssds.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentReservationsSpecificReservationInstancePropertiesLocalSsds attr_reader :disk_size_gb attr_reader :interface def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disk_size_gb = args['diskSizeGb'] @interface = args['interface'] end def to_s "#{@parent_identifier} RegionCommitmentReservationsSpecificReservationInstancePropertiesLocalSsds" end end class RegionCommitmentReservationsSpecificReservationInstancePropertiesLocalSsdsArray def self.parse(value, parent_identifier) return if value.nil? return RegionCommitmentReservationsSpecificReservationInstancePropertiesLocalSsds.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionCommitmentReservationsSpecificReservationInstancePropertiesLocalSsds.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_resource_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regioncommitment_resource_status_cancellation_information' require 'google/compute/property/regioncommitment_resource_status_cancellation_information_canceled_commitment' require 'google/compute/property/regioncommitment_resource_status_cancellation_information_cancellation_cap' require 'google/compute/property/regioncommitment_resource_status_cancellation_information_cancellation_fee' module GoogleInSpec module Compute module Property class RegionCommitmentResourceStatus attr_reader :cancellation_information def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cancellation_information = GoogleInSpec::Compute::Property::RegionCommitmentResourceStatusCancellationInformation.new(args['cancellationInformation'], to_s) end def to_s "#{@parent_identifier} RegionCommitmentResourceStatus" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_resource_status_cancellation_information.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regioncommitment_resource_status_cancellation_information_canceled_commitment' require 'google/compute/property/regioncommitment_resource_status_cancellation_information_cancellation_cap' require 'google/compute/property/regioncommitment_resource_status_cancellation_information_cancellation_fee' module GoogleInSpec module Compute module Property class RegionCommitmentResourceStatusCancellationInformation attr_reader :cancellation_fee attr_reader :cancellation_fee_expiration_timestamp attr_reader :cancellation_cap attr_reader :canceled_commitment attr_reader :canceled_commitment_last_updated_timestamp def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cancellation_fee = GoogleInSpec::Compute::Property::RegionCommitmentResourceStatusCancellationInformationCancellationFee.new(args['cancellationFee'], to_s) @cancellation_fee_expiration_timestamp = args['cancellationFeeExpirationTimestamp'] @cancellation_cap = GoogleInSpec::Compute::Property::RegionCommitmentResourceStatusCancellationInformationCancellationCap.new(args['cancellationCap'], to_s) @canceled_commitment = GoogleInSpec::Compute::Property::RegionCommitmentResourceStatusCancellationInformationCanceledCommitment.new(args['canceledCommitment'], to_s) @canceled_commitment_last_updated_timestamp = args['canceledCommitmentLastUpdatedTimestamp'] end def to_s "#{@parent_identifier} RegionCommitmentResourceStatusCancellationInformation" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_resource_status_cancellation_information_canceled_commitment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentResourceStatusCancellationInformationCanceledCommitment attr_reader :currency_code attr_reader :units attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @currency_code = args['currencyCode'] @units = args['units'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionCommitmentResourceStatusCancellationInformationCanceledCommitment" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_resource_status_cancellation_information_cancellation_cap.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentResourceStatusCancellationInformationCancellationCap attr_reader :currency_code attr_reader :units attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @currency_code = args['currencyCode'] @units = args['units'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionCommitmentResourceStatusCancellationInformationCancellationCap" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_resource_status_cancellation_information_cancellation_fee.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentResourceStatusCancellationInformationCancellationFee attr_reader :currency_code attr_reader :units attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @currency_code = args['currencyCode'] @units = args['units'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionCommitmentResourceStatusCancellationInformationCancellationFee" end end end end end ================================================ FILE: libraries/google/compute/property/regioncommitment_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionCommitmentResources attr_reader :type attr_reader :amount attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @amount = args['amount'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} RegionCommitmentResources" end end class RegionCommitmentResourcesArray def self.parse(value, parent_identifier) return if value.nil? return RegionCommitmentResources.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionCommitmentResources.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regiondisktype_deprecated.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionDiskTypeDeprecated attr_reader :state attr_reader :replacement attr_reader :deprecated attr_reader :obsolete attr_reader :deleted def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @state = args['state'] @replacement = args['replacement'] @deprecated = args['deprecated'] @obsolete = args['obsolete'] @deleted = args['deleted'] end def to_s "#{@parent_identifier} RegionDiskTypeDeprecated" end end end end end ================================================ FILE: libraries/google/compute/property/regionhealthcheck_grpc_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionHealthCheckGrpcHealthCheck attr_reader :port attr_reader :port_name attr_reader :port_specification attr_reader :grpc_service_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @port = args['port'] @port_name = args['portName'] @port_specification = args['portSpecification'] @grpc_service_name = args['grpcServiceName'] end def to_s "#{@parent_identifier} RegionHealthCheckGrpcHealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/regionhealthcheck_http2_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionHealthCheckHttp2HealthCheck attr_reader :host attr_reader :request_path attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host = args['host'] @request_path = args['requestPath'] @response = args['response'] @port = args['port'] @port_name = args['portName'] @proxy_header = args['proxyHeader'] @port_specification = args['portSpecification'] end def to_s "#{@parent_identifier} RegionHealthCheckHttp2HealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/regionhealthcheck_http_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionHealthCheckHttpHealthCheck attr_reader :host attr_reader :request_path attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host = args['host'] @request_path = args['requestPath'] @response = args['response'] @port = args['port'] @port_name = args['portName'] @proxy_header = args['proxyHeader'] @port_specification = args['portSpecification'] end def to_s "#{@parent_identifier} RegionHealthCheckHttpHealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/regionhealthcheck_https_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionHealthCheckHttpsHealthCheck attr_reader :host attr_reader :request_path attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host = args['host'] @request_path = args['requestPath'] @response = args['response'] @port = args['port'] @port_name = args['portName'] @proxy_header = args['proxyHeader'] @port_specification = args['portSpecification'] end def to_s "#{@parent_identifier} RegionHealthCheckHttpsHealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/regionhealthcheck_log_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionHealthCheckLogConfig attr_reader :enable def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable = args['enable'] end def to_s "#{@parent_identifier} RegionHealthCheckLogConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionhealthcheck_ssl_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionHealthCheckSslHealthCheck attr_reader :request attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request = args['request'] @response = args['response'] @port = args['port'] @port_name = args['portName'] @proxy_header = args['proxyHeader'] @port_specification = args['portSpecification'] end def to_s "#{@parent_identifier} RegionHealthCheckSslHealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/regionhealthcheck_tcp_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionHealthCheckTcpHealthCheck attr_reader :request attr_reader :response attr_reader :port attr_reader :port_name attr_reader :proxy_header attr_reader :port_specification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request = args['request'] @response = args['response'] @port = args['port'] @port_name = args['portName'] @proxy_header = args['proxyHeader'] @port_specification = args['portSpecification'] end def to_s "#{@parent_identifier} RegionHealthCheckTcpHealthCheck" end end end end end ================================================ FILE: libraries/google/compute/property/regioninstancegroup_named_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionInstanceGroupNamedPorts attr_reader :name attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @port = args['port'] end def to_s "#{@parent_identifier} RegionInstanceGroupNamedPorts" end end class RegionInstanceGroupNamedPortsArray def self.parse(value, parent_identifier) return if value.nil? return RegionInstanceGroupNamedPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionInstanceGroupNamedPorts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regioninstancegroupmanager_auto_healing_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionInstanceGroupManagerAutoHealingPolicies attr_reader :health_check attr_reader :initial_delay_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @health_check = args['healthCheck'] @initial_delay_sec = args['initialDelaySec'] end def to_s "#{@parent_identifier} RegionInstanceGroupManagerAutoHealingPolicies" end end class RegionInstanceGroupManagerAutoHealingPoliciesArray def self.parse(value, parent_identifier) return if value.nil? return RegionInstanceGroupManagerAutoHealingPolicies.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionInstanceGroupManagerAutoHealingPolicies.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regioninstancegroupmanager_current_actions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionInstanceGroupManagerCurrentActions attr_reader :abandoning attr_reader :creating attr_reader :creating_without_retries attr_reader :deleting attr_reader :none attr_reader :recreating attr_reader :refreshing attr_reader :restarting def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @abandoning = args['abandoning'] @creating = args['creating'] @creating_without_retries = args['creatingWithoutRetries'] @deleting = args['deleting'] @none = args['none'] @recreating = args['recreating'] @refreshing = args['refreshing'] @restarting = args['restarting'] end def to_s "#{@parent_identifier} RegionInstanceGroupManagerCurrentActions" end end end end end ================================================ FILE: libraries/google/compute/property/regioninstancegroupmanager_named_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionInstanceGroupManagerNamedPorts attr_reader :name attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @port = args['port'] end def to_s "#{@parent_identifier} RegionInstanceGroupManagerNamedPorts" end end class RegionInstanceGroupManagerNamedPortsArray def self.parse(value, parent_identifier) return if value.nil? return RegionInstanceGroupManagerNamedPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionInstanceGroupManagerNamedPorts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionnetworkendpointgroup_annotations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionNetworkEndpointGroupAnnotations attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} RegionNetworkEndpointGroupAnnotations" end end end end end ================================================ FILE: libraries/google/compute/property/regionnetworkendpointgroup_app_engine.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionNetworkEndpointGroupAppEngine attr_reader :service attr_reader :version attr_reader :url_mask def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service = args['service'] @version = args['version'] @url_mask = args['urlMask'] end def to_s "#{@parent_identifier} RegionNetworkEndpointGroupAppEngine" end end end end end ================================================ FILE: libraries/google/compute/property/regionnetworkendpointgroup_cloud_function.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionNetworkEndpointGroupCloudFunction attr_reader :function attr_reader :url_mask def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @function = args['function'] @url_mask = args['urlMask'] end def to_s "#{@parent_identifier} RegionNetworkEndpointGroupCloudFunction" end end end end end ================================================ FILE: libraries/google/compute/property/regionnetworkendpointgroup_cloud_run.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionNetworkEndpointGroupCloudRun attr_reader :service attr_reader :tag attr_reader :url_mask def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service = args['service'] @tag = args['tag'] @url_mask = args['urlMask'] end def to_s "#{@parent_identifier} RegionNetworkEndpointGroupCloudRun" end end end end end ================================================ FILE: libraries/google/compute/property/regionnetworkendpointgroup_psc_data.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionNetworkEndpointGroupPscData attr_reader :consumer_psc_address attr_reader :psc_connection_id attr_reader :psc_connection_status def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @consumer_psc_address = args['consumerPscAddress'] @psc_connection_id = args['pscConnectionId'] @psc_connection_status = args['pscConnectionStatus'] end def to_s "#{@parent_identifier} RegionNetworkEndpointGroupPscData" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_auto_deploy_config' require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config' require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs' module GoogleInSpec module Compute module Property class RegionSecurityPolicyAdaptiveProtectionConfig attr_reader :layer7_ddos_defense_config attr_reader :auto_deploy_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @layer7_ddos_defense_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig.new(args['layer7DdosDefenseConfig'], to_s) @auto_deploy_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfigAutoDeployConfig.new(args['autoDeployConfig'], to_s) end def to_s "#{@parent_identifier} RegionSecurityPolicyAdaptiveProtectionConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_auto_deploy_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyAdaptiveProtectionConfigAutoDeployConfig attr_reader :load_threshold attr_reader :confidence_threshold attr_reader :impacted_baseline_threshold attr_reader :expiration_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @load_threshold = args['loadThreshold'] @confidence_threshold = args['confidenceThreshold'] @impacted_baseline_threshold = args['impactedBaselineThreshold'] @expiration_sec = args['expirationSec'] end def to_s "#{@parent_identifier} RegionSecurityPolicyAdaptiveProtectionConfigAutoDeployConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs' module GoogleInSpec module Compute module Property class RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig attr_reader :enable attr_reader :rule_visibility attr_reader :threshold_configs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable = args['enable'] @rule_visibility = args['ruleVisibility'] @threshold_configs = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigsArray.parse(args['thresholdConfigs'], to_s) end def to_s "#{@parent_identifier} RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_apclddctctg_configs' module GoogleInSpec module Compute module Property class RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigs attr_reader :name attr_reader :auto_deploy_load_threshold attr_reader :auto_deploy_confidence_threshold attr_reader :auto_deploy_impacted_baseline_threshold attr_reader :auto_deploy_expiration_sec attr_reader :detection_load_threshold attr_reader :detection_absolute_qps attr_reader :detection_relative_to_baseline_qps attr_reader :traffic_granularity_configs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @auto_deploy_load_threshold = args['autoDeployLoadThreshold'] @auto_deploy_confidence_threshold = args['autoDeployConfidenceThreshold'] @auto_deploy_impacted_baseline_threshold = args['autoDeployImpactedBaselineThreshold'] @auto_deploy_expiration_sec = args['autoDeployExpirationSec'] @detection_load_threshold = args['detectionLoadThreshold'] @detection_absolute_qps = args['detectionAbsoluteQps'] @detection_relative_to_baseline_qps = args['detectionRelativeToBaselineQps'] @traffic_granularity_configs = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigsTrafficGranularityConfigsArray.parse(args['trafficGranularityConfigs'], to_s) end def to_s "#{@parent_identifier} RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigs" end end class RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_advanced_options_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config' module GoogleInSpec module Compute module Property class RegionSecurityPolicyAdvancedOptionsConfig attr_reader :json_parsing attr_reader :json_custom_config attr_reader :log_level attr_reader :user_ip_request_headers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @json_parsing = args['jsonParsing'] @json_custom_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdvancedOptionsConfigJsonCustomConfig.new(args['jsonCustomConfig'], to_s) @log_level = args['logLevel'] @user_ip_request_headers = args['userIpRequestHeaders'] end def to_s "#{@parent_identifier} RegionSecurityPolicyAdvancedOptionsConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyAdvancedOptionsConfigJsonCustomConfig attr_reader :content_types def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @content_types = args['contentTypes'] end def to_s "#{@parent_identifier} RegionSecurityPolicyAdvancedOptionsConfigJsonCustomConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_apclddctctg_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigsTrafficGranularityConfigs attr_reader :type attr_reader :value attr_reader :enable_each_unique_value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @value = args['value'] @enable_each_unique_value = args['enableEachUniqueValue'] end def to_s "#{@parent_identifier} RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigsTrafficGranularityConfigs" end end class RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigsTrafficGranularityConfigsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigsTrafficGranularityConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigsTrafficGranularityConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_associations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyAssociations attr_reader :name attr_reader :attachment_id attr_reader :security_policy_id attr_reader :display_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @attachment_id = args['attachmentId'] @security_policy_id = args['securityPolicyId'] @display_name = args['displayName'] end def to_s "#{@parent_identifier} RegionSecurityPolicyAssociations" end end class RegionSecurityPolicyAssociationsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyAssociations.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyAssociations.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_cloud_armor_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyCloudArmorConfig attr_reader :enable_ml def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_ml = args['enableMl'] end def to_s "#{@parent_identifier} RegionSecurityPolicyCloudArmorConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_ddos_protection_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyDdosProtectionConfig attr_reader :ddos_protection def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ddos_protection = args['ddosProtection'] end def to_s "#{@parent_identifier} RegionSecurityPolicyDdosProtectionConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} RegionSecurityPolicyLabels" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_recaptcha_options_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRecaptchaOptionsConfig attr_reader :redirect_site_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @redirect_site_key = args['redirectSiteKey'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRecaptchaOptionsConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_rules_header_action' require 'google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds' require 'google/compute/property/regionsecuritypolicy_rules_match' require 'google/compute/property/regionsecuritypolicy_rules_match_config' require 'google/compute/property/regionsecuritypolicy_rules_match_config_dest_ports' require 'google/compute/property/regionsecuritypolicy_rules_match_config_layer4_configs' require 'google/compute/property/regionsecuritypolicy_rules_match_expr' require 'google/compute/property/regionsecuritypolicy_rules_match_expr_options' require 'google/compute/property/regionsecuritypolicy_rules_match_expr_options_recaptcha_options' require 'google/compute/property/regionsecuritypolicy_rules_network_match' require 'google/compute/property/regionsecuritypolicy_rules_network_match_user_defined_fields' require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config' require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions' require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options' require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold' require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs' require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_action_rpc_status' require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options' require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold' require 'google/compute/property/regionsecuritypolicy_rules_redirect_options' module GoogleInSpec module Compute module Property class RegionSecurityPolicyRules attr_reader :kind attr_reader :description attr_reader :priority attr_reader :match attr_reader :network_match attr_reader :action attr_reader :preview attr_reader :direction attr_reader :target_resources attr_reader :enable_logging attr_reader :rule_tuple_count attr_reader :rate_limit_options attr_reader :target_service_accounts attr_reader :rule_number attr_reader :redirect_target attr_reader :header_action attr_reader :redirect_options attr_reader :rule_managed_protection_tier attr_reader :preconfigured_waf_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @description = args['description'] @priority = args['priority'] @match = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatch.new(args['match'], to_s) @network_match = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesNetworkMatch.new(args['networkMatch'], to_s) @action = args['action'] @preview = args['preview'] @direction = args['direction'] @target_resources = args['targetResources'] @enable_logging = args['enableLogging'] @rule_tuple_count = args['ruleTupleCount'] @rate_limit_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptions.new(args['rateLimitOptions'], to_s) @target_service_accounts = args['targetServiceAccounts'] @rule_number = args['ruleNumber'] @redirect_target = args['redirectTarget'] @header_action = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesHeaderAction.new(args['headerAction'], to_s) @redirect_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRedirectOptions.new(args['redirectOptions'], to_s) @rule_managed_protection_tier = args['ruleManagedProtectionTier'] @preconfigured_waf_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfig.new(args['preconfiguredWafConfig'], to_s) end def to_s "#{@parent_identifier} RegionSecurityPolicyRules" end end class RegionSecurityPolicyRulesArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds' module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesHeaderAction attr_reader :request_headers_to_adds def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_adds = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesHeaderActionRequestHeadersToAddsArray.parse(args['requestHeadersToAdds'], to_s) end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesHeaderActionRequestHeadersToAdds attr_reader :header_name attr_reader :header_value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesHeaderActionRequestHeadersToAdds" end end class RegionSecurityPolicyRulesHeaderActionRequestHeadersToAddsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRulesHeaderActionRequestHeadersToAdds.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRulesHeaderActionRequestHeadersToAdds.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_match.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_rules_match_config' require 'google/compute/property/regionsecuritypolicy_rules_match_config_dest_ports' require 'google/compute/property/regionsecuritypolicy_rules_match_config_layer4_configs' require 'google/compute/property/regionsecuritypolicy_rules_match_expr' require 'google/compute/property/regionsecuritypolicy_rules_match_expr_options' require 'google/compute/property/regionsecuritypolicy_rules_match_expr_options_recaptcha_options' module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesMatch attr_reader :expr attr_reader :expr_options attr_reader :versioned_expr attr_reader :config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @expr = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatchExpr.new(args['expr'], to_s) @expr_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatchExprOptions.new(args['exprOptions'], to_s) @versioned_expr = args['versionedExpr'] @config = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatchConfig.new(args['config'], to_s) end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesMatch" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_match_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_rules_match_config_dest_ports' require 'google/compute/property/regionsecuritypolicy_rules_match_config_layer4_configs' module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesMatchConfig attr_reader :src_ip_ranges attr_reader :dest_ip_ranges attr_reader :dest_ports attr_reader :layer4_configs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @src_ip_ranges = args['srcIpRanges'] @dest_ip_ranges = args['destIpRanges'] @dest_ports = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatchConfigDestPortsArray.parse(args['destPorts'], to_s) @layer4_configs = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatchConfigLayer4ConfigsArray.parse(args['layer4Configs'], to_s) end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesMatchConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_match_config_dest_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesMatchConfigDestPorts attr_reader :ip_protocol attr_reader :ports def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_protocol = args['ipProtocol'] @ports = args['ports'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesMatchConfigDestPorts" end end class RegionSecurityPolicyRulesMatchConfigDestPortsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRulesMatchConfigDestPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRulesMatchConfigDestPorts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_match_config_layer4_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesMatchConfigLayer4Configs attr_reader :ip_protocol attr_reader :ports def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_protocol = args['ipProtocol'] @ports = args['ports'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesMatchConfigLayer4Configs" end end class RegionSecurityPolicyRulesMatchConfigLayer4ConfigsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRulesMatchConfigLayer4Configs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRulesMatchConfigLayer4Configs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_match_expr.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesMatchExpr attr_reader :expression attr_reader :title attr_reader :description attr_reader :location def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @expression = args['expression'] @title = args['title'] @description = args['description'] @location = args['location'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesMatchExpr" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_match_expr_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_rules_match_expr_options_recaptcha_options' module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesMatchExprOptions attr_reader :recaptcha_options def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @recaptcha_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatchExprOptionsRecaptchaOptions.new(args['recaptchaOptions'], to_s) end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesMatchExprOptions" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_match_expr_options_recaptcha_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesMatchExprOptionsRecaptchaOptions attr_reader :action_token_site_keys attr_reader :session_token_site_keys def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @action_token_site_keys = args['actionTokenSiteKeys'] @session_token_site_keys = args['sessionTokenSiteKeys'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesMatchExprOptionsRecaptchaOptions" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_network_match.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_rules_network_match_user_defined_fields' module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesNetworkMatch attr_reader :user_defined_fields attr_reader :src_ip_ranges attr_reader :dest_ip_ranges attr_reader :ip_protocols attr_reader :src_ports attr_reader :dest_ports attr_reader :src_region_codes attr_reader :src_asns def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @user_defined_fields = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsArray.parse(args['userDefinedFields'], to_s) @src_ip_ranges = args['srcIpRanges'] @dest_ip_ranges = args['destIpRanges'] @ip_protocols = args['ipProtocols'] @src_ports = args['srcPorts'] @dest_ports = args['destPorts'] @src_region_codes = args['srcRegionCodes'] @src_asns = args['srcAsns'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesNetworkMatch" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_network_match_user_defined_fields.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesNetworkMatchUserDefinedFields attr_reader :name attr_reader :values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @values = args['values'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesNetworkMatchUserDefinedFields" end end class RegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRulesNetworkMatchUserDefinedFields.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRulesNetworkMatchUserDefinedFields.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions' module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesPreconfiguredWafConfig attr_reader :exclusions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @exclusions = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsArray.parse(args['exclusions'], to_s) end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesPreconfiguredWafConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_cookies_to_exclude' require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_headers_to_exclude' require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_query_params_to_exclude' require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_uris_to_exclude' module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusions attr_reader :target_rule_set attr_reader :target_rule_ids attr_reader :request_headers_to_exclude attr_reader :request_cookies_to_exclude attr_reader :request_query_params_to_exclude attr_reader :request_uris_to_exclude def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @target_rule_set = args['targetRuleSet'] @target_rule_ids = args['targetRuleIds'] @request_headers_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestHeadersToExcludeArray.parse(args['requestHeadersToExclude'], to_s) @request_cookies_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestCookiesToExcludeArray.parse(args['requestCookiesToExclude'], to_s) @request_query_params_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestQueryParamsToExcludeArray.parse(args['requestQueryParamsToExclude'], to_s) @request_uris_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestUrisToExcludeArray.parse(args['requestUrisToExclude'], to_s) end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesPreconfiguredWafConfigExclusions" end end class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRulesPreconfiguredWafConfigExclusions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRulesPreconfiguredWafConfigExclusions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_cookies_to_exclude.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestCookiesToExclude attr_reader :val attr_reader :op def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @val = args['val'] @op = args['op'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestCookiesToExclude" end end class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestCookiesToExcludeArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestCookiesToExclude.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestCookiesToExclude.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_headers_to_exclude.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestHeadersToExclude attr_reader :val attr_reader :op def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @val = args['val'] @op = args['op'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestHeadersToExclude" end end class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestHeadersToExcludeArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestHeadersToExclude.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestHeadersToExclude.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_query_params_to_exclude.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestQueryParamsToExclude attr_reader :val attr_reader :op def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @val = args['val'] @op = args['op'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestQueryParamsToExclude" end end class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestQueryParamsToExcludeArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestQueryParamsToExclude.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestQueryParamsToExclude.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_uris_to_exclude.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestUrisToExclude attr_reader :val attr_reader :op def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @val = args['val'] @op = args['op'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestUrisToExclude" end end class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestUrisToExcludeArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestUrisToExclude.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestUrisToExclude.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold' require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs' require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_action_rpc_status' require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options' require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold' module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesRateLimitOptions attr_reader :rate_limit_threshold attr_reader :conform_action attr_reader :exceed_action attr_reader :exceed_redirect_options attr_reader :exceed_action_rpc_status attr_reader :enforce_on_key attr_reader :enforce_on_key_name attr_reader :enforce_on_key_configs attr_reader :ban_threshold attr_reader :ban_duration_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @rate_limit_threshold = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsRateLimitThreshold.new(args['rateLimitThreshold'], to_s) @conform_action = args['conformAction'] @exceed_action = args['exceedAction'] @exceed_redirect_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsExceedRedirectOptions.new(args['exceedRedirectOptions'], to_s) @exceed_action_rpc_status = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsExceedActionRpcStatus.new(args['exceedActionRpcStatus'], to_s) @enforce_on_key = args['enforceOnKey'] @enforce_on_key_name = args['enforceOnKeyName'] @enforce_on_key_configs = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsArray.parse(args['enforceOnKeyConfigs'], to_s) @ban_threshold = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsBanThreshold.new(args['banThreshold'], to_s) @ban_duration_sec = args['banDurationSec'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesRateLimitOptions" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesRateLimitOptionsBanThreshold attr_reader :count attr_reader :interval_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @count = args['count'] @interval_sec = args['intervalSec'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesRateLimitOptionsBanThreshold" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigs attr_reader :enforce_on_key_type attr_reader :enforce_on_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enforce_on_key_type = args['enforceOnKeyType'] @enforce_on_key_name = args['enforceOnKeyName'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigs" end end class RegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_action_rpc_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesRateLimitOptionsExceedActionRpcStatus attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesRateLimitOptionsExceedActionRpcStatus" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesRateLimitOptionsExceedRedirectOptions attr_reader :type attr_reader :target def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @target = args['target'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesRateLimitOptionsExceedRedirectOptions" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesRateLimitOptionsRateLimitThreshold attr_reader :count attr_reader :interval_sec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @count = args['count'] @interval_sec = args['intervalSec'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesRateLimitOptionsRateLimitThreshold" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_rules_redirect_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyRulesRedirectOptions attr_reader :type attr_reader :target def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @target = args['target'] end def to_s "#{@parent_identifier} RegionSecurityPolicyRulesRedirectOptions" end end end end end ================================================ FILE: libraries/google/compute/property/regionsecuritypolicy_user_defined_fields.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSecurityPolicyUserDefinedFields attr_reader :name attr_reader :base attr_reader :offset attr_reader :size attr_reader :mask def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @base = args['base'] @offset = args['offset'] @size = args['size'] @mask = args['mask'] end def to_s "#{@parent_identifier} RegionSecurityPolicyUserDefinedFields" end end class RegionSecurityPolicyUserDefinedFieldsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSecurityPolicyUserDefinedFields.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSecurityPolicyUserDefinedFields.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tls_settings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_certificate_paths' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config_grpc_service_config' require 'google/compute/property/regionsslpolicy_tsptcccscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcccscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcccscgsccc_certificates' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config_grpc_service_config' require 'google/compute/property/regionsslpolicy_tsptcvcscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcvcscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcvcscgsccc_certificates' module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettings attr_reader :tls_mode attr_reader :proxy_tls_context attr_reader :subject_alt_names def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @tls_mode = args['tlsMode'] @proxy_tls_context = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContext.new(args['proxyTlsContext'], to_s) @subject_alt_names = args['subjectAltNames'] end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettings" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_certificate_paths' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config_grpc_service_config' require 'google/compute/property/regionsslpolicy_tsptcccscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcccscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcccscgsccc_certificates' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config_grpc_service_config' require 'google/compute/property/regionsslpolicy_tsptcvcscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcvcscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcvcscgsccc_certificates' module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContext attr_reader :certificate_context attr_reader :validation_context def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @certificate_context = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextCertificateContext.new(args['certificateContext'], to_s) @validation_context = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextValidationContext.new(args['validationContext'], to_s) end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContext" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_certificate_paths' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config_grpc_service_config' require 'google/compute/property/regionsslpolicy_tsptcccscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcccscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcccscgsccc_certificates' module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextCertificateContext attr_reader :certificate_source attr_reader :certificate_paths attr_reader :sds_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @certificate_source = args['certificateSource'] @certificate_paths = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextCertificatePaths.new(args['certificatePaths'], to_s) @sds_config = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfig.new(args['sdsConfig'], to_s) end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextCertificateContext" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_certificate_paths.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextCertificatePaths attr_reader :certificate_path attr_reader :private_key_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @certificate_path = args['certificatePath'] @private_key_path = args['privateKeyPath'] end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextCertificatePaths" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config_grpc_service_config' require 'google/compute/property/regionsslpolicy_tsptcccscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcccscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcccscgsccc_certificates' module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfig attr_reader :grpc_service_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @grpc_service_config = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfig.new(args['grpcServiceConfig'], to_s) end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config_grpc_service_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_tsptcccscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcccscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcccscgsccc_certificates' module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfig attr_reader :target_uri attr_reader :channel_credentials attr_reader :call_credentials def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @target_uri = args['targetUri'] @channel_credentials = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfigChannelCredentials.new(args['channelCredentials'], to_s) @call_credentials = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfigCallCredentials.new(args['callCredentials'], to_s) end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config_grpc_service_config' require 'google/compute/property/regionsslpolicy_tsptcvcscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcvcscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcvcscgsccc_certificates' module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextValidationContext attr_reader :validation_source attr_reader :certificate_path attr_reader :sds_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @validation_source = args['validationSource'] @certificate_path = args['certificatePath'] @sds_config = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfig.new(args['sdsConfig'], to_s) end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextValidationContext" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config_grpc_service_config' require 'google/compute/property/regionsslpolicy_tsptcvcscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcvcscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcvcscgsccc_certificates' module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfig attr_reader :grpc_service_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @grpc_service_config = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfig.new(args['grpcServiceConfig'], to_s) end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config_grpc_service_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_tsptcvcscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcvcscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcvcscgsccc_certificates' module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfig attr_reader :target_uri attr_reader :channel_credentials attr_reader :call_credentials def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @target_uri = args['targetUri'] @channel_credentials = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfigChannelCredentials.new(args['channelCredentials'], to_s) @call_credentials = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfigCallCredentials.new(args['callCredentials'], to_s) end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfig" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tsptcccscgscc_credentials.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_tsptcccscgsccc_certificates' module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfigChannelCredentials attr_reader :channel_credential_type attr_reader :certificates def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @channel_credential_type = args['channelCredentialType'] @certificates = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfigChannelCredentialsCertificates.new(args['certificates'], to_s) end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfigChannelCredentials" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tsptcccscgsccc_certificates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfigChannelCredentialsCertificates attr_reader :certificate_path attr_reader :private_key_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @certificate_path = args['certificatePath'] @private_key_path = args['privateKeyPath'] end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfigChannelCredentialsCertificates" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tsptcccscgscccf_plugin.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfigCallCredentialsFromPlugin attr_reader :name attr_reader :struct_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @struct_config = args['structConfig'] end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextCertificateContextSdsConfigGrpcServiceConfigCallCredentialsFromPlugin" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tsptcvcscgscc_credentials.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_tsptcvcscgsccc_certificates' module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfigChannelCredentials attr_reader :channel_credential_type attr_reader :certificates def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @channel_credential_type = args['channelCredentialType'] @certificates = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfigChannelCredentialsCertificates.new(args['certificates'], to_s) end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfigChannelCredentials" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tsptcvcscgsccc_certificates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfigChannelCredentialsCertificates attr_reader :certificate_path attr_reader :private_key_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @certificate_path = args['certificatePath'] @private_key_path = args['privateKeyPath'] end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfigChannelCredentialsCertificates" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_tsptcvcscgscccf_plugin.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfigCallCredentialsFromPlugin attr_reader :name attr_reader :struct_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @struct_config = args['structConfig'] end def to_s "#{@parent_identifier} RegionSslPolicyTlsSettingsProxyTlsContextValidationContextSdsConfigGrpcServiceConfigCallCredentialsFromPlugin" end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_warnings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionsslpolicy_warnings_data' module GoogleInSpec module Compute module Property class RegionSslPolicyWarnings attr_reader :code attr_reader :message attr_reader :data def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] @message = args['message'] @data = GoogleInSpec::Compute::Property::RegionSslPolicyWarningsDataArray.parse(args['data'], to_s) end def to_s "#{@parent_identifier} RegionSslPolicyWarnings" end end class RegionSslPolicyWarningsArray def self.parse(value, parent_identifier) return if value.nil? return RegionSslPolicyWarnings.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSslPolicyWarnings.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionsslpolicy_warnings_data.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionSslPolicyWarningsData attr_reader :key attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @value = args['value'] end def to_s "#{@parent_identifier} RegionSslPolicyWarningsData" end end class RegionSslPolicyWarningsDataArray def self.parse(value, parent_identifier) return if value.nil? return RegionSslPolicyWarningsData.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionSslPolicyWarningsData.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_custom_error_response_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_default_custom_error_response_policy_error_response_rules' module GoogleInSpec module Compute module Property class RegionUrlMapDefaultCustomErrorResponsePolicy attr_reader :error_response_rules attr_reader :error_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @error_response_rules = GoogleInSpec::Compute::Property::RegionUrlMapDefaultCustomErrorResponsePolicyErrorResponseRulesArray.parse(args['errorResponseRules'], to_s) @error_service = args['errorService'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultCustomErrorResponsePolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_custom_error_response_policy_error_response_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultCustomErrorResponsePolicyErrorResponseRules attr_reader :match_response_codes attr_reader :path attr_reader :override_response_code def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @match_response_codes = args['matchResponseCodes'] @path = args['path'] @override_response_code = args['overrideResponseCode'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultCustomErrorResponsePolicyErrorResponseRules" end end class RegionUrlMapDefaultCustomErrorResponsePolicyErrorResponseRulesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapDefaultCustomErrorResponsePolicyErrorResponseRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapDefaultCustomErrorResponsePolicyErrorResponseRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_default_route_action_cors_policy' require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy' require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/regionurlmap_default_route_action_max_stream_duration' require 'google/compute/property/regionurlmap_default_route_action_request_mirror_policy' require 'google/compute/property/regionurlmap_default_route_action_retry_policy' require 'google/compute/property/regionurlmap_default_route_action_retry_policy_per_try_timeout' require 'google/compute/property/regionurlmap_default_route_action_timeout' require 'google/compute/property/regionurlmap_default_route_action_url_rewrite' require 'google/compute/property/regionurlmap_default_route_action_weighted_backend_services' module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteAction attr_reader :weighted_backend_services attr_reader :url_rewrite attr_reader :timeout attr_reader :retry_policy attr_reader :request_mirror_policy attr_reader :cors_policy attr_reader :fault_injection_policy attr_reader :max_stream_duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @weighted_backend_services = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionWeightedBackendServicesArray.parse(args['weightedBackendServices'], to_s) @url_rewrite = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionUrlRewrite.new(args['urlRewrite'], to_s) @timeout = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionTimeout.new(args['timeout'], to_s) @retry_policy = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionRetryPolicy.new(args['retryPolicy'], to_s) @request_mirror_policy = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) @cors_policy = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionCorsPolicy.new(args['corsPolicy'], to_s) @fault_injection_policy = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) @max_stream_duration = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionMaxStreamDuration.new(args['maxStreamDuration'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_cors_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionCorsPolicy attr_reader :allow_origins attr_reader :allow_origin_regexes attr_reader :allow_methods attr_reader :allow_headers attr_reader :expose_headers attr_reader :max_age attr_reader :allow_credentials attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allow_origins = args['allowOrigins'] @allow_origin_regexes = args['allowOriginRegexes'] @allow_methods = args['allowMethods'] @allow_headers = args['allowHeaders'] @expose_headers = args['exposeHeaders'] @max_age = args['maxAge'] @allow_credentials = args['allowCredentials'] @disabled = args['disabled'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionCorsPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_fault_injection_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionFaultInjectionPolicy attr_reader :delay attr_reader :abort def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @delay = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionFaultInjectionPolicyDelay.new(args['delay'], to_s) @abort = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionFaultInjectionPolicyAbort.new(args['abort'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionFaultInjectionPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_fault_injection_policy_abort.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionFaultInjectionPolicyAbort attr_reader :http_status attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_status = args['httpStatus'] @percentage = args['percentage'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionFaultInjectionPolicyAbort" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_fault_injection_policy_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionFaultInjectionPolicyDelay attr_reader :fixed_delay attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed_delay = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionFaultInjectionPolicyDelayFixedDelay.new(args['fixedDelay'], to_s) @percentage = args['percentage'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionFaultInjectionPolicyDelay" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_fault_injection_policy_delay_fixed_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionFaultInjectionPolicyDelayFixedDelay attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionFaultInjectionPolicyDelayFixedDelay" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_max_stream_duration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionMaxStreamDuration attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionMaxStreamDuration" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_request_mirror_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionRequestMirrorPolicy attr_reader :backend_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionRequestMirrorPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_retry_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_default_route_action_retry_policy_per_try_timeout' module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionRetryPolicy attr_reader :retry_conditions attr_reader :num_retries attr_reader :per_try_timeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @retry_conditions = args['retryConditions'] @num_retries = args['numRetries'] @per_try_timeout = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionRetryPolicyPerTryTimeout.new(args['perTryTimeout'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionRetryPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_retry_policy_per_try_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionRetryPolicyPerTryTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionRetryPolicyPerTryTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_url_rewrite.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionUrlRewrite attr_reader :path_prefix_rewrite attr_reader :host_rewrite attr_reader :path_template_rewrite def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_prefix_rewrite = args['pathPrefixRewrite'] @host_rewrite = args['hostRewrite'] @path_template_rewrite = args['pathTemplateRewrite'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionUrlRewrite" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_weighted_backend_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_default_route_action_weighted_backend_services_header_action' require 'google/compute/property/regionurlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add' require 'google/compute/property/regionurlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add' module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionWeightedBackendServices attr_reader :backend_service attr_reader :weight attr_reader :header_action def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] @weight = args['weight'] @header_action = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderAction.new(args['headerAction'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionWeightedBackendServices" end end class RegionUrlMapDefaultRouteActionWeightedBackendServicesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapDefaultRouteActionWeightedBackendServices.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapDefaultRouteActionWeightedBackendServices.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_weighted_backend_services_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add' require 'google/compute/property/regionurlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add' module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderAction attr_reader :request_headers_to_remove attr_reader :request_headers_to_add attr_reader :response_headers_to_remove attr_reader :response_headers_to_add def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_remove = args['requestHeadersToRemove'] @request_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) @response_headers_to_remove = args['responseHeadersToRemove'] @response_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd" end end class RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd" end end class RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_default_url_redirect.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapDefaultUrlRedirect attr_reader :host_redirect attr_reader :path_redirect attr_reader :prefix_redirect attr_reader :redirect_response_code attr_reader :https_redirect attr_reader :strip_query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host_redirect = args['hostRedirect'] @path_redirect = args['pathRedirect'] @prefix_redirect = args['prefixRedirect'] @redirect_response_code = args['redirectResponseCode'] @https_redirect = args['httpsRedirect'] @strip_query = args['stripQuery'] end def to_s "#{@parent_identifier} RegionUrlMapDefaultUrlRedirect" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_header_action_request_headers_to_add' require 'google/compute/property/regionurlmap_header_action_response_headers_to_add' module GoogleInSpec module Compute module Property class RegionUrlMapHeaderAction attr_reader :request_headers_to_remove attr_reader :request_headers_to_add attr_reader :response_headers_to_remove attr_reader :response_headers_to_add def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_remove = args['requestHeadersToRemove'] @request_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) @response_headers_to_remove = args['responseHeadersToRemove'] @response_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_header_action_request_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapHeaderActionRequestHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapHeaderActionRequestHeadersToAdd" end end class RegionUrlMapHeaderActionRequestHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_header_action_response_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapHeaderActionResponseHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapHeaderActionResponseHeadersToAdd" end end class RegionUrlMapHeaderActionResponseHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_host_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapHostRules attr_reader :description attr_reader :hosts attr_reader :path_matcher def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @description = args['description'] @hosts = args['hosts'] @path_matcher = args['pathMatcher'] end def to_s "#{@parent_identifier} RegionUrlMapHostRules" end end class RegionUrlMapHostRulesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapHostRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapHostRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_default_custom_error_response_policy' require 'google/compute/property/regionurlmap_path_matchers_default_custom_error_response_policy_error_response_rules' require 'google/compute/property/regionurlmap_path_matchers_default_route_action' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_cors_policy' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_max_stream_duration' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_request_mirror_policy' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_retry_policy' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_retry_policy_per_try_timeout' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_timeout' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_url_rewrite' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_weighted_backend_services' require 'google/compute/property/regionurlmap_path_matchers_default_url_redirect' require 'google/compute/property/regionurlmap_path_matchers_header_action' require 'google/compute/property/regionurlmap_path_matchers_header_action_request_headers_to_add' require 'google/compute/property/regionurlmap_path_matchers_header_action_response_headers_to_add' require 'google/compute/property/regionurlmap_path_matchers_path_rules' require 'google/compute/property/regionurlmap_path_matchers_route_rules' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchers attr_reader :name attr_reader :description attr_reader :default_service attr_reader :default_route_action attr_reader :default_url_redirect attr_reader :path_rules attr_reader :route_rules attr_reader :header_action attr_reader :default_custom_error_response_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @description = args['description'] @default_service = args['defaultService'] @default_route_action = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteAction.new(args['defaultRouteAction'], to_s) @default_url_redirect = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultUrlRedirect.new(args['defaultUrlRedirect'], to_s) @path_rules = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesArray.parse(args['pathRules'], to_s) @route_rules = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesArray.parse(args['routeRules'], to_s) @header_action = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersHeaderAction.new(args['headerAction'], to_s) @default_custom_error_response_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultCustomErrorResponsePolicy.new(args['defaultCustomErrorResponsePolicy'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchers" end end class RegionUrlMapPathMatchersArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchers.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchers.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_custom_error_response_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_default_custom_error_response_policy_error_response_rules' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultCustomErrorResponsePolicy attr_reader :error_response_rules attr_reader :error_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @error_response_rules = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultCustomErrorResponsePolicyErrorResponseRulesArray.parse(args['errorResponseRules'], to_s) @error_service = args['errorService'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultCustomErrorResponsePolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_custom_error_response_policy_error_response_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultCustomErrorResponsePolicyErrorResponseRules attr_reader :match_response_codes attr_reader :path attr_reader :override_response_code def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @match_response_codes = args['matchResponseCodes'] @path = args['path'] @override_response_code = args['overrideResponseCode'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultCustomErrorResponsePolicyErrorResponseRules" end end class RegionUrlMapPathMatchersDefaultCustomErrorResponsePolicyErrorResponseRulesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersDefaultCustomErrorResponsePolicyErrorResponseRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersDefaultCustomErrorResponsePolicyErrorResponseRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_default_route_action_cors_policy' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_max_stream_duration' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_request_mirror_policy' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_retry_policy' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_retry_policy_per_try_timeout' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_timeout' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_url_rewrite' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_weighted_backend_services' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteAction attr_reader :weighted_backend_services attr_reader :url_rewrite attr_reader :timeout attr_reader :retry_policy attr_reader :request_mirror_policy attr_reader :cors_policy attr_reader :fault_injection_policy attr_reader :max_stream_duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @weighted_backend_services = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesArray.parse(args['weightedBackendServices'], to_s) @url_rewrite = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionUrlRewrite.new(args['urlRewrite'], to_s) @timeout = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionTimeout.new(args['timeout'], to_s) @retry_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionRetryPolicy.new(args['retryPolicy'], to_s) @request_mirror_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) @cors_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionCorsPolicy.new(args['corsPolicy'], to_s) @fault_injection_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) @max_stream_duration = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionMaxStreamDuration.new(args['maxStreamDuration'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_cors_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionCorsPolicy attr_reader :allow_origins attr_reader :allow_origin_regexes attr_reader :allow_methods attr_reader :allow_headers attr_reader :expose_headers attr_reader :max_age attr_reader :allow_credentials attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allow_origins = args['allowOrigins'] @allow_origin_regexes = args['allowOriginRegexes'] @allow_methods = args['allowMethods'] @allow_headers = args['allowHeaders'] @expose_headers = args['exposeHeaders'] @max_age = args['maxAge'] @allow_credentials = args['allowCredentials'] @disabled = args['disabled'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionCorsPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicy attr_reader :delay attr_reader :abort def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @delay = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelay.new(args['delay'], to_s) @abort = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyAbort.new(args['abort'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_abort.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyAbort attr_reader :http_status attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_status = args['httpStatus'] @percentage = args['percentage'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyAbort" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelay attr_reader :fixed_delay attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed_delay = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelayFixedDelay.new(args['fixedDelay'], to_s) @percentage = args['percentage'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelay" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelayFixedDelay attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelayFixedDelay" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_max_stream_duration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionMaxStreamDuration attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionMaxStreamDuration" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_request_mirror_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionRequestMirrorPolicy attr_reader :backend_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionRequestMirrorPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_retry_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_default_route_action_retry_policy_per_try_timeout' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionRetryPolicy attr_reader :retry_conditions attr_reader :num_retries attr_reader :per_try_timeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @retry_conditions = args['retryConditions'] @num_retries = args['numRetries'] @per_try_timeout = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionRetryPolicyPerTryTimeout.new(args['perTryTimeout'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionRetryPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_retry_policy_per_try_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionRetryPolicyPerTryTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionRetryPolicyPerTryTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_url_rewrite.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionUrlRewrite attr_reader :path_prefix_rewrite attr_reader :host_rewrite attr_reader :path_template_rewrite def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_prefix_rewrite = args['pathPrefixRewrite'] @host_rewrite = args['hostRewrite'] @path_template_rewrite = args['pathTemplateRewrite'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionUrlRewrite" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_weighted_backend_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_default_route_action_weighted_backend_services_header_action' require 'google/compute/property/regionurlmap_pmdrawbsharht_add' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServices attr_reader :backend_service attr_reader :weight attr_reader :header_action def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] @weight = args['weight'] @header_action = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesHeaderAction.new(args['headerAction'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServices" end end class RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServices.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServices.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_route_action_weighted_backend_services_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_pmdrawbsharht_add' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesHeaderAction attr_reader :request_headers_to_remove attr_reader :request_headers_to_add attr_reader :response_headers_to_remove attr_reader :response_headers_to_add def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_remove = args['requestHeadersToRemove'] @request_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) @response_headers_to_remove = args['responseHeadersToRemove'] @response_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_default_url_redirect.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultUrlRedirect attr_reader :host_redirect attr_reader :path_redirect attr_reader :prefix_redirect attr_reader :redirect_response_code attr_reader :https_redirect attr_reader :strip_query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host_redirect = args['hostRedirect'] @path_redirect = args['pathRedirect'] @prefix_redirect = args['prefixRedirect'] @redirect_response_code = args['redirectResponseCode'] @https_redirect = args['httpsRedirect'] @strip_query = args['stripQuery'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultUrlRedirect" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_header_action_request_headers_to_add' require 'google/compute/property/regionurlmap_path_matchers_header_action_response_headers_to_add' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersHeaderAction attr_reader :request_headers_to_remove attr_reader :request_headers_to_add attr_reader :response_headers_to_remove attr_reader :response_headers_to_add def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_remove = args['requestHeadersToRemove'] @request_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) @response_headers_to_remove = args['responseHeadersToRemove'] @response_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_header_action_request_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersHeaderActionRequestHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersHeaderActionRequestHeadersToAdd" end end class RegionUrlMapPathMatchersHeaderActionRequestHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_header_action_response_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersHeaderActionResponseHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersHeaderActionResponseHeadersToAdd" end end class RegionUrlMapPathMatchersHeaderActionResponseHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_path_rules_custom_error_response_policy' require 'google/compute/property/regionurlmap_path_matchers_path_rules_custom_error_response_policy_error_response_rules' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_cors_policy' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_max_stream_duration' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_request_mirror_policy' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_retry_policy' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_timeout' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_url_rewrite' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_weighted_backend_services' require 'google/compute/property/regionurlmap_path_matchers_path_rules_url_redirect' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRules attr_reader :service attr_reader :route_action attr_reader :url_redirect attr_reader :paths attr_reader :custom_error_response_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service = args['service'] @route_action = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteAction.new(args['routeAction'], to_s) @url_redirect = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesUrlRedirect.new(args['urlRedirect'], to_s) @paths = args['paths'] @custom_error_response_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesCustomErrorResponsePolicy.new(args['customErrorResponsePolicy'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRules" end end class RegionUrlMapPathMatchersPathRulesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersPathRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersPathRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_custom_error_response_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_path_rules_custom_error_response_policy_error_response_rules' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesCustomErrorResponsePolicy attr_reader :error_response_rules attr_reader :error_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @error_response_rules = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesCustomErrorResponsePolicyErrorResponseRulesArray.parse(args['errorResponseRules'], to_s) @error_service = args['errorService'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesCustomErrorResponsePolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_custom_error_response_policy_error_response_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesCustomErrorResponsePolicyErrorResponseRules attr_reader :match_response_codes attr_reader :path attr_reader :override_response_code def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @match_response_codes = args['matchResponseCodes'] @path = args['path'] @override_response_code = args['overrideResponseCode'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesCustomErrorResponsePolicyErrorResponseRules" end end class RegionUrlMapPathMatchersPathRulesCustomErrorResponsePolicyErrorResponseRulesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersPathRulesCustomErrorResponsePolicyErrorResponseRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersPathRulesCustomErrorResponsePolicyErrorResponseRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_cors_policy' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_max_stream_duration' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_request_mirror_policy' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_retry_policy' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_timeout' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_url_rewrite' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_weighted_backend_services' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteAction attr_reader :weighted_backend_services attr_reader :url_rewrite attr_reader :timeout attr_reader :retry_policy attr_reader :request_mirror_policy attr_reader :cors_policy attr_reader :fault_injection_policy attr_reader :max_stream_duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @weighted_backend_services = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesArray.parse(args['weightedBackendServices'], to_s) @url_rewrite = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionUrlRewrite.new(args['urlRewrite'], to_s) @timeout = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionTimeout.new(args['timeout'], to_s) @retry_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionRetryPolicy.new(args['retryPolicy'], to_s) @request_mirror_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) @cors_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionCorsPolicy.new(args['corsPolicy'], to_s) @fault_injection_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) @max_stream_duration = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionMaxStreamDuration.new(args['maxStreamDuration'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_cors_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionCorsPolicy attr_reader :allow_origins attr_reader :allow_origin_regexes attr_reader :allow_methods attr_reader :allow_headers attr_reader :expose_headers attr_reader :max_age attr_reader :allow_credentials attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allow_origins = args['allowOrigins'] @allow_origin_regexes = args['allowOriginRegexes'] @allow_methods = args['allowMethods'] @allow_headers = args['allowHeaders'] @expose_headers = args['exposeHeaders'] @max_age = args['maxAge'] @allow_credentials = args['allowCredentials'] @disabled = args['disabled'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionCorsPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicy attr_reader :delay attr_reader :abort def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @delay = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelay.new(args['delay'], to_s) @abort = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyAbort.new(args['abort'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyAbort attr_reader :http_status attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_status = args['httpStatus'] @percentage = args['percentage'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyAbort" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelay attr_reader :fixed_delay attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed_delay = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelayFixedDelay.new(args['fixedDelay'], to_s) @percentage = args['percentage'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelay" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelayFixedDelay attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelayFixedDelay" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_max_stream_duration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionMaxStreamDuration attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionMaxStreamDuration" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_request_mirror_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionRequestMirrorPolicy attr_reader :backend_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionRequestMirrorPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_retry_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionRetryPolicy attr_reader :retry_conditions attr_reader :num_retries attr_reader :per_try_timeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @retry_conditions = args['retryConditions'] @num_retries = args['numRetries'] @per_try_timeout = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionRetryPolicyPerTryTimeout.new(args['perTryTimeout'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionRetryPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionRetryPolicyPerTryTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionRetryPolicyPerTryTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_url_rewrite.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionUrlRewrite attr_reader :path_prefix_rewrite attr_reader :host_rewrite attr_reader :path_template_rewrite def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_prefix_rewrite = args['pathPrefixRewrite'] @host_rewrite = args['hostRewrite'] @path_template_rewrite = args['pathTemplateRewrite'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionUrlRewrite" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_weighted_backend_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action' require 'google/compute/property/regionurlmap_pmprrawbsharht_add' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServices attr_reader :backend_service attr_reader :weight attr_reader :header_action def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] @weight = args['weight'] @header_action = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderAction.new(args['headerAction'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServices" end end class RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServices.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServices.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_pmprrawbsharht_add' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderAction attr_reader :request_headers_to_remove attr_reader :request_headers_to_add attr_reader :response_headers_to_remove attr_reader :response_headers_to_add def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_remove = args['requestHeadersToRemove'] @request_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) @response_headers_to_remove = args['responseHeadersToRemove'] @response_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_path_rules_url_redirect.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesUrlRedirect attr_reader :host_redirect attr_reader :path_redirect attr_reader :prefix_redirect attr_reader :redirect_response_code attr_reader :https_redirect attr_reader :strip_query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host_redirect = args['hostRedirect'] @path_redirect = args['pathRedirect'] @prefix_redirect = args['prefixRedirect'] @redirect_response_code = args['redirectResponseCode'] @https_redirect = args['httpsRedirect'] @strip_query = args['stripQuery'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesUrlRedirect" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_custom_error_response_policy' require 'google/compute/property/regionurlmap_path_matchers_route_rules_custom_error_response_policy_error_response_rules' require 'google/compute/property/regionurlmap_path_matchers_route_rules_header_action' require 'google/compute/property/regionurlmap_path_matchers_route_rules_header_action_request_headers_to_add' require 'google/compute/property/regionurlmap_path_matchers_route_rules_header_action_response_headers_to_add' require 'google/compute/property/regionurlmap_path_matchers_route_rules_http_filter_configs' require 'google/compute/property/regionurlmap_path_matchers_route_rules_http_filter_metadata' require 'google/compute/property/regionurlmap_path_matchers_route_rules_match_rules' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_cors_policy' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_max_stream_duration' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_request_mirror_policy' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_retry_policy' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_timeout' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_url_rewrite' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_weighted_backend_services' require 'google/compute/property/regionurlmap_path_matchers_route_rules_url_redirect' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRules attr_reader :priority attr_reader :description attr_reader :match_rules attr_reader :service attr_reader :route_action attr_reader :url_redirect attr_reader :header_action attr_reader :http_filter_configs attr_reader :http_filter_metadata attr_reader :custom_error_response_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @priority = args['priority'] @description = args['description'] @match_rules = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesMatchRulesArray.parse(args['matchRules'], to_s) @service = args['service'] @route_action = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteAction.new(args['routeAction'], to_s) @url_redirect = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesUrlRedirect.new(args['urlRedirect'], to_s) @header_action = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesHeaderAction.new(args['headerAction'], to_s) @http_filter_configs = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesHttpFilterConfigsArray.parse(args['httpFilterConfigs'], to_s) @http_filter_metadata = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesHttpFilterMetadataArray.parse(args['httpFilterMetadata'], to_s) @custom_error_response_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesCustomErrorResponsePolicy.new(args['customErrorResponsePolicy'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRules" end end class RegionUrlMapPathMatchersRouteRulesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_custom_error_response_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_custom_error_response_policy_error_response_rules' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesCustomErrorResponsePolicy attr_reader :error_response_rules attr_reader :error_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @error_response_rules = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesCustomErrorResponsePolicyErrorResponseRulesArray.parse(args['errorResponseRules'], to_s) @error_service = args['errorService'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesCustomErrorResponsePolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_custom_error_response_policy_error_response_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesCustomErrorResponsePolicyErrorResponseRules attr_reader :match_response_codes attr_reader :path attr_reader :override_response_code def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @match_response_codes = args['matchResponseCodes'] @path = args['path'] @override_response_code = args['overrideResponseCode'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesCustomErrorResponsePolicyErrorResponseRules" end end class RegionUrlMapPathMatchersRouteRulesCustomErrorResponsePolicyErrorResponseRulesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesCustomErrorResponsePolicyErrorResponseRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesCustomErrorResponsePolicyErrorResponseRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_header_action_request_headers_to_add' require 'google/compute/property/regionurlmap_path_matchers_route_rules_header_action_response_headers_to_add' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesHeaderAction attr_reader :request_headers_to_remove attr_reader :request_headers_to_add attr_reader :response_headers_to_remove attr_reader :response_headers_to_add def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_remove = args['requestHeadersToRemove'] @request_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) @response_headers_to_remove = args['responseHeadersToRemove'] @response_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_header_action_request_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAdd" end end class RegionUrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_header_action_response_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAdd" end end class RegionUrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_http_filter_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesHttpFilterConfigs attr_reader :filter_name attr_reader :config_type_url attr_reader :config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @filter_name = args['filterName'] @config_type_url = args['configTypeUrl'] @config = args['config'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesHttpFilterConfigs" end end class RegionUrlMapPathMatchersRouteRulesHttpFilterConfigsArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesHttpFilterConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesHttpFilterConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_http_filter_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesHttpFilterMetadata attr_reader :filter_name attr_reader :config_type_url attr_reader :config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @filter_name = args['filterName'] @config_type_url = args['configTypeUrl'] @config = args['config'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesHttpFilterMetadata" end end class RegionUrlMapPathMatchersRouteRulesHttpFilterMetadataArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesHttpFilterMetadata.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesHttpFilterMetadata.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_match_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_match_rules_header_matches' require 'google/compute/property/regionurlmap_path_matchers_route_rules_match_rules_metadata_filters' require 'google/compute/property/regionurlmap_path_matchers_route_rules_match_rules_query_parameter_matches' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesMatchRules attr_reader :prefix_match attr_reader :full_path_match attr_reader :regex_match attr_reader :ignore_case attr_reader :header_matches attr_reader :query_parameter_matches attr_reader :metadata_filters attr_reader :path_template_match def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @prefix_match = args['prefixMatch'] @full_path_match = args['fullPathMatch'] @regex_match = args['regexMatch'] @ignore_case = args['ignoreCase'] @header_matches = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesMatchRulesHeaderMatchesArray.parse(args['headerMatches'], to_s) @query_parameter_matches = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatchesArray.parse(args['queryParameterMatches'], to_s) @metadata_filters = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersArray.parse(args['metadataFilters'], to_s) @path_template_match = args['pathTemplateMatch'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesMatchRules" end end class RegionUrlMapPathMatchersRouteRulesMatchRulesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesMatchRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesMatchRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_match_rules_header_matches.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_match_rules_header_matches_range_match' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesMatchRulesHeaderMatches attr_reader :header_name attr_reader :exact_match attr_reader :regex_match attr_reader :range_match attr_reader :present_match attr_reader :prefix_match attr_reader :suffix_match attr_reader :invert_match def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @exact_match = args['exactMatch'] @regex_match = args['regexMatch'] @range_match = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesMatchRulesHeaderMatchesRangeMatch.new(args['rangeMatch'], to_s) @present_match = args['presentMatch'] @prefix_match = args['prefixMatch'] @suffix_match = args['suffixMatch'] @invert_match = args['invertMatch'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesMatchRulesHeaderMatches" end end class RegionUrlMapPathMatchersRouteRulesMatchRulesHeaderMatchesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesMatchRulesHeaderMatches.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesMatchRulesHeaderMatches.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_match_rules_header_matches_range_match.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesMatchRulesHeaderMatchesRangeMatch attr_reader :range_start attr_reader :range_end def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @range_start = args['rangeStart'] @range_end = args['rangeEnd'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesMatchRulesHeaderMatchesRangeMatch" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_match_rules_metadata_filters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_match_rules_metadata_filters_filter_labels' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFilters attr_reader :filter_match_criteria attr_reader :filter_labels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @filter_match_criteria = args['filterMatchCriteria'] @filter_labels = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabelsArray.parse(args['filterLabels'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFilters" end end class RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFilters.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFilters.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_match_rules_metadata_filters_filter_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabels attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabels" end end class RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabelsArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabels.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabels.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_match_rules_query_parameter_matches.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatches attr_reader :name attr_reader :present_match attr_reader :exact_match attr_reader :regex_match def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @present_match = args['presentMatch'] @exact_match = args['exactMatch'] @regex_match = args['regexMatch'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatches" end end class RegionUrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatchesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatches.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatches.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_cors_policy' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_max_stream_duration' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_request_mirror_policy' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_retry_policy' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_timeout' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_url_rewrite' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_weighted_backend_services' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteAction attr_reader :weighted_backend_services attr_reader :url_rewrite attr_reader :timeout attr_reader :retry_policy attr_reader :request_mirror_policy attr_reader :cors_policy attr_reader :fault_injection_policy attr_reader :max_stream_duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @weighted_backend_services = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesArray.parse(args['weightedBackendServices'], to_s) @url_rewrite = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionUrlRewrite.new(args['urlRewrite'], to_s) @timeout = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionTimeout.new(args['timeout'], to_s) @retry_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionRetryPolicy.new(args['retryPolicy'], to_s) @request_mirror_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) @cors_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionCorsPolicy.new(args['corsPolicy'], to_s) @fault_injection_policy = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) @max_stream_duration = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionMaxStreamDuration.new(args['maxStreamDuration'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_cors_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionCorsPolicy attr_reader :allow_origins attr_reader :allow_origin_regexes attr_reader :allow_methods attr_reader :allow_headers attr_reader :expose_headers attr_reader :max_age attr_reader :allow_credentials attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allow_origins = args['allowOrigins'] @allow_origin_regexes = args['allowOriginRegexes'] @allow_methods = args['allowMethods'] @allow_headers = args['allowHeaders'] @expose_headers = args['exposeHeaders'] @max_age = args['maxAge'] @allow_credentials = args['allowCredentials'] @disabled = args['disabled'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionCorsPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicy attr_reader :delay attr_reader :abort def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @delay = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelay.new(args['delay'], to_s) @abort = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyAbort.new(args['abort'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyAbort attr_reader :http_status attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_status = args['httpStatus'] @percentage = args['percentage'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyAbort" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelay attr_reader :fixed_delay attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed_delay = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelayFixedDelay.new(args['fixedDelay'], to_s) @percentage = args['percentage'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelay" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelayFixedDelay attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelayFixedDelay" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_max_stream_duration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionMaxStreamDuration attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionMaxStreamDuration" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_request_mirror_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionRequestMirrorPolicy attr_reader :backend_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionRequestMirrorPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_retry_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionRetryPolicy attr_reader :retry_conditions attr_reader :num_retries attr_reader :per_try_timeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @retry_conditions = args['retryConditions'] @num_retries = args['numRetries'] @per_try_timeout = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionRetryPolicyPerTryTimeout.new(args['perTryTimeout'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionRetryPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionRetryPolicyPerTryTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionRetryPolicyPerTryTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_url_rewrite.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionUrlRewrite attr_reader :path_prefix_rewrite attr_reader :host_rewrite attr_reader :path_template_rewrite def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_prefix_rewrite = args['pathPrefixRewrite'] @host_rewrite = args['hostRewrite'] @path_template_rewrite = args['pathTemplateRewrite'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionUrlRewrite" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_weighted_backend_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action' require 'google/compute/property/regionurlmap_pmrrrawbsharht_add' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServices attr_reader :backend_service attr_reader :weight attr_reader :header_action def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] @weight = args['weight'] @header_action = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderAction.new(args['headerAction'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServices" end end class RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServices.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServices.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_pmrrrawbsharht_add' module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderAction attr_reader :request_headers_to_remove attr_reader :request_headers_to_add attr_reader :response_headers_to_remove attr_reader :response_headers_to_add def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_remove = args['requestHeadersToRemove'] @request_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) @response_headers_to_remove = args['responseHeadersToRemove'] @response_headers_to_add = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_path_matchers_route_rules_url_redirect.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesUrlRedirect attr_reader :host_redirect attr_reader :path_redirect attr_reader :prefix_redirect attr_reader :redirect_response_code attr_reader :https_redirect attr_reader :strip_query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host_redirect = args['hostRedirect'] @path_redirect = args['pathRedirect'] @prefix_redirect = args['prefixRedirect'] @redirect_response_code = args['redirectResponseCode'] @https_redirect = args['httpsRedirect'] @strip_query = args['stripQuery'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesUrlRedirect" end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_pmdrawbsharht_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd" end end class RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_pmprrawbsharht_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd" end end class RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_pmrrrawbsharht_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd" end end class RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_tests.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/regionurlmap_tests_headers' module GoogleInSpec module Compute module Property class RegionUrlMapTests attr_reader :description attr_reader :host attr_reader :path attr_reader :backend_service_weight attr_reader :headers attr_reader :service attr_reader :expected_url_redirect attr_reader :expected_output_url attr_reader :expected_redirect_response_code def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @description = args['description'] @host = args['host'] @path = args['path'] @backend_service_weight = args['backendServiceWeight'] @headers = GoogleInSpec::Compute::Property::RegionUrlMapTestsHeadersArray.parse(args['headers'], to_s) @service = args['service'] @expected_url_redirect = args['expectedUrlRedirect'] @expected_output_url = args['expectedOutputUrl'] @expected_redirect_response_code = args['expectedRedirectResponseCode'] end def to_s "#{@parent_identifier} RegionUrlMapTests" end end class RegionUrlMapTestsArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapTests.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapTests.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/regionurlmap_tests_headers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RegionUrlMapTestsHeaders attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} RegionUrlMapTestsHeaders" end end class RegionUrlMapTestsHeadersArray def self.parse(value, parent_identifier) return if value.nil? return RegionUrlMapTestsHeaders.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RegionUrlMapTestsHeaders.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/reservation_aggregate_reservation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/reservation_aggregate_reservation_in_use_resources' require 'google/compute/property/reservation_aggregate_reservation_reserved_resources' module GoogleInSpec module Compute module Property class ReservationAggregateReservation attr_reader :vm_family attr_reader :reserved_resources attr_reader :in_use_resources attr_reader :workload_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @vm_family = args['vmFamily'] @reserved_resources = GoogleInSpec::Compute::Property::ReservationAggregateReservationReservedResourcesArray.parse(args['reservedResources'], to_s) @in_use_resources = GoogleInSpec::Compute::Property::ReservationAggregateReservationInUseResourcesArray.parse(args['inUseResources'], to_s) @workload_type = args['workloadType'] end def to_s "#{@parent_identifier} ReservationAggregateReservation" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_aggregate_reservation_in_use_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/reservation_aggregate_reservation_in_use_resources_accelerator' module GoogleInSpec module Compute module Property class ReservationAggregateReservationInUseResources attr_reader :accelerator def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator = GoogleInSpec::Compute::Property::ReservationAggregateReservationInUseResourcesAccelerator.new(args['accelerator'], to_s) end def to_s "#{@parent_identifier} ReservationAggregateReservationInUseResources" end end class ReservationAggregateReservationInUseResourcesArray def self.parse(value, parent_identifier) return if value.nil? return ReservationAggregateReservationInUseResources.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ReservationAggregateReservationInUseResources.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/reservation_aggregate_reservation_in_use_resources_accelerator.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ReservationAggregateReservationInUseResourcesAccelerator attr_reader :accelerator_count attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_count = args['acceleratorCount'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} ReservationAggregateReservationInUseResourcesAccelerator" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_aggregate_reservation_reserved_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/reservation_aggregate_reservation_reserved_resources_accelerator' module GoogleInSpec module Compute module Property class ReservationAggregateReservationReservedResources attr_reader :accelerator def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator = GoogleInSpec::Compute::Property::ReservationAggregateReservationReservedResourcesAccelerator.new(args['accelerator'], to_s) end def to_s "#{@parent_identifier} ReservationAggregateReservationReservedResources" end end class ReservationAggregateReservationReservedResourcesArray def self.parse(value, parent_identifier) return if value.nil? return ReservationAggregateReservationReservedResources.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ReservationAggregateReservationReservedResources.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/reservation_aggregate_reservation_reserved_resources_accelerator.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ReservationAggregateReservationReservedResourcesAccelerator attr_reader :accelerator_count attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_count = args['acceleratorCount'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} ReservationAggregateReservationReservedResourcesAccelerator" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_delete_after_duration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ReservationDeleteAfterDuration attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} ReservationDeleteAfterDuration" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_resource_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ReservationResourcePolicies attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ReservationResourcePolicies" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_resource_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/reservation_resource_status_specific_sku_allocation' module GoogleInSpec module Compute module Property class ReservationResourceStatus attr_reader :specific_sku_allocation def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @specific_sku_allocation = GoogleInSpec::Compute::Property::ReservationResourceStatusSpecificSkuAllocation.new(args['specificSkuAllocation'], to_s) end def to_s "#{@parent_identifier} ReservationResourceStatus" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_resource_status_specific_sku_allocation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ReservationResourceStatusSpecificSkuAllocation attr_reader :source_instance_template_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @source_instance_template_id = args['sourceInstanceTemplateId'] end def to_s "#{@parent_identifier} ReservationResourceStatusSpecificSkuAllocation" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_share_settings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/reservation_share_settings_folder_map' require 'google/compute/property/reservation_share_settings_project_map' module GoogleInSpec module Compute module Property class ReservationShareSettings attr_reader :share_type attr_reader :projects attr_reader :project_map attr_reader :folder_map def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @share_type = args['shareType'] @projects = args['projects'] @project_map = GoogleInSpec::Compute::Property::ReservationShareSettingsProjectMap.new(args['projectMap'], to_s) @folder_map = GoogleInSpec::Compute::Property::ReservationShareSettingsFolderMap.new(args['folderMap'], to_s) end def to_s "#{@parent_identifier} ReservationShareSettings" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_share_settings_folder_map.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ReservationShareSettingsFolderMap attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ReservationShareSettingsFolderMap" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_share_settings_project_map.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ReservationShareSettingsProjectMap attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ReservationShareSettingsProjectMap" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_specific_reservation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/reservation_specific_reservation_instance_properties' require 'google/compute/property/reservation_specific_reservation_instance_properties_guest_accelerators' require 'google/compute/property/reservation_specific_reservation_instance_properties_local_ssds' module GoogleInSpec module Compute module Property class ReservationSpecificReservation attr_reader :instance_properties attr_reader :count attr_reader :in_use_count attr_reader :assured_count attr_reader :source_instance_template def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_properties = GoogleInSpec::Compute::Property::ReservationSpecificReservationInstanceProperties.new(args['instanceProperties'], to_s) @count = args['count'] @in_use_count = args['inUseCount'] @assured_count = args['assuredCount'] @source_instance_template = args['sourceInstanceTemplate'] end def to_s "#{@parent_identifier} ReservationSpecificReservation" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_specific_reservation_instance_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/reservation_specific_reservation_instance_properties_guest_accelerators' require 'google/compute/property/reservation_specific_reservation_instance_properties_local_ssds' module GoogleInSpec module Compute module Property class ReservationSpecificReservationInstanceProperties attr_reader :machine_type attr_reader :guest_accelerators attr_reader :min_cpu_platform attr_reader :local_ssds attr_reader :maintenance_freeze_duration_hours attr_reader :location_hint attr_reader :maintenance_interval def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] @guest_accelerators = GoogleInSpec::Compute::Property::ReservationSpecificReservationInstancePropertiesGuestAcceleratorsArray.parse(args['guestAccelerators'], to_s) @min_cpu_platform = args['minCpuPlatform'] @local_ssds = GoogleInSpec::Compute::Property::ReservationSpecificReservationInstancePropertiesLocalSsdsArray.parse(args['localSsds'], to_s) @maintenance_freeze_duration_hours = args['maintenanceFreezeDurationHours'] @location_hint = args['locationHint'] @maintenance_interval = args['maintenanceInterval'] end def to_s "#{@parent_identifier} ReservationSpecificReservationInstanceProperties" end end end end end ================================================ FILE: libraries/google/compute/property/reservation_specific_reservation_instance_properties_guest_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ReservationSpecificReservationInstancePropertiesGuestAccelerators attr_reader :accelerator_type attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} ReservationSpecificReservationInstancePropertiesGuestAccelerators" end end class ReservationSpecificReservationInstancePropertiesGuestAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return ReservationSpecificReservationInstancePropertiesGuestAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ReservationSpecificReservationInstancePropertiesGuestAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/reservation_specific_reservation_instance_properties_local_ssds.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ReservationSpecificReservationInstancePropertiesLocalSsds attr_reader :disk_size_gb attr_reader :interface def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disk_size_gb = args['diskSizeGb'] @interface = args['interface'] end def to_s "#{@parent_identifier} ReservationSpecificReservationInstancePropertiesLocalSsds" end end class ReservationSpecificReservationInstancePropertiesLocalSsdsArray def self.parse(value, parent_identifier) return if value.nil? return ReservationSpecificReservationInstancePropertiesLocalSsds.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ReservationSpecificReservationInstancePropertiesLocalSsds.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_group_placement_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicyGroupPlacementPolicy attr_reader :style attr_reader :locality attr_reader :vm_count attr_reader :availability_domain_count attr_reader :collocation attr_reader :scope attr_reader :tpu_topology attr_reader :max_distance attr_reader :slice_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @style = args['style'] @locality = args['locality'] @vm_count = args['vmCount'] @availability_domain_count = args['availabilityDomainCount'] @collocation = args['collocation'] @scope = args['scope'] @tpu_topology = args['tpuTopology'] @max_distance = args['maxDistance'] @slice_count = args['sliceCount'] end def to_s "#{@parent_identifier} ResourcePolicyGroupPlacementPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_instance_schedule_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/resourcepolicy_instance_schedule_policy_vm_start_schedule' require 'google/compute/property/resourcepolicy_instance_schedule_policy_vm_stop_schedule' module GoogleInSpec module Compute module Property class ResourcePolicyInstanceSchedulePolicy attr_reader :vm_start_schedule attr_reader :vm_stop_schedule attr_reader :time_zone attr_reader :start_time attr_reader :expiration_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @vm_start_schedule = GoogleInSpec::Compute::Property::ResourcePolicyInstanceSchedulePolicyVmStartSchedule.new(args['vmStartSchedule'], to_s) @vm_stop_schedule = GoogleInSpec::Compute::Property::ResourcePolicyInstanceSchedulePolicyVmStopSchedule.new(args['vmStopSchedule'], to_s) @time_zone = args['timeZone'] @start_time = args['startTime'] @expiration_time = args['expirationTime'] end def to_s "#{@parent_identifier} ResourcePolicyInstanceSchedulePolicy" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_instance_schedule_policy_vm_start_schedule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicyInstanceSchedulePolicyVmStartSchedule attr_reader :schedule def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @schedule = args['schedule'] end def to_s "#{@parent_identifier} ResourcePolicyInstanceSchedulePolicyVmStartSchedule" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_instance_schedule_policy_vm_stop_schedule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicyInstanceSchedulePolicyVmStopSchedule attr_reader :schedule def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @schedule = args['schedule'] end def to_s "#{@parent_identifier} ResourcePolicyInstanceSchedulePolicyVmStopSchedule" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_resource_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/resourcepolicy_resource_status_instance_schedule_policy' module GoogleInSpec module Compute module Property class ResourcePolicyResourceStatus attr_reader :instance_schedule_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_schedule_policy = GoogleInSpec::Compute::Property::ResourcePolicyResourceStatusInstanceSchedulePolicy.new(args['instanceSchedulePolicy'], to_s) end def to_s "#{@parent_identifier} ResourcePolicyResourceStatus" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_resource_status_instance_schedule_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicyResourceStatusInstanceSchedulePolicy attr_reader :next_run_start_time attr_reader :last_run_start_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @next_run_start_time = args['nextRunStartTime'] @last_run_start_time = args['lastRunStartTime'] end def to_s "#{@parent_identifier} ResourcePolicyResourceStatusInstanceSchedulePolicy" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_snapshot_schedule_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_retention_policy' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_daily_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_hourly_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule_day_of_weeks' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_snapshot_properties' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_snapshot_properties_labels' module GoogleInSpec module Compute module Property class ResourcePolicySnapshotSchedulePolicy attr_reader :schedule attr_reader :retention_policy attr_reader :snapshot_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @schedule = GoogleInSpec::Compute::Property::ResourcePolicySnapshotSchedulePolicySchedule.new(args['schedule'], to_s) @retention_policy = GoogleInSpec::Compute::Property::ResourcePolicySnapshotSchedulePolicyRetentionPolicy.new(args['retentionPolicy'], to_s) @snapshot_properties = GoogleInSpec::Compute::Property::ResourcePolicySnapshotSchedulePolicySnapshotProperties.new(args['snapshotProperties'], to_s) end def to_s "#{@parent_identifier} ResourcePolicySnapshotSchedulePolicy" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_snapshot_schedule_policy_retention_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicySnapshotSchedulePolicyRetentionPolicy attr_reader :max_retention_days attr_reader :on_policy_switch attr_reader :on_source_disk_delete def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_retention_days = args['maxRetentionDays'] @on_policy_switch = args['onPolicySwitch'] @on_source_disk_delete = args['onSourceDiskDelete'] end def to_s "#{@parent_identifier} ResourcePolicySnapshotSchedulePolicyRetentionPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_daily_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_hourly_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule_day_of_weeks' module GoogleInSpec module Compute module Property class ResourcePolicySnapshotSchedulePolicySchedule attr_reader :hourly_schedule attr_reader :daily_schedule attr_reader :weekly_schedule def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @hourly_schedule = GoogleInSpec::Compute::Property::ResourcePolicySnapshotSchedulePolicyScheduleHourlySchedule.new(args['hourlySchedule'], to_s) @daily_schedule = GoogleInSpec::Compute::Property::ResourcePolicySnapshotSchedulePolicyScheduleDailySchedule.new(args['dailySchedule'], to_s) @weekly_schedule = GoogleInSpec::Compute::Property::ResourcePolicySnapshotSchedulePolicyScheduleWeeklySchedule.new(args['weeklySchedule'], to_s) end def to_s "#{@parent_identifier} ResourcePolicySnapshotSchedulePolicySchedule" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_daily_schedule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicySnapshotSchedulePolicyScheduleDailySchedule attr_reader :days_in_cycle attr_reader :start_time attr_reader :duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @days_in_cycle = args['daysInCycle'] @start_time = args['startTime'] @duration = args['duration'] end def to_s "#{@parent_identifier} ResourcePolicySnapshotSchedulePolicyScheduleDailySchedule" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_hourly_schedule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicySnapshotSchedulePolicyScheduleHourlySchedule attr_reader :hours_in_cycle attr_reader :start_time attr_reader :duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @hours_in_cycle = args['hoursInCycle'] @start_time = args['startTime'] @duration = args['duration'] end def to_s "#{@parent_identifier} ResourcePolicySnapshotSchedulePolicyScheduleHourlySchedule" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule_day_of_weeks' module GoogleInSpec module Compute module Property class ResourcePolicySnapshotSchedulePolicyScheduleWeeklySchedule attr_reader :day_of_weeks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @day_of_weeks = GoogleInSpec::Compute::Property::ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeeksArray.parse(args['dayOfWeeks'], to_s) end def to_s "#{@parent_identifier} ResourcePolicySnapshotSchedulePolicyScheduleWeeklySchedule" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule_day_of_weeks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeeks attr_reader :day attr_reader :start_time attr_reader :duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @day = args['day'] @start_time = args['startTime'] @duration = args['duration'] end def to_s "#{@parent_identifier} ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeeks" end end class ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeeksArray def self.parse(value, parent_identifier) return if value.nil? return ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeeks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeeks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_snapshot_schedule_policy_snapshot_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_snapshot_properties_labels' module GoogleInSpec module Compute module Property class ResourcePolicySnapshotSchedulePolicySnapshotProperties attr_reader :labels attr_reader :storage_locations attr_reader :guest_flush attr_reader :chain_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @labels = GoogleInSpec::Compute::Property::ResourcePolicySnapshotSchedulePolicySnapshotPropertiesLabels.new(args['labels'], to_s) @storage_locations = args['storageLocations'] @guest_flush = args['guestFlush'] @chain_name = args['chainName'] end def to_s "#{@parent_identifier} ResourcePolicySnapshotSchedulePolicySnapshotProperties" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_snapshot_schedule_policy_snapshot_properties_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicySnapshotSchedulePolicySnapshotPropertiesLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ResourcePolicySnapshotSchedulePolicySnapshotPropertiesLabels" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_vm_maintenance_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/resourcepolicy_vm_maintenance_policy_concurrency_control_group' require 'google/compute/property/resourcepolicy_vm_maintenance_policy_maintenance_window' require 'google/compute/property/resourcepolicy_vm_maintenance_policy_maintenance_window_daily_maintenance_window' module GoogleInSpec module Compute module Property class ResourcePolicyVmMaintenancePolicy attr_reader :maintenance_window attr_reader :concurrency_control_group def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @maintenance_window = GoogleInSpec::Compute::Property::ResourcePolicyVmMaintenancePolicyMaintenanceWindow.new(args['maintenanceWindow'], to_s) @concurrency_control_group = GoogleInSpec::Compute::Property::ResourcePolicyVmMaintenancePolicyConcurrencyControlGroup.new(args['concurrencyControlGroup'], to_s) end def to_s "#{@parent_identifier} ResourcePolicyVmMaintenancePolicy" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_vm_maintenance_policy_concurrency_control_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicyVmMaintenancePolicyConcurrencyControlGroup attr_reader :concurrency_limit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @concurrency_limit = args['concurrencyLimit'] end def to_s "#{@parent_identifier} ResourcePolicyVmMaintenancePolicyConcurrencyControlGroup" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_vm_maintenance_policy_maintenance_window.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/resourcepolicy_vm_maintenance_policy_maintenance_window_daily_maintenance_window' module GoogleInSpec module Compute module Property class ResourcePolicyVmMaintenancePolicyMaintenanceWindow attr_reader :daily_maintenance_window def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @daily_maintenance_window = GoogleInSpec::Compute::Property::ResourcePolicyVmMaintenancePolicyMaintenanceWindowDailyMaintenanceWindow.new(args['dailyMaintenanceWindow'], to_s) end def to_s "#{@parent_identifier} ResourcePolicyVmMaintenancePolicyMaintenanceWindow" end end end end end ================================================ FILE: libraries/google/compute/property/resourcepolicy_vm_maintenance_policy_maintenance_window_daily_maintenance_window.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ResourcePolicyVmMaintenancePolicyMaintenanceWindowDailyMaintenanceWindow attr_reader :days_in_cycle attr_reader :start_time attr_reader :duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @days_in_cycle = args['daysInCycle'] @start_time = args['startTime'] @duration = args['duration'] end def to_s "#{@parent_identifier} ResourcePolicyVmMaintenancePolicyMaintenanceWindowDailyMaintenanceWindow" end end end end end ================================================ FILE: libraries/google/compute/property/router_bgp.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/router_bgp_advertised_ip_ranges' module GoogleInSpec module Compute module Property class RouterBgp attr_reader :asn attr_reader :advertise_mode attr_reader :advertised_groups attr_reader :advertised_ip_ranges def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @asn = args['asn'] @advertise_mode = args['advertiseMode'] @advertised_groups = args['advertisedGroups'] @advertised_ip_ranges = GoogleInSpec::Compute::Property::RouterBgpAdvertisedIpRangesArray.parse(args['advertisedIpRanges'], to_s) end def to_s "#{@parent_identifier} RouterBgp" end end end end end ================================================ FILE: libraries/google/compute/property/router_bgp_advertised_ip_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RouterBgpAdvertisedIpRanges attr_reader :range attr_reader :description def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @range = args['range'] @description = args['description'] end def to_s "#{@parent_identifier} RouterBgpAdvertisedIpRanges" end end class RouterBgpAdvertisedIpRangesArray def self.parse(value, parent_identifier) return if value.nil? return RouterBgpAdvertisedIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RouterBgpAdvertisedIpRanges.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/routernat_log_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RouterNatLogConfig attr_reader :enable attr_reader :filter def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable = args['enable'] @filter = args['filter'] end def to_s "#{@parent_identifier} RouterNatLogConfig" end end end end end ================================================ FILE: libraries/google/compute/property/routernat_subnetwork.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class RouterNatSubnetwork attr_reader :name attr_reader :source_ip_ranges_to_nat attr_reader :secondary_ip_range_names def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @source_ip_ranges_to_nat = args['sourceIpRangesToNat'] @secondary_ip_range_names = args['secondaryIpRangeNames'] end def to_s "#{@parent_identifier} RouterNatSubnetwork" end end class RouterNatSubnetworkArray def self.parse(value, parent_identifier) return if value.nil? return RouterNatSubnetwork.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| RouterNatSubnetwork.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/securitypolicy_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/securitypolicy_rules_match' require 'google/compute/property/securitypolicy_rules_match_config' require 'google/compute/property/securitypolicy_rules_match_expr' module GoogleInSpec module Compute module Property class SecurityPolicyRules attr_reader :description attr_reader :priority attr_reader :action attr_reader :preview attr_reader :match def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @description = args['description'] @priority = args['priority'] @action = args['action'] @preview = args['preview'] @match = GoogleInSpec::Compute::Property::SecurityPolicyRulesMatch.new(args['match'], to_s) end def to_s "#{@parent_identifier} SecurityPolicyRules" end end class SecurityPolicyRulesArray def self.parse(value, parent_identifier) return if value.nil? return SecurityPolicyRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| SecurityPolicyRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/securitypolicy_rules_match.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/securitypolicy_rules_match_config' require 'google/compute/property/securitypolicy_rules_match_expr' module GoogleInSpec module Compute module Property class SecurityPolicyRulesMatch attr_reader :description attr_reader :expr attr_reader :versioned_expr attr_reader :config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @description = args['description'] @expr = GoogleInSpec::Compute::Property::SecurityPolicyRulesMatchExpr.new(args['expr'], to_s) @versioned_expr = args['versionedExpr'] @config = GoogleInSpec::Compute::Property::SecurityPolicyRulesMatchConfig.new(args['config'], to_s) end def to_s "#{@parent_identifier} SecurityPolicyRulesMatch" end end end end end ================================================ FILE: libraries/google/compute/property/securitypolicy_rules_match_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class SecurityPolicyRulesMatchConfig attr_reader :src_ip_ranges def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @src_ip_ranges = args['srcIpRanges'] end def to_s "#{@parent_identifier} SecurityPolicyRulesMatchConfig" end end end end end ================================================ FILE: libraries/google/compute/property/securitypolicy_rules_match_expr.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class SecurityPolicyRulesMatchExpr attr_reader :expression attr_reader :title attr_reader :description attr_reader :location def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @expression = args['expression'] @title = args['title'] @description = args['description'] @location = args['location'] end def to_s "#{@parent_identifier} SecurityPolicyRulesMatchExpr" end end end end end ================================================ FILE: libraries/google/compute/property/serviceattachment_connected_endpoints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ServiceAttachmentConnectedEndpoints attr_reader :status attr_reader :psc_connection_id attr_reader :endpoint attr_reader :consumer_network def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @status = args['status'] @psc_connection_id = args['pscConnectionId'] @endpoint = args['endpoint'] @consumer_network = args['consumerNetwork'] end def to_s "#{@parent_identifier} ServiceAttachmentConnectedEndpoints" end end class ServiceAttachmentConnectedEndpointsArray def self.parse(value, parent_identifier) return if value.nil? return ServiceAttachmentConnectedEndpoints.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceAttachmentConnectedEndpoints.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/serviceattachment_consumer_accept_lists.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ServiceAttachmentConsumerAcceptLists attr_reader :project_id_or_num attr_reader :network_url attr_reader :connection_limit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_id_or_num = args['projectIdOrNum'] @network_url = args['networkUrl'] @connection_limit = args['connectionLimit'] end def to_s "#{@parent_identifier} ServiceAttachmentConsumerAcceptLists" end end class ServiceAttachmentConsumerAcceptListsArray def self.parse(value, parent_identifier) return if value.nil? return ServiceAttachmentConsumerAcceptLists.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceAttachmentConsumerAcceptLists.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/serviceattachment_psc_service_attachment_id.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ServiceAttachmentPscServiceAttachmentId attr_reader :high attr_reader :low def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @high = args['high'] @low = args['low'] end def to_s "#{@parent_identifier} ServiceAttachmentPscServiceAttachmentId" end end end end end ================================================ FILE: libraries/google/compute/property/snapshot_snapshot_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class SnapshotSnapshotEncryptionKey attr_reader :raw_key attr_reader :sha256 attr_reader :kms_key_name attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @sha256 = args['sha256'] @kms_key_name = args['kmsKeyName'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} SnapshotSnapshotEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/snapshot_source_disk_encryption_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class SnapshotSourceDiskEncryptionKey attr_reader :raw_key attr_reader :kms_key_name attr_reader :kms_key_service_account def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_key = args['rawKey'] @kms_key_name = args['kmsKeyName'] @kms_key_service_account = args['kmsKeyServiceAccount'] end def to_s "#{@parent_identifier} SnapshotSourceDiskEncryptionKey" end end end end end ================================================ FILE: libraries/google/compute/property/sslpolicy_warnings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class SslPolicyWarnings attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} SslPolicyWarnings" end end class SslPolicyWarningsArray def self.parse(value, parent_identifier) return if value.nil? return SslPolicyWarnings.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| SslPolicyWarnings.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/subnetwork_log_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class SubnetworkLogConfig attr_reader :enable attr_reader :aggregation_interval attr_reader :flow_sampling attr_reader :metadata attr_reader :metadata_fields attr_reader :filter_expr def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable = args['enable'] @aggregation_interval = args['aggregationInterval'] @flow_sampling = args['flowSampling'] @metadata = args['metadata'] @metadata_fields = args['metadataFields'] @filter_expr = args['filterExpr'] end def to_s "#{@parent_identifier} SubnetworkLogConfig" end end end end end ================================================ FILE: libraries/google/compute/property/subnetwork_secondary_ip_ranges.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class SubnetworkSecondaryIpRanges attr_reader :range_name attr_reader :ip_cidr_range def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @range_name = args['rangeName'] @ip_cidr_range = args['ipCidrRange'] end def to_s "#{@parent_identifier} SubnetworkSecondaryIpRanges" end end class SubnetworkSecondaryIpRangesArray def self.parse(value, parent_identifier) return if value.nil? return SubnetworkSecondaryIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| SubnetworkSecondaryIpRanges.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/targetvpngateway_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class TargetVpnGatewayLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} TargetVpnGatewayLabels" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_default_route_action_cors_policy' require 'google/compute/property/urlmap_default_route_action_fault_injection_policy' require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_abort' require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay' require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/urlmap_default_route_action_request_mirror_policy' require 'google/compute/property/urlmap_default_route_action_retry_policy' require 'google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout' require 'google/compute/property/urlmap_default_route_action_timeout' require 'google/compute/property/urlmap_default_route_action_url_rewrite' require 'google/compute/property/urlmap_default_route_action_weighted_backend_services' module GoogleInSpec module Compute module Property class UrlMapDefaultRouteAction attr_reader :weighted_backend_services attr_reader :url_rewrite attr_reader :timeout attr_reader :retry_policy attr_reader :request_mirror_policy attr_reader :cors_policy attr_reader :fault_injection_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @weighted_backend_services = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesArray.parse(args['weightedBackendServices'], to_s) @url_rewrite = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionUrlRewrite.new(args['urlRewrite'], to_s) @timeout = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionTimeout.new(args['timeout'], to_s) @retry_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionRetryPolicy.new(args['retryPolicy'], to_s) @request_mirror_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) @cors_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionCorsPolicy.new(args['corsPolicy'], to_s) @fault_injection_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) end def to_s "#{@parent_identifier} UrlMapDefaultRouteAction" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_cors_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionCorsPolicy attr_reader :allow_origins attr_reader :allow_origin_regexes attr_reader :allow_methods attr_reader :allow_headers attr_reader :expose_headers attr_reader :max_age attr_reader :allow_credentials attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allow_origins = args['allowOrigins'] @allow_origin_regexes = args['allowOriginRegexes'] @allow_methods = args['allowMethods'] @allow_headers = args['allowHeaders'] @expose_headers = args['exposeHeaders'] @max_age = args['maxAge'] @allow_credentials = args['allowCredentials'] @disabled = args['disabled'] end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionCorsPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_abort' require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay' require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionFaultInjectionPolicy attr_reader :delay attr_reader :abort def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @delay = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicyDelay.new(args['delay'], to_s) @abort = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicyAbort.new(args['abort'], to_s) end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionFaultInjectionPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_abort.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionFaultInjectionPolicyAbort attr_reader :http_status attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_status = args['httpStatus'] @percentage = args['percentage'] end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionFaultInjectionPolicyAbort" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionFaultInjectionPolicyDelay attr_reader :fixed_delay attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed_delay = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicyDelayFixedDelay.new(args['fixedDelay'], to_s) @percentage = args['percentage'] end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionFaultInjectionPolicyDelay" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionFaultInjectionPolicyDelayFixedDelay attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionFaultInjectionPolicyDelayFixedDelay" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_request_mirror_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionRequestMirrorPolicy attr_reader :backend_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionRequestMirrorPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_retry_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout' module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionRetryPolicy attr_reader :retry_conditions attr_reader :num_retries attr_reader :per_try_timeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @retry_conditions = args['retryConditions'] @num_retries = args['numRetries'] @per_try_timeout = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionRetryPolicyPerTryTimeout.new(args['perTryTimeout'], to_s) end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionRetryPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionRetryPolicyPerTryTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionRetryPolicyPerTryTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_url_rewrite.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionUrlRewrite attr_reader :path_prefix_rewrite attr_reader :host_rewrite def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_prefix_rewrite = args['pathPrefixRewrite'] @host_rewrite = args['hostRewrite'] end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionUrlRewrite" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action' require 'google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add' require 'google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add' module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionWeightedBackendServices attr_reader :backend_service attr_reader :weight attr_reader :header_action def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] @weight = args['weight'] @header_action = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesHeaderAction.new(args['headerAction'], to_s) end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionWeightedBackendServices" end end class UrlMapDefaultRouteActionWeightedBackendServicesArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapDefaultRouteActionWeightedBackendServices.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapDefaultRouteActionWeightedBackendServices.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add' require 'google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add' module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionWeightedBackendServicesHeaderAction attr_reader :request_headers_to_remove attr_reader :request_headers_to_add attr_reader :response_headers_to_remove attr_reader :response_headers_to_add def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_remove = args['requestHeadersToRemove'] @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) @response_headers_to_remove = args['responseHeadersToRemove'] @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionWeightedBackendServicesHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd" end end class UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd" end end class UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_default_url_redirect.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapDefaultUrlRedirect attr_reader :host_redirect attr_reader :https_redirect attr_reader :path_redirect attr_reader :prefix_redirect attr_reader :redirect_response_code attr_reader :strip_query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host_redirect = args['hostRedirect'] @https_redirect = args['httpsRedirect'] @path_redirect = args['pathRedirect'] @prefix_redirect = args['prefixRedirect'] @redirect_response_code = args['redirectResponseCode'] @strip_query = args['stripQuery'] end def to_s "#{@parent_identifier} UrlMapDefaultUrlRedirect" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_header_action_request_headers_to_add' require 'google/compute/property/urlmap_header_action_response_headers_to_add' module GoogleInSpec module Compute module Property class UrlMapHeaderAction attr_reader :request_headers_to_add attr_reader :request_headers_to_remove attr_reader :response_headers_to_add attr_reader :response_headers_to_remove def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) @request_headers_to_remove = args['requestHeadersToRemove'] @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) @response_headers_to_remove = args['responseHeadersToRemove'] end def to_s "#{@parent_identifier} UrlMapHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_header_action_request_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapHeaderActionRequestHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} UrlMapHeaderActionRequestHeadersToAdd" end end class UrlMapHeaderActionRequestHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_header_action_response_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapHeaderActionResponseHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} UrlMapHeaderActionResponseHeadersToAdd" end end class UrlMapHeaderActionResponseHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_host_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapHostRules attr_reader :description attr_reader :hosts attr_reader :path_matcher def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @description = args['description'] @hosts = args['hosts'] @path_matcher = args['pathMatcher'] end def to_s "#{@parent_identifier} UrlMapHostRules" end end class UrlMapHostRulesArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapHostRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapHostRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_path_matchers_default_route_action' require 'google/compute/property/urlmap_path_matchers_default_route_action_cors_policy' require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy' require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort' require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay' require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy' require 'google/compute/property/urlmap_path_matchers_default_route_action_retry_policy' require 'google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout' require 'google/compute/property/urlmap_path_matchers_default_route_action_timeout' require 'google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite' require 'google/compute/property/urlmap_path_matchers_default_url_redirect' require 'google/compute/property/urlmap_path_matchers_header_action' require 'google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add' require 'google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add' module GoogleInSpec module Compute module Property class UrlMapPathMatchers attr_reader :default_service attr_reader :description attr_reader :header_action attr_reader :name attr_reader :default_url_redirect attr_reader :default_route_action def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @default_service = args['defaultService'] @description = args['description'] @header_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderAction.new(args['headerAction'], to_s) @name = args['name'] @default_url_redirect = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultUrlRedirect.new(args['defaultUrlRedirect'], to_s) @default_route_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteAction.new(args['defaultRouteAction'], to_s) end def to_s "#{@parent_identifier} UrlMapPathMatchers" end end class UrlMapPathMatchersArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapPathMatchers.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapPathMatchers.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_path_matchers_default_route_action_cors_policy' require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy' require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort' require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay' require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy' require 'google/compute/property/urlmap_path_matchers_default_route_action_retry_policy' require 'google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout' require 'google/compute/property/urlmap_path_matchers_default_route_action_timeout' require 'google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite' module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteAction attr_reader :url_rewrite attr_reader :timeout attr_reader :retry_policy attr_reader :request_mirror_policy attr_reader :cors_policy attr_reader :fault_injection_policy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @url_rewrite = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionUrlRewrite.new(args['urlRewrite'], to_s) @timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionTimeout.new(args['timeout'], to_s) @retry_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionRetryPolicy.new(args['retryPolicy'], to_s) @request_mirror_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) @cors_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionCorsPolicy.new(args['corsPolicy'], to_s) @fault_injection_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteAction" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action_cors_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteActionCorsPolicy attr_reader :allow_origins attr_reader :allow_origin_regexes attr_reader :allow_methods attr_reader :allow_headers attr_reader :expose_headers attr_reader :max_age attr_reader :allow_credentials attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allow_origins = args['allowOrigins'] @allow_origin_regexes = args['allowOriginRegexes'] @allow_methods = args['allowMethods'] @allow_headers = args['allowHeaders'] @expose_headers = args['exposeHeaders'] @max_age = args['maxAge'] @allow_credentials = args['allowCredentials'] @disabled = args['disabled'] end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteActionCorsPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort' require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay' require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicy attr_reader :delay attr_reader :abort def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @delay = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelay.new(args['delay'], to_s) @abort = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyAbort.new(args['abort'], to_s) end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyAbort attr_reader :http_status attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_status = args['httpStatus'] @percentage = args['percentage'] end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyAbort" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelay attr_reader :fixed_delay attr_reader :percentage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed_delay = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelayFixedDelay.new(args['fixedDelay'], to_s) @percentage = args['percentage'] end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelay" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelayFixedDelay attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelayFixedDelay" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteActionRequestMirrorPolicy attr_reader :backend_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backend_service = args['backendService'] end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteActionRequestMirrorPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action_retry_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout' module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteActionRetryPolicy attr_reader :retry_conditions attr_reader :num_retries attr_reader :per_try_timeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @retry_conditions = args['retryConditions'] @num_retries = args['numRetries'] @per_try_timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionRetryPolicyPerTryTimeout.new(args['perTryTimeout'], to_s) end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteActionRetryPolicy" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteActionRetryPolicyPerTryTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteActionRetryPolicyPerTryTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action_timeout.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteActionTimeout attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteActionTimeout" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultRouteActionUrlRewrite attr_reader :path_prefix_rewrite attr_reader :host_rewrite def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_prefix_rewrite = args['pathPrefixRewrite'] @host_rewrite = args['hostRewrite'] end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultRouteActionUrlRewrite" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_default_url_redirect.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersDefaultUrlRedirect attr_reader :host_redirect attr_reader :https_redirect attr_reader :path_redirect attr_reader :prefix_redirect attr_reader :redirect_response_code attr_reader :strip_query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @host_redirect = args['hostRedirect'] @https_redirect = args['httpsRedirect'] @path_redirect = args['pathRedirect'] @prefix_redirect = args['prefixRedirect'] @redirect_response_code = args['redirectResponseCode'] @strip_query = args['stripQuery'] end def to_s "#{@parent_identifier} UrlMapPathMatchersDefaultUrlRedirect" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_header_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add' require 'google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add' module GoogleInSpec module Compute module Property class UrlMapPathMatchersHeaderAction attr_reader :request_headers_to_add attr_reader :request_headers_to_remove attr_reader :response_headers_to_add attr_reader :response_headers_to_remove def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) @request_headers_to_remove = args['requestHeadersToRemove'] @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) @response_headers_to_remove = args['responseHeadersToRemove'] end def to_s "#{@parent_identifier} UrlMapPathMatchersHeaderAction" end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersHeaderActionRequestHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} UrlMapPathMatchersHeaderActionRequestHeadersToAdd" end end class UrlMapPathMatchersHeaderActionRequestHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapPathMatchersHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapPathMatchersHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapPathMatchersHeaderActionResponseHeadersToAdd attr_reader :header_name attr_reader :header_value attr_reader :replace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @header_name = args['headerName'] @header_value = args['headerValue'] @replace = args['replace'] end def to_s "#{@parent_identifier} UrlMapPathMatchersHeaderActionResponseHeadersToAdd" end end class UrlMapPathMatchersHeaderActionResponseHeadersToAddArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapPathMatchersHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapPathMatchersHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/urlmap_tests.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class UrlMapTests attr_reader :description attr_reader :host attr_reader :path attr_reader :service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @description = args['description'] @host = args['host'] @path = args['path'] @service = args['service'] end def to_s "#{@parent_identifier} UrlMapTests" end end class UrlMapTestsArray def self.parse(value, parent_identifier) return if value.nil? return UrlMapTests.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| UrlMapTests.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/vpngateway_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class VpnGatewayLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} VpnGatewayLabels" end end end end end ================================================ FILE: libraries/google/compute/property/vpngateway_vpn_interfaces.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class VpnGatewayVpnInterfaces attr_reader :id attr_reader :ip_address attr_reader :interconnect_attachment def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @id = args['id'] @ip_address = args['ipAddress'] @interconnect_attachment = args['interconnectAttachment'] end def to_s "#{@parent_identifier} VpnGatewayVpnInterfaces" end end class VpnGatewayVpnInterfacesArray def self.parse(value, parent_identifier) return if value.nil? return VpnGatewayVpnInterfaces.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| VpnGatewayVpnInterfaces.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/compute/property/zone_deprecated.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Compute module Property class ZoneDeprecated attr_reader :deleted attr_reader :deprecated attr_reader :obsolete attr_reader :replacement attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @deleted = parse_time_string(args['deleted']) @deprecated = parse_time_string(args['deprecated']) @obsolete = parse_time_string(args['obsolete']) @replacement = args['replacement'] @state = args['state'] end def to_s "#{@parent_identifier} ZoneDeprecated" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/container/property/cluster_addons_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config' require 'google/container/property/cluster_addons_config_horizontal_pod_autoscaling' require 'google/container/property/cluster_addons_config_http_load_balancing' require 'google/container/property/cluster_addons_config_kubernetes_dashboard' require 'google/container/property/cluster_addons_config_network_policy_config' module GoogleInSpec module Container module Property class ClusterAddonsConfig attr_reader :http_load_balancing attr_reader :horizontal_pod_autoscaling attr_reader :kubernetes_dashboard attr_reader :network_policy_config attr_reader :gce_persistent_disk_csi_driver_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_load_balancing = GoogleInSpec::Container::Property::ClusterAddonsConfigHttpLoadBalancing.new(args['httpLoadBalancing'], to_s) @horizontal_pod_autoscaling = GoogleInSpec::Container::Property::ClusterAddonsConfigHorizontalPodAutoscaling.new(args['horizontalPodAutoscaling'], to_s) @kubernetes_dashboard = GoogleInSpec::Container::Property::ClusterAddonsConfigKubernetesDashboard.new(args['kubernetesDashboard'], to_s) @network_policy_config = GoogleInSpec::Container::Property::ClusterAddonsConfigNetworkPolicyConfig.new(args['networkPolicyConfig'], to_s) @gce_persistent_disk_csi_driver_config = GoogleInSpec::Container::Property::ClusterAddonsConfigGcePersistentDiskCsiDriverConfig.new(args['gcePersistentDiskCsiDriverConfig'], to_s) end def to_s "#{@parent_identifier} ClusterAddonsConfig" end end end end end ================================================ FILE: libraries/google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterAddonsConfigGcePersistentDiskCsiDriverConfig attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} ClusterAddonsConfigGcePersistentDiskCsiDriverConfig" end end end end end ================================================ FILE: libraries/google/container/property/cluster_addons_config_horizontal_pod_autoscaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterAddonsConfigHorizontalPodAutoscaling attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disabled = args['disabled'] end def to_s "#{@parent_identifier} ClusterAddonsConfigHorizontalPodAutoscaling" end end end end end ================================================ FILE: libraries/google/container/property/cluster_addons_config_http_load_balancing.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterAddonsConfigHttpLoadBalancing attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disabled = args['disabled'] end def to_s "#{@parent_identifier} ClusterAddonsConfigHttpLoadBalancing" end end end end end ================================================ FILE: libraries/google/container/property/cluster_addons_config_kubernetes_dashboard.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterAddonsConfigKubernetesDashboard attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disabled = args['disabled'] end def to_s "#{@parent_identifier} ClusterAddonsConfigKubernetesDashboard" end end end end end ================================================ FILE: libraries/google/container/property/cluster_addons_config_network_policy_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterAddonsConfigNetworkPolicyConfig attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disabled = args['disabled'] end def to_s "#{@parent_identifier} ClusterAddonsConfigNetworkPolicyConfig" end end end end end ================================================ FILE: libraries/google/container/property/cluster_binary_authorization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterBinaryAuthorization attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} ClusterBinaryAuthorization" end end end end end ================================================ FILE: libraries/google/container/property/cluster_conditions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterConditions attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} ClusterConditions" end end class ClusterConditionsArray def self.parse(value, parent_identifier) return if value.nil? return ClusterConditions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ClusterConditions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/container/property/cluster_database_encryption.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterDatabaseEncryption attr_reader :state attr_reader :key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @state = args['state'] @key_name = args['keyName'] end def to_s "#{@parent_identifier} ClusterDatabaseEncryption" end end end end end ================================================ FILE: libraries/google/container/property/cluster_default_max_pods_constraint.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterDefaultMaxPodsConstraint attr_reader :max_pods_per_node def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_pods_per_node = args['maxPodsPerNode'] end def to_s "#{@parent_identifier} ClusterDefaultMaxPodsConstraint" end end end end end ================================================ FILE: libraries/google/container/property/cluster_fleet.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterFleet attr_reader :project attr_reader :membership attr_reader :pre_registered def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project = args['project'] @membership = args['membership'] @pre_registered = args['preRegistered'] end def to_s "#{@parent_identifier} ClusterFleet" end end end end end ================================================ FILE: libraries/google/container/property/cluster_ip_allocation_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterIpAllocationPolicy attr_reader :use_ip_aliases attr_reader :create_subnetwork attr_reader :subnetwork_name attr_reader :cluster_secondary_range_name attr_reader :services_secondary_range_name attr_reader :cluster_ipv4_cidr_block attr_reader :node_ipv4_cidr_block attr_reader :services_ipv4_cidr_block attr_reader :tpu_ipv4_cidr_block def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @use_ip_aliases = args['useIpAliases'] @create_subnetwork = args['createSubnetwork'] @subnetwork_name = args['subnetworkName'] @cluster_secondary_range_name = args['clusterSecondaryRangeName'] @services_secondary_range_name = args['servicesSecondaryRangeName'] @cluster_ipv4_cidr_block = args['clusterIpv4CidrBlock'] @node_ipv4_cidr_block = args['nodeIpv4CidrBlock'] @services_ipv4_cidr_block = args['servicesIpv4CidrBlock'] @tpu_ipv4_cidr_block = args['tpuIpv4CidrBlock'] end def to_s "#{@parent_identifier} ClusterIpAllocationPolicy" end end end end end ================================================ FILE: libraries/google/container/property/cluster_legacy_abac.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterLegacyAbac attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} ClusterLegacyAbac" end end end end end ================================================ FILE: libraries/google/container/property/cluster_master_auth.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/cluster_master_auth_client_certificate_config' module GoogleInSpec module Container module Property class ClusterMasterAuth attr_reader :username attr_reader :password attr_reader :client_certificate_config attr_reader :cluster_ca_certificate attr_reader :client_certificate attr_reader :client_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @username = args['username'] @password = args['password'] @client_certificate_config = GoogleInSpec::Container::Property::ClusterMasterAuthClientCertificateConfig.new(args['clientCertificateConfig'], to_s) @cluster_ca_certificate = args['clusterCaCertificate'] @client_certificate = args['clientCertificate'] @client_key = args['clientKey'] end def to_s "#{@parent_identifier} ClusterMasterAuth" end end end end end ================================================ FILE: libraries/google/container/property/cluster_master_auth_client_certificate_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterMasterAuthClientCertificateConfig attr_reader :issue_client_certificate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @issue_client_certificate = args['issueClientCertificate'] end def to_s "#{@parent_identifier} ClusterMasterAuthClientCertificateConfig" end end end end end ================================================ FILE: libraries/google/container/property/cluster_master_authorized_networks_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/cluster_master_authorized_networks_config_cidr_blocks' module GoogleInSpec module Container module Property class ClusterMasterAuthorizedNetworksConfig attr_reader :enabled attr_reader :cidr_blocks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] @cidr_blocks = GoogleInSpec::Container::Property::ClusterMasterAuthorizedNetworksConfigCidrBlocksArray.parse(args['cidrBlocks'], to_s) end def to_s "#{@parent_identifier} ClusterMasterAuthorizedNetworksConfig" end end end end end ================================================ FILE: libraries/google/container/property/cluster_master_authorized_networks_config_cidr_blocks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterMasterAuthorizedNetworksConfigCidrBlocks attr_reader :display_name attr_reader :cidr_block def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @display_name = args['displayName'] @cidr_block = args['cidrBlock'] end def to_s "#{@parent_identifier} ClusterMasterAuthorizedNetworksConfigCidrBlocks" end end class ClusterMasterAuthorizedNetworksConfigCidrBlocksArray def self.parse(value, parent_identifier) return if value.nil? return ClusterMasterAuthorizedNetworksConfigCidrBlocks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ClusterMasterAuthorizedNetworksConfigCidrBlocks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/container/property/cluster_network_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterNetworkConfig attr_reader :enable_intra_node_visibility attr_reader :network attr_reader :subnetwork attr_reader :default_snat_status def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_intra_node_visibility = args['enableIntraNodeVisibility'] @network = args['network'] @subnetwork = args['subnetwork'] @default_snat_status = args['defaultSnatStatus'] end def to_s "#{@parent_identifier} ClusterNetworkConfig" end end end end end ================================================ FILE: libraries/google/container/property/cluster_network_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterNetworkPolicy attr_reader :provider attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @provider = args['provider'] @enabled = args['enabled'] end def to_s "#{@parent_identifier} ClusterNetworkPolicy" end end end end end ================================================ FILE: libraries/google/container/property/cluster_node_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/cluster_node_config_accelerators' require 'google/container/property/cluster_node_config_shielded_instance_config' require 'google/container/property/cluster_node_config_taints' module GoogleInSpec module Container module Property class ClusterNodeConfig attr_reader :machine_type attr_reader :disk_size_gb attr_reader :oauth_scopes attr_reader :service_account attr_reader :metadata attr_reader :image_type attr_reader :labels attr_reader :local_ssd_count attr_reader :tags attr_reader :preemptible attr_reader :accelerators attr_reader :disk_type attr_reader :min_cpu_platform attr_reader :taints attr_reader :shielded_instance_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] @disk_size_gb = args['diskSizeGb'] @oauth_scopes = args['oauthScopes'] @service_account = args['serviceAccount'] @metadata = args['metadata'] @image_type = args['imageType'] @labels = args['labels'] @local_ssd_count = args['localSsdCount'] @tags = args['tags'] @preemptible = args['preemptible'] @accelerators = GoogleInSpec::Container::Property::ClusterNodeConfigAcceleratorsArray.parse(args['accelerators'], to_s) @disk_type = args['diskType'] @min_cpu_platform = args['minCpuPlatform'] @taints = GoogleInSpec::Container::Property::ClusterNodeConfigTaintsArray.parse(args['taints'], to_s) @shielded_instance_config = GoogleInSpec::Container::Property::ClusterNodeConfigShieldedInstanceConfig.new(args['shieldedInstanceConfig'], to_s) end def to_s "#{@parent_identifier} ClusterNodeConfig" end end end end end ================================================ FILE: libraries/google/container/property/cluster_node_config_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterNodeConfigAccelerators attr_reader :accelerator_count attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_count = args['acceleratorCount'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} ClusterNodeConfigAccelerators" end end class ClusterNodeConfigAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return ClusterNodeConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ClusterNodeConfigAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/container/property/cluster_node_config_shielded_instance_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterNodeConfigShieldedInstanceConfig attr_reader :enable_secure_boot attr_reader :enable_integrity_monitoring def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_secure_boot = args['enableSecureBoot'] @enable_integrity_monitoring = args['enableIntegrityMonitoring'] end def to_s "#{@parent_identifier} ClusterNodeConfigShieldedInstanceConfig" end end end end end ================================================ FILE: libraries/google/container/property/cluster_node_config_taints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterNodeConfigTaints attr_reader :key attr_reader :value attr_reader :effect def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @value = args['value'] @effect = args['effect'] end def to_s "#{@parent_identifier} ClusterNodeConfigTaints" end end class ClusterNodeConfigTaintsArray def self.parse(value, parent_identifier) return if value.nil? return ClusterNodeConfigTaints.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ClusterNodeConfigTaints.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/container/property/cluster_node_pools.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterNodePools attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} ClusterNodePools" end end class ClusterNodePoolsArray def self.parse(value, parent_identifier) return if value.nil? return ClusterNodePools.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ClusterNodePools.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/container/property/cluster_pod_security_policy_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterPodSecurityPolicyConfig attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} ClusterPodSecurityPolicyConfig" end end end end end ================================================ FILE: libraries/google/container/property/cluster_private_cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterPrivateClusterConfig attr_reader :enable_private_nodes attr_reader :enable_private_endpoint attr_reader :master_ipv4_cidr_block attr_reader :private_endpoint attr_reader :public_endpoint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_private_nodes = args['enablePrivateNodes'] @enable_private_endpoint = args['enablePrivateEndpoint'] @master_ipv4_cidr_block = args['masterIpv4CidrBlock'] @private_endpoint = args['privateEndpoint'] @public_endpoint = args['publicEndpoint'] end def to_s "#{@parent_identifier} ClusterPrivateClusterConfig" end end end end end ================================================ FILE: libraries/google/container/property/cluster_release_channel.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterReleaseChannel attr_reader :channel def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @channel = args['channel'] end def to_s "#{@parent_identifier} ClusterReleaseChannel" end end end end end ================================================ FILE: libraries/google/container/property/cluster_shielded_nodes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ClusterShieldedNodes attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} ClusterShieldedNodes" end end end end end ================================================ FILE: libraries/google/container/property/nodepool_autoscaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class NodePoolAutoscaling attr_reader :enabled attr_reader :min_node_count attr_reader :max_node_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] @min_node_count = args['minNodeCount'] @max_node_count = args['maxNodeCount'] end def to_s "#{@parent_identifier} NodePoolAutoscaling" end end end end end ================================================ FILE: libraries/google/container/property/nodepool_conditions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class NodePoolConditions attr_reader :code def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] end def to_s "#{@parent_identifier} NodePoolConditions" end end class NodePoolConditionsArray def self.parse(value, parent_identifier) return if value.nil? return NodePoolConditions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NodePoolConditions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/container/property/nodepool_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/nodepool_config_accelerators' require 'google/container/property/nodepool_config_shielded_instance_config' require 'google/container/property/nodepool_config_taints' require 'google/container/property/nodepool_config_workload_meta_config' module GoogleInSpec module Container module Property class NodePoolConfig attr_reader :machine_type attr_reader :disk_size_gb attr_reader :oauth_scopes attr_reader :service_account attr_reader :metadata attr_reader :image_type attr_reader :labels attr_reader :local_ssd_count attr_reader :tags attr_reader :preemptible attr_reader :accelerators attr_reader :disk_type attr_reader :min_cpu_platform attr_reader :taints attr_reader :shielded_instance_config attr_reader :workload_meta_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] @disk_size_gb = args['diskSizeGb'] @oauth_scopes = args['oauthScopes'] @service_account = args['serviceAccount'] @metadata = args['metadata'] @image_type = args['imageType'] @labels = args['labels'] @local_ssd_count = args['localSsdCount'] @tags = args['tags'] @preemptible = args['preemptible'] @accelerators = GoogleInSpec::Container::Property::NodePoolConfigAcceleratorsArray.parse(args['accelerators'], to_s) @disk_type = args['diskType'] @min_cpu_platform = args['minCpuPlatform'] @taints = GoogleInSpec::Container::Property::NodePoolConfigTaintsArray.parse(args['taints'], to_s) @shielded_instance_config = GoogleInSpec::Container::Property::NodePoolConfigShieldedInstanceConfig.new(args['shieldedInstanceConfig'], to_s) @workload_meta_config = GoogleInSpec::Container::Property::NodePoolConfigWorkloadMetaConfig.new(args['workloadMetadataConfig'], to_s) end def to_s "#{@parent_identifier} NodePoolConfig" end end end end end ================================================ FILE: libraries/google/container/property/nodepool_config_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class NodePoolConfigAccelerators attr_reader :accelerator_count attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_count = args['acceleratorCount'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} NodePoolConfigAccelerators" end end class NodePoolConfigAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return NodePoolConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NodePoolConfigAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/container/property/nodepool_config_shielded_instance_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class NodePoolConfigShieldedInstanceConfig attr_reader :enable_secure_boot attr_reader :enable_integrity_monitoring def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_secure_boot = args['enableSecureBoot'] @enable_integrity_monitoring = args['enableIntegrityMonitoring'] end def to_s "#{@parent_identifier} NodePoolConfigShieldedInstanceConfig" end end end end end ================================================ FILE: libraries/google/container/property/nodepool_config_taints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class NodePoolConfigTaints attr_reader :key attr_reader :value attr_reader :effect def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @value = args['value'] @effect = args['effect'] end def to_s "#{@parent_identifier} NodePoolConfigTaints" end end class NodePoolConfigTaintsArray def self.parse(value, parent_identifier) return if value.nil? return NodePoolConfigTaints.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NodePoolConfigTaints.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/container/property/nodepool_config_workload_meta_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class NodePoolConfigWorkloadMetaConfig attr_reader :mode def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @mode = args['mode'] end def to_s "#{@parent_identifier} NodePoolConfigWorkloadMetaConfig" end end end end end ================================================ FILE: libraries/google/container/property/nodepool_management.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/container/property/nodepool_management_upgrade_options' module GoogleInSpec module Container module Property class NodePoolManagement attr_reader :auto_upgrade attr_reader :auto_repair attr_reader :upgrade_options def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @auto_upgrade = args['autoUpgrade'] @auto_repair = args['autoRepair'] @upgrade_options = GoogleInSpec::Container::Property::NodePoolManagementUpgradeOptions.new(args['upgradeOptions'], to_s) end def to_s "#{@parent_identifier} NodePoolManagement" end end end end end ================================================ FILE: libraries/google/container/property/nodepool_management_upgrade_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class NodePoolManagementUpgradeOptions attr_reader :auto_upgrade_start_time attr_reader :description def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @auto_upgrade_start_time = parse_time_string(args['autoUpgradeStartTime']) @description = args['description'] end def to_s "#{@parent_identifier} NodePoolManagementUpgradeOptions" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/container/property/nodepool_max_pods_constraint.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class NodePoolMaxPodsConstraint attr_reader :max_pods_per_node def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_pods_per_node = args['maxPodsPerNode'] end def to_s "#{@parent_identifier} NodePoolMaxPodsConstraint" end end end end end ================================================ FILE: libraries/google/container/property/serverconfig_channels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Container module Property class ServerConfigChannels attr_reader :channel attr_reader :default_version attr_reader :valid_versions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @channel = args['channel'] @default_version = args['defaultVersion'] @valid_versions = args['validVersions'] end def to_s "#{@parent_identifier} ServerConfigChannels" end end class ServerConfigChannelsArray def self.parse(value, parent_identifier) return if value.nil? return ServerConfigChannels.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServerConfigChannels.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_environment_debug_options' require 'google/dataflow/property/projectlocationjob_environment_debug_options_data_sampling' require 'google/dataflow/property/projectlocationjob_environment_internal_experiments' require 'google/dataflow/property/projectlocationjob_environment_sdk_pipeline_options' require 'google/dataflow/property/projectlocationjob_environment_user_agent' require 'google/dataflow/property/projectlocationjob_environment_version' require 'google/dataflow/property/projectlocationjob_environment_worker_pools' module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironment attr_reader :temp_storage_prefix attr_reader :cluster_manager_api_service attr_reader :experiments attr_reader :service_options attr_reader :service_kms_key_name attr_reader :worker_pools attr_reader :user_agent attr_reader :version attr_reader :dataset attr_reader :sdk_pipeline_options attr_reader :internal_experiments attr_reader :service_account_email attr_reader :flex_resource_scheduling_goal attr_reader :worker_region attr_reader :worker_zone attr_reader :shuffle_mode attr_reader :debug_options attr_reader :use_streaming_engine_resource_based_billing attr_reader :streaming_mode def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @temp_storage_prefix = args['tempStoragePrefix'] @cluster_manager_api_service = args['clusterManagerApiService'] @experiments = args['experiments'] @service_options = args['serviceOptions'] @service_kms_key_name = args['serviceKmsKeyName'] @worker_pools = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentWorkerPoolsArray.parse(args['workerPools'], to_s) @user_agent = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentUserAgent.new(args['userAgent'], to_s) @version = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentVersion.new(args['version'], to_s) @dataset = args['dataset'] @sdk_pipeline_options = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentSdkPipelineOptions.new(args['sdkPipelineOptions'], to_s) @internal_experiments = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentInternalExperiments.new(args['internalExperiments'], to_s) @service_account_email = args['serviceAccountEmail'] @flex_resource_scheduling_goal = args['flexResourceSchedulingGoal'] @worker_region = args['workerRegion'] @worker_zone = args['workerZone'] @shuffle_mode = args['shuffleMode'] @debug_options = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentDebugOptions.new(args['debugOptions'], to_s) @use_streaming_engine_resource_based_billing = args['useStreamingEngineResourceBasedBilling'] @streaming_mode = args['streamingMode'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironment" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_debug_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_environment_debug_options_data_sampling' module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentDebugOptions attr_reader :enable_hot_key_logging attr_reader :data_sampling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_hot_key_logging = args['enableHotKeyLogging'] @data_sampling = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentDebugOptionsDataSampling.new(args['dataSampling'], to_s) end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentDebugOptions" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_debug_options_data_sampling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentDebugOptionsDataSampling attr_reader :behaviors def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @behaviors = args['behaviors'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentDebugOptionsDataSampling" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_internal_experiments.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentInternalExperiments attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentInternalExperiments" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_sdk_pipeline_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentSdkPipelineOptions attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentSdkPipelineOptions" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_user_agent.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentUserAgent attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentUserAgent" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_version.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentVersion attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentVersion" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_worker_pools.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_environment_worker_pools_autoscaling_settings' require 'google/dataflow/property/projectlocationjob_environment_worker_pools_data_disks' require 'google/dataflow/property/projectlocationjob_environment_worker_pools_metadata' require 'google/dataflow/property/projectlocationjob_environment_worker_pools_packages' require 'google/dataflow/property/projectlocationjob_environment_worker_pools_pool_args' require 'google/dataflow/property/projectlocationjob_environment_worker_pools_sdk_harness_container_images' require 'google/dataflow/property/projectlocationjob_environment_worker_pools_taskrunner_settings' require 'google/dataflow/property/projectlocationjob_environment_worker_pools_taskrunner_settings_parallel_worker_settings' module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentWorkerPools attr_reader :kind attr_reader :num_workers attr_reader :packages attr_reader :default_package_set attr_reader :machine_type attr_reader :teardown_policy attr_reader :disk_size_gb attr_reader :disk_type attr_reader :disk_source_image attr_reader :zone attr_reader :taskrunner_settings attr_reader :on_host_maintenance attr_reader :data_disks attr_reader :metadata attr_reader :autoscaling_settings attr_reader :pool_args attr_reader :network attr_reader :subnetwork attr_reader :worker_harness_container_image attr_reader :num_threads_per_worker attr_reader :ip_configuration attr_reader :sdk_harness_container_images def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @num_workers = args['numWorkers'] @packages = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentWorkerPoolsPackagesArray.parse(args['packages'], to_s) @default_package_set = args['defaultPackageSet'] @machine_type = args['machineType'] @teardown_policy = args['teardownPolicy'] @disk_size_gb = args['diskSizeGb'] @disk_type = args['diskType'] @disk_source_image = args['diskSourceImage'] @zone = args['zone'] @taskrunner_settings = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentWorkerPoolsTaskrunnerSettings.new(args['taskrunnerSettings'], to_s) @on_host_maintenance = args['onHostMaintenance'] @data_disks = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentWorkerPoolsDataDisksArray.parse(args['dataDisks'], to_s) @metadata = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentWorkerPoolsMetadata.new(args['metadata'], to_s) @autoscaling_settings = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentWorkerPoolsAutoscalingSettings.new(args['autoscalingSettings'], to_s) @pool_args = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentWorkerPoolsPoolArgs.new(args['poolArgs'], to_s) @network = args['network'] @subnetwork = args['subnetwork'] @worker_harness_container_image = args['workerHarnessContainerImage'] @num_threads_per_worker = args['numThreadsPerWorker'] @ip_configuration = args['ipConfiguration'] @sdk_harness_container_images = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentWorkerPoolsSdkHarnessContainerImagesArray.parse(args['sdkHarnessContainerImages'], to_s) end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentWorkerPools" end end class ProjectLocationJobEnvironmentWorkerPoolsArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobEnvironmentWorkerPools.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobEnvironmentWorkerPools.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_worker_pools_autoscaling_settings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentWorkerPoolsAutoscalingSettings attr_reader :algorithm attr_reader :max_num_workers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @algorithm = args['algorithm'] @max_num_workers = args['maxNumWorkers'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentWorkerPoolsAutoscalingSettings" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_worker_pools_data_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentWorkerPoolsDataDisks attr_reader :size_gb attr_reader :disk_type attr_reader :mount_point def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @size_gb = args['sizeGb'] @disk_type = args['diskType'] @mount_point = args['mountPoint'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentWorkerPoolsDataDisks" end end class ProjectLocationJobEnvironmentWorkerPoolsDataDisksArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobEnvironmentWorkerPoolsDataDisks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobEnvironmentWorkerPoolsDataDisks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_worker_pools_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentWorkerPoolsMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentWorkerPoolsMetadata" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_worker_pools_packages.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentWorkerPoolsPackages attr_reader :name attr_reader :location def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @location = args['location'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentWorkerPoolsPackages" end end class ProjectLocationJobEnvironmentWorkerPoolsPackagesArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobEnvironmentWorkerPoolsPackages.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobEnvironmentWorkerPoolsPackages.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_worker_pools_pool_args.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentWorkerPoolsPoolArgs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentWorkerPoolsPoolArgs" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_worker_pools_sdk_harness_container_images.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentWorkerPoolsSdkHarnessContainerImages attr_reader :container_image attr_reader :use_single_core_per_container attr_reader :environment_id attr_reader :capabilities def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @container_image = args['containerImage'] @use_single_core_per_container = args['useSingleCorePerContainer'] @environment_id = args['environmentId'] @capabilities = args['capabilities'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentWorkerPoolsSdkHarnessContainerImages" end end class ProjectLocationJobEnvironmentWorkerPoolsSdkHarnessContainerImagesArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobEnvironmentWorkerPoolsSdkHarnessContainerImages.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobEnvironmentWorkerPoolsSdkHarnessContainerImages.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_worker_pools_taskrunner_settings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_environment_worker_pools_taskrunner_settings_parallel_worker_settings' module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentWorkerPoolsTaskrunnerSettings attr_reader :task_user attr_reader :task_group attr_reader :oauth_scopes attr_reader :base_url attr_reader :dataflow_api_version attr_reader :parallel_worker_settings attr_reader :base_task_dir attr_reader :continue_on_exception attr_reader :log_to_serialconsole attr_reader :alsologtostderr attr_reader :log_upload_location attr_reader :log_dir attr_reader :temp_storage_prefix attr_reader :harness_command attr_reader :workflow_file_name attr_reader :commandlines_file_name attr_reader :vm_id attr_reader :language_hint attr_reader :streaming_worker_main_class def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @task_user = args['taskUser'] @task_group = args['taskGroup'] @oauth_scopes = args['oauthScopes'] @base_url = args['baseUrl'] @dataflow_api_version = args['dataflowApiVersion'] @parallel_worker_settings = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironmentWorkerPoolsTaskrunnerSettingsParallelWorkerSettings.new(args['parallelWorkerSettings'], to_s) @base_task_dir = args['baseTaskDir'] @continue_on_exception = args['continueOnException'] @log_to_serialconsole = args['logToSerialconsole'] @alsologtostderr = args['alsologtostderr'] @log_upload_location = args['logUploadLocation'] @log_dir = args['logDir'] @temp_storage_prefix = args['tempStoragePrefix'] @harness_command = args['harnessCommand'] @workflow_file_name = args['workflowFileName'] @commandlines_file_name = args['commandlinesFileName'] @vm_id = args['vmId'] @language_hint = args['languageHint'] @streaming_worker_main_class = args['streamingWorkerMainClass'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentWorkerPoolsTaskrunnerSettings" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_environment_worker_pools_taskrunner_settings_parallel_worker_settings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobEnvironmentWorkerPoolsTaskrunnerSettingsParallelWorkerSettings attr_reader :base_url attr_reader :reporting_enabled attr_reader :service_path attr_reader :shuffle_service_path attr_reader :worker_id attr_reader :temp_storage_prefix def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @base_url = args['baseUrl'] @reporting_enabled = args['reportingEnabled'] @service_path = args['servicePath'] @shuffle_service_path = args['shuffleServicePath'] @worker_id = args['workerId'] @temp_storage_prefix = args['tempStoragePrefix'] end def to_s "#{@parent_identifier} ProjectLocationJobEnvironmentWorkerPoolsTaskrunnerSettingsParallelWorkerSettings" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_execution_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_execution_info_stages' module GoogleInSpec module Dataflow module Property class ProjectLocationJobExecutionInfo attr_reader :stages def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @stages = GoogleInSpec::Dataflow::Property::ProjectLocationJobExecutionInfoStages.new(args['stages'], to_s) end def to_s "#{@parent_identifier} ProjectLocationJobExecutionInfo" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_execution_info_stages.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobExecutionInfoStages attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobExecutionInfoStages" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_job_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_job_metadata_big_table_details' require 'google/dataflow/property/projectlocationjob_job_metadata_bigquery_details' require 'google/dataflow/property/projectlocationjob_job_metadata_datastore_details' require 'google/dataflow/property/projectlocationjob_job_metadata_file_details' require 'google/dataflow/property/projectlocationjob_job_metadata_pubsub_details' require 'google/dataflow/property/projectlocationjob_job_metadata_sdk_version' require 'google/dataflow/property/projectlocationjob_job_metadata_sdk_version_bugs' require 'google/dataflow/property/projectlocationjob_job_metadata_spanner_details' require 'google/dataflow/property/projectlocationjob_job_metadata_user_display_properties' module GoogleInSpec module Dataflow module Property class ProjectLocationJobJobMetadata attr_reader :sdk_version attr_reader :spanner_details attr_reader :bigquery_details attr_reader :big_table_details attr_reader :pubsub_details attr_reader :file_details attr_reader :datastore_details attr_reader :user_display_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @sdk_version = GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadataSdkVersion.new(args['sdkVersion'], to_s) @spanner_details = GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadataSpannerDetailsArray.parse(args['spannerDetails'], to_s) @bigquery_details = GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadataBigqueryDetailsArray.parse(args['bigqueryDetails'], to_s) @big_table_details = GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadataBigTableDetailsArray.parse(args['bigTableDetails'], to_s) @pubsub_details = GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadataPubsubDetailsArray.parse(args['pubsubDetails'], to_s) @file_details = GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadataFileDetailsArray.parse(args['fileDetails'], to_s) @datastore_details = GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadataDatastoreDetailsArray.parse(args['datastoreDetails'], to_s) @user_display_properties = GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadataUserDisplayProperties.new(args['userDisplayProperties'], to_s) end def to_s "#{@parent_identifier} ProjectLocationJobJobMetadata" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_job_metadata_big_table_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobJobMetadataBigTableDetails attr_reader :project_id attr_reader :instance_id attr_reader :table_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_id = args['projectId'] @instance_id = args['instanceId'] @table_id = args['tableId'] end def to_s "#{@parent_identifier} ProjectLocationJobJobMetadataBigTableDetails" end end class ProjectLocationJobJobMetadataBigTableDetailsArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobJobMetadataBigTableDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobJobMetadataBigTableDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_job_metadata_bigquery_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobJobMetadataBigqueryDetails attr_reader :table attr_reader :dataset attr_reader :project_id attr_reader :query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @table = args['table'] @dataset = args['dataset'] @project_id = args['projectId'] @query = args['query'] end def to_s "#{@parent_identifier} ProjectLocationJobJobMetadataBigqueryDetails" end end class ProjectLocationJobJobMetadataBigqueryDetailsArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobJobMetadataBigqueryDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobJobMetadataBigqueryDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_job_metadata_datastore_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobJobMetadataDatastoreDetails attr_reader :namespace attr_reader :project_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @namespace = args['namespace'] @project_id = args['projectId'] end def to_s "#{@parent_identifier} ProjectLocationJobJobMetadataDatastoreDetails" end end class ProjectLocationJobJobMetadataDatastoreDetailsArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobJobMetadataDatastoreDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobJobMetadataDatastoreDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_job_metadata_file_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobJobMetadataFileDetails attr_reader :file_pattern def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @file_pattern = args['filePattern'] end def to_s "#{@parent_identifier} ProjectLocationJobJobMetadataFileDetails" end end class ProjectLocationJobJobMetadataFileDetailsArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobJobMetadataFileDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobJobMetadataFileDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_job_metadata_pubsub_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobJobMetadataPubsubDetails attr_reader :topic attr_reader :subscription def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @topic = args['topic'] @subscription = args['subscription'] end def to_s "#{@parent_identifier} ProjectLocationJobJobMetadataPubsubDetails" end end class ProjectLocationJobJobMetadataPubsubDetailsArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobJobMetadataPubsubDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobJobMetadataPubsubDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_job_metadata_sdk_version.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_job_metadata_sdk_version_bugs' module GoogleInSpec module Dataflow module Property class ProjectLocationJobJobMetadataSdkVersion attr_reader :version attr_reader :version_display_name attr_reader :sdk_support_status attr_reader :bugs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @version = args['version'] @version_display_name = args['versionDisplayName'] @sdk_support_status = args['sdkSupportStatus'] @bugs = GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadataSdkVersionBugsArray.parse(args['bugs'], to_s) end def to_s "#{@parent_identifier} ProjectLocationJobJobMetadataSdkVersion" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_job_metadata_sdk_version_bugs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobJobMetadataSdkVersionBugs attr_reader :type attr_reader :severity attr_reader :uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @severity = args['severity'] @uri = args['uri'] end def to_s "#{@parent_identifier} ProjectLocationJobJobMetadataSdkVersionBugs" end end class ProjectLocationJobJobMetadataSdkVersionBugsArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobJobMetadataSdkVersionBugs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobJobMetadataSdkVersionBugs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_job_metadata_spanner_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobJobMetadataSpannerDetails attr_reader :project_id attr_reader :instance_id attr_reader :database_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_id = args['projectId'] @instance_id = args['instanceId'] @database_id = args['databaseId'] end def to_s "#{@parent_identifier} ProjectLocationJobJobMetadataSpannerDetails" end end class ProjectLocationJobJobMetadataSpannerDetailsArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobJobMetadataSpannerDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobJobMetadataSpannerDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_job_metadata_user_display_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobJobMetadataUserDisplayProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobJobMetadataUserDisplayProperties" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobLabels" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_pipeline_description.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_pipeline_description_display_data' require 'google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage' require 'google/dataflow/property/projectlocationjob_pipeline_description_original_pipeline_transform' module GoogleInSpec module Dataflow module Property class ProjectLocationJobPipelineDescription attr_reader :original_pipeline_transform attr_reader :execution_pipeline_stage attr_reader :display_data attr_reader :step_names_hash def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @original_pipeline_transform = GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescriptionOriginalPipelineTransformArray.parse(args['originalPipelineTransform'], to_s) @execution_pipeline_stage = GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescriptionExecutionPipelineStageArray.parse(args['executionPipelineStage'], to_s) @display_data = GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescriptionDisplayDataArray.parse(args['displayData'], to_s) @step_names_hash = args['stepNamesHash'] end def to_s "#{@parent_identifier} ProjectLocationJobPipelineDescription" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_pipeline_description_display_data.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobPipelineDescriptionDisplayData attr_reader :key attr_reader :namespace attr_reader :str_value attr_reader :int64_value attr_reader :float_value attr_reader :java_class_value attr_reader :timestamp_value attr_reader :duration_value attr_reader :bool_value attr_reader :short_str_value attr_reader :url attr_reader :label def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @namespace = args['namespace'] @str_value = args['strValue'] @int64_value = args['int64Value'] @float_value = args['floatValue'] @java_class_value = args['javaClassValue'] @timestamp_value = args['timestampValue'] @duration_value = args['durationValue'] @bool_value = args['boolValue'] @short_str_value = args['shortStrValue'] @url = args['url'] @label = args['label'] end def to_s "#{@parent_identifier} ProjectLocationJobPipelineDescriptionDisplayData" end end class ProjectLocationJobPipelineDescriptionDisplayDataArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobPipelineDescriptionDisplayData.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobPipelineDescriptionDisplayData.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage_component_source' require 'google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage_component_transform' require 'google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage_input_source' require 'google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage_output_source' module GoogleInSpec module Dataflow module Property class ProjectLocationJobPipelineDescriptionExecutionPipelineStage attr_reader :name attr_reader :id attr_reader :kind attr_reader :input_source attr_reader :output_source attr_reader :prerequisite_stage attr_reader :component_transform attr_reader :component_source def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @id = args['id'] @kind = args['kind'] @input_source = GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescriptionExecutionPipelineStageInputSourceArray.parse(args['inputSource'], to_s) @output_source = GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescriptionExecutionPipelineStageOutputSourceArray.parse(args['outputSource'], to_s) @prerequisite_stage = args['prerequisiteStage'] @component_transform = GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentTransformArray.parse(args['componentTransform'], to_s) @component_source = GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentSourceArray.parse(args['componentSource'], to_s) end def to_s "#{@parent_identifier} ProjectLocationJobPipelineDescriptionExecutionPipelineStage" end end class ProjectLocationJobPipelineDescriptionExecutionPipelineStageArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobPipelineDescriptionExecutionPipelineStage.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobPipelineDescriptionExecutionPipelineStage.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage_component_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentSource attr_reader :user_name attr_reader :name attr_reader :original_transform_or_collection def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @user_name = args['userName'] @name = args['name'] @original_transform_or_collection = args['originalTransformOrCollection'] end def to_s "#{@parent_identifier} ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentSource" end end class ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentSourceArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentSource.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentSource.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage_component_transform.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentTransform attr_reader :user_name attr_reader :name attr_reader :original_transform def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @user_name = args['userName'] @name = args['name'] @original_transform = args['originalTransform'] end def to_s "#{@parent_identifier} ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentTransform" end end class ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentTransformArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentTransform.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobPipelineDescriptionExecutionPipelineStageComponentTransform.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage_input_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobPipelineDescriptionExecutionPipelineStageInputSource attr_reader :user_name attr_reader :name attr_reader :original_transform_or_collection attr_reader :size_bytes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @user_name = args['userName'] @name = args['name'] @original_transform_or_collection = args['originalTransformOrCollection'] @size_bytes = args['sizeBytes'] end def to_s "#{@parent_identifier} ProjectLocationJobPipelineDescriptionExecutionPipelineStageInputSource" end end class ProjectLocationJobPipelineDescriptionExecutionPipelineStageInputSourceArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobPipelineDescriptionExecutionPipelineStageInputSource.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobPipelineDescriptionExecutionPipelineStageInputSource.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage_output_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobPipelineDescriptionExecutionPipelineStageOutputSource attr_reader :user_name attr_reader :name attr_reader :original_transform_or_collection attr_reader :size_bytes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @user_name = args['userName'] @name = args['name'] @original_transform_or_collection = args['originalTransformOrCollection'] @size_bytes = args['sizeBytes'] end def to_s "#{@parent_identifier} ProjectLocationJobPipelineDescriptionExecutionPipelineStageOutputSource" end end class ProjectLocationJobPipelineDescriptionExecutionPipelineStageOutputSourceArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobPipelineDescriptionExecutionPipelineStageOutputSource.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobPipelineDescriptionExecutionPipelineStageOutputSource.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_pipeline_description_original_pipeline_transform.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_pipeline_description_original_pipeline_transform_display_data' module GoogleInSpec module Dataflow module Property class ProjectLocationJobPipelineDescriptionOriginalPipelineTransform attr_reader :kind attr_reader :id attr_reader :name attr_reader :display_data attr_reader :output_collection_name attr_reader :input_collection_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @id = args['id'] @name = args['name'] @display_data = GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescriptionOriginalPipelineTransformDisplayDataArray.parse(args['displayData'], to_s) @output_collection_name = args['outputCollectionName'] @input_collection_name = args['inputCollectionName'] end def to_s "#{@parent_identifier} ProjectLocationJobPipelineDescriptionOriginalPipelineTransform" end end class ProjectLocationJobPipelineDescriptionOriginalPipelineTransformArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobPipelineDescriptionOriginalPipelineTransform.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobPipelineDescriptionOriginalPipelineTransform.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_pipeline_description_original_pipeline_transform_display_data.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobPipelineDescriptionOriginalPipelineTransformDisplayData attr_reader :key attr_reader :namespace attr_reader :str_value attr_reader :int64_value attr_reader :float_value attr_reader :java_class_value attr_reader :timestamp_value attr_reader :duration_value attr_reader :bool_value attr_reader :short_str_value attr_reader :url attr_reader :label def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @namespace = args['namespace'] @str_value = args['strValue'] @int64_value = args['int64Value'] @float_value = args['floatValue'] @java_class_value = args['javaClassValue'] @timestamp_value = args['timestampValue'] @duration_value = args['durationValue'] @bool_value = args['boolValue'] @short_str_value = args['shortStrValue'] @url = args['url'] @label = args['label'] end def to_s "#{@parent_identifier} ProjectLocationJobPipelineDescriptionOriginalPipelineTransformDisplayData" end end class ProjectLocationJobPipelineDescriptionOriginalPipelineTransformDisplayDataArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobPipelineDescriptionOriginalPipelineTransformDisplayData.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobPipelineDescriptionOriginalPipelineTransformDisplayData.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_runtime_updatable_params.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobRuntimeUpdatableParams attr_reader :max_num_workers attr_reader :min_num_workers attr_reader :worker_utilization_hint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_num_workers = args['maxNumWorkers'] @min_num_workers = args['minNumWorkers'] @worker_utilization_hint = args['workerUtilizationHint'] end def to_s "#{@parent_identifier} ProjectLocationJobRuntimeUpdatableParams" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_stage_states.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobStageStates attr_reader :execution_stage_name attr_reader :execution_stage_state attr_reader :current_state_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @execution_stage_name = args['executionStageName'] @execution_stage_state = args['executionStageState'] @current_state_time = args['currentStateTime'] end def to_s "#{@parent_identifier} ProjectLocationJobStageStates" end end class ProjectLocationJobStageStatesArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobStageStates.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobStageStates.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_steps.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataflow/property/projectlocationjob_steps_properties' module GoogleInSpec module Dataflow module Property class ProjectLocationJobSteps attr_reader :kind attr_reader :name attr_reader :properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @name = args['name'] @properties = GoogleInSpec::Dataflow::Property::ProjectLocationJobStepsProperties.new(args['properties'], to_s) end def to_s "#{@parent_identifier} ProjectLocationJobSteps" end end class ProjectLocationJobStepsArray def self.parse(value, parent_identifier) return if value.nil? return ProjectLocationJobSteps.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ProjectLocationJobSteps.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_steps_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobStepsProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobStepsProperties" end end end end end ================================================ FILE: libraries/google/dataflow/property/projectlocationjob_transform_name_mapping.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataflow module Property class ProjectLocationJobTransformNameMapping attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ProjectLocationJobTransformNameMapping" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataFusion module Property class InstanceAccelerators attr_reader :accelerator_type attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @state = args['state'] end def to_s "#{@parent_identifier} InstanceAccelerators" end end class InstanceAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_available_version.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataFusion module Property class InstanceAvailableVersion attr_reader :version_number attr_reader :default_version attr_reader :available_features attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @version_number = args['versionNumber'] @default_version = args['defaultVersion'] @available_features = args['availableFeatures'] @type = args['type'] end def to_s "#{@parent_identifier} InstanceAvailableVersion" end end class InstanceAvailableVersionArray def self.parse(value, parent_identifier) return if value.nil? return InstanceAvailableVersion.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceAvailableVersion.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_crypto_key_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataFusion module Property class InstanceCryptoKeyConfig attr_reader :key_reference def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key_reference = args['keyReference'] end def to_s "#{@parent_identifier} InstanceCryptoKeyConfig" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_event_publish_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataFusion module Property class InstanceEventPublishConfig attr_reader :enabled attr_reader :topic def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] @topic = args['topic'] end def to_s "#{@parent_identifier} InstanceEventPublishConfig" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataFusion module Property class InstanceLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} InstanceLabels" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_maintenance_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/datafusion/property/instance_maintenance_policy_maintenance_exclusion_window' require 'google/datafusion/property/instance_maintenance_policy_maintenance_window' require 'google/datafusion/property/instance_maintenance_policy_maintenance_window_recurring_time_window' require 'google/datafusion/property/instance_maintenance_policy_maintenance_window_recurring_time_window_window' module GoogleInSpec module DataFusion module Property class InstanceMaintenancePolicy attr_reader :maintenance_window attr_reader :maintenance_exclusion_window def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @maintenance_window = GoogleInSpec::DataFusion::Property::InstanceMaintenancePolicyMaintenanceWindow.new(args['maintenanceWindow'], to_s) @maintenance_exclusion_window = GoogleInSpec::DataFusion::Property::InstanceMaintenancePolicyMaintenanceExclusionWindow.new(args['maintenanceExclusionWindow'], to_s) end def to_s "#{@parent_identifier} InstanceMaintenancePolicy" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_maintenance_policy_maintenance_exclusion_window.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataFusion module Property class InstanceMaintenancePolicyMaintenanceExclusionWindow attr_reader :start_time attr_reader :end_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @start_time = args['startTime'] @end_time = args['endTime'] end def to_s "#{@parent_identifier} InstanceMaintenancePolicyMaintenanceExclusionWindow" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_maintenance_policy_maintenance_window.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/datafusion/property/instance_maintenance_policy_maintenance_window_recurring_time_window' require 'google/datafusion/property/instance_maintenance_policy_maintenance_window_recurring_time_window_window' module GoogleInSpec module DataFusion module Property class InstanceMaintenancePolicyMaintenanceWindow attr_reader :recurring_time_window def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @recurring_time_window = GoogleInSpec::DataFusion::Property::InstanceMaintenancePolicyMaintenanceWindowRecurringTimeWindow.new(args['recurringTimeWindow'], to_s) end def to_s "#{@parent_identifier} InstanceMaintenancePolicyMaintenanceWindow" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_maintenance_policy_maintenance_window_recurring_time_window.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/datafusion/property/instance_maintenance_policy_maintenance_window_recurring_time_window_window' module GoogleInSpec module DataFusion module Property class InstanceMaintenancePolicyMaintenanceWindowRecurringTimeWindow attr_reader :window attr_reader :recurrence def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @window = GoogleInSpec::DataFusion::Property::InstanceMaintenancePolicyMaintenanceWindowRecurringTimeWindowWindow.new(args['window'], to_s) @recurrence = args['recurrence'] end def to_s "#{@parent_identifier} InstanceMaintenancePolicyMaintenanceWindowRecurringTimeWindow" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_maintenance_policy_maintenance_window_recurring_time_window_window.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataFusion module Property class InstanceMaintenancePolicyMaintenanceWindowRecurringTimeWindowWindow attr_reader :start_time attr_reader :end_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @start_time = args['startTime'] @end_time = args['endTime'] end def to_s "#{@parent_identifier} InstanceMaintenancePolicyMaintenanceWindowRecurringTimeWindowWindow" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_network_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/datafusion/property/instance_network_config_private_service_connect_config' module GoogleInSpec module DataFusion module Property class InstanceNetworkConfig attr_reader :network attr_reader :ip_allocation attr_reader :connection_type attr_reader :private_service_connect_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @network = args['network'] @ip_allocation = args['ipAllocation'] @connection_type = args['connectionType'] @private_service_connect_config = GoogleInSpec::DataFusion::Property::InstanceNetworkConfigPrivateServiceConnectConfig.new(args['privateServiceConnectConfig'], to_s) end def to_s "#{@parent_identifier} InstanceNetworkConfig" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_network_config_private_service_connect_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataFusion module Property class InstanceNetworkConfigPrivateServiceConnectConfig attr_reader :network_attachment attr_reader :unreachable_cidr_block attr_reader :effective_unreachable_cidr_block def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @network_attachment = args['networkAttachment'] @unreachable_cidr_block = args['unreachableCidrBlock'] @effective_unreachable_cidr_block = args['effectiveUnreachableCidrBlock'] end def to_s "#{@parent_identifier} InstanceNetworkConfigPrivateServiceConnectConfig" end end end end end ================================================ FILE: libraries/google/datafusion/property/instance_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataFusion module Property class InstanceOptions attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} InstanceOptions" end end end end end ================================================ FILE: libraries/google/dataproc/property/autoscalingpolicy_basic_algorithm.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/autoscalingpolicy_basic_algorithm_spark_standalone_config' require 'google/dataproc/property/autoscalingpolicy_basic_algorithm_yarn_config' module GoogleInSpec module Dataproc module Property class AutoscalingPolicyBasicAlgorithm attr_reader :yarn_config attr_reader :spark_standalone_config attr_reader :cooldown_period def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @yarn_config = GoogleInSpec::Dataproc::Property::AutoscalingPolicyBasicAlgorithmYarnConfig.new(args['yarnConfig'], to_s) @spark_standalone_config = GoogleInSpec::Dataproc::Property::AutoscalingPolicyBasicAlgorithmSparkStandaloneConfig.new(args['sparkStandaloneConfig'], to_s) @cooldown_period = args['cooldownPeriod'] end def to_s "#{@parent_identifier} AutoscalingPolicyBasicAlgorithm" end end end end end ================================================ FILE: libraries/google/dataproc/property/autoscalingpolicy_basic_algorithm_spark_standalone_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class AutoscalingPolicyBasicAlgorithmSparkStandaloneConfig attr_reader :graceful_decommission_timeout attr_reader :scale_up_factor attr_reader :scale_down_factor attr_reader :scale_up_min_worker_fraction attr_reader :scale_down_min_worker_fraction attr_reader :remove_only_idle_workers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @graceful_decommission_timeout = args['gracefulDecommissionTimeout'] @scale_up_factor = args['scaleUpFactor'] @scale_down_factor = args['scaleDownFactor'] @scale_up_min_worker_fraction = args['scaleUpMinWorkerFraction'] @scale_down_min_worker_fraction = args['scaleDownMinWorkerFraction'] @remove_only_idle_workers = args['removeOnlyIdleWorkers'] end def to_s "#{@parent_identifier} AutoscalingPolicyBasicAlgorithmSparkStandaloneConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/autoscalingpolicy_basic_algorithm_yarn_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class AutoscalingPolicyBasicAlgorithmYarnConfig attr_reader :graceful_decommission_timeout attr_reader :scale_up_factor attr_reader :scale_down_factor attr_reader :scale_up_min_worker_fraction attr_reader :scale_down_min_worker_fraction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @graceful_decommission_timeout = args['gracefulDecommissionTimeout'] @scale_up_factor = args['scaleUpFactor'] @scale_down_factor = args['scaleDownFactor'] @scale_up_min_worker_fraction = args['scaleUpMinWorkerFraction'] @scale_down_min_worker_fraction = args['scaleDownMinWorkerFraction'] end def to_s "#{@parent_identifier} AutoscalingPolicyBasicAlgorithmYarnConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/autoscalingpolicy_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class AutoscalingPolicyLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} AutoscalingPolicyLabels" end end end end end ================================================ FILE: libraries/google/dataproc/property/autoscalingpolicy_secondary_worker_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class AutoscalingPolicySecondaryWorkerConfig attr_reader :min_instances attr_reader :max_instances attr_reader :weight def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min_instances = args['minInstances'] @max_instances = args['maxInstances'] @weight = args['weight'] end def to_s "#{@parent_identifier} AutoscalingPolicySecondaryWorkerConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/autoscalingpolicy_worker_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class AutoscalingPolicyWorkerConfig attr_reader :min_instances attr_reader :max_instances attr_reader :weight def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min_instances = args['minInstances'] @max_instances = args['maxInstances'] @weight = args['weight'] end def to_s "#{@parent_identifier} AutoscalingPolicyWorkerConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_environment_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/batch_environment_config_execution_config' require 'google/dataproc/property/batch_environment_config_peripherals_config' require 'google/dataproc/property/batch_environment_config_peripherals_config_spark_history_server_config' module GoogleInSpec module Dataproc module Property class BatchEnvironmentConfig attr_reader :execution_config attr_reader :peripherals_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @execution_config = GoogleInSpec::Dataproc::Property::BatchEnvironmentConfigExecutionConfig.new(args['executionConfig'], to_s) @peripherals_config = GoogleInSpec::Dataproc::Property::BatchEnvironmentConfigPeripheralsConfig.new(args['peripheralsConfig'], to_s) end def to_s "#{@parent_identifier} BatchEnvironmentConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_environment_config_execution_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchEnvironmentConfigExecutionConfig attr_reader :service_account attr_reader :network_uri attr_reader :subnetwork_uri attr_reader :network_tags attr_reader :kms_key attr_reader :idle_ttl attr_reader :ttl attr_reader :staging_bucket def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service_account = args['serviceAccount'] @network_uri = args['networkUri'] @subnetwork_uri = args['subnetworkUri'] @network_tags = args['networkTags'] @kms_key = args['kmsKey'] @idle_ttl = args['idleTtl'] @ttl = args['ttl'] @staging_bucket = args['stagingBucket'] end def to_s "#{@parent_identifier} BatchEnvironmentConfigExecutionConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_environment_config_peripherals_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/batch_environment_config_peripherals_config_spark_history_server_config' module GoogleInSpec module Dataproc module Property class BatchEnvironmentConfigPeripheralsConfig attr_reader :metastore_service attr_reader :spark_history_server_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metastore_service = args['metastoreService'] @spark_history_server_config = GoogleInSpec::Dataproc::Property::BatchEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig.new(args['sparkHistoryServerConfig'], to_s) end def to_s "#{@parent_identifier} BatchEnvironmentConfigPeripheralsConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_environment_config_peripherals_config_spark_history_server_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig attr_reader :dataproc_cluster def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @dataproc_cluster = args['dataprocCluster'] end def to_s "#{@parent_identifier} BatchEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} BatchLabels" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_pyspark_batch.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchPysparkBatch attr_reader :main_python_file_uri attr_reader :args attr_reader :python_file_uris attr_reader :jar_file_uris attr_reader :file_uris attr_reader :archive_uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_python_file_uri = args['mainPythonFileUri'] @args = args['args'] @python_file_uris = args['pythonFileUris'] @jar_file_uris = args['jarFileUris'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] end def to_s "#{@parent_identifier} BatchPysparkBatch" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_runtime_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/batch_runtime_config_properties' require 'google/dataproc/property/batch_runtime_config_repository_config' require 'google/dataproc/property/batch_runtime_config_repository_config_pypi_repository_config' module GoogleInSpec module Dataproc module Property class BatchRuntimeConfig attr_reader :version attr_reader :container_image attr_reader :properties attr_reader :repository_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @version = args['version'] @container_image = args['containerImage'] @properties = GoogleInSpec::Dataproc::Property::BatchRuntimeConfigProperties.new(args['properties'], to_s) @repository_config = GoogleInSpec::Dataproc::Property::BatchRuntimeConfigRepositoryConfig.new(args['repositoryConfig'], to_s) end def to_s "#{@parent_identifier} BatchRuntimeConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_runtime_config_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchRuntimeConfigProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} BatchRuntimeConfigProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_runtime_config_repository_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/batch_runtime_config_repository_config_pypi_repository_config' module GoogleInSpec module Dataproc module Property class BatchRuntimeConfigRepositoryConfig attr_reader :pypi_repository_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pypi_repository_config = GoogleInSpec::Dataproc::Property::BatchRuntimeConfigRepositoryConfigPypiRepositoryConfig.new(args['pypiRepositoryConfig'], to_s) end def to_s "#{@parent_identifier} BatchRuntimeConfigRepositoryConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_runtime_config_repository_config_pypi_repository_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchRuntimeConfigRepositoryConfigPypiRepositoryConfig attr_reader :pypi_repository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pypi_repository = args['pypiRepository'] end def to_s "#{@parent_identifier} BatchRuntimeConfigRepositoryConfigPypiRepositoryConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_runtime_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/batch_runtime_info_approximate_usage' require 'google/dataproc/property/batch_runtime_info_current_usage' require 'google/dataproc/property/batch_runtime_info_endpoints' module GoogleInSpec module Dataproc module Property class BatchRuntimeInfo attr_reader :endpoints attr_reader :output_uri attr_reader :diagnostic_output_uri attr_reader :approximate_usage attr_reader :current_usage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @endpoints = GoogleInSpec::Dataproc::Property::BatchRuntimeInfoEndpoints.new(args['endpoints'], to_s) @output_uri = args['outputUri'] @diagnostic_output_uri = args['diagnosticOutputUri'] @approximate_usage = GoogleInSpec::Dataproc::Property::BatchRuntimeInfoApproximateUsage.new(args['approximateUsage'], to_s) @current_usage = GoogleInSpec::Dataproc::Property::BatchRuntimeInfoCurrentUsage.new(args['currentUsage'], to_s) end def to_s "#{@parent_identifier} BatchRuntimeInfo" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_runtime_info_approximate_usage.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchRuntimeInfoApproximateUsage attr_reader :milli_dcu_seconds attr_reader :shuffle_storage_gb_seconds attr_reader :milli_accelerator_seconds attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @milli_dcu_seconds = args['milliDcuSeconds'] @shuffle_storage_gb_seconds = args['shuffleStorageGbSeconds'] @milli_accelerator_seconds = args['milliAcceleratorSeconds'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} BatchRuntimeInfoApproximateUsage" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_runtime_info_current_usage.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchRuntimeInfoCurrentUsage attr_reader :milli_dcu attr_reader :shuffle_storage_gb attr_reader :milli_dcu_premium attr_reader :shuffle_storage_gb_premium attr_reader :milli_accelerator attr_reader :accelerator_type attr_reader :snapshot_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @milli_dcu = args['milliDcu'] @shuffle_storage_gb = args['shuffleStorageGb'] @milli_dcu_premium = args['milliDcuPremium'] @shuffle_storage_gb_premium = args['shuffleStorageGbPremium'] @milli_accelerator = args['milliAccelerator'] @accelerator_type = args['acceleratorType'] @snapshot_time = args['snapshotTime'] end def to_s "#{@parent_identifier} BatchRuntimeInfoCurrentUsage" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_runtime_info_endpoints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchRuntimeInfoEndpoints attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} BatchRuntimeInfoEndpoints" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_spark_batch.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchSparkBatch attr_reader :main_jar_file_uri attr_reader :main_class attr_reader :args attr_reader :jar_file_uris attr_reader :file_uris attr_reader :archive_uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_jar_file_uri = args['mainJarFileUri'] @main_class = args['mainClass'] @args = args['args'] @jar_file_uris = args['jarFileUris'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] end def to_s "#{@parent_identifier} BatchSparkBatch" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_spark_r_batch.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchSparkRBatch attr_reader :main_r_file_uri attr_reader :args attr_reader :file_uris attr_reader :archive_uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_r_file_uri = args['mainRFileUri'] @args = args['args'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] end def to_s "#{@parent_identifier} BatchSparkRBatch" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_spark_sql_batch.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/batch_spark_sql_batch_query_variables' module GoogleInSpec module Dataproc module Property class BatchSparkSqlBatch attr_reader :query_file_uri attr_reader :query_variables attr_reader :jar_file_uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_variables = GoogleInSpec::Dataproc::Property::BatchSparkSqlBatchQueryVariables.new(args['queryVariables'], to_s) @jar_file_uris = args['jarFileUris'] end def to_s "#{@parent_identifier} BatchSparkSqlBatch" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_spark_sql_batch_query_variables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchSparkSqlBatchQueryVariables attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} BatchSparkSqlBatchQueryVariables" end end end end end ================================================ FILE: libraries/google/dataproc/property/batch_state_history.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class BatchStateHistory attr_reader :state attr_reader :state_message attr_reader :state_start_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @state = args['state'] @state_message = args['stateMessage'] @state_start_time = args['stateStartTime'] end def to_s "#{@parent_identifier} BatchStateHistory" end end class BatchStateHistoryArray def self.parse(value, parent_identifier) return if value.nil? return BatchStateHistory.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BatchStateHistory.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/cluster_config_encryption_config' require 'google/dataproc/property/cluster_config_gce_cluster_config' require 'google/dataproc/property/cluster_config_initialization_actions' require 'google/dataproc/property/cluster_config_master_config' require 'google/dataproc/property/cluster_config_master_config_disk_config' require 'google/dataproc/property/cluster_config_master_config_managed_group_config' require 'google/dataproc/property/cluster_config_secondary_worker_config' require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' require 'google/dataproc/property/cluster_config_security_config' require 'google/dataproc/property/cluster_config_security_config_kerberos_config' require 'google/dataproc/property/cluster_config_software_config' require 'google/dataproc/property/cluster_config_worker_config' require 'google/dataproc/property/cluster_config_worker_config_disk_config' require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' module GoogleInSpec module Dataproc module Property class ClusterConfig attr_reader :config_bucket attr_reader :gce_cluster_config attr_reader :master_config attr_reader :worker_config attr_reader :secondary_worker_config attr_reader :software_config attr_reader :initialization_actions attr_reader :encryption_config attr_reader :security_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @config_bucket = args['configBucket'] @gce_cluster_config = GoogleInSpec::Dataproc::Property::ClusterConfigGceClusterConfig.new(args['gceClusterConfig'], to_s) @master_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfig.new(args['masterConfig'], to_s) @worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfig.new(args['workerConfig'], to_s) @secondary_worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfig.new(args['secondaryWorkerConfig'], to_s) @software_config = GoogleInSpec::Dataproc::Property::ClusterConfigSoftwareConfig.new(args['softwareConfig'], to_s) @initialization_actions = GoogleInSpec::Dataproc::Property::ClusterConfigInitializationActionsArray.parse(args['initializationActions'], to_s) @encryption_config = GoogleInSpec::Dataproc::Property::ClusterConfigEncryptionConfig.new(args['encryptionConfig'], to_s) @security_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfig.new(args['securityConfig'], to_s) end def to_s "#{@parent_identifier} ClusterConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_encryption_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigEncryptionConfig attr_reader :gce_pd_kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gce_pd_kms_key_name = args['gcePdKmsKeyName'] end def to_s "#{@parent_identifier} ClusterConfigEncryptionConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_gce_cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigGceClusterConfig attr_reader :zone_uri attr_reader :network_uri attr_reader :subnetwork_uri attr_reader :internal_ip_only attr_reader :service_account_scopes attr_reader :tags attr_reader :metadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @zone_uri = args['zoneUri'] @network_uri = args['networkUri'] @subnetwork_uri = args['subnetworkUri'] @internal_ip_only = args['internalIpOnly'] @service_account_scopes = args['serviceAccountScopes'] @tags = args['tags'] @metadata = args['metadata'] end def to_s "#{@parent_identifier} ClusterConfigGceClusterConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_initialization_actions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigInitializationActions attr_reader :executable_file attr_reader :execution_timeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @executable_file = args['executableFile'] @execution_timeout = args['executionTimeout'] end def to_s "#{@parent_identifier} ClusterConfigInitializationActions" end end class ClusterConfigInitializationActionsArray def self.parse(value, parent_identifier) return if value.nil? return ClusterConfigInitializationActions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ClusterConfigInitializationActions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_master_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/cluster_config_master_config_disk_config' require 'google/dataproc/property/cluster_config_master_config_managed_group_config' module GoogleInSpec module Dataproc module Property class ClusterConfigMasterConfig attr_reader :num_instances attr_reader :instance_names attr_reader :image_uri attr_reader :machine_type_uri attr_reader :disk_config attr_reader :is_preemptible attr_reader :managed_group_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @num_instances = args['numInstances'] @instance_names = args['instanceNames'] @image_uri = args['imageUri'] @machine_type_uri = args['machineTypeUri'] @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigDiskConfig.new(args['diskConfig'], to_s) @is_preemptible = args['isPreemptible'] @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) end def to_s "#{@parent_identifier} ClusterConfigMasterConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_master_config_disk_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigMasterConfigDiskConfig attr_reader :boot_disk_type attr_reader :boot_disk_size_gb attr_reader :num_local_ssds def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @boot_disk_type = args['bootDiskType'] @boot_disk_size_gb = args['bootDiskSizeGb'] @num_local_ssds = args['numLocalSsds'] end def to_s "#{@parent_identifier} ClusterConfigMasterConfigDiskConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_master_config_managed_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigMasterConfigManagedGroupConfig attr_reader :instance_template_name attr_reader :instance_group_manager_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_template_name = args['instanceTemplateName'] @instance_group_manager_name = args['instanceGroupManagerName'] end def to_s "#{@parent_identifier} ClusterConfigMasterConfigManagedGroupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_secondary_worker_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' module GoogleInSpec module Dataproc module Property class ClusterConfigSecondaryWorkerConfig attr_reader :num_instances attr_reader :instance_names attr_reader :image_uri attr_reader :machine_type_uri attr_reader :disk_config attr_reader :is_preemptible attr_reader :managed_group_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @num_instances = args['numInstances'] @instance_names = args['instanceNames'] @image_uri = args['imageUri'] @machine_type_uri = args['machineTypeUri'] @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigDiskConfig.new(args['diskConfig'], to_s) @is_preemptible = args['isPreemptible'] @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) end def to_s "#{@parent_identifier} ClusterConfigSecondaryWorkerConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_secondary_worker_config_disk_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigSecondaryWorkerConfigDiskConfig attr_reader :boot_disk_type attr_reader :boot_disk_size_gb attr_reader :num_local_ssds def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @boot_disk_type = args['bootDiskType'] @boot_disk_size_gb = args['bootDiskSizeGb'] @num_local_ssds = args['numLocalSsds'] end def to_s "#{@parent_identifier} ClusterConfigSecondaryWorkerConfigDiskConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigSecondaryWorkerConfigManagedGroupConfig attr_reader :instance_template_name attr_reader :instance_group_manager_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_template_name = args['instanceTemplateName'] @instance_group_manager_name = args['instanceGroupManagerName'] end def to_s "#{@parent_identifier} ClusterConfigSecondaryWorkerConfigManagedGroupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_security_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/cluster_config_security_config_kerberos_config' module GoogleInSpec module Dataproc module Property class ClusterConfigSecurityConfig attr_reader :kerberos_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kerberos_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfigKerberosConfig.new(args['kerberosConfig'], to_s) end def to_s "#{@parent_identifier} ClusterConfigSecurityConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_security_config_kerberos_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigSecurityConfigKerberosConfig attr_reader :enable_kerberos attr_reader :rootprincipal_password_uri attr_reader :kms_key_uri attr_reader :keystore_uri attr_reader :truststore_uri attr_reader :key_password_uri attr_reader :truststore_password_uri attr_reader :cross_realm_trust_realm attr_reader :cross_realm_trust_admin_server attr_reader :cross_realm_trust_shared_password_uri attr_reader :kdc_db_key_uri attr_reader :tgt_lifetime_hours attr_reader :realm def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_kerberos = args['enableKerberos'] @rootprincipal_password_uri = args['rootprincipalPasswordUri'] @kms_key_uri = args['kmsKeyUri'] @keystore_uri = args['keystoreUri'] @truststore_uri = args['truststoreUri'] @key_password_uri = args['keyPasswordUri'] @truststore_password_uri = args['truststorePasswordUri'] @cross_realm_trust_realm = args['crossRealmTrustRealm'] @cross_realm_trust_admin_server = args['crossRealmTrustAdminServer'] @cross_realm_trust_shared_password_uri = args['crossRealmTrustSharedPasswordUri'] @kdc_db_key_uri = args['kdcDbKeyUri'] @tgt_lifetime_hours = args['tgtLifetimeHours'] @realm = args['realm'] end def to_s "#{@parent_identifier} ClusterConfigSecurityConfigKerberosConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_software_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigSoftwareConfig attr_reader :image_version attr_reader :properties attr_reader :optional_components def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @image_version = args['imageVersion'] @properties = args['properties'] @optional_components = args['optionalComponents'] end def to_s "#{@parent_identifier} ClusterConfigSoftwareConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_worker_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/cluster_config_worker_config_disk_config' require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' module GoogleInSpec module Dataproc module Property class ClusterConfigWorkerConfig attr_reader :num_instances attr_reader :instance_names attr_reader :image_uri attr_reader :machine_type_uri attr_reader :disk_config attr_reader :is_preemptible attr_reader :managed_group_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @num_instances = args['numInstances'] @instance_names = args['instanceNames'] @image_uri = args['imageUri'] @machine_type_uri = args['machineTypeUri'] @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigDiskConfig.new(args['diskConfig'], to_s) @is_preemptible = args['isPreemptible'] @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) end def to_s "#{@parent_identifier} ClusterConfigWorkerConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_worker_config_disk_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigWorkerConfigDiskConfig attr_reader :boot_disk_type attr_reader :boot_disk_size_gb attr_reader :num_local_ssds def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @boot_disk_type = args['bootDiskType'] @boot_disk_size_gb = args['bootDiskSizeGb'] @num_local_ssds = args['numLocalSsds'] end def to_s "#{@parent_identifier} ClusterConfigWorkerConfigDiskConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/cluster_config_worker_config_managed_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class ClusterConfigWorkerConfigManagedGroupConfig attr_reader :instance_template_name attr_reader :instance_group_manager_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_template_name = args['instanceTemplateName'] @instance_group_manager_name = args['instanceGroupManagerName'] end def to_s "#{@parent_identifier} ClusterConfigWorkerConfigManagedGroupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_driver_scheduling_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobDriverSchedulingConfig attr_reader :memory_mb attr_reader :vcores def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @memory_mb = args['memoryMb'] @vcores = args['vcores'] end def to_s "#{@parent_identifier} JobDriverSchedulingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_flink_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_flink_job_logging_config' require 'google/dataproc/property/job_flink_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_flink_job_properties' module GoogleInSpec module Dataproc module Property class JobFlinkJob attr_reader :main_jar_file_uri attr_reader :main_class attr_reader :args attr_reader :jar_file_uris attr_reader :savepoint_uri attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_jar_file_uri = args['mainJarFileUri'] @main_class = args['mainClass'] @args = args['args'] @jar_file_uris = args['jarFileUris'] @savepoint_uri = args['savepointUri'] @properties = GoogleInSpec::Dataproc::Property::JobFlinkJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::JobFlinkJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} JobFlinkJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_flink_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_flink_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class JobFlinkJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::JobFlinkJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} JobFlinkJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_flink_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobFlinkJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobFlinkJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_flink_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobFlinkJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobFlinkJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_hadoop_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_hadoop_job_logging_config' require 'google/dataproc/property/job_hadoop_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_hadoop_job_properties' module GoogleInSpec module Dataproc module Property class JobHadoopJob attr_reader :main_jar_file_uri attr_reader :main_class attr_reader :args attr_reader :jar_file_uris attr_reader :file_uris attr_reader :archive_uris attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_jar_file_uri = args['mainJarFileUri'] @main_class = args['mainClass'] @args = args['args'] @jar_file_uris = args['jarFileUris'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] @properties = GoogleInSpec::Dataproc::Property::JobHadoopJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::JobHadoopJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} JobHadoopJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_hadoop_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_hadoop_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class JobHadoopJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::JobHadoopJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} JobHadoopJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_hadoop_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobHadoopJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobHadoopJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_hadoop_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobHadoopJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobHadoopJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_hive_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_hive_job_properties' require 'google/dataproc/property/job_hive_job_query_list' require 'google/dataproc/property/job_hive_job_script_variables' module GoogleInSpec module Dataproc module Property class JobHiveJob attr_reader :query_file_uri attr_reader :query_list attr_reader :continue_on_failure attr_reader :script_variables attr_reader :properties attr_reader :jar_file_uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_list = GoogleInSpec::Dataproc::Property::JobHiveJobQueryList.new(args['queryList'], to_s) @continue_on_failure = args['continueOnFailure'] @script_variables = GoogleInSpec::Dataproc::Property::JobHiveJobScriptVariables.new(args['scriptVariables'], to_s) @properties = GoogleInSpec::Dataproc::Property::JobHiveJobProperties.new(args['properties'], to_s) @jar_file_uris = args['jarFileUris'] end def to_s "#{@parent_identifier} JobHiveJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_hive_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobHiveJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobHiveJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_hive_job_query_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobHiveJobQueryList attr_reader :queries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @queries = args['queries'] end def to_s "#{@parent_identifier} JobHiveJobQueryList" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_hive_job_script_variables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobHiveJobScriptVariables attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobHiveJobScriptVariables" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobLabels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_pig_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_pig_job_logging_config' require 'google/dataproc/property/job_pig_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_pig_job_properties' require 'google/dataproc/property/job_pig_job_query_list' require 'google/dataproc/property/job_pig_job_script_variables' module GoogleInSpec module Dataproc module Property class JobPigJob attr_reader :query_file_uri attr_reader :query_list attr_reader :continue_on_failure attr_reader :script_variables attr_reader :properties attr_reader :jar_file_uris attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_list = GoogleInSpec::Dataproc::Property::JobPigJobQueryList.new(args['queryList'], to_s) @continue_on_failure = args['continueOnFailure'] @script_variables = GoogleInSpec::Dataproc::Property::JobPigJobScriptVariables.new(args['scriptVariables'], to_s) @properties = GoogleInSpec::Dataproc::Property::JobPigJobProperties.new(args['properties'], to_s) @jar_file_uris = args['jarFileUris'] @logging_config = GoogleInSpec::Dataproc::Property::JobPigJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} JobPigJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_pig_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_pig_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class JobPigJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::JobPigJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} JobPigJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_pig_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobPigJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobPigJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_pig_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobPigJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobPigJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_pig_job_query_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobPigJobQueryList attr_reader :queries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @queries = args['queries'] end def to_s "#{@parent_identifier} JobPigJobQueryList" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_pig_job_script_variables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobPigJobScriptVariables attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobPigJobScriptVariables" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_placement.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_placement_cluster_labels' module GoogleInSpec module Dataproc module Property class JobPlacement attr_reader :cluster_name attr_reader :cluster_uuid attr_reader :cluster_labels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cluster_name = args['clusterName'] @cluster_uuid = args['clusterUuid'] @cluster_labels = GoogleInSpec::Dataproc::Property::JobPlacementClusterLabels.new(args['clusterLabels'], to_s) end def to_s "#{@parent_identifier} JobPlacement" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_placement_cluster_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobPlacementClusterLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobPlacementClusterLabels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_presto_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_presto_job_logging_config' require 'google/dataproc/property/job_presto_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_presto_job_properties' require 'google/dataproc/property/job_presto_job_query_list' module GoogleInSpec module Dataproc module Property class JobPrestoJob attr_reader :query_file_uri attr_reader :query_list attr_reader :continue_on_failure attr_reader :output_format attr_reader :client_tags attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_list = GoogleInSpec::Dataproc::Property::JobPrestoJobQueryList.new(args['queryList'], to_s) @continue_on_failure = args['continueOnFailure'] @output_format = args['outputFormat'] @client_tags = args['clientTags'] @properties = GoogleInSpec::Dataproc::Property::JobPrestoJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::JobPrestoJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} JobPrestoJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_presto_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_presto_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class JobPrestoJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::JobPrestoJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} JobPrestoJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_presto_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobPrestoJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobPrestoJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_presto_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobPrestoJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobPrestoJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_presto_job_query_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobPrestoJobQueryList attr_reader :queries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @queries = args['queries'] end def to_s "#{@parent_identifier} JobPrestoJobQueryList" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_pyspark_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_pyspark_job_logging_config' require 'google/dataproc/property/job_pyspark_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_pyspark_job_properties' module GoogleInSpec module Dataproc module Property class JobPysparkJob attr_reader :main_python_file_uri attr_reader :args attr_reader :python_file_uris attr_reader :jar_file_uris attr_reader :file_uris attr_reader :archive_uris attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_python_file_uri = args['mainPythonFileUri'] @args = args['args'] @python_file_uris = args['pythonFileUris'] @jar_file_uris = args['jarFileUris'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] @properties = GoogleInSpec::Dataproc::Property::JobPysparkJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::JobPysparkJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} JobPysparkJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_pyspark_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_pyspark_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class JobPysparkJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::JobPysparkJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} JobPysparkJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_pyspark_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobPysparkJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobPysparkJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_pyspark_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobPysparkJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobPysparkJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_reference.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobReference attr_reader :project_id attr_reader :job_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_id = args['projectId'] @job_id = args['jobId'] end def to_s "#{@parent_identifier} JobReference" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobScheduling attr_reader :max_failures_per_hour attr_reader :max_failures_total def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_failures_per_hour = args['maxFailuresPerHour'] @max_failures_total = args['maxFailuresTotal'] end def to_s "#{@parent_identifier} JobScheduling" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_spark_job_logging_config' require 'google/dataproc/property/job_spark_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_spark_job_properties' module GoogleInSpec module Dataproc module Property class JobSparkJob attr_reader :main_jar_file_uri attr_reader :main_class attr_reader :args attr_reader :jar_file_uris attr_reader :file_uris attr_reader :archive_uris attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_jar_file_uri = args['mainJarFileUri'] @main_class = args['mainClass'] @args = args['args'] @jar_file_uris = args['jarFileUris'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] @properties = GoogleInSpec::Dataproc::Property::JobSparkJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::JobSparkJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} JobSparkJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_spark_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class JobSparkJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::JobSparkJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} JobSparkJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobSparkJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobSparkJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobSparkJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobSparkJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_r_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_spark_r_job_logging_config' require 'google/dataproc/property/job_spark_r_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_spark_r_job_properties' module GoogleInSpec module Dataproc module Property class JobSparkRJob attr_reader :main_r_file_uri attr_reader :args attr_reader :file_uris attr_reader :archive_uris attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_r_file_uri = args['mainRFileUri'] @args = args['args'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] @properties = GoogleInSpec::Dataproc::Property::JobSparkRJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::JobSparkRJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} JobSparkRJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_r_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_spark_r_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class JobSparkRJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::JobSparkRJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} JobSparkRJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_r_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobSparkRJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobSparkRJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_r_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobSparkRJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobSparkRJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_sql_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_spark_sql_job_logging_config' require 'google/dataproc/property/job_spark_sql_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_spark_sql_job_properties' require 'google/dataproc/property/job_spark_sql_job_query_list' require 'google/dataproc/property/job_spark_sql_job_script_variables' module GoogleInSpec module Dataproc module Property class JobSparkSqlJob attr_reader :query_file_uri attr_reader :query_list attr_reader :script_variables attr_reader :properties attr_reader :jar_file_uris attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_list = GoogleInSpec::Dataproc::Property::JobSparkSqlJobQueryList.new(args['queryList'], to_s) @script_variables = GoogleInSpec::Dataproc::Property::JobSparkSqlJobScriptVariables.new(args['scriptVariables'], to_s) @properties = GoogleInSpec::Dataproc::Property::JobSparkSqlJobProperties.new(args['properties'], to_s) @jar_file_uris = args['jarFileUris'] @logging_config = GoogleInSpec::Dataproc::Property::JobSparkSqlJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} JobSparkSqlJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_sql_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_spark_sql_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class JobSparkSqlJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::JobSparkSqlJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} JobSparkSqlJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_sql_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobSparkSqlJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobSparkSqlJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_sql_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobSparkSqlJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobSparkSqlJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_sql_job_query_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobSparkSqlJobQueryList attr_reader :queries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @queries = args['queries'] end def to_s "#{@parent_identifier} JobSparkSqlJobQueryList" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_spark_sql_job_script_variables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobSparkSqlJobScriptVariables attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobSparkSqlJobScriptVariables" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobStatus attr_reader :state attr_reader :details attr_reader :state_start_time attr_reader :substate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @state = args['state'] @details = args['details'] @state_start_time = args['stateStartTime'] @substate = args['substate'] end def to_s "#{@parent_identifier} JobStatus" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_status_history.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobStatusHistory attr_reader :state attr_reader :details attr_reader :state_start_time attr_reader :substate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @state = args['state'] @details = args['details'] @state_start_time = args['stateStartTime'] @substate = args['substate'] end def to_s "#{@parent_identifier} JobStatusHistory" end end class JobStatusHistoryArray def self.parse(value, parent_identifier) return if value.nil? return JobStatusHistory.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobStatusHistory.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/job_trino_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_trino_job_logging_config' require 'google/dataproc/property/job_trino_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_trino_job_properties' require 'google/dataproc/property/job_trino_job_query_list' module GoogleInSpec module Dataproc module Property class JobTrinoJob attr_reader :query_file_uri attr_reader :query_list attr_reader :continue_on_failure attr_reader :output_format attr_reader :client_tags attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_list = GoogleInSpec::Dataproc::Property::JobTrinoJobQueryList.new(args['queryList'], to_s) @continue_on_failure = args['continueOnFailure'] @output_format = args['outputFormat'] @client_tags = args['clientTags'] @properties = GoogleInSpec::Dataproc::Property::JobTrinoJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::JobTrinoJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} JobTrinoJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_trino_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/job_trino_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class JobTrinoJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::JobTrinoJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} JobTrinoJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_trino_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobTrinoJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobTrinoJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_trino_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobTrinoJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobTrinoJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_trino_job_query_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobTrinoJobQueryList attr_reader :queries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @queries = args['queries'] end def to_s "#{@parent_identifier} JobTrinoJobQueryList" end end end end end ================================================ FILE: libraries/google/dataproc/property/job_yarn_applications.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class JobYarnApplications attr_reader :name attr_reader :state attr_reader :progress attr_reader :tracking_url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @state = args['state'] @progress = args['progress'] @tracking_url = args['trackingUrl'] end def to_s "#{@parent_identifier} JobYarnApplications" end end class JobYarnApplicationsArray def self.parse(value, parent_identifier) return if value.nil? return JobYarnApplications.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobYarnApplications.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/session_environment_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/session_environment_config_execution_config' require 'google/dataproc/property/session_environment_config_peripherals_config' require 'google/dataproc/property/session_environment_config_peripherals_config_spark_history_server_config' module GoogleInSpec module Dataproc module Property class SessionEnvironmentConfig attr_reader :execution_config attr_reader :peripherals_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @execution_config = GoogleInSpec::Dataproc::Property::SessionEnvironmentConfigExecutionConfig.new(args['executionConfig'], to_s) @peripherals_config = GoogleInSpec::Dataproc::Property::SessionEnvironmentConfigPeripheralsConfig.new(args['peripheralsConfig'], to_s) end def to_s "#{@parent_identifier} SessionEnvironmentConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_environment_config_execution_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class SessionEnvironmentConfigExecutionConfig attr_reader :service_account attr_reader :network_uri attr_reader :subnetwork_uri attr_reader :network_tags attr_reader :kms_key attr_reader :idle_ttl attr_reader :ttl attr_reader :staging_bucket def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service_account = args['serviceAccount'] @network_uri = args['networkUri'] @subnetwork_uri = args['subnetworkUri'] @network_tags = args['networkTags'] @kms_key = args['kmsKey'] @idle_ttl = args['idleTtl'] @ttl = args['ttl'] @staging_bucket = args['stagingBucket'] end def to_s "#{@parent_identifier} SessionEnvironmentConfigExecutionConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_environment_config_peripherals_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/session_environment_config_peripherals_config_spark_history_server_config' module GoogleInSpec module Dataproc module Property class SessionEnvironmentConfigPeripheralsConfig attr_reader :metastore_service attr_reader :spark_history_server_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metastore_service = args['metastoreService'] @spark_history_server_config = GoogleInSpec::Dataproc::Property::SessionEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig.new(args['sparkHistoryServerConfig'], to_s) end def to_s "#{@parent_identifier} SessionEnvironmentConfigPeripheralsConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_environment_config_peripherals_config_spark_history_server_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class SessionEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig attr_reader :dataproc_cluster def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @dataproc_cluster = args['dataprocCluster'] end def to_s "#{@parent_identifier} SessionEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_jupyter_session.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class SessionJupyterSession attr_reader :kernel attr_reader :display_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kernel = args['kernel'] @display_name = args['displayName'] end def to_s "#{@parent_identifier} SessionJupyterSession" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class SessionLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} SessionLabels" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_runtime_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/session_runtime_config_properties' require 'google/dataproc/property/session_runtime_config_repository_config' require 'google/dataproc/property/session_runtime_config_repository_config_pypi_repository_config' module GoogleInSpec module Dataproc module Property class SessionRuntimeConfig attr_reader :version attr_reader :container_image attr_reader :properties attr_reader :repository_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @version = args['version'] @container_image = args['containerImage'] @properties = GoogleInSpec::Dataproc::Property::SessionRuntimeConfigProperties.new(args['properties'], to_s) @repository_config = GoogleInSpec::Dataproc::Property::SessionRuntimeConfigRepositoryConfig.new(args['repositoryConfig'], to_s) end def to_s "#{@parent_identifier} SessionRuntimeConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_runtime_config_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class SessionRuntimeConfigProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} SessionRuntimeConfigProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_runtime_config_repository_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/session_runtime_config_repository_config_pypi_repository_config' module GoogleInSpec module Dataproc module Property class SessionRuntimeConfigRepositoryConfig attr_reader :pypi_repository_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pypi_repository_config = GoogleInSpec::Dataproc::Property::SessionRuntimeConfigRepositoryConfigPypiRepositoryConfig.new(args['pypiRepositoryConfig'], to_s) end def to_s "#{@parent_identifier} SessionRuntimeConfigRepositoryConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_runtime_config_repository_config_pypi_repository_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class SessionRuntimeConfigRepositoryConfigPypiRepositoryConfig attr_reader :pypi_repository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pypi_repository = args['pypiRepository'] end def to_s "#{@parent_identifier} SessionRuntimeConfigRepositoryConfigPypiRepositoryConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_runtime_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/session_runtime_info_approximate_usage' require 'google/dataproc/property/session_runtime_info_current_usage' require 'google/dataproc/property/session_runtime_info_endpoints' module GoogleInSpec module Dataproc module Property class SessionRuntimeInfo attr_reader :endpoints attr_reader :output_uri attr_reader :diagnostic_output_uri attr_reader :approximate_usage attr_reader :current_usage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @endpoints = GoogleInSpec::Dataproc::Property::SessionRuntimeInfoEndpoints.new(args['endpoints'], to_s) @output_uri = args['outputUri'] @diagnostic_output_uri = args['diagnosticOutputUri'] @approximate_usage = GoogleInSpec::Dataproc::Property::SessionRuntimeInfoApproximateUsage.new(args['approximateUsage'], to_s) @current_usage = GoogleInSpec::Dataproc::Property::SessionRuntimeInfoCurrentUsage.new(args['currentUsage'], to_s) end def to_s "#{@parent_identifier} SessionRuntimeInfo" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_runtime_info_approximate_usage.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class SessionRuntimeInfoApproximateUsage attr_reader :milli_dcu_seconds attr_reader :shuffle_storage_gb_seconds attr_reader :milli_accelerator_seconds attr_reader :accelerator_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @milli_dcu_seconds = args['milliDcuSeconds'] @shuffle_storage_gb_seconds = args['shuffleStorageGbSeconds'] @milli_accelerator_seconds = args['milliAcceleratorSeconds'] @accelerator_type = args['acceleratorType'] end def to_s "#{@parent_identifier} SessionRuntimeInfoApproximateUsage" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_runtime_info_current_usage.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class SessionRuntimeInfoCurrentUsage attr_reader :milli_dcu attr_reader :shuffle_storage_gb attr_reader :milli_dcu_premium attr_reader :shuffle_storage_gb_premium attr_reader :milli_accelerator attr_reader :accelerator_type attr_reader :snapshot_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @milli_dcu = args['milliDcu'] @shuffle_storage_gb = args['shuffleStorageGb'] @milli_dcu_premium = args['milliDcuPremium'] @shuffle_storage_gb_premium = args['shuffleStorageGbPremium'] @milli_accelerator = args['milliAccelerator'] @accelerator_type = args['acceleratorType'] @snapshot_time = args['snapshotTime'] end def to_s "#{@parent_identifier} SessionRuntimeInfoCurrentUsage" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_runtime_info_endpoints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class SessionRuntimeInfoEndpoints attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} SessionRuntimeInfoEndpoints" end end end end end ================================================ FILE: libraries/google/dataproc/property/session_state_history.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class SessionStateHistory attr_reader :state attr_reader :state_message attr_reader :state_start_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @state = args['state'] @state_message = args['stateMessage'] @state_start_time = args['stateStartTime'] end def to_s "#{@parent_identifier} SessionStateHistory" end end class SessionStateHistoryArray def self.parse(value, parent_identifier) return if value.nil? return SessionStateHistory.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| SessionStateHistory.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_labels' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_accelerators' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_disk_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_references' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_startup_config' module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsNodeGroup attr_reader :name attr_reader :roles attr_reader :node_group_config attr_reader :labels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @roles = args['roles'] @node_group_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfig.new(args['nodeGroupConfig'], to_s) @labels = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupLabels.new(args['labels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroup" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupLabels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_accelerators' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_disk_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_references' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_startup_config' module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfig attr_reader :num_instances attr_reader :instance_names attr_reader :instance_references attr_reader :image_uri attr_reader :machine_type_uri attr_reader :disk_config attr_reader :is_preemptible attr_reader :preemptibility attr_reader :managed_group_config attr_reader :accelerators attr_reader :min_cpu_platform attr_reader :min_num_instances attr_reader :instance_flexibility_policy attr_reader :startup_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @num_instances = args['numInstances'] @instance_names = args['instanceNames'] @instance_references = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceReferencesArray.parse(args['instanceReferences'], to_s) @image_uri = args['imageUri'] @machine_type_uri = args['machineTypeUri'] @disk_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigDiskConfig.new(args['diskConfig'], to_s) @is_preemptible = args['isPreemptible'] @preemptibility = args['preemptibility'] @managed_group_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) @accelerators = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAcceleratorsArray.parse(args['accelerators'], to_s) @min_cpu_platform = args['minCpuPlatform'] @min_num_instances = args['minNumInstances'] @instance_flexibility_policy = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicy.new(args['instanceFlexibilityPolicy'], to_s) @startup_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigStartupConfig.new(args['startupConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators attr_reader :accelerator_type_uri attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type_uri = args['acceleratorTypeUri'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators" end end class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_disk_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigDiskConfig attr_reader :boot_disk_type attr_reader :boot_disk_size_gb attr_reader :num_local_ssds attr_reader :local_ssd_interface def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @boot_disk_type = args['bootDiskType'] @boot_disk_size_gb = args['bootDiskSizeGb'] @num_local_ssds = args['numLocalSsds'] @local_ssd_interface = args['localSsdInterface'] end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigDiskConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_flexibility_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results' module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicy attr_reader :instance_selection_list attr_reader :instance_selection_results def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_selection_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionListArray.parse(args['instanceSelectionList'], to_s) @instance_selection_results = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicyInstanceSelectionResultsArray.parse(args['instanceSelectionResults'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicy" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_references.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceReferences attr_reader :instance_name attr_reader :instance_id attr_reader :public_key attr_reader :public_ecies_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_name = args['instanceName'] @instance_id = args['instanceId'] @public_key = args['publicKey'] @public_ecies_key = args['publicEciesKey'] end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceReferences" end end class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceReferencesArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceReferences.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceReferences.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_managed_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigManagedGroupConfig attr_reader :instance_template_name attr_reader :instance_group_manager_name attr_reader :instance_group_manager_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_template_name = args['instanceTemplateName'] @instance_group_manager_name = args['instanceGroupManagerName'] @instance_group_manager_uri = args['instanceGroupManagerUri'] end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigManagedGroupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_startup_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigStartupConfig attr_reader :required_registration_fraction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @required_registration_fraction = args['requiredRegistrationFraction'] end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigStartupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionList attr_reader :machine_types attr_reader :rank def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_types = args['machineTypes'] @rank = args['rank'] end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionList" end end class WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionListArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionList.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionList.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionResults attr_reader :machine_type attr_reader :vm_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] @vm_count = args['vmCount'] end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionResults" end end class WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionResultsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionResults.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionResults.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_encryption_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateEncryptionConfig attr_reader :kms_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key = args['kmsKey'] end def to_s "#{@parent_identifier} WorkflowTemplateEncryptionConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_gke_cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_gke_cluster_config_namespaced_gke_deployment_target' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target' module GoogleInSpec module Dataproc module Property class WorkflowTemplateGkeClusterConfig attr_reader :namespaced_gke_deployment_target attr_reader :gke_cluster_target attr_reader :node_pool_target def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @namespaced_gke_deployment_target = GoogleInSpec::Dataproc::Property::WorkflowTemplateGkeClusterConfigNamespacedGkeDeploymentTarget.new(args['namespacedGkeDeploymentTarget'], to_s) @gke_cluster_target = args['gkeClusterTarget'] @node_pool_target = GoogleInSpec::Dataproc::Property::WorkflowTemplateGkeClusterConfigNodePoolTargetArray.parse(args['nodePoolTarget'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateGkeClusterConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_gke_cluster_config_namespaced_gke_deployment_target.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateGkeClusterConfigNamespacedGkeDeploymentTarget attr_reader :target_gke_cluster attr_reader :cluster_namespace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @target_gke_cluster = args['targetGkeCluster'] @cluster_namespace = args['clusterNamespace'] end def to_s "#{@parent_identifier} WorkflowTemplateGkeClusterConfigNamespacedGkeDeploymentTarget" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_autoscaling' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config_accelerators' module GoogleInSpec module Dataproc module Property class WorkflowTemplateGkeClusterConfigNodePoolTarget attr_reader :node_pool attr_reader :roles attr_reader :node_pool_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @node_pool = args['nodePool'] @roles = args['roles'] @node_pool_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfig.new(args['nodePoolConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateGkeClusterConfigNodePoolTarget" end end class WorkflowTemplateGkeClusterConfigNodePoolTargetArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateGkeClusterConfigNodePoolTarget.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateGkeClusterConfigNodePoolTarget.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_autoscaling' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config_accelerators' module GoogleInSpec module Dataproc module Property class WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfig attr_reader :config attr_reader :locations attr_reader :autoscaling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @config = GoogleInSpec::Dataproc::Property::WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigConfig.new(args['config'], to_s) @locations = args['locations'] @autoscaling = GoogleInSpec::Dataproc::Property::WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigAutoscaling.new(args['autoscaling'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_autoscaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigAutoscaling attr_reader :min_node_count attr_reader :max_node_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min_node_count = args['minNodeCount'] @max_node_count = args['maxNodeCount'] end def to_s "#{@parent_identifier} WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigAutoscaling" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config_accelerators' module GoogleInSpec module Dataproc module Property class WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigConfig attr_reader :machine_type attr_reader :local_ssd_count attr_reader :preemptible attr_reader :accelerators attr_reader :min_cpu_platform attr_reader :boot_disk_kms_key attr_reader :spot def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] @local_ssd_count = args['localSsdCount'] @preemptible = args['preemptible'] @accelerators = GoogleInSpec::Dataproc::Property::WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigConfigAcceleratorsArray.parse(args['accelerators'], to_s) @min_cpu_platform = args['minCpuPlatform'] @boot_disk_kms_key = args['bootDiskKmsKey'] @spot = args['spot'] end def to_s "#{@parent_identifier} WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigConfigAccelerators attr_reader :accelerator_count attr_reader :accelerator_type attr_reader :gpu_partition_size def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_count = args['acceleratorCount'] @accelerator_type = args['acceleratorType'] @gpu_partition_size = args['gpuPartitionSize'] end def to_s "#{@parent_identifier} WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigConfigAccelerators" end end class WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigConfigAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfigConfigAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_flink_job' require 'google/dataproc/property/workflowtemplate_jobs_flink_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_flink_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_flink_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_hadoop_job' require 'google/dataproc/property/workflowtemplate_jobs_hadoop_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_hadoop_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_hadoop_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_hive_job' require 'google/dataproc/property/workflowtemplate_jobs_hive_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_hive_job_query_list' require 'google/dataproc/property/workflowtemplate_jobs_hive_job_script_variables' require 'google/dataproc/property/workflowtemplate_jobs_labels' require 'google/dataproc/property/workflowtemplate_jobs_pig_job' require 'google/dataproc/property/workflowtemplate_jobs_pig_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_pig_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_pig_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_pig_job_query_list' require 'google/dataproc/property/workflowtemplate_jobs_pig_job_script_variables' require 'google/dataproc/property/workflowtemplate_jobs_presto_job' require 'google/dataproc/property/workflowtemplate_jobs_presto_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_presto_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_presto_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_presto_job_query_list' require 'google/dataproc/property/workflowtemplate_jobs_pyspark_job' require 'google/dataproc/property/workflowtemplate_jobs_pyspark_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_pyspark_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_pyspark_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_scheduling' require 'google/dataproc/property/workflowtemplate_jobs_spark_job' require 'google/dataproc/property/workflowtemplate_jobs_spark_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_spark_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_spark_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_spark_r_job' require 'google/dataproc/property/workflowtemplate_jobs_spark_r_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_spark_r_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_spark_r_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job' require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_query_list' require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_script_variables' require 'google/dataproc/property/workflowtemplate_jobs_trino_job' require 'google/dataproc/property/workflowtemplate_jobs_trino_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_trino_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_trino_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_trino_job_query_list' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobs attr_reader :step_id attr_reader :hadoop_job attr_reader :spark_job attr_reader :pyspark_job attr_reader :hive_job attr_reader :pig_job attr_reader :spark_r_job attr_reader :spark_sql_job attr_reader :presto_job attr_reader :trino_job attr_reader :flink_job attr_reader :labels attr_reader :scheduling attr_reader :prerequisite_step_ids def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @step_id = args['stepId'] @hadoop_job = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsHadoopJob.new(args['hadoopJob'], to_s) @spark_job = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkJob.new(args['sparkJob'], to_s) @pyspark_job = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPysparkJob.new(args['pysparkJob'], to_s) @hive_job = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsHiveJob.new(args['hiveJob'], to_s) @pig_job = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPigJob.new(args['pigJob'], to_s) @spark_r_job = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkRJob.new(args['sparkRJob'], to_s) @spark_sql_job = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkSqlJob.new(args['sparkSqlJob'], to_s) @presto_job = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPrestoJob.new(args['prestoJob'], to_s) @trino_job = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsTrinoJob.new(args['trinoJob'], to_s) @flink_job = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsFlinkJob.new(args['flinkJob'], to_s) @labels = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsLabels.new(args['labels'], to_s) @scheduling = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsScheduling.new(args['scheduling'], to_s) @prerequisite_step_ids = args['prerequisiteStepIds'] end def to_s "#{@parent_identifier} WorkflowTemplateJobs" end end class WorkflowTemplateJobsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateJobs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateJobs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_flink_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_flink_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_flink_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_flink_job_properties' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsFlinkJob attr_reader :main_jar_file_uri attr_reader :main_class attr_reader :args attr_reader :jar_file_uris attr_reader :savepoint_uri attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_jar_file_uri = args['mainJarFileUri'] @main_class = args['mainClass'] @args = args['args'] @jar_file_uris = args['jarFileUris'] @savepoint_uri = args['savepointUri'] @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsFlinkJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsFlinkJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsFlinkJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_flink_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_flink_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsFlinkJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsFlinkJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsFlinkJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_flink_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsFlinkJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsFlinkJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_flink_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsFlinkJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsFlinkJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_hadoop_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_hadoop_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_hadoop_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_hadoop_job_properties' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsHadoopJob attr_reader :main_jar_file_uri attr_reader :main_class attr_reader :args attr_reader :jar_file_uris attr_reader :file_uris attr_reader :archive_uris attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_jar_file_uri = args['mainJarFileUri'] @main_class = args['mainClass'] @args = args['args'] @jar_file_uris = args['jarFileUris'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsHadoopJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsHadoopJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsHadoopJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_hadoop_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_hadoop_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsHadoopJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsHadoopJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsHadoopJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_hadoop_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsHadoopJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsHadoopJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_hadoop_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsHadoopJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsHadoopJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_hive_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_hive_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_hive_job_query_list' require 'google/dataproc/property/workflowtemplate_jobs_hive_job_script_variables' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsHiveJob attr_reader :query_file_uri attr_reader :query_list attr_reader :continue_on_failure attr_reader :script_variables attr_reader :properties attr_reader :jar_file_uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsHiveJobQueryList.new(args['queryList'], to_s) @continue_on_failure = args['continueOnFailure'] @script_variables = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsHiveJobScriptVariables.new(args['scriptVariables'], to_s) @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsHiveJobProperties.new(args['properties'], to_s) @jar_file_uris = args['jarFileUris'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsHiveJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_hive_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsHiveJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsHiveJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_hive_job_query_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsHiveJobQueryList attr_reader :queries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @queries = args['queries'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsHiveJobQueryList" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_hive_job_script_variables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsHiveJobScriptVariables attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsHiveJobScriptVariables" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsLabels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_pig_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_pig_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_pig_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_pig_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_pig_job_query_list' require 'google/dataproc/property/workflowtemplate_jobs_pig_job_script_variables' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPigJob attr_reader :query_file_uri attr_reader :query_list attr_reader :continue_on_failure attr_reader :script_variables attr_reader :properties attr_reader :jar_file_uris attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPigJobQueryList.new(args['queryList'], to_s) @continue_on_failure = args['continueOnFailure'] @script_variables = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPigJobScriptVariables.new(args['scriptVariables'], to_s) @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPigJobProperties.new(args['properties'], to_s) @jar_file_uris = args['jarFileUris'] @logging_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPigJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsPigJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_pig_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_pig_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPigJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPigJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsPigJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_pig_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPigJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsPigJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_pig_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPigJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsPigJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_pig_job_query_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPigJobQueryList attr_reader :queries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @queries = args['queries'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsPigJobQueryList" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_pig_job_script_variables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPigJobScriptVariables attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsPigJobScriptVariables" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_presto_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_presto_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_presto_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_presto_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_presto_job_query_list' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPrestoJob attr_reader :query_file_uri attr_reader :query_list attr_reader :continue_on_failure attr_reader :output_format attr_reader :client_tags attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPrestoJobQueryList.new(args['queryList'], to_s) @continue_on_failure = args['continueOnFailure'] @output_format = args['outputFormat'] @client_tags = args['clientTags'] @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPrestoJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPrestoJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsPrestoJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_presto_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_presto_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPrestoJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPrestoJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsPrestoJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_presto_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPrestoJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsPrestoJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_presto_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPrestoJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsPrestoJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_presto_job_query_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPrestoJobQueryList attr_reader :queries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @queries = args['queries'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsPrestoJobQueryList" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_pyspark_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_pyspark_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_pyspark_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_pyspark_job_properties' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPysparkJob attr_reader :main_python_file_uri attr_reader :args attr_reader :python_file_uris attr_reader :jar_file_uris attr_reader :file_uris attr_reader :archive_uris attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_python_file_uri = args['mainPythonFileUri'] @args = args['args'] @python_file_uris = args['pythonFileUris'] @jar_file_uris = args['jarFileUris'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPysparkJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPysparkJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsPysparkJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_pyspark_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_pyspark_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPysparkJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsPysparkJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsPysparkJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_pyspark_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPysparkJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsPysparkJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_pyspark_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsPysparkJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsPysparkJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsScheduling attr_reader :max_failures_per_hour attr_reader :max_failures_total def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_failures_per_hour = args['maxFailuresPerHour'] @max_failures_total = args['maxFailuresTotal'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsScheduling" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_spark_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_spark_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_spark_job_properties' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkJob attr_reader :main_jar_file_uri attr_reader :main_class attr_reader :args attr_reader :jar_file_uris attr_reader :file_uris attr_reader :archive_uris attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_jar_file_uri = args['mainJarFileUri'] @main_class = args['mainClass'] @args = args['args'] @jar_file_uris = args['jarFileUris'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_spark_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_r_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_spark_r_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_spark_r_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_spark_r_job_properties' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkRJob attr_reader :main_r_file_uri attr_reader :args attr_reader :file_uris attr_reader :archive_uris attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_r_file_uri = args['mainRFileUri'] @args = args['args'] @file_uris = args['fileUris'] @archive_uris = args['archiveUris'] @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkRJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkRJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkRJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_r_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_spark_r_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkRJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkRJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkRJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_r_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkRJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkRJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_r_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkRJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkRJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_sql_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_query_list' require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_script_variables' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkSqlJob attr_reader :query_file_uri attr_reader :query_list attr_reader :script_variables attr_reader :properties attr_reader :jar_file_uris attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkSqlJobQueryList.new(args['queryList'], to_s) @script_variables = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkSqlJobScriptVariables.new(args['scriptVariables'], to_s) @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkSqlJobProperties.new(args['properties'], to_s) @jar_file_uris = args['jarFileUris'] @logging_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkSqlJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkSqlJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_sql_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_spark_sql_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkSqlJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsSparkSqlJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkSqlJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_sql_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkSqlJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkSqlJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_sql_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkSqlJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkSqlJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_sql_job_query_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkSqlJobQueryList attr_reader :queries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @queries = args['queries'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkSqlJobQueryList" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_spark_sql_job_script_variables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsSparkSqlJobScriptVariables attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsSparkSqlJobScriptVariables" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_trino_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_trino_job_logging_config' require 'google/dataproc/property/workflowtemplate_jobs_trino_job_logging_config_driver_log_levels' require 'google/dataproc/property/workflowtemplate_jobs_trino_job_properties' require 'google/dataproc/property/workflowtemplate_jobs_trino_job_query_list' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsTrinoJob attr_reader :query_file_uri attr_reader :query_list attr_reader :continue_on_failure attr_reader :output_format attr_reader :client_tags attr_reader :properties attr_reader :logging_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query_file_uri = args['queryFileUri'] @query_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsTrinoJobQueryList.new(args['queryList'], to_s) @continue_on_failure = args['continueOnFailure'] @output_format = args['outputFormat'] @client_tags = args['clientTags'] @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsTrinoJobProperties.new(args['properties'], to_s) @logging_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsTrinoJobLoggingConfig.new(args['loggingConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsTrinoJob" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_trino_job_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_jobs_trino_job_logging_config_driver_log_levels' module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsTrinoJobLoggingConfig attr_reader :driver_log_levels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @driver_log_levels = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsTrinoJobLoggingConfigDriverLogLevels.new(args['driverLogLevels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateJobsTrinoJobLoggingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_trino_job_logging_config_driver_log_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsTrinoJobLoggingConfigDriverLogLevels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsTrinoJobLoggingConfigDriverLogLevels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_trino_job_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsTrinoJobProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsTrinoJobProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_jobs_trino_job_query_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateJobsTrinoJobQueryList attr_reader :queries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @queries = args['queries'] end def to_s "#{@parent_identifier} WorkflowTemplateJobsTrinoJobQueryList" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateLabels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_master_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_master_config_accelerators' require 'google/dataproc/property/workflowtemplate_master_config_disk_config' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_master_config_instance_references' require 'google/dataproc/property/workflowtemplate_master_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_master_config_startup_config' module GoogleInSpec module Dataproc module Property class WorkflowTemplateMasterConfig attr_reader :num_instances attr_reader :instance_names attr_reader :instance_references attr_reader :image_uri attr_reader :machine_type_uri attr_reader :disk_config attr_reader :is_preemptible attr_reader :preemptibility attr_reader :managed_group_config attr_reader :accelerators attr_reader :min_cpu_platform attr_reader :min_num_instances attr_reader :instance_flexibility_policy attr_reader :startup_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @num_instances = args['numInstances'] @instance_names = args['instanceNames'] @instance_references = GoogleInSpec::Dataproc::Property::WorkflowTemplateMasterConfigInstanceReferencesArray.parse(args['instanceReferences'], to_s) @image_uri = args['imageUri'] @machine_type_uri = args['machineTypeUri'] @disk_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateMasterConfigDiskConfig.new(args['diskConfig'], to_s) @is_preemptible = args['isPreemptible'] @preemptibility = args['preemptibility'] @managed_group_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateMasterConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) @accelerators = GoogleInSpec::Dataproc::Property::WorkflowTemplateMasterConfigAcceleratorsArray.parse(args['accelerators'], to_s) @min_cpu_platform = args['minCpuPlatform'] @min_num_instances = args['minNumInstances'] @instance_flexibility_policy = GoogleInSpec::Dataproc::Property::WorkflowTemplateMasterConfigInstanceFlexibilityPolicy.new(args['instanceFlexibilityPolicy'], to_s) @startup_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateMasterConfigStartupConfig.new(args['startupConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateMasterConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_master_config_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateMasterConfigAccelerators attr_reader :accelerator_type_uri attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type_uri = args['acceleratorTypeUri'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} WorkflowTemplateMasterConfigAccelerators" end end class WorkflowTemplateMasterConfigAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateMasterConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateMasterConfigAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_master_config_disk_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateMasterConfigDiskConfig attr_reader :boot_disk_type attr_reader :boot_disk_size_gb attr_reader :num_local_ssds attr_reader :local_ssd_interface def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @boot_disk_type = args['bootDiskType'] @boot_disk_size_gb = args['bootDiskSizeGb'] @num_local_ssds = args['numLocalSsds'] @local_ssd_interface = args['localSsdInterface'] end def to_s "#{@parent_identifier} WorkflowTemplateMasterConfigDiskConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_results' module GoogleInSpec module Dataproc module Property class WorkflowTemplateMasterConfigInstanceFlexibilityPolicy attr_reader :instance_selection_list attr_reader :instance_selection_results def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_selection_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionListArray.parse(args['instanceSelectionList'], to_s) @instance_selection_results = GoogleInSpec::Dataproc::Property::WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionResultsArray.parse(args['instanceSelectionResults'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateMasterConfigInstanceFlexibilityPolicy" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionList attr_reader :machine_types attr_reader :rank def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_types = args['machineTypes'] @rank = args['rank'] end def to_s "#{@parent_identifier} WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionList" end end class WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionListArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionList.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionList.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_results.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionResults attr_reader :machine_type attr_reader :vm_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] @vm_count = args['vmCount'] end def to_s "#{@parent_identifier} WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionResults" end end class WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionResultsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionResults.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateMasterConfigInstanceFlexibilityPolicyInstanceSelectionResults.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_master_config_instance_references.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateMasterConfigInstanceReferences attr_reader :instance_name attr_reader :instance_id attr_reader :public_key attr_reader :public_ecies_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_name = args['instanceName'] @instance_id = args['instanceId'] @public_key = args['publicKey'] @public_ecies_key = args['publicEciesKey'] end def to_s "#{@parent_identifier} WorkflowTemplateMasterConfigInstanceReferences" end end class WorkflowTemplateMasterConfigInstanceReferencesArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateMasterConfigInstanceReferences.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateMasterConfigInstanceReferences.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_master_config_managed_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateMasterConfigManagedGroupConfig attr_reader :instance_template_name attr_reader :instance_group_manager_name attr_reader :instance_group_manager_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_template_name = args['instanceTemplateName'] @instance_group_manager_name = args['instanceGroupManagerName'] @instance_group_manager_uri = args['instanceGroupManagerUri'] end def to_s "#{@parent_identifier} WorkflowTemplateMasterConfigManagedGroupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_master_config_startup_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateMasterConfigStartupConfig attr_reader :required_registration_fraction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @required_registration_fraction = args['requiredRegistrationFraction'] end def to_s "#{@parent_identifier} WorkflowTemplateMasterConfigStartupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_parameters_validation' require 'google/dataproc/property/workflowtemplate_parameters_validation_regex' require 'google/dataproc/property/workflowtemplate_parameters_validation_values' module GoogleInSpec module Dataproc module Property class WorkflowTemplateParameters attr_reader :name attr_reader :fields attr_reader :description attr_reader :validation def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @fields = args['fields'] @description = args['description'] @validation = GoogleInSpec::Dataproc::Property::WorkflowTemplateParametersValidation.new(args['validation'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateParameters" end end class WorkflowTemplateParametersArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateParameters.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateParameters.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_parameters_validation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_parameters_validation_regex' require 'google/dataproc/property/workflowtemplate_parameters_validation_values' module GoogleInSpec module Dataproc module Property class WorkflowTemplateParametersValidation attr_reader :regex attr_reader :values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @regex = GoogleInSpec::Dataproc::Property::WorkflowTemplateParametersValidationRegex.new(args['regex'], to_s) @values = GoogleInSpec::Dataproc::Property::WorkflowTemplateParametersValidationValues.new(args['values'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateParametersValidation" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_parameters_validation_regex.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateParametersValidationRegex attr_reader :regexes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @regexes = args['regexes'] end def to_s "#{@parent_identifier} WorkflowTemplateParametersValidationRegex" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_parameters_validation_values.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateParametersValidationValues attr_reader :values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @values = args['values'] end def to_s "#{@parent_identifier} WorkflowTemplateParametersValidationValues" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_placement_cluster_selector' require 'google/dataproc/property/workflowtemplate_placement_cluster_selector_cluster_labels' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_autoscaling_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config_metrics' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_encryption_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config_http_ports' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_confidential_instance_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_metadata' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_node_group_affinity' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_reservation_affinity' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_shielded_instance_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_namespaced_gke_deployment_target' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_initialization_actions' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_lifecycle_config' require 'google/dataproc/property/workflowtemplate_master_config' require 'google/dataproc/property/workflowtemplate_master_config_accelerators' require 'google/dataproc/property/workflowtemplate_master_config_disk_config' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_master_config_instance_references' require 'google/dataproc/property/workflowtemplate_master_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_master_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_metastore_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_accelerators' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_disk_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_references' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config' require 'google/dataproc/property/workflowtemplate_security_config_identity_config' require 'google/dataproc/property/workflowtemplate_security_config_identity_config_user_service_account_mapping' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config_kerberos_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config_properties' require 'google/dataproc/property/workflowtemplate_worker_config' require 'google/dataproc/property/workflowtemplate_worker_config_accelerators' require 'google/dataproc/property/workflowtemplate_worker_config_disk_config' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_worker_config_instance_references' require 'google/dataproc/property/workflowtemplate_worker_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_worker_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_labels' module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacement attr_reader :managed_cluster attr_reader :cluster_selector def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @managed_cluster = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedCluster.new(args['managedCluster'], to_s) @cluster_selector = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementClusterSelector.new(args['clusterSelector'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplatePlacement" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_cluster_selector.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_placement_cluster_selector_cluster_labels' module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementClusterSelector attr_reader :zone attr_reader :cluster_labels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @zone = args['zone'] @cluster_labels = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementClusterSelectorClusterLabels.new(args['clusterLabels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplatePlacementClusterSelector" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_cluster_selector_cluster_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementClusterSelectorClusterLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementClusterSelectorClusterLabels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_autoscaling_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config_metrics' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_encryption_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config_http_ports' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_confidential_instance_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_metadata' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_node_group_affinity' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_reservation_affinity' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_shielded_instance_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_namespaced_gke_deployment_target' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_initialization_actions' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_lifecycle_config' require 'google/dataproc/property/workflowtemplate_master_config' require 'google/dataproc/property/workflowtemplate_master_config_accelerators' require 'google/dataproc/property/workflowtemplate_master_config_disk_config' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_master_config_instance_references' require 'google/dataproc/property/workflowtemplate_master_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_master_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_metastore_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_accelerators' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_disk_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_references' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config' require 'google/dataproc/property/workflowtemplate_security_config_identity_config' require 'google/dataproc/property/workflowtemplate_security_config_identity_config_user_service_account_mapping' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config_kerberos_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config_properties' require 'google/dataproc/property/workflowtemplate_worker_config' require 'google/dataproc/property/workflowtemplate_worker_config_accelerators' require 'google/dataproc/property/workflowtemplate_worker_config_disk_config' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_worker_config_instance_references' require 'google/dataproc/property/workflowtemplate_worker_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_worker_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_labels' module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedCluster attr_reader :cluster_name attr_reader :config attr_reader :labels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cluster_name = args['clusterName'] @config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfig.new(args['config'], to_s) @labels = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterLabels.new(args['labels'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedCluster" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_autoscaling_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config_metrics' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_encryption_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config_http_ports' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_confidential_instance_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_metadata' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_node_group_affinity' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_reservation_affinity' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_shielded_instance_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_namespaced_gke_deployment_target' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_initialization_actions' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_lifecycle_config' require 'google/dataproc/property/workflowtemplate_master_config' require 'google/dataproc/property/workflowtemplate_master_config_accelerators' require 'google/dataproc/property/workflowtemplate_master_config_disk_config' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_master_config_instance_references' require 'google/dataproc/property/workflowtemplate_master_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_master_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_metastore_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_accelerators' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_disk_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_references' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config' require 'google/dataproc/property/workflowtemplate_security_config_identity_config' require 'google/dataproc/property/workflowtemplate_security_config_identity_config_user_service_account_mapping' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config_kerberos_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config_properties' require 'google/dataproc/property/workflowtemplate_worker_config' require 'google/dataproc/property/workflowtemplate_worker_config_accelerators' require 'google/dataproc/property/workflowtemplate_worker_config_disk_config' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_worker_config_instance_references' require 'google/dataproc/property/workflowtemplate_worker_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_worker_config_startup_config' module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfig attr_reader :config_bucket attr_reader :temp_bucket attr_reader :gce_cluster_config attr_reader :master_config attr_reader :worker_config attr_reader :secondary_worker_config attr_reader :software_config attr_reader :initialization_actions attr_reader :encryption_config attr_reader :autoscaling_config attr_reader :security_config attr_reader :lifecycle_config attr_reader :endpoint_config attr_reader :metastore_config attr_reader :gke_cluster_config attr_reader :dataproc_metric_config attr_reader :auxiliary_node_groups def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @config_bucket = args['configBucket'] @temp_bucket = args['tempBucket'] @gce_cluster_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigGceClusterConfig.new(args['gceClusterConfig'], to_s) @master_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateMasterConfig.new(args['masterConfig'], to_s) @worker_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateWorkerConfig.new(args['workerConfig'], to_s) @secondary_worker_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateSecondaryWorkerConfig.new(args['secondaryWorkerConfig'], to_s) @software_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigSoftwareConfig.new(args['softwareConfig'], to_s) @initialization_actions = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigInitializationActionsArray.parse(args['initializationActions'], to_s) @encryption_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigEncryptionConfig.new(args['encryptionConfig'], to_s) @autoscaling_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigAutoscalingConfig.new(args['autoscalingConfig'], to_s) @security_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigSecurityConfig.new(args['securityConfig'], to_s) @lifecycle_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigLifecycleConfig.new(args['lifecycleConfig'], to_s) @endpoint_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigEndpointConfig.new(args['endpointConfig'], to_s) @metastore_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigMetastoreConfig.new(args['metastoreConfig'], to_s) @gke_cluster_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateGkeClusterConfig.new(args['gkeClusterConfig'], to_s) @dataproc_metric_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigDataprocMetricConfig.new(args['dataprocMetricConfig'], to_s) @auxiliary_node_groups = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsArray.parse(args['auxiliaryNodeGroups'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_autoscaling_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigAutoscalingConfig attr_reader :policy_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @policy_uri = args['policyUri'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigAutoscalingConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_auxiliary_node_groups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_labels' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_accelerators' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_disk_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_references' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_startup_config' module GoogleInSpec module Dataproc module Property class WorkflowTemplateAuxiliaryNodeGroups attr_reader :node_group attr_reader :node_group_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @node_group = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroup.new(args['nodeGroup'], to_s) @node_group_id = args['nodeGroupId'] end def to_s "#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroups" end end class WorkflowTemplateAuxiliaryNodeGroupsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateAuxiliaryNodeGroups.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateAuxiliaryNodeGroups.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config_metrics' module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigDataprocMetricConfig attr_reader :metrics def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metrics = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigDataprocMetricConfigMetricsArray.parse(args['metrics'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigDataprocMetricConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config_metrics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigDataprocMetricConfigMetrics attr_reader :metric_source attr_reader :metric_overrides def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric_source = args['metricSource'] @metric_overrides = args['metricOverrides'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigDataprocMetricConfigMetrics" end end class WorkflowTemplatePlacementManagedClusterConfigDataprocMetricConfigMetricsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplatePlacementManagedClusterConfigDataprocMetricConfigMetrics.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplatePlacementManagedClusterConfigDataprocMetricConfigMetrics.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_encryption_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigEncryptionConfig attr_reader :gce_pd_kms_key_name attr_reader :kms_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gce_pd_kms_key_name = args['gcePdKmsKeyName'] @kms_key = args['kmsKey'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigEncryptionConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config_http_ports' module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigEndpointConfig attr_reader :http_ports attr_reader :enable_http_port_access def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_ports = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigEndpointConfigHttpPorts.new(args['httpPorts'], to_s) @enable_http_port_access = args['enableHttpPortAccess'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigEndpointConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config_http_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigEndpointConfigHttpPorts attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigEndpointConfigHttpPorts" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_confidential_instance_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_metadata' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_node_group_affinity' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_reservation_affinity' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_shielded_instance_config' module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigGceClusterConfig attr_reader :zone_uri attr_reader :network_uri attr_reader :subnetwork_uri attr_reader :internal_ip_only attr_reader :private_ipv6_google_access attr_reader :service_account attr_reader :service_account_scopes attr_reader :tags attr_reader :metadata attr_reader :reservation_affinity attr_reader :node_group_affinity attr_reader :shielded_instance_config attr_reader :confidential_instance_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @zone_uri = args['zoneUri'] @network_uri = args['networkUri'] @subnetwork_uri = args['subnetworkUri'] @internal_ip_only = args['internalIpOnly'] @private_ipv6_google_access = args['privateIpv6GoogleAccess'] @service_account = args['serviceAccount'] @service_account_scopes = args['serviceAccountScopes'] @tags = args['tags'] @metadata = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigMetadata.new(args['metadata'], to_s) @reservation_affinity = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigReservationAffinity.new(args['reservationAffinity'], to_s) @node_group_affinity = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigNodeGroupAffinity.new(args['nodeGroupAffinity'], to_s) @shielded_instance_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig.new(args['shieldedInstanceConfig'], to_s) @confidential_instance_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigConfidentialInstanceConfig.new(args['confidentialInstanceConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigGceClusterConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_confidential_instance_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigConfidentialInstanceConfig attr_reader :enable_confidential_compute def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_confidential_compute = args['enableConfidentialCompute'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigConfidentialInstanceConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigMetadata" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_node_group_affinity.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigNodeGroupAffinity attr_reader :node_group_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @node_group_uri = args['nodeGroupUri'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigNodeGroupAffinity" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_reservation_affinity.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigReservationAffinity attr_reader :consume_reservation_type attr_reader :key attr_reader :values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @consume_reservation_type = args['consumeReservationType'] @key = args['key'] @values = args['values'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigReservationAffinity" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_shielded_instance_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig attr_reader :enable_secure_boot attr_reader :enable_vtpm attr_reader :enable_integrity_monitoring def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_secure_boot = args['enableSecureBoot'] @enable_vtpm = args['enableVtpm'] @enable_integrity_monitoring = args['enableIntegrityMonitoring'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_initialization_actions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigInitializationActions attr_reader :executable_file attr_reader :execution_timeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @executable_file = args['executableFile'] @execution_timeout = args['executionTimeout'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigInitializationActions" end end class WorkflowTemplatePlacementManagedClusterConfigInitializationActionsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplatePlacementManagedClusterConfigInitializationActions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplatePlacementManagedClusterConfigInitializationActions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_lifecycle_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigLifecycleConfig attr_reader :idle_delete_ttl attr_reader :auto_delete_time attr_reader :auto_delete_ttl attr_reader :idle_start_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @idle_delete_ttl = args['idleDeleteTtl'] @auto_delete_time = args['autoDeleteTime'] @auto_delete_ttl = args['autoDeleteTtl'] @idle_start_time = args['idleStartTime'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigLifecycleConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_metastore_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigMetastoreConfig attr_reader :dataproc_metastore_service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @dataproc_metastore_service = args['dataprocMetastoreService'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigMetastoreConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_security_config_identity_config' require 'google/dataproc/property/workflowtemplate_security_config_identity_config_user_service_account_mapping' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config_kerberos_config' module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigSecurityConfig attr_reader :kerberos_config attr_reader :identity_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kerberos_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigSecurityConfigKerberosConfig.new(args['kerberosConfig'], to_s) @identity_config = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigSecurityConfigIdentityConfig.new(args['identityConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigSecurityConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config_kerberos_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigSecurityConfigKerberosConfig attr_reader :enable_kerberos attr_reader :root_principal_password_uri attr_reader :kms_key_uri attr_reader :keystore_uri attr_reader :truststore_uri attr_reader :keystore_password_uri attr_reader :key_password_uri attr_reader :truststore_password_uri attr_reader :cross_realm_trust_realm attr_reader :cross_realm_trust_kdc attr_reader :cross_realm_trust_admin_server attr_reader :cross_realm_trust_shared_password_uri attr_reader :kdc_db_key_uri attr_reader :tgt_lifetime_hours attr_reader :realm def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enable_kerberos = args['enableKerberos'] @root_principal_password_uri = args['rootPrincipalPasswordUri'] @kms_key_uri = args['kmsKeyUri'] @keystore_uri = args['keystoreUri'] @truststore_uri = args['truststoreUri'] @keystore_password_uri = args['keystorePasswordUri'] @key_password_uri = args['keyPasswordUri'] @truststore_password_uri = args['truststorePasswordUri'] @cross_realm_trust_realm = args['crossRealmTrustRealm'] @cross_realm_trust_kdc = args['crossRealmTrustKdc'] @cross_realm_trust_admin_server = args['crossRealmTrustAdminServer'] @cross_realm_trust_shared_password_uri = args['crossRealmTrustSharedPasswordUri'] @kdc_db_key_uri = args['kdcDbKeyUri'] @tgt_lifetime_hours = args['tgtLifetimeHours'] @realm = args['realm'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigSecurityConfigKerberosConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config_properties' module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigSoftwareConfig attr_reader :image_version attr_reader :properties attr_reader :optional_components def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @image_version = args['imageVersion'] @properties = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacementManagedClusterConfigSoftwareConfigProperties.new(args['properties'], to_s) @optional_components = args['optionalComponents'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigSoftwareConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config_properties.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigSoftwareConfigProperties attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigSoftwareConfigProperties" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_placement_managed_cluster_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterLabels" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_secondary_worker_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_secondary_worker_config_accelerators' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_disk_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_references' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_startup_config' module GoogleInSpec module Dataproc module Property class WorkflowTemplateSecondaryWorkerConfig attr_reader :num_instances attr_reader :instance_names attr_reader :instance_references attr_reader :image_uri attr_reader :machine_type_uri attr_reader :disk_config attr_reader :is_preemptible attr_reader :preemptibility attr_reader :managed_group_config attr_reader :accelerators attr_reader :min_cpu_platform attr_reader :min_num_instances attr_reader :instance_flexibility_policy attr_reader :startup_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @num_instances = args['numInstances'] @instance_names = args['instanceNames'] @instance_references = GoogleInSpec::Dataproc::Property::WorkflowTemplateSecondaryWorkerConfigInstanceReferencesArray.parse(args['instanceReferences'], to_s) @image_uri = args['imageUri'] @machine_type_uri = args['machineTypeUri'] @disk_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateSecondaryWorkerConfigDiskConfig.new(args['diskConfig'], to_s) @is_preemptible = args['isPreemptible'] @preemptibility = args['preemptibility'] @managed_group_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateSecondaryWorkerConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) @accelerators = GoogleInSpec::Dataproc::Property::WorkflowTemplateSecondaryWorkerConfigAcceleratorsArray.parse(args['accelerators'], to_s) @min_cpu_platform = args['minCpuPlatform'] @min_num_instances = args['minNumInstances'] @instance_flexibility_policy = GoogleInSpec::Dataproc::Property::WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicy.new(args['instanceFlexibilityPolicy'], to_s) @startup_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateSecondaryWorkerConfigStartupConfig.new(args['startupConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateSecondaryWorkerConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_secondary_worker_config_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateSecondaryWorkerConfigAccelerators attr_reader :accelerator_type_uri attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type_uri = args['acceleratorTypeUri'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} WorkflowTemplateSecondaryWorkerConfigAccelerators" end end class WorkflowTemplateSecondaryWorkerConfigAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateSecondaryWorkerConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateSecondaryWorkerConfigAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_secondary_worker_config_disk_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateSecondaryWorkerConfigDiskConfig attr_reader :boot_disk_type attr_reader :boot_disk_size_gb attr_reader :num_local_ssds attr_reader :local_ssd_interface def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @boot_disk_type = args['bootDiskType'] @boot_disk_size_gb = args['bootDiskSizeGb'] @num_local_ssds = args['numLocalSsds'] @local_ssd_interface = args['localSsdInterface'] end def to_s "#{@parent_identifier} WorkflowTemplateSecondaryWorkerConfigDiskConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_results' module GoogleInSpec module Dataproc module Property class WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicy attr_reader :instance_selection_list attr_reader :instance_selection_results def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_selection_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionListArray.parse(args['instanceSelectionList'], to_s) @instance_selection_results = GoogleInSpec::Dataproc::Property::WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResultsArray.parse(args['instanceSelectionResults'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicy" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionList attr_reader :machine_types attr_reader :rank def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_types = args['machineTypes'] @rank = args['rank'] end def to_s "#{@parent_identifier} WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionList" end end class WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionListArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionList.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionList.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_results.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResults attr_reader :machine_type attr_reader :vm_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] @vm_count = args['vmCount'] end def to_s "#{@parent_identifier} WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResults" end end class WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResultsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResults.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateSecondaryWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResults.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_secondary_worker_config_instance_references.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateSecondaryWorkerConfigInstanceReferences attr_reader :instance_name attr_reader :instance_id attr_reader :public_key attr_reader :public_ecies_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_name = args['instanceName'] @instance_id = args['instanceId'] @public_key = args['publicKey'] @public_ecies_key = args['publicEciesKey'] end def to_s "#{@parent_identifier} WorkflowTemplateSecondaryWorkerConfigInstanceReferences" end end class WorkflowTemplateSecondaryWorkerConfigInstanceReferencesArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateSecondaryWorkerConfigInstanceReferences.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateSecondaryWorkerConfigInstanceReferences.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_secondary_worker_config_managed_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateSecondaryWorkerConfigManagedGroupConfig attr_reader :instance_template_name attr_reader :instance_group_manager_name attr_reader :instance_group_manager_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_template_name = args['instanceTemplateName'] @instance_group_manager_name = args['instanceGroupManagerName'] @instance_group_manager_uri = args['instanceGroupManagerUri'] end def to_s "#{@parent_identifier} WorkflowTemplateSecondaryWorkerConfigManagedGroupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_secondary_worker_config_startup_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateSecondaryWorkerConfigStartupConfig attr_reader :required_registration_fraction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @required_registration_fraction = args['requiredRegistrationFraction'] end def to_s "#{@parent_identifier} WorkflowTemplateSecondaryWorkerConfigStartupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_security_config_identity_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_security_config_identity_config_user_service_account_mapping' module GoogleInSpec module Dataproc module Property class WorkflowTemplatePlacementManagedClusterConfigSecurityConfigIdentityConfig attr_reader :user_service_account_mapping def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @user_service_account_mapping = GoogleInSpec::Dataproc::Property::WorkflowTemplateSecurityConfigIdentityConfigUserServiceAccountMapping.new(args['userServiceAccountMapping'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplatePlacementManagedClusterConfigSecurityConfigIdentityConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_security_config_identity_config_user_service_account_mapping.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateSecurityConfigIdentityConfigUserServiceAccountMapping attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} WorkflowTemplateSecurityConfigIdentityConfigUserServiceAccountMapping" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_worker_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_worker_config_accelerators' require 'google/dataproc/property/workflowtemplate_worker_config_disk_config' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_worker_config_instance_references' require 'google/dataproc/property/workflowtemplate_worker_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_worker_config_startup_config' module GoogleInSpec module Dataproc module Property class WorkflowTemplateWorkerConfig attr_reader :num_instances attr_reader :instance_names attr_reader :instance_references attr_reader :image_uri attr_reader :machine_type_uri attr_reader :disk_config attr_reader :is_preemptible attr_reader :preemptibility attr_reader :managed_group_config attr_reader :accelerators attr_reader :min_cpu_platform attr_reader :min_num_instances attr_reader :instance_flexibility_policy attr_reader :startup_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @num_instances = args['numInstances'] @instance_names = args['instanceNames'] @instance_references = GoogleInSpec::Dataproc::Property::WorkflowTemplateWorkerConfigInstanceReferencesArray.parse(args['instanceReferences'], to_s) @image_uri = args['imageUri'] @machine_type_uri = args['machineTypeUri'] @disk_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateWorkerConfigDiskConfig.new(args['diskConfig'], to_s) @is_preemptible = args['isPreemptible'] @preemptibility = args['preemptibility'] @managed_group_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateWorkerConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) @accelerators = GoogleInSpec::Dataproc::Property::WorkflowTemplateWorkerConfigAcceleratorsArray.parse(args['accelerators'], to_s) @min_cpu_platform = args['minCpuPlatform'] @min_num_instances = args['minNumInstances'] @instance_flexibility_policy = GoogleInSpec::Dataproc::Property::WorkflowTemplateWorkerConfigInstanceFlexibilityPolicy.new(args['instanceFlexibilityPolicy'], to_s) @startup_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateWorkerConfigStartupConfig.new(args['startupConfig'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateWorkerConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_worker_config_accelerators.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateWorkerConfigAccelerators attr_reader :accelerator_type_uri attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type_uri = args['acceleratorTypeUri'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} WorkflowTemplateWorkerConfigAccelerators" end end class WorkflowTemplateWorkerConfigAcceleratorsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateWorkerConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateWorkerConfigAccelerators.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_worker_config_disk_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateWorkerConfigDiskConfig attr_reader :boot_disk_type attr_reader :boot_disk_size_gb attr_reader :num_local_ssds attr_reader :local_ssd_interface def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @boot_disk_type = args['bootDiskType'] @boot_disk_size_gb = args['bootDiskSizeGb'] @num_local_ssds = args['numLocalSsds'] @local_ssd_interface = args['localSsdInterface'] end def to_s "#{@parent_identifier} WorkflowTemplateWorkerConfigDiskConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_results' module GoogleInSpec module Dataproc module Property class WorkflowTemplateWorkerConfigInstanceFlexibilityPolicy attr_reader :instance_selection_list attr_reader :instance_selection_results def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_selection_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionListArray.parse(args['instanceSelectionList'], to_s) @instance_selection_results = GoogleInSpec::Dataproc::Property::WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResultsArray.parse(args['instanceSelectionResults'], to_s) end def to_s "#{@parent_identifier} WorkflowTemplateWorkerConfigInstanceFlexibilityPolicy" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionList attr_reader :machine_types attr_reader :rank def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_types = args['machineTypes'] @rank = args['rank'] end def to_s "#{@parent_identifier} WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionList" end end class WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionListArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionList.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionList.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_results.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResults attr_reader :machine_type attr_reader :vm_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_type = args['machineType'] @vm_count = args['vmCount'] end def to_s "#{@parent_identifier} WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResults" end end class WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResultsArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResults.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateWorkerConfigInstanceFlexibilityPolicyInstanceSelectionResults.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_worker_config_instance_references.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateWorkerConfigInstanceReferences attr_reader :instance_name attr_reader :instance_id attr_reader :public_key attr_reader :public_ecies_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_name = args['instanceName'] @instance_id = args['instanceId'] @public_key = args['publicKey'] @public_ecies_key = args['publicEciesKey'] end def to_s "#{@parent_identifier} WorkflowTemplateWorkerConfigInstanceReferences" end end class WorkflowTemplateWorkerConfigInstanceReferencesArray def self.parse(value, parent_identifier) return if value.nil? return WorkflowTemplateWorkerConfigInstanceReferences.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| WorkflowTemplateWorkerConfigInstanceReferences.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_worker_config_managed_group_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateWorkerConfigManagedGroupConfig attr_reader :instance_template_name attr_reader :instance_group_manager_name attr_reader :instance_group_manager_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_template_name = args['instanceTemplateName'] @instance_group_manager_name = args['instanceGroupManagerName'] @instance_group_manager_uri = args['instanceGroupManagerUri'] end def to_s "#{@parent_identifier} WorkflowTemplateWorkerConfigManagedGroupConfig" end end end end end ================================================ FILE: libraries/google/dataproc/property/workflowtemplate_worker_config_startup_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Dataproc module Property class WorkflowTemplateWorkerConfigStartupConfig attr_reader :required_registration_fraction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @required_registration_fraction = args['requiredRegistrationFraction'] end def to_s "#{@parent_identifier} WorkflowTemplateWorkerConfigStartupConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/federation_backend_metastores.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class FederationBackendMetastores attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} FederationBackendMetastores" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/federation_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class FederationLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} FederationLabels" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_encryption_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceEncryptionConfig attr_reader :kms_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key = args['kmsKey'] end def to_s "#{@parent_identifier} ServiceEncryptionConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_hive_metastore_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/service_hive_metastore_config_auxiliary_versions' require 'google/dataprocmetastore/property/service_hive_metastore_config_config_overrides' require 'google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config' require 'google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config_keytab' module GoogleInSpec module DataprocMetastore module Property class ServiceHiveMetastoreConfig attr_reader :version attr_reader :config_overrides attr_reader :kerberos_config attr_reader :endpoint_protocol attr_reader :auxiliary_versions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @version = args['version'] @config_overrides = GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfigConfigOverrides.new(args['configOverrides'], to_s) @kerberos_config = GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfigKerberosConfig.new(args['kerberosConfig'], to_s) @endpoint_protocol = args['endpointProtocol'] @auxiliary_versions = GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfigAuxiliaryVersions.new(args['auxiliaryVersions'], to_s) end def to_s "#{@parent_identifier} ServiceHiveMetastoreConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_hive_metastore_config_auxiliary_versions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceHiveMetastoreConfigAuxiliaryVersions attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceHiveMetastoreConfigAuxiliaryVersions" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_hive_metastore_config_config_overrides.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceHiveMetastoreConfigConfigOverrides attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceHiveMetastoreConfigConfigOverrides" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config_keytab' module GoogleInSpec module DataprocMetastore module Property class ServiceHiveMetastoreConfigKerberosConfig attr_reader :keytab attr_reader :principal attr_reader :krb5_config_gcs_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @keytab = GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfigKerberosConfigKeytab.new(args['keytab'], to_s) @principal = args['principal'] @krb5_config_gcs_uri = args['krb5ConfigGcsUri'] end def to_s "#{@parent_identifier} ServiceHiveMetastoreConfigKerberosConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config_keytab.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceHiveMetastoreConfigKerberosConfigKeytab attr_reader :cloud_secret def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cloud_secret = args['cloudSecret'] end def to_s "#{@parent_identifier} ServiceHiveMetastoreConfigKerberosConfigKeytab" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceLabels" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_maintenance_window.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceMaintenanceWindow attr_reader :hour_of_day attr_reader :day_of_week def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @hour_of_day = args['hourOfDay'] @day_of_week = args['dayOfWeek'] end def to_s "#{@parent_identifier} ServiceMaintenanceWindow" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_metadata_integration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/service_metadata_integration_data_catalog_config' require 'google/dataprocmetastore/property/service_metadata_integration_dataplex_config' require 'google/dataprocmetastore/property/service_metadata_integration_dataplex_config_lake_resources' module GoogleInSpec module DataprocMetastore module Property class ServiceMetadataIntegration attr_reader :data_catalog_config attr_reader :dataplex_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @data_catalog_config = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataIntegrationDataCatalogConfig.new(args['dataCatalogConfig'], to_s) @dataplex_config = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataIntegrationDataplexConfig.new(args['dataplexConfig'], to_s) end def to_s "#{@parent_identifier} ServiceMetadataIntegration" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_metadata_integration_data_catalog_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceMetadataIntegrationDataCatalogConfig attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} ServiceMetadataIntegrationDataCatalogConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_metadata_integration_dataplex_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/service_metadata_integration_dataplex_config_lake_resources' module GoogleInSpec module DataprocMetastore module Property class ServiceMetadataIntegrationDataplexConfig attr_reader :lake_resources def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @lake_resources = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataIntegrationDataplexConfigLakeResources.new(args['lakeResources'], to_s) end def to_s "#{@parent_identifier} ServiceMetadataIntegrationDataplexConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_metadata_integration_dataplex_config_lake_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceMetadataIntegrationDataplexConfigLakeResources attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceMetadataIntegrationDataplexConfigLakeResources" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_metadata_management_activity.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/service_metadata_management_activity_metadata_exports' require 'google/dataprocmetastore/property/service_metadata_management_activity_restores' module GoogleInSpec module DataprocMetastore module Property class ServiceMetadataManagementActivity attr_reader :metadata_exports attr_reader :restores def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metadata_exports = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataManagementActivityMetadataExportsArray.parse(args['metadataExports'], to_s) @restores = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataManagementActivityRestoresArray.parse(args['restores'], to_s) end def to_s "#{@parent_identifier} ServiceMetadataManagementActivity" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_metadata_management_activity_metadata_exports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceMetadataManagementActivityMetadataExports attr_reader :destination_gcs_uri attr_reader :start_time attr_reader :end_time attr_reader :state attr_reader :database_dump_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @destination_gcs_uri = args['destinationGcsUri'] @start_time = args['startTime'] @end_time = args['endTime'] @state = args['state'] @database_dump_type = args['databaseDumpType'] end def to_s "#{@parent_identifier} ServiceMetadataManagementActivityMetadataExports" end end class ServiceMetadataManagementActivityMetadataExportsArray def self.parse(value, parent_identifier) return if value.nil? return ServiceMetadataManagementActivityMetadataExports.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceMetadataManagementActivityMetadataExports.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_metadata_management_activity_restores.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceMetadataManagementActivityRestores attr_reader :start_time attr_reader :end_time attr_reader :state attr_reader :backup attr_reader :type attr_reader :details attr_reader :backup_location def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @start_time = args['startTime'] @end_time = args['endTime'] @state = args['state'] @backup = args['backup'] @type = args['type'] @details = args['details'] @backup_location = args['backupLocation'] end def to_s "#{@parent_identifier} ServiceMetadataManagementActivityRestores" end end class ServiceMetadataManagementActivityRestoresArray def self.parse(value, parent_identifier) return if value.nil? return ServiceMetadataManagementActivityRestores.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceMetadataManagementActivityRestores.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_network_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/service_network_config_consumers' module GoogleInSpec module DataprocMetastore module Property class ServiceNetworkConfig attr_reader :consumers attr_reader :custom_routes_enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @consumers = GoogleInSpec::DataprocMetastore::Property::ServiceNetworkConfigConsumersArray.parse(args['consumers'], to_s) @custom_routes_enabled = args['customRoutesEnabled'] end def to_s "#{@parent_identifier} ServiceNetworkConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_network_config_consumers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceNetworkConfigConsumers attr_reader :subnetwork attr_reader :endpoint_uri attr_reader :endpoint_location def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @subnetwork = args['subnetwork'] @endpoint_uri = args['endpointUri'] @endpoint_location = args['endpointLocation'] end def to_s "#{@parent_identifier} ServiceNetworkConfigConsumers" end end class ServiceNetworkConfigConsumersArray def self.parse(value, parent_identifier) return if value.nil? return ServiceNetworkConfigConsumers.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceNetworkConfigConsumers.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_scaling_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/service_scaling_config_autoscaling_config' require 'google/dataprocmetastore/property/service_scaling_config_autoscaling_config_limit_config' module GoogleInSpec module DataprocMetastore module Property class ServiceScalingConfig attr_reader :instance_size attr_reader :scaling_factor attr_reader :autoscaling_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_size = args['instanceSize'] @scaling_factor = args['scalingFactor'] @autoscaling_config = GoogleInSpec::DataprocMetastore::Property::ServiceScalingConfigAutoscalingConfig.new(args['autoscalingConfig'], to_s) end def to_s "#{@parent_identifier} ServiceScalingConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_scaling_config_autoscaling_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/service_scaling_config_autoscaling_config_limit_config' module GoogleInSpec module DataprocMetastore module Property class ServiceScalingConfigAutoscalingConfig attr_reader :autoscaling_factor attr_reader :autoscaling_enabled attr_reader :limit_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @autoscaling_factor = args['autoscalingFactor'] @autoscaling_enabled = args['autoscalingEnabled'] @limit_config = GoogleInSpec::DataprocMetastore::Property::ServiceScalingConfigAutoscalingConfigLimitConfig.new(args['limitConfig'], to_s) end def to_s "#{@parent_identifier} ServiceScalingConfigAutoscalingConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_scaling_config_autoscaling_config_limit_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceScalingConfigAutoscalingConfigLimitConfig attr_reader :max_scaling_factor attr_reader :min_scaling_factor def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_scaling_factor = args['maxScalingFactor'] @min_scaling_factor = args['minScalingFactor'] end def to_s "#{@parent_identifier} ServiceScalingConfigAutoscalingConfigLimitConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_scheduled_backup.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/service_scheduled_backup_latest_backup' module GoogleInSpec module DataprocMetastore module Property class ServiceScheduledBackup attr_reader :enabled attr_reader :cron_schedule attr_reader :time_zone attr_reader :next_scheduled_time attr_reader :backup_location attr_reader :latest_backup def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] @cron_schedule = args['cronSchedule'] @time_zone = args['timeZone'] @next_scheduled_time = args['nextScheduledTime'] @backup_location = args['backupLocation'] @latest_backup = GoogleInSpec::DataprocMetastore::Property::ServiceScheduledBackupLatestBackup.new(args['latestBackup'], to_s) end def to_s "#{@parent_identifier} ServiceScheduledBackup" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_scheduled_backup_latest_backup.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceScheduledBackupLatestBackup attr_reader :backup_id attr_reader :start_time attr_reader :state attr_reader :duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backup_id = args['backupId'] @start_time = args['startTime'] @state = args['state'] @duration = args['duration'] end def to_s "#{@parent_identifier} ServiceScheduledBackupLatestBackup" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/service_telemetry_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceTelemetryConfig attr_reader :log_format def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @log_format = args['logFormat'] end def to_s "#{@parent_identifier} ServiceTelemetryConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/servicebackup_service_revision_encryption_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_auxiliary_versions' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_config_overrides' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_kerberos_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_kerberos_config_keytab' require 'google/dataprocmetastore/property/servicebackup_service_revision_labels' require 'google/dataprocmetastore/property/servicebackup_service_revision_maintenance_window' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_data_catalog_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_dataplex_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_dataplex_config_lake_resources' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity_metadata_exports' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity_restores' require 'google/dataprocmetastore/property/servicebackup_service_revision_network_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_network_config_consumers' require 'google/dataprocmetastore/property/servicebackup_service_revision_scaling_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_scaling_config_autoscaling_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_scaling_config_autoscaling_config_limit_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_scheduled_backup' require 'google/dataprocmetastore/property/servicebackup_service_revision_scheduled_backup_latest_backup' require 'google/dataprocmetastore/property/servicebackup_service_revision_telemetry_config' module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevision attr_reader :hive_metastore_config attr_reader :name attr_reader :create_time attr_reader :update_time attr_reader :labels attr_reader :network attr_reader :endpoint_uri attr_reader :port attr_reader :state attr_reader :state_message attr_reader :artifact_gcs_uri attr_reader :tier attr_reader :metadata_integration attr_reader :maintenance_window attr_reader :uid attr_reader :metadata_management_activity attr_reader :release_channel attr_reader :encryption_config attr_reader :network_config attr_reader :database_type attr_reader :telemetry_config attr_reader :scaling_config attr_reader :scheduled_backup attr_reader :deletion_protection def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @hive_metastore_config = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionHiveMetastoreConfig.new(args['hiveMetastoreConfig'], to_s) @name = args['name'] @create_time = args['createTime'] @update_time = args['updateTime'] @labels = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionLabels.new(args['labels'], to_s) @network = args['network'] @endpoint_uri = args['endpointUri'] @port = args['port'] @state = args['state'] @state_message = args['stateMessage'] @artifact_gcs_uri = args['artifactGcsUri'] @tier = args['tier'] @metadata_integration = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionMetadataIntegration.new(args['metadataIntegration'], to_s) @maintenance_window = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionMaintenanceWindow.new(args['maintenanceWindow'], to_s) @uid = args['uid'] @metadata_management_activity = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionMetadataManagementActivity.new(args['metadataManagementActivity'], to_s) @release_channel = args['releaseChannel'] @encryption_config = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionEncryptionConfig.new(args['encryptionConfig'], to_s) @network_config = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionNetworkConfig.new(args['networkConfig'], to_s) @database_type = args['databaseType'] @telemetry_config = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionTelemetryConfig.new(args['telemetryConfig'], to_s) @scaling_config = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionScalingConfig.new(args['scalingConfig'], to_s) @scheduled_backup = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionScheduledBackup.new(args['scheduledBackup'], to_s) @deletion_protection = args['deletionProtection'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevision" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_encryption_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionEncryptionConfig attr_reader :kms_key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key = args['kmsKey'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionEncryptionConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_auxiliary_versions' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_config_overrides' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_kerberos_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_kerberos_config_keytab' module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionHiveMetastoreConfig attr_reader :version attr_reader :config_overrides attr_reader :kerberos_config attr_reader :endpoint_protocol attr_reader :auxiliary_versions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @version = args['version'] @config_overrides = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionHiveMetastoreConfigConfigOverrides.new(args['configOverrides'], to_s) @kerberos_config = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionHiveMetastoreConfigKerberosConfig.new(args['kerberosConfig'], to_s) @endpoint_protocol = args['endpointProtocol'] @auxiliary_versions = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionHiveMetastoreConfigAuxiliaryVersions.new(args['auxiliaryVersions'], to_s) end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionHiveMetastoreConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_auxiliary_versions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionHiveMetastoreConfigAuxiliaryVersions attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionHiveMetastoreConfigAuxiliaryVersions" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_config_overrides.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionHiveMetastoreConfigConfigOverrides attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionHiveMetastoreConfigConfigOverrides" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_kerberos_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_kerberos_config_keytab' module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionHiveMetastoreConfigKerberosConfig attr_reader :keytab attr_reader :principal attr_reader :krb5_config_gcs_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @keytab = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionHiveMetastoreConfigKerberosConfigKeytab.new(args['keytab'], to_s) @principal = args['principal'] @krb5_config_gcs_uri = args['krb5ConfigGcsUri'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionHiveMetastoreConfigKerberosConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_kerberos_config_keytab.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionHiveMetastoreConfigKerberosConfigKeytab attr_reader :cloud_secret def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cloud_secret = args['cloudSecret'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionHiveMetastoreConfigKerberosConfigKeytab" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionLabels" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_maintenance_window.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionMaintenanceWindow attr_reader :hour_of_day attr_reader :day_of_week def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @hour_of_day = args['hourOfDay'] @day_of_week = args['dayOfWeek'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionMaintenanceWindow" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_data_catalog_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_dataplex_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_dataplex_config_lake_resources' module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionMetadataIntegration attr_reader :data_catalog_config attr_reader :dataplex_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @data_catalog_config = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionMetadataIntegrationDataCatalogConfig.new(args['dataCatalogConfig'], to_s) @dataplex_config = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionMetadataIntegrationDataplexConfig.new(args['dataplexConfig'], to_s) end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionMetadataIntegration" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_data_catalog_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionMetadataIntegrationDataCatalogConfig attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionMetadataIntegrationDataCatalogConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_dataplex_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_dataplex_config_lake_resources' module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionMetadataIntegrationDataplexConfig attr_reader :lake_resources def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @lake_resources = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionMetadataIntegrationDataplexConfigLakeResources.new(args['lakeResources'], to_s) end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionMetadataIntegrationDataplexConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_dataplex_config_lake_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionMetadataIntegrationDataplexConfigLakeResources attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionMetadataIntegrationDataplexConfigLakeResources" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity_metadata_exports' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity_restores' module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionMetadataManagementActivity attr_reader :metadata_exports attr_reader :restores def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metadata_exports = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionMetadataManagementActivityMetadataExportsArray.parse(args['metadataExports'], to_s) @restores = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionMetadataManagementActivityRestoresArray.parse(args['restores'], to_s) end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionMetadataManagementActivity" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity_metadata_exports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionMetadataManagementActivityMetadataExports attr_reader :destination_gcs_uri attr_reader :start_time attr_reader :end_time attr_reader :state attr_reader :database_dump_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @destination_gcs_uri = args['destinationGcsUri'] @start_time = args['startTime'] @end_time = args['endTime'] @state = args['state'] @database_dump_type = args['databaseDumpType'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionMetadataManagementActivityMetadataExports" end end class ServiceBackupServiceRevisionMetadataManagementActivityMetadataExportsArray def self.parse(value, parent_identifier) return if value.nil? return ServiceBackupServiceRevisionMetadataManagementActivityMetadataExports.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceBackupServiceRevisionMetadataManagementActivityMetadataExports.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity_restores.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionMetadataManagementActivityRestores attr_reader :start_time attr_reader :end_time attr_reader :state attr_reader :backup attr_reader :type attr_reader :details attr_reader :backup_location def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @start_time = args['startTime'] @end_time = args['endTime'] @state = args['state'] @backup = args['backup'] @type = args['type'] @details = args['details'] @backup_location = args['backupLocation'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionMetadataManagementActivityRestores" end end class ServiceBackupServiceRevisionMetadataManagementActivityRestoresArray def self.parse(value, parent_identifier) return if value.nil? return ServiceBackupServiceRevisionMetadataManagementActivityRestores.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceBackupServiceRevisionMetadataManagementActivityRestores.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_network_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/servicebackup_service_revision_network_config_consumers' module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionNetworkConfig attr_reader :consumers attr_reader :custom_routes_enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @consumers = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionNetworkConfigConsumersArray.parse(args['consumers'], to_s) @custom_routes_enabled = args['customRoutesEnabled'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionNetworkConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_network_config_consumers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionNetworkConfigConsumers attr_reader :subnetwork attr_reader :endpoint_uri attr_reader :endpoint_location def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @subnetwork = args['subnetwork'] @endpoint_uri = args['endpointUri'] @endpoint_location = args['endpointLocation'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionNetworkConfigConsumers" end end class ServiceBackupServiceRevisionNetworkConfigConsumersArray def self.parse(value, parent_identifier) return if value.nil? return ServiceBackupServiceRevisionNetworkConfigConsumers.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceBackupServiceRevisionNetworkConfigConsumers.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_scaling_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/servicebackup_service_revision_scaling_config_autoscaling_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_scaling_config_autoscaling_config_limit_config' module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionScalingConfig attr_reader :instance_size attr_reader :scaling_factor attr_reader :autoscaling_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_size = args['instanceSize'] @scaling_factor = args['scalingFactor'] @autoscaling_config = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionScalingConfigAutoscalingConfig.new(args['autoscalingConfig'], to_s) end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionScalingConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_scaling_config_autoscaling_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/servicebackup_service_revision_scaling_config_autoscaling_config_limit_config' module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionScalingConfigAutoscalingConfig attr_reader :autoscaling_factor attr_reader :autoscaling_enabled attr_reader :limit_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @autoscaling_factor = args['autoscalingFactor'] @autoscaling_enabled = args['autoscalingEnabled'] @limit_config = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionScalingConfigAutoscalingConfigLimitConfig.new(args['limitConfig'], to_s) end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionScalingConfigAutoscalingConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_scaling_config_autoscaling_config_limit_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionScalingConfigAutoscalingConfigLimitConfig attr_reader :max_scaling_factor attr_reader :min_scaling_factor def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_scaling_factor = args['maxScalingFactor'] @min_scaling_factor = args['minScalingFactor'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionScalingConfigAutoscalingConfigLimitConfig" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_scheduled_backup.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dataprocmetastore/property/servicebackup_service_revision_scheduled_backup_latest_backup' module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionScheduledBackup attr_reader :enabled attr_reader :cron_schedule attr_reader :time_zone attr_reader :next_scheduled_time attr_reader :backup_location attr_reader :latest_backup def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] @cron_schedule = args['cronSchedule'] @time_zone = args['timeZone'] @next_scheduled_time = args['nextScheduledTime'] @backup_location = args['backupLocation'] @latest_backup = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevisionScheduledBackupLatestBackup.new(args['latestBackup'], to_s) end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionScheduledBackup" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_scheduled_backup_latest_backup.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionScheduledBackupLatestBackup attr_reader :backup_id attr_reader :start_time attr_reader :state attr_reader :duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @backup_id = args['backupId'] @start_time = args['startTime'] @state = args['state'] @duration = args['duration'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionScheduledBackupLatestBackup" end end end end end ================================================ FILE: libraries/google/dataprocmetastore/property/servicebackup_service_revision_telemetry_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DataprocMetastore module Property class ServiceBackupServiceRevisionTelemetryConfig attr_reader :log_format def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @log_format = args['logFormat'] end def to_s "#{@parent_identifier} ServiceBackupServiceRevisionTelemetryConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf' require 'google/dlp/property/dt_config_info_type_tf_tf' module GoogleInSpec module DLP module Property class DTConfig attr_reader :info_type_tf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @info_type_tf = GoogleInSpec::DLP::Property::DTConfigInfoTypeTf.new(args['infoTypeTf'], to_s) end def to_s "#{@parent_identifier} DTConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf_tf' module GoogleInSpec module DLP module Property class DTConfigInfoTypeTf attr_reader :tf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @tf = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfArray.parse(args['tf'], to_s) end def to_s "#{@parent_identifier} DTConfigInfoTypeTf" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf_tf_info_types' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value' module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTf attr_reader :info_types attr_reader :primitive_tf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @info_types = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfInfoTypesArray.parse(args['infoTypes'], to_s) @primitive_tf = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTf.new(args['primitiveTf'], to_s) end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTf" end end class DTConfigInfoTypeTfTfArray def self.parse(value, parent_identifier) return if value.nil? return DTConfigInfoTypeTfTf.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| DTConfigInfoTypeTfTf.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_info_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfInfoTypes attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfInfoTypes" end end class DTConfigInfoTypeTfTfInfoTypesArray def self.parse(value, parent_identifier) return if value.nil? return DTConfigInfoTypeTfTfInfoTypes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| DTConfigInfoTypeTfTfInfoTypes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value' module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTf attr_reader :replace_config attr_reader :replace_with_info_type_config attr_reader :character_mask_config attr_reader :crypto_deterministic_config attr_reader :crypto_replace_ffx_fpe_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @replace_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfig.new(args['replaceConfig'], to_s) @replace_with_info_type_config = args['replaceWithInfoTypeConfig'] @character_mask_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfig.new(args['characterMaskConfig'], to_s) @crypto_deterministic_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfig.new(args['cryptoDeterministicConfig'], to_s) @crypto_replace_ffx_fpe_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfig.new(args['cryptoReplaceFfxFpeConfig'], to_s) end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTf" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore' module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfig attr_reader :masking_character attr_reader :number_to_mask attr_reader :reverse_order attr_reader :characters_to_ignore def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @masking_character = args['maskingCharacter'] @number_to_mask = args['numberToMask'] @reverse_order = args['reverseOrder'] @characters_to_ignore = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfigCharactersToIgnoreArray.parse(args['charactersToIgnore'], to_s) end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfigCharactersToIgnore attr_reader :characters_to_skip attr_reader :common_characters_to_ignore def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @characters_to_skip = args['charactersToSkip'] @common_characters_to_ignore = args['commonCharactersToIgnore'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfigCharactersToIgnore" end end class DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfigCharactersToIgnoreArray def self.parse(value, parent_identifier) return if value.nil? return DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfigCharactersToIgnore.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfigCharactersToIgnore.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type' module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfig attr_reader :crypto_key attr_reader :surrogate_info_type attr_reader :context def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @crypto_key = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKey.new(args['cryptoKey'], to_s) @surrogate_info_type = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigSurrogateInfoType.new(args['surrogateInfoType'], to_s) @context = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigContext.new(args['context'], to_s) end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigContext attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigContext" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped' module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKey attr_reader :transient attr_reader :unwrapped attr_reader :kms_wrapped def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @transient = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyTransient.new(args['transient'], to_s) @unwrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyUnwrapped.new(args['unwrapped'], to_s) @kms_wrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyKmsWrapped.new(args['kmsWrapped'], to_s) end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKey" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyKmsWrapped attr_reader :wrapped_key attr_reader :crypto_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @wrapped_key = args['wrappedKey'] @crypto_key_name = args['cryptoKeyName'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyKmsWrapped" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyTransient attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyTransient" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyUnwrapped attr_reader :key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyUnwrapped" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigSurrogateInfoType attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigSurrogateInfoType" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type' module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfig attr_reader :crypto_key attr_reader :context attr_reader :surrogate_info_type attr_reader :common_alphabet attr_reader :custom_alphabet attr_reader :radix def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @crypto_key = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKey.new(args['cryptoKey'], to_s) @context = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigContext.new(args['context'], to_s) @surrogate_info_type = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigSurrogateInfoType.new(args['surrogateInfoType'], to_s) @common_alphabet = args['commonAlphabet'] @custom_alphabet = args['customAlphabet'] @radix = args['radix'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigContext attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigContext" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped' module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKey attr_reader :transient attr_reader :unwrapped attr_reader :kms_wrapped def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @transient = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyTransient.new(args['transient'], to_s) @unwrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyUnwrapped.new(args['unwrapped'], to_s) @kms_wrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyKmsWrapped.new(args['kmsWrapped'], to_s) end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKey" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyKmsWrapped attr_reader :wrapped_key attr_reader :crypto_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @wrapped_key = args['wrappedKey'] @crypto_key_name = args['cryptoKeyName'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyKmsWrapped" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyTransient attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyTransient" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyUnwrapped attr_reader :key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyUnwrapped" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigSurrogateInfoType attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigSurrogateInfoType" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value' module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfReplaceConfig attr_reader :new_value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @new_value = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValue.new(args['newValue'], to_s) end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfReplaceConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value' require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value' module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValue attr_reader :integer_value attr_reader :float_value attr_reader :string_value attr_reader :boolean_value attr_reader :timestamp_value attr_reader :time_value attr_reader :date_value attr_reader :day_of_week_value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @integer_value = args['integerValue'] @float_value = args['floatValue'] @string_value = args['stringValue'] @boolean_value = args['booleanValue'] @timestamp_value = args['timestampValue'] @time_value = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueTimeValue.new(args['timeValue'], to_s) @date_value = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueDateValue.new(args['dateValue'], to_s) @day_of_week_value = args['dayOfWeekValue'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValue" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueDateValue attr_reader :year attr_reader :month attr_reader :day def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @year = args['year'] @month = args['month'] @day = args['day'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueDateValue" end end end end end ================================================ FILE: libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueTimeValue attr_reader :hours attr_reader :minutes attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @hours = args['hours'] @minutes = args['minutes'] @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueTimeValue" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types' require 'google/dlp/property/inspecttemplate_inspect_config_info_types' require 'google/dlp/property/inspecttemplate_inspect_config_limits' require 'google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfig attr_reader :exclude_info_types attr_reader :include_quote attr_reader :min_likelihood attr_reader :limits attr_reader :info_types attr_reader :content_options attr_reader :rule_set attr_reader :custom_info_types def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @exclude_info_types = args['excludeInfoTypes'] @include_quote = args['includeQuote'] @min_likelihood = args['minLikelihood'] @limits = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigLimits.new(args['limits'], to_s) @info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigInfoTypesArray.parse(args['infoTypes'], to_s) @content_options = args['contentOptions'] @rule_set = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetArray.parse(args['ruleSet'], to_s) @custom_info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesArray.parse(args['customInfoTypes'], to_s) end def to_s "#{@parent_identifier} InspectTemplateInspectConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary' require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path' require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list' require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_info_type' require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_regex' require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_stored_type' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigCustomInfoTypes attr_reader :info_type attr_reader :likelihood attr_reader :exclusion_type attr_reader :regex attr_reader :dictionary attr_reader :stored_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @info_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesInfoType.new(args['infoType'], to_s) @likelihood = args['likelihood'] @exclusion_type = args['exclusionType'] @regex = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesRegex.new(args['regex'], to_s) @dictionary = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesDictionary.new(args['dictionary'], to_s) @stored_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesStoredType.new(args['storedType'], to_s) end def to_s "#{@parent_identifier} InspectTemplateInspectConfigCustomInfoTypes" end end class InspectTemplateInspectConfigCustomInfoTypesArray def self.parse(value, parent_identifier) return if value.nil? return InspectTemplateInspectConfigCustomInfoTypes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InspectTemplateInspectConfigCustomInfoTypes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path' require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigCustomInfoTypesDictionary attr_reader :word_list attr_reader :cloud_storage_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @word_list = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesDictionaryWordList.new(args['wordList'], to_s) @cloud_storage_path = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesDictionaryCloudStoragePath.new(args['cloudStoragePath'], to_s) end def to_s "#{@parent_identifier} InspectTemplateInspectConfigCustomInfoTypesDictionary" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigCustomInfoTypesDictionaryCloudStoragePath attr_reader :path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigCustomInfoTypesDictionaryCloudStoragePath" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigCustomInfoTypesDictionaryWordList attr_reader :words def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @words = args['words'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigCustomInfoTypesDictionaryWordList" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_info_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigCustomInfoTypesInfoType attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigCustomInfoTypesInfoType" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_regex.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigCustomInfoTypesRegex attr_reader :pattern attr_reader :group_indexes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pattern = args['pattern'] @group_indexes = args['groupIndexes'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigCustomInfoTypesRegex" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_stored_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigCustomInfoTypesStoredType attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigCustomInfoTypesStoredType" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_info_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigInfoTypes attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigInfoTypes" end end class InspectTemplateInspectConfigInfoTypesArray def self.parse(value, parent_identifier) return if value.nil? return InspectTemplateInspectConfigInfoTypes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InspectTemplateInspectConfigInfoTypes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_limits.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigLimits attr_reader :max_findings_per_item attr_reader :max_findings_per_request attr_reader :max_findings_per_info_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_findings_per_item = args['maxFindingsPerItem'] @max_findings_per_request = args['maxFindingsPerRequest'] @max_findings_per_info_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigLimitsMaxFindingsPerInfoTypeArray.parse(args['maxFindingsPerInfoType'], to_s) end def to_s "#{@parent_identifier} InspectTemplateInspectConfigLimits" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type_info_type' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigLimitsMaxFindingsPerInfoType attr_reader :info_type attr_reader :max_findings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @info_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigLimitsMaxFindingsPerInfoTypeInfoType.new(args['infoType'], to_s) @max_findings = args['maxFindings'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigLimitsMaxFindingsPerInfoType" end end class InspectTemplateInspectConfigLimitsMaxFindingsPerInfoTypeArray def self.parse(value, parent_identifier) return if value.nil? return InspectTemplateInspectConfigLimitsMaxFindingsPerInfoType.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InspectTemplateInspectConfigLimitsMaxFindingsPerInfoType.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type_info_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigLimitsMaxFindingsPerInfoTypeInfoType attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigLimitsMaxFindingsPerInfoTypeInfoType" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_info_types' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSet attr_reader :info_types attr_reader :rules def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetInfoTypesArray.parse(args['infoTypes'], to_s) @rules = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesArray.parse(args['rules'], to_s) end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSet" end end class InspectTemplateInspectConfigRuleSetArray def self.parse(value, parent_identifier) return if value.nil? return InspectTemplateInspectConfigRuleSet.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InspectTemplateInspectConfigRuleSet.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_info_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetInfoTypes attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetInfoTypes" end end class InspectTemplateInspectConfigRuleSetInfoTypesArray def self.parse(value, parent_identifier) return if value.nil? return InspectTemplateInspectConfigRuleSetInfoTypes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InspectTemplateInspectConfigRuleSetInfoTypes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRules attr_reader :hotword_rule attr_reader :exclusion_rule def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @hotword_rule = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRule.new(args['hotwordRule'], to_s) @exclusion_rule = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRule.new(args['exclusionRule'], to_s) end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRules" end end class InspectTemplateInspectConfigRuleSetRulesArray def self.parse(value, parent_identifier) return if value.nil? return InspectTemplateInspectConfigRuleSetRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InspectTemplateInspectConfigRuleSetRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesExclusionRule attr_reader :matching_type attr_reader :dictionary attr_reader :regex attr_reader :exclude_info_types def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @matching_type = args['matchingType'] @dictionary = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionary.new(args['dictionary'], to_s) @regex = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleRegex.new(args['regex'], to_s) @exclude_info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypes.new(args['excludeInfoTypes'], to_s) end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesExclusionRule" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionary attr_reader :word_list attr_reader :cloud_storage_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @word_list = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryWordList.new(args['wordList'], to_s) @cloud_storage_path = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryCloudStoragePath.new(args['cloudStoragePath'], to_s) end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionary" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryCloudStoragePath attr_reader :path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryCloudStoragePath" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryWordList attr_reader :words def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @words = args['words'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryWordList" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypes attr_reader :info_types def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypesInfoTypesArray.parse(args['infoTypes'], to_s) end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypes" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypesInfoTypes attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypesInfoTypes" end end class InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypesInfoTypesArray def self.parse(value, parent_identifier) return if value.nil? return InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypesInfoTypes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypesInfoTypes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesExclusionRuleRegex attr_reader :pattern attr_reader :group_indexes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pattern = args['pattern'] @group_indexes = args['groupIndexes'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesExclusionRuleRegex" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity' module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesHotwordRule attr_reader :hotword_regex attr_reader :proximity attr_reader :likelihood_adjustment def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @hotword_regex = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRuleHotwordRegex.new(args['hotwordRegex'], to_s) @proximity = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRuleProximity.new(args['proximity'], to_s) @likelihood_adjustment = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRuleLikelihoodAdjustment.new(args['likelihoodAdjustment'], to_s) end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesHotwordRule" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesHotwordRuleHotwordRegex attr_reader :pattern attr_reader :group_indexes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pattern = args['pattern'] @group_indexes = args['groupIndexes'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesHotwordRuleHotwordRegex" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesHotwordRuleLikelihoodAdjustment attr_reader :fixed_likelihood attr_reader :relative_likelihood def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed_likelihood = args['fixedLikelihood'] @relative_likelihood = args['relativeLikelihood'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesHotwordRuleLikelihoodAdjustment" end end end end end ================================================ FILE: libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class InspectTemplateInspectConfigRuleSetRulesHotwordRuleProximity attr_reader :window_before attr_reader :window_after def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @window_before = args['windowBefore'] @window_after = args['windowAfter'] end def to_s "#{@parent_identifier} InspectTemplateInspectConfigRuleSetRulesHotwordRuleProximity" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_deidentify_stats' require 'google/dlp/property/job_act_det_deidentify_stats_requested_options' require 'google/dlp/property/job_act_det_deidentify_stats_requested_options_details' require 'google/dlp/property/job_act_det_dt_det' require 'google/dlp/property/job_act_det_dt_det_de_stats' require 'google/dlp/property/job_act_det_dt_det_req_opt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config' module GoogleInSpec module DLP module Property class JobActDet attr_reader :dt_det attr_reader :deidentify_stats def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @dt_det = GoogleInSpec::DLP::Property::JobActDetDtDet.new(args['dtDet'], to_s) @deidentify_stats = GoogleInSpec::DLP::Property::JobActDetDeidentifyStats.new(args['deidentifyStats'], to_s) end def to_s "#{@parent_identifier} JobActDet" end end class JobActDetArray def self.parse(value, parent_identifier) return if value.nil? return JobActDet.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDet.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_deidentify_stats.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_deidentify_stats_requested_options' require 'google/dlp/property/job_act_det_deidentify_stats_requested_options_details' module GoogleInSpec module DLP module Property class JobActDetDeidentifyStats attr_reader :requested_options def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @requested_options = GoogleInSpec::DLP::Property::JobActDetDeidentifyStatsRequestedOptions.new(args['requestedOptions'], to_s) end def to_s "#{@parent_identifier} JobActDetDeidentifyStats" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_deidentify_stats_requested_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_deidentify_stats_requested_options_details' module GoogleInSpec module DLP module Property class JobActDetDeidentifyStatsRequestedOptions attr_reader :code attr_reader :message attr_reader :details def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] @message = args['message'] @details = GoogleInSpec::DLP::Property::JobActDetDeidentifyStatsRequestedOptionsDetailsArray.parse(args['details'], to_s) end def to_s "#{@parent_identifier} JobActDetDeidentifyStatsRequestedOptions" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_deidentify_stats_requested_options_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDeidentifyStatsRequestedOptionsDetails attr_reader :type attr_reader :field1 def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @field1 = args['field1'] end def to_s "#{@parent_identifier} JobActDetDeidentifyStatsRequestedOptionsDetails" end end class JobActDetDeidentifyStatsRequestedOptionsDetailsArray def self.parse(value, parent_identifier) return if value.nil? return JobActDetDeidentifyStatsRequestedOptionsDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDetDeidentifyStatsRequestedOptionsDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_de_stats' require 'google/dlp/property/job_act_det_dt_det_req_opt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config' module GoogleInSpec module DLP module Property class JobActDetDtDet attr_reader :de_stats attr_reader :req_opt def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @de_stats = GoogleInSpec::DLP::Property::JobActDetDtDetDeStats.new(args['deStats'], to_s) @req_opt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOpt.new(args['req_Opt'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDet" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_de_stats.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetDeStats attr_reader :transformed_bytes attr_reader :transformation_count attr_reader :transformation_error_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @transformed_bytes = args['transformedBytes'] @transformation_count = args['transformationCount'] @transformation_error_count = args['transformationErrorCount'] end def to_s "#{@parent_identifier} JobActDetDtDetDeStats" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOpt attr_reader :snapshot_dt attr_reader :snapshot_structured_dt attr_reader :snapshot_img_rt def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @snapshot_dt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotDt.new(args['snapshotDT'], to_s) @snapshot_structured_dt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotStructuredDt.new(args['snapshotStructuredDT'], to_s) @snapshot_img_rt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRt.new(args['snapshotImgRT'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOpt" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template_config' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotDiTemplate attr_reader :name attr_reader :display_name attr_reader :description attr_reader :create_time attr_reader :update_time attr_reader :config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @display_name = args['displayName'] @description = args['description'] @create_time = args['createTime'] @update_time = args['updateTime'] @config = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotDiTemplateConfig.new(args['config'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotDiTemplate" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotDiTemplateConfig attr_reader :tf_error_handling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @tf_error_handling = args['tfErrorHandling'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotDiTemplateConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotDt attr_reader :name attr_reader :display_name attr_reader :description attr_reader :create_time attr_reader :update_time attr_reader :config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @display_name = args['displayName'] @description = args['description'] @create_time = args['createTime'] @update_time = args['updateTime'] @config = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotDtConfig.new(args['config'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotDt" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotDtConfig attr_reader :tf_error_handling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @tf_error_handling = args['tfErrorHandling'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotDtConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRt attr_reader :name attr_reader :display_name attr_reader :description attr_reader :create_time attr_reader :update_time attr_reader :dt_con def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @display_name = args['displayName'] @description = args['description'] @create_time = args['createTime'] @update_time = args['updateTime'] @dt_con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtCon.new(args['dtCon'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRt" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtCon attr_reader :tf_error_handling attr_reader :info_type_tf attr_reader :rec_tf attr_reader :image_tf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @tf_error_handling = args['tfErrorHandling'] @info_type_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTf.new(args['infoTypeTf'], to_s) @rec_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTf.new(args['recTf'], to_s) @image_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTf.new(args['ImageTf'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtCon" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConImageTf attr_reader :redaction_color attr_reader :selected_info_types attr_reader :all_info_types attr_reader :all_text def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @redaction_color = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfRedactionColor.new(args['redactionColor'], to_s) @selected_info_types = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfSelectedInfoTypesArray.parse(args['selectedInfoTypes'], to_s) @all_info_types = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllInfoTypesArray.parse(args['allInfoTypes'], to_s) @all_text = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllText.new(args['allText'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConImageTf" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllInfoTypes attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllInfoTypes" end end class JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllInfoTypesArray def self.parse(value, parent_identifier) return if value.nil? return JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllInfoTypes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllInfoTypes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllText attr_reader :red attr_reader :green attr_reader :blue def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @red = args['red'] @green = args['green'] @blue = args['blue'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllText" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConImageTfRedactionColor attr_reader :red attr_reader :green attr_reader :blue def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @red = args['red'] @green = args['green'] @blue = args['blue'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConImageTfRedactionColor" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConImageTfSelectedInfoTypes attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConImageTfSelectedInfoTypes" end end class JobActDetDtDetReqOptSnapshotImgRtDtConImageTfSelectedInfoTypesArray def self.parse(value, parent_identifier) return if value.nil? return JobActDetDtDetReqOptSnapshotImgRtDtConImageTfSelectedInfoTypes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDetDtDetReqOptSnapshotImgRtDtConImageTfSelectedInfoTypes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTf attr_reader :tf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfArray.parse(args['tf'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTf" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTf attr_reader :info_types def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @info_types = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypesArray.parse(args['infoTypes'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTf" end end class JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfArray def self.parse(value, parent_identifier) return if value.nil? return JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTf.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTf.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types_sensitivity_score' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypes attr_reader :name attr_reader :version attr_reader :sensitivity_score def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @version = args['version'] @sensitivity_score = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypesSensitivityScore.new(args['sensitivityScore'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypes" end end class JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypesArray def self.parse(value, parent_identifier) return if value.nil? return JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types_sensitivity_score.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypesSensitivityScore attr_reader :score def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @score = args['score'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypesSensitivityScore" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTf attr_reader :field_tf attr_reader :rec_sup def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @field_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfArray.parse(args['fieldTf'], to_s) @rec_sup = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupArray.parse(args['recSup'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTf" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_fields' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTf attr_reader :fields attr_reader :con def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fields = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfFieldsArray.parse(args['fields'], to_s) @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfCon.new(args['con'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTf" end end class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfArray def self.parse(value, parent_identifier) return if value.nil? return JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTf.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTf.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfCon attr_reader :exps def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @exps = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExps.new(args['exps'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfCon" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExps attr_reader :logical_operator attr_reader :con def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @logical_operator = args['logicalOperator'] @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsCon.new(args['con'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExps" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsCon attr_reader :cond def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cond = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondArray.parse(args['cond'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsCon" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_field' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val' require 'google/dlp/property/job_adddrosirdcrtftceccnvd_val' require 'google/dlp/property/job_adddrosirdcrtftceccnvt_val' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCond attr_reader :field attr_reader :operator attr_reader :new_val def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @field = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondField.new(args['field'], to_s) @operator = args['operator'] @new_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewVal.new(args['newVal'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCond" end end class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondArray def self.parse(value, parent_identifier) return if value.nil? return JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCond.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCond.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_field.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondField attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondField" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_adddrosirdcrtftceccnvd_val' require 'google/dlp/property/job_adddrosirdcrtftceccnvt_val' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewVal attr_reader :integer_value attr_reader :float_value attr_reader :string_value attr_reader :boolean_value attr_reader :timestamp_value attr_reader :time_val attr_reader :date_val attr_reader :day_of_week_val def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @integer_value = args['integerValue'] @float_value = args['floatValue'] @string_value = args['stringValue'] @boolean_value = args['booleanValue'] @timestamp_value = args['timestampValue'] @time_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValTimeVal.new(args['timeVal'], to_s) @date_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValDateVal.new(args['dateVal'], to_s) @day_of_week_val = args['dayOfWeekVal'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewVal" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_fields.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfFields attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfFields" end end class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfFieldsArray def self.parse(value, parent_identifier) return if value.nil? return JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfFields.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfFields.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSup attr_reader :con def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupCon.new(args['con'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSup" end end class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupArray def self.parse(value, parent_identifier) return if value.nil? return JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSup.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSup.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupCon attr_reader :exp def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @exp = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExp.new(args['exp'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupCon" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExp attr_reader :logical_operator attr_reader :con def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @logical_operator = args['logicalOperator'] @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpCon.new(args['con'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExp" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpCon attr_reader :con def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConArray.parse(args['con'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpCon" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_field' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConCon attr_reader :field attr_reader :operator attr_reader :new_val def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @field = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConField.new(args['field'], to_s) @operator = args['operator'] @new_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewVal.new(args['newVal'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConCon" end end class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConArray def self.parse(value, parent_identifier) return if value.nil? return JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConCon.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConCon.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_field.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConField attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConField" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val' require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewVal attr_reader :integer_val attr_reader :float_val attr_reader :string_val attr_reader :boolean_val attr_reader :timestamp_val attr_reader :time_val attr_reader :date_val attr_reader :day_of_week_val def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @integer_val = args['integerVal'] @float_val = args['floatVal'] @string_val = args['stringVal'] @boolean_val = args['booleanVal'] @timestamp_val = args['timestampVal'] @time_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValTimeVal.new(args['timeVal'], to_s) @date_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValDateVal.new(args['dateVal'], to_s) @day_of_week_val = args['dayOfWeekVal'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewVal" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValDateVal attr_reader :year attr_reader :month attr_reader :day def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @year = args['year'] @month = args['month'] @day = args['day'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValDateVal" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValTimeVal attr_reader :hours attr_reader :minutes attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @hours = args['hours'] @minutes = args['minutes'] @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValTimeVal" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config' module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotStructuredDt attr_reader :name attr_reader :display_name attr_reader :description attr_reader :create_time attr_reader :update_time attr_reader :deidentify_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @display_name = args['displayName'] @description = args['description'] @create_time = args['createTime'] @update_time = args['updateTime'] @deidentify_config = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotStructuredDtDeidentifyConfig.new(args['deidentifyConfig'], to_s) end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotStructuredDt" end end end end end ================================================ FILE: libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotStructuredDtDeidentifyConfig attr_reader :tf_error_handling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @tf_error_handling = args['tfErrorHandling'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotStructuredDtDeidentifyConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/job_adddrosirdcrtftceccnvd_val.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValDateVal attr_reader :year attr_reader :month attr_reader :day def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @year = args['year'] @month = args['month'] @day = args['day'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValDateVal" end end end end end ================================================ FILE: libraries/google/dlp/property/job_adddrosirdcrtftceccnvt_val.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValTimeVal attr_reader :hours attr_reader :minutes attr_reader :seconds attr_reader :nanos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @hours = args['hours'] @minutes = args['minutes'] @seconds = args['seconds'] @nanos = args['nanos'] end def to_s "#{@parent_identifier} JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValTimeVal" end end end end end ================================================ FILE: libraries/google/dlp/property/job_errors.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_errors_details' require 'google/dlp/property/job_errors_details_status' require 'google/dlp/property/job_errors_details_status_details' module GoogleInSpec module DLP module Property class JobErrors attr_reader :details def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = GoogleInSpec::DLP::Property::JobErrorsDetails.new(args['details'], to_s) end def to_s "#{@parent_identifier} JobErrors" end end class JobErrorsArray def self.parse(value, parent_identifier) return if value.nil? return JobErrors.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobErrors.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/job_errors_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_errors_details_status' require 'google/dlp/property/job_errors_details_status_details' module GoogleInSpec module DLP module Property class JobErrorsDetails attr_reader :status def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @status = GoogleInSpec::DLP::Property::JobErrorsDetailsStatus.new(args['status'], to_s) end def to_s "#{@parent_identifier} JobErrorsDetails" end end end end end ================================================ FILE: libraries/google/dlp/property/job_errors_details_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/job_errors_details_status_details' module GoogleInSpec module DLP module Property class JobErrorsDetailsStatus attr_reader :code attr_reader :message attr_reader :details def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @code = args['code'] @message = args['message'] @details = GoogleInSpec::DLP::Property::JobErrorsDetailsStatusDetailsArray.parse(args['details'], to_s) end def to_s "#{@parent_identifier} JobErrorsDetailsStatus" end end end end end ================================================ FILE: libraries/google/dlp/property/job_errors_details_status_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobErrorsDetailsStatusDetails attr_reader :type attr_reader :field1 def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @field1 = args['field1'] end def to_s "#{@parent_identifier} JobErrorsDetailsStatusDetails" end end class JobErrorsDetailsStatusDetailsArray def self.parse(value, parent_identifier) return if value.nil? return JobErrorsDetailsStatusDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobErrorsDetailsStatusDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_inspect_job_actions' require 'google/dlp/property/jobtrigger_inspect_job_storage_config' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field' module GoogleInSpec module DLP module Property class JobTriggerInspectJob attr_reader :inspect_template_name attr_reader :storage_config attr_reader :actions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @inspect_template_name = args['inspectTemplateName'] @storage_config = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfig.new(args['storageConfig'], to_s) @actions = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsArray.parse(args['actions'], to_s) end def to_s "#{@parent_identifier} JobTriggerInspectJob" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_actions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings' require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config' require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table' module GoogleInSpec module DLP module Property class JobTriggerInspectJobActions attr_reader :save_findings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @save_findings = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsSaveFindings.new(args['saveFindings'], to_s) end def to_s "#{@parent_identifier} JobTriggerInspectJobActions" end end class JobTriggerInspectJobActionsArray def self.parse(value, parent_identifier) return if value.nil? return JobTriggerInspectJobActions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTriggerInspectJobActions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config' require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table' module GoogleInSpec module DLP module Property class JobTriggerInspectJobActionsSaveFindings attr_reader :output_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_config = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsSaveFindingsOutputConfig.new(args['outputConfig'], to_s) end def to_s "#{@parent_identifier} JobTriggerInspectJobActionsSaveFindings" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table' module GoogleInSpec module DLP module Property class JobTriggerInspectJobActionsSaveFindingsOutputConfig attr_reader :table attr_reader :output_schema def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @table = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsSaveFindingsOutputConfigTable.new(args['table'], to_s) @output_schema = args['outputSchema'] end def to_s "#{@parent_identifier} JobTriggerInspectJobActionsSaveFindingsOutputConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobTriggerInspectJobActionsSaveFindingsOutputConfigTable attr_reader :project_id attr_reader :dataset_id attr_reader :table_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_id = args['projectId'] @dataset_id = args['datasetId'] @table_id = args['tableId'] end def to_s "#{@parent_identifier} JobTriggerInspectJobActionsSaveFindingsOutputConfigTable" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field' module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfig attr_reader :timespan_config attr_reader :datastore_options attr_reader :cloud_storage_options attr_reader :big_query_options def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @timespan_config = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigTimespanConfig.new(args['timespanConfig'], to_s) @datastore_options = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigDatastoreOptions.new(args['datastoreOptions'], to_s) @cloud_storage_options = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigCloudStorageOptions.new(args['cloudStorageOptions'], to_s) @big_query_options = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigBigQueryOptions.new(args['bigQueryOptions'], to_s) end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference' module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfigBigQueryOptions attr_reader :table_reference def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @table_reference = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigBigQueryOptionsTableReference.new(args['tableReference'], to_s) end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfigBigQueryOptions" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfigBigQueryOptionsTableReference attr_reader :project_id attr_reader :dataset_id attr_reader :table_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_id = args['projectId'] @dataset_id = args['datasetId'] @table_id = args['tableId'] end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfigBigQueryOptionsTableReference" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set' module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfigCloudStorageOptions attr_reader :file_set attr_reader :bytes_limit_per_file attr_reader :bytes_limit_per_file_percent attr_reader :files_limit_percent attr_reader :file_types attr_reader :sample_method def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @file_set = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSet.new(args['fileSet'], to_s) @bytes_limit_per_file = args['bytesLimitPerFile'] @bytes_limit_per_file_percent = args['bytesLimitPerFilePercent'] @files_limit_percent = args['filesLimitPercent'] @file_types = args['fileTypes'] @sample_method = args['sampleMethod'] end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfigCloudStorageOptions" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set' module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSet attr_reader :url attr_reader :regex_file_set def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @url = args['url'] @regex_file_set = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSetRegexFileSet.new(args['regexFileSet'], to_s) end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSet" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSetRegexFileSet attr_reader :bucket_name attr_reader :include_regex attr_reader :exclude_regex def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @bucket_name = args['bucketName'] @include_regex = args['includeRegex'] @exclude_regex = args['excludeRegex'] end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSetRegexFileSet" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id' module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfigDatastoreOptions attr_reader :partition_id attr_reader :kind def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @partition_id = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigDatastoreOptionsPartitionId.new(args['partitionId'], to_s) @kind = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigDatastoreOptionsKind.new(args['kind'], to_s) end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfigDatastoreOptions" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfigDatastoreOptionsKind attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfigDatastoreOptionsKind" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfigDatastoreOptionsPartitionId attr_reader :project_id attr_reader :namespace_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_id = args['projectId'] @namespace_id = args['namespaceId'] end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfigDatastoreOptionsPartitionId" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field' module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfigTimespanConfig attr_reader :start_time attr_reader :end_time attr_reader :enable_auto_population_of_timespan_config attr_reader :timestamp_field def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @start_time = args['startTime'] @end_time = args['endTime'] @enable_auto_population_of_timespan_config = args['enableAutoPopulationOfTimespanConfig'] @timestamp_field = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigTimespanConfigTimestampField.new(args['timestampField'], to_s) end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfigTimespanConfig" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobTriggerInspectJobStorageConfigTimespanConfigTimestampField attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} JobTriggerInspectJobStorageConfigTimespanConfigTimestampField" end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_triggers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/jobtrigger_triggers_schedule' module GoogleInSpec module DLP module Property class JobTriggerTriggers attr_reader :schedule def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @schedule = GoogleInSpec::DLP::Property::JobTriggerTriggersSchedule.new(args['schedule'], to_s) end def to_s "#{@parent_identifier} JobTriggerTriggers" end end class JobTriggerTriggersArray def self.parse(value, parent_identifier) return if value.nil? return JobTriggerTriggers.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTriggerTriggers.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dlp/property/jobtrigger_triggers_schedule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class JobTriggerTriggersSchedule attr_reader :recurrence_period_duration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @recurrence_period_duration = args['recurrencePeriodDuration'] end def to_s "#{@parent_identifier} JobTriggerTriggersSchedule" end end end end end ================================================ FILE: libraries/google/dlp/property/storedinfotype_dictionary.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/storedinfotype_dictionary_cloud_storage_path' require 'google/dlp/property/storedinfotype_dictionary_word_list' module GoogleInSpec module DLP module Property class StoredInfoTypeDictionary attr_reader :word_list attr_reader :cloud_storage_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @word_list = GoogleInSpec::DLP::Property::StoredInfoTypeDictionaryWordList.new(args['wordList'], to_s) @cloud_storage_path = GoogleInSpec::DLP::Property::StoredInfoTypeDictionaryCloudStoragePath.new(args['cloudStoragePath'], to_s) end def to_s "#{@parent_identifier} StoredInfoTypeDictionary" end end end end end ================================================ FILE: libraries/google/dlp/property/storedinfotype_dictionary_cloud_storage_path.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class StoredInfoTypeDictionaryCloudStoragePath attr_reader :path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] end def to_s "#{@parent_identifier} StoredInfoTypeDictionaryCloudStoragePath" end end end end end ================================================ FILE: libraries/google/dlp/property/storedinfotype_dictionary_word_list.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class StoredInfoTypeDictionaryWordList attr_reader :words def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @words = args['words'] end def to_s "#{@parent_identifier} StoredInfoTypeDictionaryWordList" end end end end end ================================================ FILE: libraries/google/dlp/property/storedinfotype_large_custom_dictionary.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field' require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field' require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table' require 'google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set' require 'google/dlp/property/storedinfotype_large_custom_dictionary_output_path' module GoogleInSpec module DLP module Property class StoredInfoTypeLargeCustomDictionary attr_reader :output_path attr_reader :cloud_storage_file_set attr_reader :big_query_field def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_path = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryOutputPath.new(args['outputPath'], to_s) @cloud_storage_file_set = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryCloudStorageFileSet.new(args['cloudStorageFileSet'], to_s) @big_query_field = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryBigQueryField.new(args['bigQueryField'], to_s) end def to_s "#{@parent_identifier} StoredInfoTypeLargeCustomDictionary" end end end end end ================================================ FILE: libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field' require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table' module GoogleInSpec module DLP module Property class StoredInfoTypeLargeCustomDictionaryBigQueryField attr_reader :table attr_reader :field def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @table = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryBigQueryFieldTable.new(args['table'], to_s) @field = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryBigQueryFieldField.new(args['field'], to_s) end def to_s "#{@parent_identifier} StoredInfoTypeLargeCustomDictionaryBigQueryField" end end end end end ================================================ FILE: libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class StoredInfoTypeLargeCustomDictionaryBigQueryFieldField attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} StoredInfoTypeLargeCustomDictionaryBigQueryFieldField" end end end end end ================================================ FILE: libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class StoredInfoTypeLargeCustomDictionaryBigQueryFieldTable attr_reader :project_id attr_reader :dataset_id attr_reader :table_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_id = args['projectId'] @dataset_id = args['datasetId'] @table_id = args['tableId'] end def to_s "#{@parent_identifier} StoredInfoTypeLargeCustomDictionaryBigQueryFieldTable" end end end end end ================================================ FILE: libraries/google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class StoredInfoTypeLargeCustomDictionaryCloudStorageFileSet attr_reader :url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @url = args['url'] end def to_s "#{@parent_identifier} StoredInfoTypeLargeCustomDictionaryCloudStorageFileSet" end end end end end ================================================ FILE: libraries/google/dlp/property/storedinfotype_large_custom_dictionary_output_path.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class StoredInfoTypeLargeCustomDictionaryOutputPath attr_reader :path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] end def to_s "#{@parent_identifier} StoredInfoTypeLargeCustomDictionaryOutputPath" end end end end end ================================================ FILE: libraries/google/dlp/property/storedinfotype_regex.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DLP module Property class StoredInfoTypeRegex attr_reader :pattern attr_reader :group_indexes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pattern = args['pattern'] @group_indexes = args['groupIndexes'] end def to_s "#{@parent_identifier} StoredInfoTypeRegex" end end end end end ================================================ FILE: libraries/google/dns/property/managedzone_dnssec_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dns/property/managedzone_dnssec_config_default_key_specs' module GoogleInSpec module DNS module Property class ManagedZoneDnssecConfig attr_reader :kind attr_reader :non_existence attr_reader :state attr_reader :default_key_specs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @non_existence = args['nonExistence'] @state = args['state'] @default_key_specs = GoogleInSpec::DNS::Property::ManagedZoneDnssecConfigDefaultKeySpecsArray.parse(args['defaultKeySpecs'], to_s) end def to_s "#{@parent_identifier} ManagedZoneDnssecConfig" end end end end end ================================================ FILE: libraries/google/dns/property/managedzone_dnssec_config_default_key_specs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DNS module Property class ManagedZoneDnssecConfigDefaultKeySpecs attr_reader :algorithm attr_reader :key_length attr_reader :key_type attr_reader :kind def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @algorithm = args['algorithm'] @key_length = args['keyLength'] @key_type = args['keyType'] @kind = args['kind'] end def to_s "#{@parent_identifier} ManagedZoneDnssecConfigDefaultKeySpecs" end end class ManagedZoneDnssecConfigDefaultKeySpecsArray def self.parse(value, parent_identifier) return if value.nil? return ManagedZoneDnssecConfigDefaultKeySpecs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ManagedZoneDnssecConfigDefaultKeySpecs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dns/property/managedzone_forwarding_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dns/property/managedzone_forwarding_config_target_name_servers' module GoogleInSpec module DNS module Property class ManagedZoneForwardingConfig attr_reader :target_name_servers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @target_name_servers = GoogleInSpec::DNS::Property::ManagedZoneForwardingConfigTargetNameServersArray.parse(args['targetNameServers'], to_s) end def to_s "#{@parent_identifier} ManagedZoneForwardingConfig" end end end end end ================================================ FILE: libraries/google/dns/property/managedzone_forwarding_config_target_name_servers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DNS module Property class ManagedZoneForwardingConfigTargetNameServers attr_reader :ipv4_address attr_reader :forwarding_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ipv4_address = args['ipv4Address'] @forwarding_path = args['forwardingPath'] end def to_s "#{@parent_identifier} ManagedZoneForwardingConfigTargetNameServers" end end class ManagedZoneForwardingConfigTargetNameServersArray def self.parse(value, parent_identifier) return if value.nil? return ManagedZoneForwardingConfigTargetNameServers.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ManagedZoneForwardingConfigTargetNameServers.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dns/property/managedzone_peering_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dns/property/managedzone_peering_config_target_network' module GoogleInSpec module DNS module Property class ManagedZonePeeringConfig attr_reader :target_network def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @target_network = GoogleInSpec::DNS::Property::ManagedZonePeeringConfigTargetNetwork.new(args['targetNetwork'], to_s) end def to_s "#{@parent_identifier} ManagedZonePeeringConfig" end end end end end ================================================ FILE: libraries/google/dns/property/managedzone_peering_config_target_network.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DNS module Property class ManagedZonePeeringConfigTargetNetwork attr_reader :network_url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @network_url = args['networkUrl'] end def to_s "#{@parent_identifier} ManagedZonePeeringConfigTargetNetwork" end end end end end ================================================ FILE: libraries/google/dns/property/managedzone_private_visibility_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dns/property/managedzone_private_visibility_config_networks' module GoogleInSpec module DNS module Property class ManagedZonePrivateVisibilityConfig attr_reader :networks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @networks = GoogleInSpec::DNS::Property::ManagedZonePrivateVisibilityConfigNetworksArray.parse(args['networks'], to_s) end def to_s "#{@parent_identifier} ManagedZonePrivateVisibilityConfig" end end end end end ================================================ FILE: libraries/google/dns/property/managedzone_private_visibility_config_networks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DNS module Property class ManagedZonePrivateVisibilityConfigNetworks attr_reader :network_url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @network_url = args['networkUrl'] end def to_s "#{@parent_identifier} ManagedZonePrivateVisibilityConfigNetworks" end end class ManagedZonePrivateVisibilityConfigNetworksArray def self.parse(value, parent_identifier) return if value.nil? return ManagedZonePrivateVisibilityConfigNetworks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ManagedZonePrivateVisibilityConfigNetworks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/dns/property/managedzone_service_directory_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/dns/property/managedzone_service_directory_config_namespace' module GoogleInSpec module DNS module Property class ManagedZoneServiceDirectoryConfig attr_reader :namespace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @namespace = GoogleInSpec::DNS::Property::ManagedZoneServiceDirectoryConfigNamespace.new(args['namespace'], to_s) end def to_s "#{@parent_identifier} ManagedZoneServiceDirectoryConfig" end end end end end ================================================ FILE: libraries/google/dns/property/managedzone_service_directory_config_namespace.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module DNS module Property class ManagedZoneServiceDirectoryConfigNamespace attr_reader :namespace_url def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @namespace_url = args['namespaceUrl'] end def to_s "#{@parent_identifier} ManagedZoneServiceDirectoryConfigNamespace" end end end end end ================================================ FILE: libraries/google/filestore/property/instance_file_shares.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/filestore/property/instance_file_shares_nfs_export_options' module GoogleInSpec module Filestore module Property class InstanceFileShares attr_reader :name attr_reader :capacity_gb attr_reader :nfs_export_options def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @capacity_gb = args['capacityGb'] @nfs_export_options = GoogleInSpec::Filestore::Property::InstanceFileSharesNfsExportOptionsArray.parse(args['nfsExportOptions'], to_s) end def to_s "#{@parent_identifier} InstanceFileShares" end end class InstanceFileSharesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceFileShares.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceFileShares.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/filestore/property/instance_file_shares_nfs_export_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Filestore module Property class InstanceFileSharesNfsExportOptions attr_reader :ip_ranges attr_reader :access_mode attr_reader :squash_mode attr_reader :anon_uid attr_reader :anon_gid def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_ranges = args['ipRanges'] @access_mode = args['accessMode'] @squash_mode = args['squashMode'] @anon_uid = args['anonUid'] @anon_gid = args['anonGid'] end def to_s "#{@parent_identifier} InstanceFileSharesNfsExportOptions" end end class InstanceFileSharesNfsExportOptionsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceFileSharesNfsExportOptions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceFileSharesNfsExportOptions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/filestore/property/instance_networks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Filestore module Property class InstanceNetworks attr_reader :network attr_reader :modes attr_reader :reserved_ip_range attr_reader :ip_addresses def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @network = args['network'] @modes = args['modes'] @reserved_ip_range = args['reservedIpRange'] @ip_addresses = args['ipAddresses'] end def to_s "#{@parent_identifier} InstanceNetworks" end end class InstanceNetworksArray def self.parse(value, parent_identifier) return if value.nil? return InstanceNetworks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceNetworks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/iam/property/iam_binding_condition.rb ================================================ # frozen_string_literal: false # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module GoogleInSpec module Iam module Property class IamBindingCondition attr_reader :title attr_reader :description attr_reader :expression def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @title = args['title'] @description = args['description'] @expression = args['expression'] end def to_s "#{@parent_identifier} IamBindingCondition" end end end end end ================================================ FILE: libraries/google/iam/property/iam_policy_audit_configs.rb ================================================ # frozen_string_literal: false # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'google/iam/property/iam_policy_audit_configs_audit_log_configs' module GoogleInSpec module Iam module Property class IamPolicyAuditConfigs attr_reader :service attr_reader :audit_log_configs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service = args['service'] @audit_log_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsAuditLogConfigsArray.parse(args['auditLogConfigs'], to_s) end def to_s "#{@parent_identifier} IamPolicyAuditConfigs" end end class IamPolicyAuditConfigsArray def self.parse(value, parent_identifier) return if value.nil? return IamPolicyAuditConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| IamPolicyAuditConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb ================================================ # frozen_string_literal: false # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module GoogleInSpec module Iam module Property class IamPolicyAuditConfigsAuditLogConfigs attr_reader :log_type attr_reader :exempted_members def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @log_type = args['logType'] @exempted_members = args['exemptedMembers'] end def to_s "#{@parent_identifier} IamPolicyAuditConfigsAuditLogConfigs" end end class IamPolicyAuditConfigsAuditLogConfigsArray def self.parse(value, parent_identifier) return if value.nil? return IamPolicyAuditConfigsAuditLogConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| IamPolicyAuditConfigsAuditLogConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/iam/property/iam_policy_bindings.rb ================================================ # frozen_string_literal: false # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'google/iam/property/iam_binding_condition' module GoogleInSpec module Iam module Property class IamPolicyBindings attr_reader :role attr_reader :members attr_reader :condition def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @role = args['role'] @members = args['members'] @condition = GoogleInSpec::Iam::Property::IamBindingCondition.new(args['condition'], to_s) end def to_s "#{@parent_identifier} IamPolicyBindings" end end class IamPolicyBindingsArray def self.parse(value, parent_identifier) return if value.nil? return IamPolicyBindings.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| IamPolicyBindings.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/kms/property/cryptokey_version_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module KMS module Property class CryptoKeyVersionTemplate attr_reader :algorithm attr_reader :protection_level def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @algorithm = args['algorithm'] @protection_level = args['protectionLevel'] end def to_s "#{@parent_identifier} CryptoKeyVersionTemplate" end end end end end ================================================ FILE: libraries/google/kms/property/cryptokeyversion_attestation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module KMS module Property class CryptoKeyVersionAttestation attr_reader :format attr_reader :content def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @format = args['format'] @content = args['content'] end def to_s "#{@parent_identifier} CryptoKeyVersionAttestation" end end end end end ================================================ FILE: libraries/google/kms/property/cryptokeyversion_external_protection_level_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module KMS module Property class CryptoKeyVersionExternalProtectionLevelOptions attr_reader :external_key_uri attr_reader :ekm_connection_key_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @external_key_uri = args['externalKeyUri'] @ekm_connection_key_path = args['ekmConnectionKeyPath'] end def to_s "#{@parent_identifier} CryptoKeyVersionExternalProtectionLevelOptions" end end end end end ================================================ FILE: libraries/google/kms/property/ekmconnection_service_resolvers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/kms/property/ekmconnection_service_resolvers_server_certificates' module GoogleInSpec module KMS module Property class EkmConnectionServiceResolvers attr_reader :service_directory_service attr_reader :endpoint_filter attr_reader :hostname attr_reader :server_certificates def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service_directory_service = args['serviceDirectoryService'] @endpoint_filter = args['endpointFilter'] @hostname = args['hostname'] @server_certificates = GoogleInSpec::KMS::Property::EkmConnectionServiceResolversServerCertificates.new(args['serverCertificates'], to_s) end def to_s "#{@parent_identifier} EkmConnectionServiceResolvers" end end end end end ================================================ FILE: libraries/google/kms/property/ekmconnection_service_resolvers_server_certificates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module KMS module Property class EkmConnectionServiceResolversServerCertificates attr_reader :raw_der attr_reader :parsed attr_reader :issuer attr_reader :subject attr_reader :subject_alternative_dns_names attr_reader :not_before_time attr_reader :not_after_time attr_reader :serial_number attr_reader :sha256_fingerprint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @raw_der = args['rawDer'] @parsed = args['parsed'] @issuer = args['issuer'] @subject = args['subject'] @subject_alternative_dns_names = args['subjectAlternativeDnsNames'] @not_before_time = parse_time_string(args['notBeforeTime']) @not_after_time = parse_time_string(args['notAfterTime']) @serial_number = args['serialNumber'] @sha256_fingerprint = args['sha256Fingerprint'] end def to_s "#{@parent_identifier} EkmConnectionServiceResolversServerCertificates" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/kms/property/keyringimportjob_attestation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module KMS module Property class KeyRingImportJobAttestation attr_reader :format attr_reader :content def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @format = args['format'] @content = args['content'] end def to_s "#{@parent_identifier} KeyRingImportJobAttestation" end end end end end ================================================ FILE: libraries/google/kms/property/keyringimportjob_public_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module KMS module Property class KeyRingImportJobPublicKey attr_reader :pem def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pem = args['pem'] end def to_s "#{@parent_identifier} KeyRingImportJobPublicKey" end end end end end ================================================ FILE: libraries/google/logging/property/metric_bucket_options.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/logging/property/metric_bucket_options_explicit_buckets' require 'google/logging/property/metric_bucket_options_exponential_buckets' require 'google/logging/property/metric_bucket_options_linear_buckets' module GoogleInSpec module Logging module Property class MetricBucketOptions attr_reader :linear_buckets attr_reader :exponential_buckets attr_reader :explicit_buckets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @linear_buckets = GoogleInSpec::Logging::Property::MetricBucketOptionsLinearBuckets.new(args['linearBuckets'], to_s) @exponential_buckets = GoogleInSpec::Logging::Property::MetricBucketOptionsExponentialBuckets.new(args['exponentialBuckets'], to_s) @explicit_buckets = GoogleInSpec::Logging::Property::MetricBucketOptionsExplicitBuckets.new(args['explicitBuckets'], to_s) end def to_s "#{@parent_identifier} MetricBucketOptions" end end end end end ================================================ FILE: libraries/google/logging/property/metric_bucket_options_explicit_buckets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Logging module Property class MetricBucketOptionsExplicitBuckets attr_reader :bounds def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @bounds = args['bounds'] end def to_s "#{@parent_identifier} MetricBucketOptionsExplicitBuckets" end end end end end ================================================ FILE: libraries/google/logging/property/metric_bucket_options_exponential_buckets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Logging module Property class MetricBucketOptionsExponentialBuckets attr_reader :num_finite_buckets attr_reader :growth_factor attr_reader :scale def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @num_finite_buckets = args['numFiniteBuckets'] @growth_factor = args['growthFactor'] @scale = args['scale'] end def to_s "#{@parent_identifier} MetricBucketOptionsExponentialBuckets" end end end end end ================================================ FILE: libraries/google/logging/property/metric_bucket_options_linear_buckets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Logging module Property class MetricBucketOptionsLinearBuckets attr_reader :num_finite_buckets attr_reader :width attr_reader :offset def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @num_finite_buckets = args['numFiniteBuckets'] @width = args['width'] @offset = args['offset'] end def to_s "#{@parent_identifier} MetricBucketOptionsLinearBuckets" end end end end end ================================================ FILE: libraries/google/logging/property/metric_metric_descriptor.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/logging/property/metric_metric_descriptor_labels' module GoogleInSpec module Logging module Property class MetricMetricDescriptor attr_reader :unit attr_reader :value_type attr_reader :metric_kind attr_reader :labels attr_reader :display_name attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @unit = args['unit'] @value_type = args['valueType'] @metric_kind = args['metricKind'] @labels = GoogleInSpec::Logging::Property::MetricMetricDescriptorLabelsArray.parse(args['labels'], to_s) @display_name = args['displayName'] @type = args['type'] end def to_s "#{@parent_identifier} MetricMetricDescriptor" end end end end end ================================================ FILE: libraries/google/logging/property/metric_metric_descriptor_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Logging module Property class MetricMetricDescriptorLabels attr_reader :key attr_reader :description attr_reader :value_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] @description = args['description'] @value_type = args['valueType'] end def to_s "#{@parent_identifier} MetricMetricDescriptorLabels" end end class MetricMetricDescriptorLabelsArray def self.parse(value, parent_identifier) return if value.nil? return MetricMetricDescriptorLabels.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| MetricMetricDescriptorLabels.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/memcache/property/instance_memcache_nodes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Memcache module Property class InstanceMemcacheNodes attr_reader :node_id attr_reader :zone attr_reader :port attr_reader :host attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @node_id = args['nodeId'] @zone = args['zone'] @port = args['port'] @host = args['host'] @state = args['state'] end def to_s "#{@parent_identifier} InstanceMemcacheNodes" end end class InstanceMemcacheNodesArray def self.parse(value, parent_identifier) return if value.nil? return InstanceMemcacheNodes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceMemcacheNodes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/memcache/property/instance_memcache_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Memcache module Property class InstanceMemcacheParameters attr_reader :id attr_reader :params def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @id = args['id'] @params = args['params'] end def to_s "#{@parent_identifier} InstanceMemcacheParameters" end end end end end ================================================ FILE: libraries/google/memcache/property/instance_node_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Memcache module Property class InstanceNodeConfig attr_reader :cpu_count attr_reader :memory_size_mb def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cpu_count = args['cpuCount'] @memory_size_mb = args['memorySizeMb'] end def to_s "#{@parent_identifier} InstanceNodeConfig" end end end end end ================================================ FILE: libraries/google/memcache/property/instance_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Memcache module Property class InstanceParameters attr_reader :id attr_reader :params def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @id = args['id'] @params = args['params'] end def to_s "#{@parent_identifier} InstanceParameters" end end end end end ================================================ FILE: libraries/google/mlengine/property/model_default_version.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module MLEngine module Property class ModelDefaultVersion attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} ModelDefaultVersion" end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_conditions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/monitoring/property/alertpolicy_conditions_condition_absent' require 'google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations' require 'google/monitoring/property/alertpolicy_conditions_condition_absent_trigger' require 'google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language' require 'google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger' require 'google/monitoring/property/alertpolicy_conditions_condition_threshold' require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations' require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations' require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger' module GoogleInSpec module Monitoring module Property class AlertPolicyConditions attr_reader :condition_absent attr_reader :name attr_reader :condition_monitoring_query_language attr_reader :condition_threshold attr_reader :display_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @condition_absent = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionAbsent.new(args['conditionAbsent'], to_s) @name = args['name'] @condition_monitoring_query_language = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionMonitoringQueryLanguage.new(args['conditionMonitoringQueryLanguage'], to_s) @condition_threshold = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThreshold.new(args['conditionThreshold'], to_s) @display_name = args['displayName'] end def to_s "#{@parent_identifier} AlertPolicyConditions" end end class AlertPolicyConditionsArray def self.parse(value, parent_identifier) return if value.nil? return AlertPolicyConditions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| AlertPolicyConditions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_conditions_condition_absent.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations' require 'google/monitoring/property/alertpolicy_conditions_condition_absent_trigger' module GoogleInSpec module Monitoring module Property class AlertPolicyConditionsConditionAbsent attr_reader :aggregations attr_reader :trigger attr_reader :duration attr_reader :filter def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @aggregations = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionAbsentAggregationsArray.parse(args['aggregations'], to_s) @trigger = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionAbsentTrigger.new(args['trigger'], to_s) @duration = args['duration'] @filter = args['filter'] end def to_s "#{@parent_identifier} AlertPolicyConditionsConditionAbsent" end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Monitoring module Property class AlertPolicyConditionsConditionAbsentAggregations attr_reader :per_series_aligner attr_reader :group_by_fields attr_reader :alignment_period attr_reader :cross_series_reducer def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @per_series_aligner = args['perSeriesAligner'] @group_by_fields = args['groupByFields'] @alignment_period = args['alignmentPeriod'] @cross_series_reducer = args['crossSeriesReducer'] end def to_s "#{@parent_identifier} AlertPolicyConditionsConditionAbsentAggregations" end end class AlertPolicyConditionsConditionAbsentAggregationsArray def self.parse(value, parent_identifier) return if value.nil? return AlertPolicyConditionsConditionAbsentAggregations.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| AlertPolicyConditionsConditionAbsentAggregations.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_conditions_condition_absent_trigger.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Monitoring module Property class AlertPolicyConditionsConditionAbsentTrigger attr_reader :percent attr_reader :count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @percent = args['percent'] @count = args['count'] end def to_s "#{@parent_identifier} AlertPolicyConditionsConditionAbsentTrigger" end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger' module GoogleInSpec module Monitoring module Property class AlertPolicyConditionsConditionMonitoringQueryLanguage attr_reader :query attr_reader :duration attr_reader :trigger def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @query = args['query'] @duration = args['duration'] @trigger = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionMonitoringQueryLanguageTrigger.new(args['trigger'], to_s) end def to_s "#{@parent_identifier} AlertPolicyConditionsConditionMonitoringQueryLanguage" end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Monitoring module Property class AlertPolicyConditionsConditionMonitoringQueryLanguageTrigger attr_reader :percent attr_reader :count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @percent = args['percent'] @count = args['count'] end def to_s "#{@parent_identifier} AlertPolicyConditionsConditionMonitoringQueryLanguageTrigger" end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations' require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations' require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger' module GoogleInSpec module Monitoring module Property class AlertPolicyConditionsConditionThreshold attr_reader :threshold_value attr_reader :denominator_filter attr_reader :denominator_aggregations attr_reader :duration attr_reader :comparison attr_reader :trigger attr_reader :aggregations attr_reader :filter def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @threshold_value = args['thresholdValue'] @denominator_filter = args['denominatorFilter'] @denominator_aggregations = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThresholdDenominatorAggregationsArray.parse(args['denominatorAggregations'], to_s) @duration = args['duration'] @comparison = args['comparison'] @trigger = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThresholdTrigger.new(args['trigger'], to_s) @aggregations = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThresholdAggregationsArray.parse(args['aggregations'], to_s) @filter = args['filter'] end def to_s "#{@parent_identifier} AlertPolicyConditionsConditionThreshold" end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Monitoring module Property class AlertPolicyConditionsConditionThresholdAggregations attr_reader :per_series_aligner attr_reader :group_by_fields attr_reader :alignment_period attr_reader :cross_series_reducer def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @per_series_aligner = args['perSeriesAligner'] @group_by_fields = args['groupByFields'] @alignment_period = args['alignmentPeriod'] @cross_series_reducer = args['crossSeriesReducer'] end def to_s "#{@parent_identifier} AlertPolicyConditionsConditionThresholdAggregations" end end class AlertPolicyConditionsConditionThresholdAggregationsArray def self.parse(value, parent_identifier) return if value.nil? return AlertPolicyConditionsConditionThresholdAggregations.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| AlertPolicyConditionsConditionThresholdAggregations.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Monitoring module Property class AlertPolicyConditionsConditionThresholdDenominatorAggregations attr_reader :per_series_aligner attr_reader :group_by_fields attr_reader :alignment_period attr_reader :cross_series_reducer def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @per_series_aligner = args['perSeriesAligner'] @group_by_fields = args['groupByFields'] @alignment_period = args['alignmentPeriod'] @cross_series_reducer = args['crossSeriesReducer'] end def to_s "#{@parent_identifier} AlertPolicyConditionsConditionThresholdDenominatorAggregations" end end class AlertPolicyConditionsConditionThresholdDenominatorAggregationsArray def self.parse(value, parent_identifier) return if value.nil? return AlertPolicyConditionsConditionThresholdDenominatorAggregations.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| AlertPolicyConditionsConditionThresholdDenominatorAggregations.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Monitoring module Property class AlertPolicyConditionsConditionThresholdTrigger attr_reader :percent attr_reader :count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @percent = args['percent'] @count = args['count'] end def to_s "#{@parent_identifier} AlertPolicyConditionsConditionThresholdTrigger" end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_creation_record.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Monitoring module Property class AlertPolicyCreationRecord attr_reader :mutate_time attr_reader :mutated_by def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @mutate_time = args['mutateTime'] @mutated_by = args['mutatedBy'] end def to_s "#{@parent_identifier} AlertPolicyCreationRecord" end end end end end ================================================ FILE: libraries/google/monitoring/property/alertpolicy_documentation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Monitoring module Property class AlertPolicyDocumentation attr_reader :content attr_reader :mime_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @content = args['content'] @mime_type = args['mimeType'] end def to_s "#{@parent_identifier} AlertPolicyDocumentation" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/constraints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/orgpolicy/property/google_managed_constraint' require 'google/orgpolicy/property/list_constraint' module GoogleInSpec module Orgpolicy module Property class Constraints attr_reader :display_name attr_reader :google_managed_constraint attr_reader :description attr_reader :constraint_default attr_reader :supports_dry_run attr_reader :name attr_reader :list_constraint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @display_name = args['displayName'] @google_managed_constraint = GoogleInSpec::Orgpolicy::Property::GoogleManagedConstraint.new(args['googleManagedConstraint'], to_s) @description = args['description'] @constraint_default = args['constraintDefault'] @supports_dry_run = args['supportsDryRun'] @name = args['name'] @list_constraint = GoogleInSpec::Orgpolicy::Property::ListConstraint.new(args['listConstraint'], to_s) end def to_s "#{@parent_identifier} Constraints" end end class ConstraintsArray def self.parse(value, parent_identifier) return if value.nil? return Constraints.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| Constraints.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/orgpolicy/property/google_managed_constraint.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Orgpolicy module Property class GoogleManagedConstraint attr_reader :action_type attr_reader :resource_types attr_reader :condition attr_reader :method_types def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @action_type = args['actionType'] @resource_types = args['resourceTypes'] @condition = args['condition'] @method_types = args['methodTypes'] end def to_s "#{@parent_identifier} GoogleManagedConstraint" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/list_constraint.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Orgpolicy module Property class ListConstraint attr_reader :supports_under attr_reader :supports_in def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @supports_under = args['supportsUnder'] @supports_in = args['supportsIn'] end def to_s "#{@parent_identifier} ListConstraint" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_alternate.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/orgpolicy/property/policy_alternate_spec' require 'google/orgpolicy/property/policy_alternate_spec_rules' module GoogleInSpec module Orgpolicy module Property class PolicyAlternate attr_reader :launch attr_reader :spec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @launch = args['launch'] @spec = GoogleInSpec::Orgpolicy::Property::PolicyAlternateSpec.new(args['spec'], to_s) end def to_s "#{@parent_identifier} PolicyAlternate" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_alternate_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/orgpolicy/property/policy_alternate_spec_rules' module GoogleInSpec module Orgpolicy module Property class PolicyAlternateSpec attr_reader :update_time attr_reader :rules attr_reader :etag attr_reader :reset attr_reader :inherit_from_parent def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @update_time = args['updateTime'] @rules = GoogleInSpec::Orgpolicy::Property::PolicyAlternateSpecRulesArray.parse(args['rules'], to_s) @etag = args['etag'] @reset = args['reset'] @inherit_from_parent = args['inheritFromParent'] end def to_s "#{@parent_identifier} PolicyAlternateSpec" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_alternate_spec_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/orgpolicy/property/policy_alternate_spec_rules_condition' require 'google/orgpolicy/property/policy_alternate_spec_rules_values' module GoogleInSpec module Orgpolicy module Property class PolicyAlternateSpecRules attr_reader :condition attr_reader :deny_all attr_reader :allow_all attr_reader :enforce attr_reader :values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @condition = GoogleInSpec::Orgpolicy::Property::PolicyAlternateSpecRulesCondition.new(args['condition'], to_s) @deny_all = args['denyAll'] @allow_all = args['allowAll'] @enforce = args['enforce'] @values = GoogleInSpec::Orgpolicy::Property::PolicyAlternateSpecRulesValues.new(args['values'], to_s) end def to_s "#{@parent_identifier} PolicyAlternateSpecRules" end end class PolicyAlternateSpecRulesArray def self.parse(value, parent_identifier) return if value.nil? return PolicyAlternateSpecRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| PolicyAlternateSpecRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_alternate_spec_rules_condition.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Orgpolicy module Property class PolicyAlternateSpecRulesCondition attr_reader :title attr_reader :location attr_reader :expression attr_reader :description def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @title = args['title'] @location = args['location'] @expression = args['expression'] @description = args['description'] end def to_s "#{@parent_identifier} PolicyAlternateSpecRulesCondition" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_alternate_spec_rules_values.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Orgpolicy module Property class PolicyAlternateSpecRulesValues attr_reader :denied_values attr_reader :allowed_values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @denied_values = args['deniedValues'] @allowed_values = args['allowedValues'] end def to_s "#{@parent_identifier} PolicyAlternateSpecRulesValues" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_dry_run_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/orgpolicy/property/policy_dry_run_spec_rules' module GoogleInSpec module Orgpolicy module Property class PolicyDryRunSpec attr_reader :update_time attr_reader :rules attr_reader :etag attr_reader :reset attr_reader :inherit_from_parent def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @update_time = args['updateTime'] @rules = GoogleInSpec::Orgpolicy::Property::PolicyDryRunSpecRulesArray.parse(args['rules'], to_s) @etag = args['etag'] @reset = args['reset'] @inherit_from_parent = args['inheritFromParent'] end def to_s "#{@parent_identifier} PolicyDryRunSpec" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_dry_run_spec_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/orgpolicy/property/policy_dry_run_spec_rules_condition' require 'google/orgpolicy/property/policy_dry_run_spec_rules_values' module GoogleInSpec module Orgpolicy module Property class PolicyDryRunSpecRules attr_reader :condition attr_reader :deny_all attr_reader :allow_all attr_reader :enforce attr_reader :values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @condition = GoogleInSpec::Orgpolicy::Property::PolicyDryRunSpecRulesCondition.new(args['condition'], to_s) @deny_all = args['denyAll'] @allow_all = args['allowAll'] @enforce = args['enforce'] @values = GoogleInSpec::Orgpolicy::Property::PolicyDryRunSpecRulesValues.new(args['values'], to_s) end def to_s "#{@parent_identifier} PolicyDryRunSpecRules" end end class PolicyDryRunSpecRulesArray def self.parse(value, parent_identifier) return if value.nil? return PolicyDryRunSpecRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| PolicyDryRunSpecRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_dry_run_spec_rules_condition.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Orgpolicy module Property class PolicyDryRunSpecRulesCondition attr_reader :title attr_reader :location attr_reader :expression attr_reader :description def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @title = args['title'] @location = args['location'] @expression = args['expression'] @description = args['description'] end def to_s "#{@parent_identifier} PolicyDryRunSpecRulesCondition" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_dry_run_spec_rules_values.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Orgpolicy module Property class PolicyDryRunSpecRulesValues attr_reader :denied_values attr_reader :allowed_values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @denied_values = args['deniedValues'] @allowed_values = args['allowedValues'] end def to_s "#{@parent_identifier} PolicyDryRunSpecRulesValues" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/orgpolicy/property/policy_spec_rules' module GoogleInSpec module Orgpolicy module Property class PolicySpec attr_reader :update_time attr_reader :rules attr_reader :etag attr_reader :reset attr_reader :inherit_from_parent def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @update_time = args['updateTime'] @rules = GoogleInSpec::Orgpolicy::Property::PolicySpecRulesArray.parse(args['rules'], to_s) @etag = args['etag'] @reset = args['reset'] @inherit_from_parent = args['inheritFromParent'] end def to_s "#{@parent_identifier} PolicySpec" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_spec_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/orgpolicy/property/policy_spec_rules_condition' require 'google/orgpolicy/property/policy_spec_rules_values' module GoogleInSpec module Orgpolicy module Property class PolicySpecRules attr_reader :condition attr_reader :deny_all attr_reader :allow_all attr_reader :enforce attr_reader :values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @condition = GoogleInSpec::Orgpolicy::Property::PolicySpecRulesCondition.new(args['condition'], to_s) @deny_all = args['denyAll'] @allow_all = args['allowAll'] @enforce = args['enforce'] @values = GoogleInSpec::Orgpolicy::Property::PolicySpecRulesValues.new(args['values'], to_s) end def to_s "#{@parent_identifier} PolicySpecRules" end end class PolicySpecRulesArray def self.parse(value, parent_identifier) return if value.nil? return PolicySpecRules.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| PolicySpecRules.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_spec_rules_condition.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Orgpolicy module Property class PolicySpecRulesCondition attr_reader :title attr_reader :location attr_reader :expression attr_reader :description def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @title = args['title'] @location = args['location'] @expression = args['expression'] @description = args['description'] end def to_s "#{@parent_identifier} PolicySpecRulesCondition" end end end end end ================================================ FILE: libraries/google/orgpolicy/property/policy_spec_rules_values.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Orgpolicy module Property class PolicySpecRulesValues attr_reader :denied_values attr_reader :allowed_values def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @denied_values = args['deniedValues'] @allowed_values = args['allowedValues'] end def to_s "#{@parent_identifier} PolicySpecRulesValues" end end end end end ================================================ FILE: libraries/google/pubsub/property/subscription_dead_letter_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Pubsub module Property class SubscriptionDeadLetterPolicy attr_reader :dead_letter_topic attr_reader :max_delivery_attempts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @dead_letter_topic = args['deadLetterTopic'] @max_delivery_attempts = args['maxDeliveryAttempts'] end def to_s "#{@parent_identifier} SubscriptionDeadLetterPolicy" end end end end end ================================================ FILE: libraries/google/pubsub/property/subscription_expiration_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Pubsub module Property class SubscriptionExpirationPolicy attr_reader :ttl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ttl = args['ttl'] end def to_s "#{@parent_identifier} SubscriptionExpirationPolicy" end end end end end ================================================ FILE: libraries/google/pubsub/property/subscription_push_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/pubsub/property/subscription_push_config_oidc_token' module GoogleInSpec module Pubsub module Property class SubscriptionPushConfig attr_reader :oidc_token attr_reader :push_endpoint attr_reader :attributes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @oidc_token = GoogleInSpec::Pubsub::Property::SubscriptionPushConfigOidcToken.new(args['oidcToken'], to_s) @push_endpoint = args['pushEndpoint'] @attributes = args['attributes'] end def to_s "#{@parent_identifier} SubscriptionPushConfig" end end end end end ================================================ FILE: libraries/google/pubsub/property/subscription_push_config_oidc_token.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Pubsub module Property class SubscriptionPushConfigOidcToken attr_reader :service_account_email attr_reader :audience def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service_account_email = args['serviceAccountEmail'] @audience = args['audience'] end def to_s "#{@parent_identifier} SubscriptionPushConfigOidcToken" end end end end end ================================================ FILE: libraries/google/pubsub/property/subscription_retry_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Pubsub module Property class SubscriptionRetryPolicy attr_reader :minimum_backoff attr_reader :maximum_backoff def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @minimum_backoff = args['minimumBackoff'] @maximum_backoff = args['maximumBackoff'] end def to_s "#{@parent_identifier} SubscriptionRetryPolicy" end end end end end ================================================ FILE: libraries/google/pubsub/property/topic_message_storage_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Pubsub module Property class TopicMessageStoragePolicy attr_reader :allowed_persistence_regions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @allowed_persistence_regions = args['allowedPersistenceRegions'] end def to_s "#{@parent_identifier} TopicMessageStoragePolicy" end end end end end ================================================ FILE: libraries/google/redis/property/instance_server_ca_certs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Redis module Property class InstanceServerCaCerts attr_reader :serial_number attr_reader :cert attr_reader :create_time attr_reader :expire_time attr_reader :sha1_fingerprint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @serial_number = args['serialNumber'] @cert = args['cert'] @create_time = args['createTime'] @expire_time = args['expireTime'] @sha1_fingerprint = args['sha1Fingerprint'] end def to_s "#{@parent_identifier} InstanceServerCaCerts" end end class InstanceServerCaCertsArray def self.parse(value, parent_identifier) return if value.nil? return InstanceServerCaCerts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| InstanceServerCaCerts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/resourcemanager/property/organization_owner.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module ResourceManager module Property class OrganizationOwner attr_reader :directory_customer_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @directory_customer_id = args['directoryCustomerId'] end def to_s "#{@parent_identifier} OrganizationOwner" end end end end end ================================================ FILE: libraries/google/resourcemanager/property/project_parent.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module ResourceManager module Property class ProjectParent attr_reader :type attr_reader :id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @id = args['id'] end def to_s "#{@parent_identifier} ProjectParent" end end end end end ================================================ FILE: libraries/google/run/property/job_annotations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobAnnotations attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobAnnotations" end end end end end ================================================ FILE: libraries/google/run/property/job_binary_authorization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobBinaryAuthorization attr_reader :use_default attr_reader :policy attr_reader :breakglass_justification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @use_default = args['useDefault'] @policy = args['policy'] @breakglass_justification = args['breakglassJustification'] end def to_s "#{@parent_identifier} JobBinaryAuthorization" end end end end end ================================================ FILE: libraries/google/run/property/job_conditions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobConditions attr_reader :type attr_reader :state attr_reader :message attr_reader :last_transition_time attr_reader :severity attr_reader :reason attr_reader :revision_reason attr_reader :execution_reason def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @state = args['state'] @message = args['message'] @last_transition_time = args['lastTransitionTime'] @severity = args['severity'] @reason = args['reason'] @revision_reason = args['revisionReason'] @execution_reason = args['executionReason'] end def to_s "#{@parent_identifier} JobConditions" end end class JobConditionsArray def self.parse(value, parent_identifier) return if value.nil? return JobConditions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobConditions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/job_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobLabels" end end end end end ================================================ FILE: libraries/google/run/property/job_latest_created_execution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobLatestCreatedExecution attr_reader :name attr_reader :create_time attr_reader :completion_time attr_reader :delete_time attr_reader :completion_status def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @create_time = args['createTime'] @completion_time = args['completionTime'] @delete_time = args['deleteTime'] @completion_status = args['completionStatus'] end def to_s "#{@parent_identifier} JobLatestCreatedExecution" end end end end end ================================================ FILE: libraries/google/run/property/job_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_annotations' require 'google/run/property/job_template_labels' require 'google/run/property/job_template_template' require 'google/run/property/job_template_template_containers' require 'google/run/property/job_template_template_volumes' require 'google/run/property/job_template_template_vpc_access' require 'google/run/property/job_template_template_vpc_access_network_interfaces' module GoogleInSpec module Run module Property class JobTemplate attr_reader :labels attr_reader :annotations attr_reader :parallelism attr_reader :task_count attr_reader :template def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @labels = GoogleInSpec::Run::Property::JobTemplateLabels.new(args['labels'], to_s) @annotations = GoogleInSpec::Run::Property::JobTemplateAnnotations.new(args['annotations'], to_s) @parallelism = args['parallelism'] @task_count = args['taskCount'] @template = GoogleInSpec::Run::Property::JobTemplateTemplate.new(args['template'], to_s) end def to_s "#{@parent_identifier} JobTemplate" end end end end end ================================================ FILE: libraries/google/run/property/job_template_annotations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateAnnotations attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobTemplateAnnotations" end end end end end ================================================ FILE: libraries/google/run/property/job_template_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobTemplateLabels" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_containers' require 'google/run/property/job_template_template_volumes' require 'google/run/property/job_template_template_vpc_access' require 'google/run/property/job_template_template_vpc_access_network_interfaces' module GoogleInSpec module Run module Property class JobTemplateTemplate attr_reader :containers attr_reader :volumes attr_reader :max_retries attr_reader :timeout attr_reader :service_account attr_reader :execution_environment attr_reader :encryption_key attr_reader :vpc_access def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @containers = GoogleInSpec::Run::Property::JobTemplateTemplateContainersArray.parse(args['containers'], to_s) @volumes = GoogleInSpec::Run::Property::JobTemplateTemplateVolumesArray.parse(args['volumes'], to_s) @max_retries = args['maxRetries'] @timeout = args['timeout'] @service_account = args['serviceAccount'] @execution_environment = args['executionEnvironment'] @encryption_key = args['encryptionKey'] @vpc_access = GoogleInSpec::Run::Property::JobTemplateTemplateVPCAccess.new(args['vpcAccess'], to_s) end def to_s "#{@parent_identifier} JobTemplateTemplate" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_containers_env' require 'google/run/property/job_template_template_containers_liveness_probe' require 'google/run/property/job_template_template_containers_liveness_probe_grpc' require 'google/run/property/job_template_template_containers_liveness_probe_http_get' require 'google/run/property/job_template_template_containers_liveness_probe_http_get_http_headers' require 'google/run/property/job_template_template_containers_liveness_probe_tcp_socket' require 'google/run/property/job_template_template_containers_ports' require 'google/run/property/job_template_template_containers_resources' require 'google/run/property/job_template_template_containers_resources_limits' require 'google/run/property/job_template_template_containers_startup_probe' require 'google/run/property/job_template_template_containers_startup_probe_grpc' require 'google/run/property/job_template_template_containers_startup_probe_http_get' require 'google/run/property/job_template_template_containers_startup_probe_http_get_http_headers' require 'google/run/property/job_template_template_containers_startup_probe_tcp_socket' require 'google/run/property/job_template_template_containers_volume_mounts' module GoogleInSpec module Run module Property class JobTemplateTemplateContainers attr_reader :name attr_reader :image attr_reader :command attr_reader :args attr_reader :env attr_reader :resources attr_reader :ports attr_reader :volume_mounts attr_reader :working_dir attr_reader :liveness_probe attr_reader :startup_probe attr_reader :depends_on def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @image = args['image'] @command = args['command'] @args = args['args'] @env = GoogleInSpec::Run::Property::JobTemplateTemplateContainersEnvArray.parse(args['env'], to_s) @resources = GoogleInSpec::Run::Property::JobTemplateTemplateContainersResources.new(args['resources'], to_s) @ports = GoogleInSpec::Run::Property::JobTemplateTemplateContainersPortsArray.parse(args['ports'], to_s) @volume_mounts = GoogleInSpec::Run::Property::JobTemplateTemplateContainersVolumeMountsArray.parse(args['volumeMounts'], to_s) @working_dir = args['workingDir'] @liveness_probe = GoogleInSpec::Run::Property::JobTemplateTemplateContainersLivenessProbe.new(args['livenessProbe'], to_s) @startup_probe = GoogleInSpec::Run::Property::JobTemplateTemplateContainersStartupProbe.new(args['startupProbe'], to_s) @depends_on = args['dependsOn'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainers" end end class JobTemplateTemplateContainersArray def self.parse(value, parent_identifier) return if value.nil? return JobTemplateTemplateContainers.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTemplateTemplateContainers.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_containers_env_value_source' require 'google/run/property/job_template_template_containers_env_value_source_secret_key_ref' module GoogleInSpec module Run module Property class JobTemplateTemplateContainersEnv attr_reader :name attr_reader :value attr_reader :value_source def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] @value_source = GoogleInSpec::Run::Property::JobTemplateTemplateContainersEnvValueSource.new(args['valueSource'], to_s) end def to_s "#{@parent_identifier} JobTemplateTemplateContainersEnv" end end class JobTemplateTemplateContainersEnvArray def self.parse(value, parent_identifier) return if value.nil? return JobTemplateTemplateContainersEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTemplateTemplateContainersEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_env_value_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_containers_env_value_source_secret_key_ref' module GoogleInSpec module Run module Property class JobTemplateTemplateContainersEnvValueSource attr_reader :secret_key_ref def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @secret_key_ref = GoogleInSpec::Run::Property::JobTemplateTemplateContainersEnvValueSourceSecretKeyRef.new(args['secretKeyRef'], to_s) end def to_s "#{@parent_identifier} JobTemplateTemplateContainersEnvValueSource" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_env_value_source_secret_key_ref.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateContainersEnvValueSourceSecretKeyRef attr_reader :secret attr_reader :version def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @secret = args['secret'] @version = args['version'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersEnvValueSourceSecretKeyRef" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_liveness_probe.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_containers_liveness_probe_grpc' require 'google/run/property/job_template_template_containers_liveness_probe_http_get' require 'google/run/property/job_template_template_containers_liveness_probe_http_get_http_headers' require 'google/run/property/job_template_template_containers_liveness_probe_tcp_socket' module GoogleInSpec module Run module Property class JobTemplateTemplateContainersLivenessProbe attr_reader :initial_delay_seconds attr_reader :timeout_seconds attr_reader :period_seconds attr_reader :failure_threshold attr_reader :http_get attr_reader :tcp_socket attr_reader :grpc def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @initial_delay_seconds = args['initialDelaySeconds'] @timeout_seconds = args['timeoutSeconds'] @period_seconds = args['periodSeconds'] @failure_threshold = args['failureThreshold'] @http_get = GoogleInSpec::Run::Property::JobTemplateTemplateContainersLivenessProbeHttpGet.new(args['httpGet'], to_s) @tcp_socket = GoogleInSpec::Run::Property::JobTemplateTemplateContainersLivenessProbeTcpSocket.new(args['tcpSocket'], to_s) @grpc = GoogleInSpec::Run::Property::JobTemplateTemplateContainersLivenessProbeGrpc.new(args['grpc'], to_s) end def to_s "#{@parent_identifier} JobTemplateTemplateContainersLivenessProbe" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_liveness_probe_grpc.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateContainersLivenessProbeGrpc attr_reader :port attr_reader :service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @port = args['port'] @service = args['service'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersLivenessProbeGrpc" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_liveness_probe_http_get.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_containers_liveness_probe_http_get_http_headers' module GoogleInSpec module Run module Property class JobTemplateTemplateContainersLivenessProbeHttpGet attr_reader :path attr_reader :http_headers attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] @http_headers = GoogleInSpec::Run::Property::JobTemplateTemplateContainersLivenessProbeHttpGetHttpHeadersArray.parse(args['httpHeaders'], to_s) @port = args['port'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersLivenessProbeHttpGet" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_liveness_probe_http_get_http_headers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateContainersLivenessProbeHttpGetHttpHeaders attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersLivenessProbeHttpGetHttpHeaders" end end class JobTemplateTemplateContainersLivenessProbeHttpGetHttpHeadersArray def self.parse(value, parent_identifier) return if value.nil? return JobTemplateTemplateContainersLivenessProbeHttpGetHttpHeaders.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTemplateTemplateContainersLivenessProbeHttpGetHttpHeaders.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_liveness_probe_tcp_socket.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateContainersLivenessProbeTcpSocket attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @port = args['port'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersLivenessProbeTcpSocket" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateContainersPorts attr_reader :name attr_reader :container_port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @container_port = args['containerPort'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersPorts" end end class JobTemplateTemplateContainersPortsArray def self.parse(value, parent_identifier) return if value.nil? return JobTemplateTemplateContainersPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTemplateTemplateContainersPorts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_containers_resources_limits' module GoogleInSpec module Run module Property class JobTemplateTemplateContainersResources attr_reader :limits attr_reader :cpu_idle attr_reader :startup_cpu_boost def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @limits = GoogleInSpec::Run::Property::JobTemplateTemplateContainersResourcesLimits.new(args['limits'], to_s) @cpu_idle = args['cpuIdle'] @startup_cpu_boost = args['startupCpuBoost'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersResources" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_resources_limits.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateContainersResourcesLimits attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersResourcesLimits" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_startup_probe.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_containers_startup_probe_grpc' require 'google/run/property/job_template_template_containers_startup_probe_http_get' require 'google/run/property/job_template_template_containers_startup_probe_http_get_http_headers' require 'google/run/property/job_template_template_containers_startup_probe_tcp_socket' module GoogleInSpec module Run module Property class JobTemplateTemplateContainersStartupProbe attr_reader :initial_delay_seconds attr_reader :timeout_seconds attr_reader :period_seconds attr_reader :failure_threshold attr_reader :http_get attr_reader :tcp_socket attr_reader :grpc def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @initial_delay_seconds = args['initialDelaySeconds'] @timeout_seconds = args['timeoutSeconds'] @period_seconds = args['periodSeconds'] @failure_threshold = args['failureThreshold'] @http_get = GoogleInSpec::Run::Property::JobTemplateTemplateContainersStartupProbeHttpGet.new(args['httpGet'], to_s) @tcp_socket = GoogleInSpec::Run::Property::JobTemplateTemplateContainersStartupProbeTcpSocket.new(args['tcpSocket'], to_s) @grpc = GoogleInSpec::Run::Property::JobTemplateTemplateContainersStartupProbeGrpc.new(args['grpc'], to_s) end def to_s "#{@parent_identifier} JobTemplateTemplateContainersStartupProbe" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_startup_probe_grpc.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateContainersStartupProbeGrpc attr_reader :port attr_reader :service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @port = args['port'] @service = args['service'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersStartupProbeGrpc" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_startup_probe_http_get.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_containers_startup_probe_http_get_http_headers' module GoogleInSpec module Run module Property class JobTemplateTemplateContainersStartupProbeHttpGet attr_reader :path attr_reader :http_headers attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] @http_headers = GoogleInSpec::Run::Property::JobTemplateTemplateContainersStartupProbeHttpGetHttpHeadersArray.parse(args['httpHeaders'], to_s) @port = args['port'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersStartupProbeHttpGet" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_startup_probe_http_get_http_headers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateContainersStartupProbeHttpGetHttpHeaders attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersStartupProbeHttpGetHttpHeaders" end end class JobTemplateTemplateContainersStartupProbeHttpGetHttpHeadersArray def self.parse(value, parent_identifier) return if value.nil? return JobTemplateTemplateContainersStartupProbeHttpGetHttpHeaders.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTemplateTemplateContainersStartupProbeHttpGetHttpHeaders.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_startup_probe_tcp_socket.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateContainersStartupProbeTcpSocket attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @port = args['port'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersStartupProbeTcpSocket" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_containers_volume_mounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateContainersVolumeMounts attr_reader :name attr_reader :mount_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @mount_path = args['mountPath'] end def to_s "#{@parent_identifier} JobTemplateTemplateContainersVolumeMounts" end end class JobTemplateTemplateContainersVolumeMountsArray def self.parse(value, parent_identifier) return if value.nil? return JobTemplateTemplateContainersVolumeMounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTemplateTemplateContainersVolumeMounts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_volumes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_volumes_cloud_sql_instance' require 'google/run/property/job_template_template_volumes_empty_dir' require 'google/run/property/job_template_template_volumes_gcs' require 'google/run/property/job_template_template_volumes_nfs' require 'google/run/property/job_template_template_volumes_secret' require 'google/run/property/job_template_template_volumes_secret_items' module GoogleInSpec module Run module Property class JobTemplateTemplateVolumes attr_reader :name attr_reader :secret attr_reader :cloud_sql_instance attr_reader :empty_dir attr_reader :nfs attr_reader :gcs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @secret = GoogleInSpec::Run::Property::JobTemplateTemplateVolumesSecret.new(args['secret'], to_s) @cloud_sql_instance = GoogleInSpec::Run::Property::JobTemplateTemplateVolumesCloudSqlInstance.new(args['cloudSqlInstance'], to_s) @empty_dir = GoogleInSpec::Run::Property::JobTemplateTemplateVolumesEmptyDir.new(args['emptyDir'], to_s) @nfs = GoogleInSpec::Run::Property::JobTemplateTemplateVolumesNfs.new(args['nfs'], to_s) @gcs = GoogleInSpec::Run::Property::JobTemplateTemplateVolumesGcs.new(args['gcs'], to_s) end def to_s "#{@parent_identifier} JobTemplateTemplateVolumes" end end class JobTemplateTemplateVolumesArray def self.parse(value, parent_identifier) return if value.nil? return JobTemplateTemplateVolumes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTemplateTemplateVolumes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_volumes_cloud_sql_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateVolumesCloudSqlInstance attr_reader :instances def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instances = args['instances'] end def to_s "#{@parent_identifier} JobTemplateTemplateVolumesCloudSqlInstance" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_volumes_empty_dir.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateVolumesEmptyDir attr_reader :medium attr_reader :size_limit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @medium = args['medium'] @size_limit = args['sizeLimit'] end def to_s "#{@parent_identifier} JobTemplateTemplateVolumesEmptyDir" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_volumes_gcs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateVolumesGcs attr_reader :bucket attr_reader :read_only def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @bucket = args['bucket'] @read_only = args['readOnly'] end def to_s "#{@parent_identifier} JobTemplateTemplateVolumesGcs" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_volumes_nfs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateVolumesNfs attr_reader :server attr_reader :path attr_reader :read_only def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @server = args['server'] @path = args['path'] @read_only = args['readOnly'] end def to_s "#{@parent_identifier} JobTemplateTemplateVolumesNfs" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_volumes_secret.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_volumes_secret_items' module GoogleInSpec module Run module Property class JobTemplateTemplateVolumesSecret attr_reader :secret attr_reader :items attr_reader :default_mode def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @secret = args['secret'] @items = GoogleInSpec::Run::Property::JobTemplateTemplateVolumesSecretItemsArray.parse(args['items'], to_s) @default_mode = args['defaultMode'] end def to_s "#{@parent_identifier} JobTemplateTemplateVolumesSecret" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_volumes_secret_items.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateVolumesSecretItems attr_reader :path attr_reader :version attr_reader :mode def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] @version = args['version'] @mode = args['mode'] end def to_s "#{@parent_identifier} JobTemplateTemplateVolumesSecretItems" end end class JobTemplateTemplateVolumesSecretItemsArray def self.parse(value, parent_identifier) return if value.nil? return JobTemplateTemplateVolumesSecretItems.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTemplateTemplateVolumesSecretItems.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_vpc_access.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/job_template_template_vpc_access_network_interfaces' module GoogleInSpec module Run module Property class JobTemplateTemplateVPCAccess attr_reader :connector attr_reader :egress attr_reader :network_interfaces def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @connector = args['connector'] @egress = args['egress'] @network_interfaces = GoogleInSpec::Run::Property::JobTemplateTemplateVPCAccessNetworkInterfacesArray.parse(args['networkInterfaces'], to_s) end def to_s "#{@parent_identifier} JobTemplateTemplateVPCAccess" end end end end end ================================================ FILE: libraries/google/run/property/job_template_template_vpc_access_network_interfaces.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTemplateTemplateVPCAccessNetworkInterfaces attr_reader :network attr_reader :subnetwork attr_reader :tags def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @network = args['network'] @subnetwork = args['subnetwork'] @tags = args['tags'] end def to_s "#{@parent_identifier} JobTemplateTemplateVPCAccessNetworkInterfaces" end end class JobTemplateTemplateVPCAccessNetworkInterfacesArray def self.parse(value, parent_identifier) return if value.nil? return JobTemplateTemplateVPCAccessNetworkInterfaces.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| JobTemplateTemplateVPCAccessNetworkInterfaces.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/job_terminal_condition.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class JobTerminalCondition attr_reader :type attr_reader :state attr_reader :message attr_reader :last_transition_time attr_reader :severity attr_reader :reason attr_reader :revision_reason attr_reader :execution_reason def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @state = args['state'] @message = args['message'] @last_transition_time = args['lastTransitionTime'] @severity = args['severity'] @reason = args['reason'] @revision_reason = args['revisionReason'] @execution_reason = args['executionReason'] end def to_s "#{@parent_identifier} JobTerminalCondition" end end end end end ================================================ FILE: libraries/google/run/property/service_annotations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceAnnotations attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceAnnotations" end end end end end ================================================ FILE: libraries/google/run/property/service_binary_authorization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceBinaryAuthorization attr_reader :use_default attr_reader :policy attr_reader :breakglass_justification def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @use_default = args['useDefault'] @policy = args['policy'] @breakglass_justification = args['breakglassJustification'] end def to_s "#{@parent_identifier} ServiceBinaryAuthorization" end end end end end ================================================ FILE: libraries/google/run/property/service_conditions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceConditions attr_reader :type attr_reader :state attr_reader :message attr_reader :last_transition_time attr_reader :severity attr_reader :reason attr_reader :revision_reason attr_reader :execution_reason def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @state = args['state'] @message = args['message'] @last_transition_time = args['lastTransitionTime'] @severity = args['severity'] @reason = args['reason'] @revision_reason = args['revisionReason'] @execution_reason = args['executionReason'] end def to_s "#{@parent_identifier} ServiceConditions" end end class ServiceConditionsArray def self.parse(value, parent_identifier) return if value.nil? return ServiceConditions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceConditions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceLabels" end end end end end ================================================ FILE: libraries/google/run/property/service_scaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceScaling attr_reader :min_instance_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min_instance_count = args['minInstanceCount'] end def to_s "#{@parent_identifier} ServiceScaling" end end end end end ================================================ FILE: libraries/google/run/property/service_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_annotations' require 'google/run/property/service_template_containers' require 'google/run/property/service_template_labels' require 'google/run/property/service_template_node_selector' require 'google/run/property/service_template_scaling' require 'google/run/property/service_template_volumes' require 'google/run/property/service_template_vpc_access' require 'google/run/property/service_template_vpc_access_network_interfaces' module GoogleInSpec module Run module Property class ServiceTemplate attr_reader :revision attr_reader :labels attr_reader :annotations attr_reader :scaling attr_reader :vpc_access attr_reader :timeout attr_reader :service_account attr_reader :containers attr_reader :volumes attr_reader :execution_environment attr_reader :encryption_key attr_reader :max_instance_request_concurrency attr_reader :session_affinity attr_reader :health_check_disabled attr_reader :node_selector def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @revision = args['revision'] @labels = GoogleInSpec::Run::Property::ServiceTemplateLabels.new(args['labels'], to_s) @annotations = GoogleInSpec::Run::Property::ServiceTemplateAnnotations.new(args['annotations'], to_s) @scaling = GoogleInSpec::Run::Property::ServiceTemplateScaling.new(args['scaling'], to_s) @vpc_access = GoogleInSpec::Run::Property::ServiceTemplateVPCAccess.new(args['vpcAccess'], to_s) @timeout = args['timeout'] @service_account = args['serviceAccount'] @containers = GoogleInSpec::Run::Property::ServiceTemplateContainersArray.parse(args['containers'], to_s) @volumes = GoogleInSpec::Run::Property::ServiceTemplateVolumesArray.parse(args['volumes'], to_s) @execution_environment = args['executionEnvironment'] @encryption_key = args['encryptionKey'] @max_instance_request_concurrency = args['maxInstanceRequestConcurrency'] @session_affinity = args['sessionAffinity'] @health_check_disabled = args['healthCheckDisabled'] @node_selector = GoogleInSpec::Run::Property::ServiceTemplateNodeSelector.new(args['nodeSelector'], to_s) end def to_s "#{@parent_identifier} ServiceTemplate" end end end end end ================================================ FILE: libraries/google/run/property/service_template_annotations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateAnnotations attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceTemplateAnnotations" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_containers_env' require 'google/run/property/service_template_containers_liveness_probe' require 'google/run/property/service_template_containers_liveness_probe_grpc' require 'google/run/property/service_template_containers_liveness_probe_http_get' require 'google/run/property/service_template_containers_liveness_probe_http_get_http_headers' require 'google/run/property/service_template_containers_liveness_probe_tcp_socket' require 'google/run/property/service_template_containers_ports' require 'google/run/property/service_template_containers_resources' require 'google/run/property/service_template_containers_resources_limits' require 'google/run/property/service_template_containers_startup_probe' require 'google/run/property/service_template_containers_startup_probe_grpc' require 'google/run/property/service_template_containers_startup_probe_http_get' require 'google/run/property/service_template_containers_startup_probe_http_get_http_headers' require 'google/run/property/service_template_containers_startup_probe_tcp_socket' require 'google/run/property/service_template_containers_volume_mounts' module GoogleInSpec module Run module Property class ServiceTemplateContainers attr_reader :name attr_reader :image attr_reader :command attr_reader :args attr_reader :env attr_reader :resources attr_reader :ports attr_reader :volume_mounts attr_reader :working_dir attr_reader :liveness_probe attr_reader :startup_probe attr_reader :depends_on def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @image = args['image'] @command = args['command'] @args = args['args'] @env = GoogleInSpec::Run::Property::ServiceTemplateContainersEnvArray.parse(args['env'], to_s) @resources = GoogleInSpec::Run::Property::ServiceTemplateContainersResources.new(args['resources'], to_s) @ports = GoogleInSpec::Run::Property::ServiceTemplateContainersPortsArray.parse(args['ports'], to_s) @volume_mounts = GoogleInSpec::Run::Property::ServiceTemplateContainersVolumeMountsArray.parse(args['volumeMounts'], to_s) @working_dir = args['workingDir'] @liveness_probe = GoogleInSpec::Run::Property::ServiceTemplateContainersLivenessProbe.new(args['livenessProbe'], to_s) @startup_probe = GoogleInSpec::Run::Property::ServiceTemplateContainersStartupProbe.new(args['startupProbe'], to_s) @depends_on = args['dependsOn'] end def to_s "#{@parent_identifier} ServiceTemplateContainers" end end class ServiceTemplateContainersArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTemplateContainers.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTemplateContainers.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_containers_env_value_source' require 'google/run/property/service_template_containers_env_value_source_secret_key_ref' module GoogleInSpec module Run module Property class ServiceTemplateContainersEnv attr_reader :name attr_reader :value attr_reader :value_source def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] @value_source = GoogleInSpec::Run::Property::ServiceTemplateContainersEnvValueSource.new(args['valueSource'], to_s) end def to_s "#{@parent_identifier} ServiceTemplateContainersEnv" end end class ServiceTemplateContainersEnvArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTemplateContainersEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTemplateContainersEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_env_value_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_containers_env_value_source_secret_key_ref' module GoogleInSpec module Run module Property class ServiceTemplateContainersEnvValueSource attr_reader :secret_key_ref def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @secret_key_ref = GoogleInSpec::Run::Property::ServiceTemplateContainersEnvValueSourceSecretKeyRef.new(args['secretKeyRef'], to_s) end def to_s "#{@parent_identifier} ServiceTemplateContainersEnvValueSource" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_env_value_source_secret_key_ref.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateContainersEnvValueSourceSecretKeyRef attr_reader :secret attr_reader :version def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @secret = args['secret'] @version = args['version'] end def to_s "#{@parent_identifier} ServiceTemplateContainersEnvValueSourceSecretKeyRef" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_liveness_probe.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_containers_liveness_probe_grpc' require 'google/run/property/service_template_containers_liveness_probe_http_get' require 'google/run/property/service_template_containers_liveness_probe_http_get_http_headers' require 'google/run/property/service_template_containers_liveness_probe_tcp_socket' module GoogleInSpec module Run module Property class ServiceTemplateContainersLivenessProbe attr_reader :initial_delay_seconds attr_reader :timeout_seconds attr_reader :period_seconds attr_reader :failure_threshold attr_reader :http_get attr_reader :tcp_socket attr_reader :grpc def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @initial_delay_seconds = args['initialDelaySeconds'] @timeout_seconds = args['timeoutSeconds'] @period_seconds = args['periodSeconds'] @failure_threshold = args['failureThreshold'] @http_get = GoogleInSpec::Run::Property::ServiceTemplateContainersLivenessProbeHttpGet.new(args['httpGet'], to_s) @tcp_socket = GoogleInSpec::Run::Property::ServiceTemplateContainersLivenessProbeTcpSocket.new(args['tcpSocket'], to_s) @grpc = GoogleInSpec::Run::Property::ServiceTemplateContainersLivenessProbeGrpc.new(args['grpc'], to_s) end def to_s "#{@parent_identifier} ServiceTemplateContainersLivenessProbe" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_liveness_probe_grpc.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateContainersLivenessProbeGrpc attr_reader :port attr_reader :service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @port = args['port'] @service = args['service'] end def to_s "#{@parent_identifier} ServiceTemplateContainersLivenessProbeGrpc" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_liveness_probe_http_get.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_containers_liveness_probe_http_get_http_headers' module GoogleInSpec module Run module Property class ServiceTemplateContainersLivenessProbeHttpGet attr_reader :path attr_reader :http_headers attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] @http_headers = GoogleInSpec::Run::Property::ServiceTemplateContainersLivenessProbeHttpGetHttpHeadersArray.parse(args['httpHeaders'], to_s) @port = args['port'] end def to_s "#{@parent_identifier} ServiceTemplateContainersLivenessProbeHttpGet" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_liveness_probe_http_get_http_headers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateContainersLivenessProbeHttpGetHttpHeaders attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} ServiceTemplateContainersLivenessProbeHttpGetHttpHeaders" end end class ServiceTemplateContainersLivenessProbeHttpGetHttpHeadersArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTemplateContainersLivenessProbeHttpGetHttpHeaders.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTemplateContainersLivenessProbeHttpGetHttpHeaders.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_liveness_probe_tcp_socket.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateContainersLivenessProbeTcpSocket attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @port = args['port'] end def to_s "#{@parent_identifier} ServiceTemplateContainersLivenessProbeTcpSocket" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateContainersPorts attr_reader :name attr_reader :container_port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @container_port = args['containerPort'] end def to_s "#{@parent_identifier} ServiceTemplateContainersPorts" end end class ServiceTemplateContainersPortsArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTemplateContainersPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTemplateContainersPorts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_containers_resources_limits' module GoogleInSpec module Run module Property class ServiceTemplateContainersResources attr_reader :limits attr_reader :cpu_idle attr_reader :startup_cpu_boost def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @limits = GoogleInSpec::Run::Property::ServiceTemplateContainersResourcesLimits.new(args['limits'], to_s) @cpu_idle = args['cpuIdle'] @startup_cpu_boost = args['startupCpuBoost'] end def to_s "#{@parent_identifier} ServiceTemplateContainersResources" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_resources_limits.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateContainersResourcesLimits attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceTemplateContainersResourcesLimits" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_startup_probe.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_containers_startup_probe_grpc' require 'google/run/property/service_template_containers_startup_probe_http_get' require 'google/run/property/service_template_containers_startup_probe_http_get_http_headers' require 'google/run/property/service_template_containers_startup_probe_tcp_socket' module GoogleInSpec module Run module Property class ServiceTemplateContainersStartupProbe attr_reader :initial_delay_seconds attr_reader :timeout_seconds attr_reader :period_seconds attr_reader :failure_threshold attr_reader :http_get attr_reader :tcp_socket attr_reader :grpc def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @initial_delay_seconds = args['initialDelaySeconds'] @timeout_seconds = args['timeoutSeconds'] @period_seconds = args['periodSeconds'] @failure_threshold = args['failureThreshold'] @http_get = GoogleInSpec::Run::Property::ServiceTemplateContainersStartupProbeHttpGet.new(args['httpGet'], to_s) @tcp_socket = GoogleInSpec::Run::Property::ServiceTemplateContainersStartupProbeTcpSocket.new(args['tcpSocket'], to_s) @grpc = GoogleInSpec::Run::Property::ServiceTemplateContainersStartupProbeGrpc.new(args['grpc'], to_s) end def to_s "#{@parent_identifier} ServiceTemplateContainersStartupProbe" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_startup_probe_grpc.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateContainersStartupProbeGrpc attr_reader :port attr_reader :service def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @port = args['port'] @service = args['service'] end def to_s "#{@parent_identifier} ServiceTemplateContainersStartupProbeGrpc" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_startup_probe_http_get.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_containers_startup_probe_http_get_http_headers' module GoogleInSpec module Run module Property class ServiceTemplateContainersStartupProbeHttpGet attr_reader :path attr_reader :http_headers attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] @http_headers = GoogleInSpec::Run::Property::ServiceTemplateContainersStartupProbeHttpGetHttpHeadersArray.parse(args['httpHeaders'], to_s) @port = args['port'] end def to_s "#{@parent_identifier} ServiceTemplateContainersStartupProbeHttpGet" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_startup_probe_http_get_http_headers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateContainersStartupProbeHttpGetHttpHeaders attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} ServiceTemplateContainersStartupProbeHttpGetHttpHeaders" end end class ServiceTemplateContainersStartupProbeHttpGetHttpHeadersArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTemplateContainersStartupProbeHttpGetHttpHeaders.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTemplateContainersStartupProbeHttpGetHttpHeaders.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_startup_probe_tcp_socket.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateContainersStartupProbeTcpSocket attr_reader :port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @port = args['port'] end def to_s "#{@parent_identifier} ServiceTemplateContainersStartupProbeTcpSocket" end end end end end ================================================ FILE: libraries/google/run/property/service_template_containers_volume_mounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateContainersVolumeMounts attr_reader :name attr_reader :mount_path def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @mount_path = args['mountPath'] end def to_s "#{@parent_identifier} ServiceTemplateContainersVolumeMounts" end end class ServiceTemplateContainersVolumeMountsArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTemplateContainersVolumeMounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTemplateContainersVolumeMounts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_template_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ServiceTemplateLabels" end end end end end ================================================ FILE: libraries/google/run/property/service_template_node_selector.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateNodeSelector attr_reader :accelerator def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator = args['accelerator'] end def to_s "#{@parent_identifier} ServiceTemplateNodeSelector" end end end end end ================================================ FILE: libraries/google/run/property/service_template_scaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateScaling attr_reader :min_instance_count attr_reader :max_instance_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @min_instance_count = args['minInstanceCount'] @max_instance_count = args['maxInstanceCount'] end def to_s "#{@parent_identifier} ServiceTemplateScaling" end end end end end ================================================ FILE: libraries/google/run/property/service_template_volumes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_volumes_cloud_sql_instance' require 'google/run/property/service_template_volumes_empty_dir' require 'google/run/property/service_template_volumes_gcs' require 'google/run/property/service_template_volumes_nfs' require 'google/run/property/service_template_volumes_secret' require 'google/run/property/service_template_volumes_secret_items' module GoogleInSpec module Run module Property class ServiceTemplateVolumes attr_reader :name attr_reader :secret attr_reader :cloud_sql_instance attr_reader :empty_dir attr_reader :nfs attr_reader :gcs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @secret = GoogleInSpec::Run::Property::ServiceTemplateVolumesSecret.new(args['secret'], to_s) @cloud_sql_instance = GoogleInSpec::Run::Property::ServiceTemplateVolumesCloudSqlInstance.new(args['cloudSqlInstance'], to_s) @empty_dir = GoogleInSpec::Run::Property::ServiceTemplateVolumesEmptyDir.new(args['emptyDir'], to_s) @nfs = GoogleInSpec::Run::Property::ServiceTemplateVolumesNfs.new(args['nfs'], to_s) @gcs = GoogleInSpec::Run::Property::ServiceTemplateVolumesGcs.new(args['gcs'], to_s) end def to_s "#{@parent_identifier} ServiceTemplateVolumes" end end class ServiceTemplateVolumesArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTemplateVolumes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTemplateVolumes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_template_volumes_cloud_sql_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateVolumesCloudSqlInstance attr_reader :instances def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instances = args['instances'] end def to_s "#{@parent_identifier} ServiceTemplateVolumesCloudSqlInstance" end end end end end ================================================ FILE: libraries/google/run/property/service_template_volumes_empty_dir.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateVolumesEmptyDir attr_reader :medium attr_reader :size_limit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @medium = args['medium'] @size_limit = args['sizeLimit'] end def to_s "#{@parent_identifier} ServiceTemplateVolumesEmptyDir" end end end end end ================================================ FILE: libraries/google/run/property/service_template_volumes_gcs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateVolumesGcs attr_reader :bucket attr_reader :read_only def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @bucket = args['bucket'] @read_only = args['readOnly'] end def to_s "#{@parent_identifier} ServiceTemplateVolumesGcs" end end end end end ================================================ FILE: libraries/google/run/property/service_template_volumes_nfs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateVolumesNfs attr_reader :server attr_reader :path attr_reader :read_only def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @server = args['server'] @path = args['path'] @read_only = args['readOnly'] end def to_s "#{@parent_identifier} ServiceTemplateVolumesNfs" end end end end end ================================================ FILE: libraries/google/run/property/service_template_volumes_secret.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_volumes_secret_items' module GoogleInSpec module Run module Property class ServiceTemplateVolumesSecret attr_reader :secret attr_reader :items attr_reader :default_mode def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @secret = args['secret'] @items = GoogleInSpec::Run::Property::ServiceTemplateVolumesSecretItemsArray.parse(args['items'], to_s) @default_mode = args['defaultMode'] end def to_s "#{@parent_identifier} ServiceTemplateVolumesSecret" end end end end end ================================================ FILE: libraries/google/run/property/service_template_volumes_secret_items.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateVolumesSecretItems attr_reader :path attr_reader :version attr_reader :mode def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] @version = args['version'] @mode = args['mode'] end def to_s "#{@parent_identifier} ServiceTemplateVolumesSecretItems" end end class ServiceTemplateVolumesSecretItemsArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTemplateVolumesSecretItems.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTemplateVolumesSecretItems.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_template_vpc_access.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/run/property/service_template_vpc_access_network_interfaces' module GoogleInSpec module Run module Property class ServiceTemplateVPCAccess attr_reader :connector attr_reader :egress attr_reader :network_interfaces def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @connector = args['connector'] @egress = args['egress'] @network_interfaces = GoogleInSpec::Run::Property::ServiceTemplateVPCAccessNetworkInterfacesArray.parse(args['networkInterfaces'], to_s) end def to_s "#{@parent_identifier} ServiceTemplateVPCAccess" end end end end end ================================================ FILE: libraries/google/run/property/service_template_vpc_access_network_interfaces.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTemplateVPCAccessNetworkInterfaces attr_reader :network attr_reader :subnetwork attr_reader :tags def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @network = args['network'] @subnetwork = args['subnetwork'] @tags = args['tags'] end def to_s "#{@parent_identifier} ServiceTemplateVPCAccessNetworkInterfaces" end end class ServiceTemplateVPCAccessNetworkInterfacesArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTemplateVPCAccessNetworkInterfaces.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTemplateVPCAccessNetworkInterfaces.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_terminal_condition.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTerminalCondition attr_reader :type attr_reader :state attr_reader :message attr_reader :last_transition_time attr_reader :severity attr_reader :reason attr_reader :revision_reason attr_reader :execution_reason def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @state = args['state'] @message = args['message'] @last_transition_time = args['lastTransitionTime'] @severity = args['severity'] @reason = args['reason'] @revision_reason = args['revisionReason'] @execution_reason = args['executionReason'] end def to_s "#{@parent_identifier} ServiceTerminalCondition" end end end end end ================================================ FILE: libraries/google/run/property/service_traffic.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTraffic attr_reader :type attr_reader :revision attr_reader :percent attr_reader :tag def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @revision = args['revision'] @percent = args['percent'] @tag = args['tag'] end def to_s "#{@parent_identifier} ServiceTraffic" end end class ServiceTrafficArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTraffic.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTraffic.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/run/property/service_traffic_statuses.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Run module Property class ServiceTrafficStatuses attr_reader :type attr_reader :revision attr_reader :percent attr_reader :tag attr_reader :uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @type = args['type'] @revision = args['revision'] @percent = args['percent'] @tag = args['tag'] @uri = args['uri'] end def to_s "#{@parent_identifier} ServiceTrafficStatuses" end end class ServiceTrafficStatusesArray def self.parse(value, parent_identifier) return if value.nil? return ServiceTrafficStatuses.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceTrafficStatuses.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/secretmanager/property/secret_replication.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/secretmanager/property/secret_replication_user_managed' require 'google/secretmanager/property/secret_replication_user_managed_replicas' module GoogleInSpec module SecretManager module Property class SecretReplication attr_reader :automatic attr_reader :user_managed def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @automatic = args['automatic'] @user_managed = GoogleInSpec::SecretManager::Property::SecretReplicationUserManaged.new(args['userManaged'], to_s) end def to_s "#{@parent_identifier} SecretReplication" end end end end end ================================================ FILE: libraries/google/secretmanager/property/secret_replication_user_managed.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/secretmanager/property/secret_replication_user_managed_replicas' module GoogleInSpec module SecretManager module Property class SecretReplicationUserManaged attr_reader :replicas def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @replicas = GoogleInSpec::SecretManager::Property::SecretReplicationUserManagedReplicasArray.parse(args['replicas'], to_s) end def to_s "#{@parent_identifier} SecretReplicationUserManaged" end end end end end ================================================ FILE: libraries/google/secretmanager/property/secret_replication_user_managed_replicas.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/secretmanager/property/secret_replication_user_managed_replicas_customer_managed_encryption' module GoogleInSpec module SecretManager module Property class SecretReplicationUserManagedReplicas attr_reader :location attr_reader :customer_managed_encryption def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @location = args['location'] @customer_managed_encryption = GoogleInSpec::SecretManager::Property::SecretReplicationUserManagedReplicasCustomerManagedEncryption.new(args['customerManagedEncryption'], to_s) end def to_s "#{@parent_identifier} SecretReplicationUserManagedReplicas" end end class SecretReplicationUserManagedReplicasArray def self.parse(value, parent_identifier) return if value.nil? return SecretReplicationUserManagedReplicas.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| SecretReplicationUserManagedReplicas.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/secretmanager/property/secret_replication_user_managed_replicas_customer_managed_encryption.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SecretManager module Property class SecretReplicationUserManagedReplicasCustomerManagedEncryption attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} SecretReplicationUserManagedReplicasCustomerManagedEncryption" end end end end end ================================================ FILE: libraries/google/secretmanager/property/secret_rotation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SecretManager module Property class SecretRotation attr_reader :next_rotation_time attr_reader :rotation_period def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @next_rotation_time = args['nextRotationTime'] @rotation_period = args['rotationPeriod'] end def to_s "#{@parent_identifier} SecretRotation" end end end end end ================================================ FILE: libraries/google/secretmanager/property/secret_topics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SecretManager module Property class SecretTopics attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] end def to_s "#{@parent_identifier} SecretTopics" end end class SecretTopicsArray def self.parse(value, parent_identifier) return if value.nil? return SecretTopics.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| SecretTopics.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/secretmanager/property/secretversion_payload.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SecretManager module Property class SecretVersionPayload attr_reader :data def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @data = args['data'] end def to_s "#{@parent_identifier} SecretVersionPayload" end end end end end ================================================ FILE: libraries/google/serviceusage/property/service_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/serviceusage/property/service_config_apis' module GoogleInSpec module ServiceUsage module Property class ServiceConfig attr_reader :name attr_reader :title attr_reader :apis def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @title = args['title'] @apis = GoogleInSpec::ServiceUsage::Property::ServiceConfigApisArray.parse(args['apis'], to_s) end def to_s "#{@parent_identifier} ServiceConfig" end end end end end ================================================ FILE: libraries/google/serviceusage/property/service_config_apis.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module ServiceUsage module Property class ServiceConfigApis attr_reader :name attr_reader :version def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @version = args['version'] end def to_s "#{@parent_identifier} ServiceConfigApis" end end class ServiceConfigApisArray def self.parse(value, parent_identifier) return if value.nil? return ServiceConfigApis.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ServiceConfigApis.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/sourcerepo/property/repository_pubsub_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SourceRepo module Property class RepositoryPubsubConfigs attr_reader :message_format attr_reader :service_account_email def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @message_format = args['messageFormat'] @service_account_email = args['serviceAccountEmail'] end def to_s "#{@parent_identifier} RepositoryPubsubConfigs" end end end end end ================================================ FILE: libraries/google/sql/property/connect_ip_addresses.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class ConnectIpAddresses attr_reader :ip_address attr_reader :time_to_retire attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_address = args['ipAddress'] @time_to_retire = parse_time_string(args['timeToRetire']) @type = args['type'] end def to_s "#{@parent_identifier} ConnectIpAddresses" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end class ConnectIpAddressesArray def self.parse(value, parent_identifier) return if value.nil? return ConnectIpAddresses.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ConnectIpAddresses.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/sql/property/connect_server_ca_cert.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class ConnectServerCaCert attr_reader :cert attr_reader :cert_serial_number attr_reader :common_name attr_reader :sha1_fingerprint attr_reader :instance attr_reader :create_time attr_reader :expiration_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cert = args['cert'] @cert_serial_number = args['certSerialNumber'] @common_name = args['commonName'] @sha1_fingerprint = args['sha1Fingerprint'] @instance = args['instance'] @create_time = parse_time_string(args['createTime']) @expiration_time = parse_time_string(args['expirationTime']) end def to_s "#{@parent_identifier} ConnectServerCaCert" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_disk_encryption_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class DatabaseInstanceDiskEncryptionConfiguration attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} DatabaseInstanceDiskEncryptionConfiguration" end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_disk_encryption_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class DatabaseInstanceDiskEncryptionStatus attr_reader :kms_key_version_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_version_name = args['kmsKeyVersionName'] end def to_s "#{@parent_identifier} DatabaseInstanceDiskEncryptionStatus" end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_failover_replica.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class DatabaseInstanceFailoverReplica attr_reader :available attr_reader :name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @available = args['available'] @name = args['name'] end def to_s "#{@parent_identifier} DatabaseInstanceFailoverReplica" end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_ip_addresses.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class DatabaseInstanceIpAddresses attr_reader :ip_address attr_reader :time_to_retire attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ip_address = args['ipAddress'] @time_to_retire = parse_time_string(args['timeToRetire']) @type = args['type'] end def to_s "#{@parent_identifier} DatabaseInstanceIpAddresses" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end class DatabaseInstanceIpAddressesArray def self.parse(value, parent_identifier) return if value.nil? return DatabaseInstanceIpAddresses.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| DatabaseInstanceIpAddresses.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_replica_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration' module GoogleInSpec module SQL module Property class DatabaseInstanceReplicaConfiguration attr_reader :failover_target attr_reader :mysql_replica_configuration attr_reader :replica_names attr_reader :service_account_email_address def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @failover_target = args['failoverTarget'] @mysql_replica_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceReplicaConfigurationMysqlReplicaConfiguration.new(args['mysqlReplicaConfiguration'], to_s) @replica_names = args['replicaNames'] @service_account_email_address = args['serviceAccountEmailAddress'] end def to_s "#{@parent_identifier} DatabaseInstanceReplicaConfiguration" end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class DatabaseInstanceReplicaConfigurationMysqlReplicaConfiguration attr_reader :ca_certificate attr_reader :client_certificate attr_reader :client_key attr_reader :connect_retry_interval attr_reader :dump_file_path attr_reader :master_heartbeat_period attr_reader :password attr_reader :ssl_cipher attr_reader :username attr_reader :verify_server_certificate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ca_certificate = args['caCertificate'] @client_certificate = args['clientCertificate'] @client_key = args['clientKey'] @connect_retry_interval = args['connectRetryInterval'] @dump_file_path = args['dumpFilePath'] @master_heartbeat_period = args['masterHeartbeatPeriod'] @password = args['password'] @ssl_cipher = args['sslCipher'] @username = args['username'] @verify_server_certificate = args['verifyServerCertificate'] end def to_s "#{@parent_identifier} DatabaseInstanceReplicaConfigurationMysqlReplicaConfiguration" end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_server_ca_cert.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class DatabaseInstanceServerCaCert attr_reader :cert attr_reader :cert_serial_number attr_reader :common_name attr_reader :create_time attr_reader :expiration_time attr_reader :sha1_fingerprint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @cert = args['cert'] @cert_serial_number = args['certSerialNumber'] @common_name = args['commonName'] @create_time = parse_time_string(args['createTime']) @expiration_time = parse_time_string(args['expirationTime']) @sha1_fingerprint = args['sha1Fingerprint'] end def to_s "#{@parent_identifier} DatabaseInstanceServerCaCert" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_settings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/sql/property/databaseinstance_settings_backup_configuration' require 'google/sql/property/databaseinstance_settings_database_flags' require 'google/sql/property/databaseinstance_settings_ip_configuration' require 'google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks' module GoogleInSpec module SQL module Property class DatabaseInstanceSettings attr_reader :kind attr_reader :database_flags attr_reader :ip_configuration attr_reader :tier attr_reader :availability_type attr_reader :backup_configuration attr_reader :settings_version attr_reader :user_labels attr_reader :activation_policy attr_reader :data_disk_size_gb attr_reader :data_disk_type attr_reader :pricing_plan attr_reader :replication_type attr_reader :storage_auto_resize attr_reader :storage_auto_resize_limit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kind = args['kind'] @database_flags = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsDatabaseFlagsArray.parse(args['databaseFlags'], to_s) @ip_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsIpConfiguration.new(args['ipConfiguration'], to_s) @tier = args['tier'] @availability_type = args['availabilityType'] @backup_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsBackupConfiguration.new(args['backupConfiguration'], to_s) @settings_version = args['settingsVersion'] @user_labels = args['userLabels'] @activation_policy = args['activationPolicy'] @data_disk_size_gb = args['dataDiskSizeGb'] @data_disk_type = args['dataDiskType'] @pricing_plan = args['pricingPlan'] @replication_type = args['replicationType'] @storage_auto_resize = args['storageAutoResize'] @storage_auto_resize_limit = args['storageAutoResizeLimit'] end def to_s "#{@parent_identifier} DatabaseInstanceSettings" end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_settings_backup_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class DatabaseInstanceSettingsBackupConfiguration attr_reader :enabled attr_reader :binary_log_enabled attr_reader :start_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] @binary_log_enabled = args['binaryLogEnabled'] @start_time = args['startTime'] end def to_s "#{@parent_identifier} DatabaseInstanceSettingsBackupConfiguration" end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_settings_database_flags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class DatabaseInstanceSettingsDatabaseFlags attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} DatabaseInstanceSettingsDatabaseFlags" end end class DatabaseInstanceSettingsDatabaseFlagsArray def self.parse(value, parent_identifier) return if value.nil? return DatabaseInstanceSettingsDatabaseFlags.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| DatabaseInstanceSettingsDatabaseFlags.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_settings_ip_configuration.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks' module GoogleInSpec module SQL module Property class DatabaseInstanceSettingsIpConfiguration attr_reader :ipv4_enabled attr_reader :authorized_networks attr_reader :require_ssl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @ipv4_enabled = args['ipv4Enabled'] @authorized_networks = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsIpConfigurationAuthorizedNetworksArray.parse(args['authorizedNetworks'], to_s) @require_ssl = args['requireSsl'] end def to_s "#{@parent_identifier} DatabaseInstanceSettingsIpConfiguration" end end end end end ================================================ FILE: libraries/google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module SQL module Property class DatabaseInstanceSettingsIpConfigurationAuthorizedNetworks attr_reader :expiration_time attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @expiration_time = parse_time_string(args['expirationTime']) @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} DatabaseInstanceSettingsIpConfigurationAuthorizedNetworks" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end class DatabaseInstanceSettingsIpConfigurationAuthorizedNetworksArray def self.parse(value, parent_identifier) return if value.nil? return DatabaseInstanceSettingsIpConfigurationAuthorizedNetworks.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| DatabaseInstanceSettingsIpConfigurationAuthorizedNetworks.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/storage/property/bucket_acl.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/storage/property/bucket_acl_project_team' module GoogleInSpec module Storage module Property class BucketAcl attr_reader :bucket attr_reader :domain attr_reader :email attr_reader :entity attr_reader :entity_id attr_reader :id attr_reader :project_team attr_reader :role def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @bucket = args['bucket'] @domain = args['domain'] @email = args['email'] @entity = args['entity'] @entity_id = args['entityId'] @id = args['id'] @project_team = GoogleInSpec::Storage::Property::BucketAclProjectTeam.new(args['projectTeam'], to_s) @role = args['role'] end def to_s "#{@parent_identifier} BucketAcl" end end class BucketAclArray def self.parse(value, parent_identifier) return if value.nil? return BucketAcl.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BucketAcl.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/storage/property/bucket_acl_project_team.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketAclProjectTeam attr_reader :project_number attr_reader :team def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_number = args['projectNumber'] @team = args['team'] end def to_s "#{@parent_identifier} BucketAclProjectTeam" end end end end end ================================================ FILE: libraries/google/storage/property/bucket_cors.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketCors attr_reader :max_age_seconds attr_reader :method attr_reader :origin attr_reader :response_header def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_age_seconds = args['maxAgeSeconds'] @method = args['method'] @origin = args['origin'] @response_header = args['responseHeader'] end def to_s "#{@parent_identifier} BucketCors" end end class BucketCorsArray def self.parse(value, parent_identifier) return if value.nil? return BucketCors.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BucketCors.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/storage/property/bucket_default_object_acl.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/storage/property/bucket_default_object_acl_project_team' module GoogleInSpec module Storage module Property class BucketDefaultObjectAcl attr_reader :bucket attr_reader :domain attr_reader :email attr_reader :entity attr_reader :entity_id attr_reader :generation attr_reader :id attr_reader :object attr_reader :project_team attr_reader :role def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @bucket = args['bucket'] @domain = args['domain'] @email = args['email'] @entity = args['entity'] @entity_id = args['entityId'] @generation = args['generation'] @id = args['id'] @object = args['object'] @project_team = GoogleInSpec::Storage::Property::BucketDefaultObjectAclProjectTeam.new(args['projectTeam'], to_s) @role = args['role'] end def to_s "#{@parent_identifier} BucketDefaultObjectAcl" end end class BucketDefaultObjectAclArray def self.parse(value, parent_identifier) return if value.nil? return BucketDefaultObjectAcl.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BucketDefaultObjectAcl.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/storage/property/bucket_default_object_acl_project_team.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketDefaultObjectAclProjectTeam attr_reader :project_number attr_reader :team def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_number = args['projectNumber'] @team = args['team'] end def to_s "#{@parent_identifier} BucketDefaultObjectAclProjectTeam" end end end end end ================================================ FILE: libraries/google/storage/property/bucket_encryption.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketEncryption attr_reader :default_kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @default_kms_key_name = args['defaultKmsKeyName'] end def to_s "#{@parent_identifier} BucketEncryption" end end end end end ================================================ FILE: libraries/google/storage/property/bucket_lifecycle.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/storage/property/bucket_lifecycle_rule' module GoogleInSpec module Storage module Property class BucketLifecycle attr_reader :rule def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @rule = GoogleInSpec::Storage::Property::BucketLifecycleRuleArray.parse(args['rule'], to_s) end def to_s "#{@parent_identifier} BucketLifecycle" end end end end end ================================================ FILE: libraries/google/storage/property/bucket_lifecycle_rule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/storage/property/bucket_lifecycle_rule_action' require 'google/storage/property/bucket_lifecycle_rule_condition' module GoogleInSpec module Storage module Property class BucketLifecycleRule attr_reader :action attr_reader :condition def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @action = GoogleInSpec::Storage::Property::BucketLifecycleRuleAction.new(args['action'], to_s) @condition = GoogleInSpec::Storage::Property::BucketLifecycleRuleCondition.new(args['condition'], to_s) end def to_s "#{@parent_identifier} BucketLifecycleRule" end end class BucketLifecycleRuleArray def self.parse(value, parent_identifier) return if value.nil? return BucketLifecycleRule.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BucketLifecycleRule.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/storage/property/bucket_lifecycle_rule_action.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketLifecycleRuleAction attr_reader :storage_class attr_reader :type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @storage_class = args['storageClass'] @type = args['type'] end def to_s "#{@parent_identifier} BucketLifecycleRuleAction" end end end end end ================================================ FILE: libraries/google/storage/property/bucket_lifecycle_rule_condition.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketLifecycleRuleCondition attr_reader :age_days attr_reader :created_before attr_reader :is_live attr_reader :matches_storage_class attr_reader :num_newer_versions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @age_days = args['age'] @created_before = parse_time_string(args['createdBefore']) @is_live = args['isLive'] @matches_storage_class = args['matchesStorageClass'] @num_newer_versions = args['numNewerVersions'] end def to_s "#{@parent_identifier} BucketLifecycleRuleCondition" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/storage/property/bucket_logging.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketLogging attr_reader :log_bucket attr_reader :log_object_prefix def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @log_bucket = args['logBucket'] @log_object_prefix = args['logObjectPrefix'] end def to_s "#{@parent_identifier} BucketLogging" end end end end end ================================================ FILE: libraries/google/storage/property/bucket_owner.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketOwner attr_reader :entity attr_reader :entity_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @entity = args['entity'] @entity_id = args['entityId'] end def to_s "#{@parent_identifier} BucketOwner" end end end end end ================================================ FILE: libraries/google/storage/property/bucket_retention_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketRetentionPolicy attr_reader :effective_time attr_reader :is_locked attr_reader :retention_period def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @effective_time = parse_time_string(args['effectiveTime']) @is_locked = args['isLocked'] @retention_period = args['retentionPeriod'] end def to_s "#{@parent_identifier} BucketRetentionPolicy" end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end end end end end ================================================ FILE: libraries/google/storage/property/bucket_versioning.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketVersioning attr_reader :enabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @enabled = args['enabled'] end def to_s "#{@parent_identifier} BucketVersioning" end end end end end ================================================ FILE: libraries/google/storage/property/bucket_website.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketWebsite attr_reader :main_page_suffix attr_reader :not_found_page def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @main_page_suffix = args['mainPageSuffix'] @not_found_page = args['notFoundPage'] end def to_s "#{@parent_identifier} BucketWebsite" end end end end end ================================================ FILE: libraries/google/storage/property/bucketacl_project_team.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class BucketACLProjectTeam attr_reader :project_number attr_reader :team def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_number = args['projectNumber'] @team = args['team'] end def to_s "#{@parent_identifier} BucketACLProjectTeam" end end end end end ================================================ FILE: libraries/google/storage/property/defaultobjectacl_project_team.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class DefaultObjectACLProjectTeam attr_reader :project_number attr_reader :team def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_number = args['projectNumber'] @team = args['team'] end def to_s "#{@parent_identifier} DefaultObjectACLProjectTeam" end end end end end ================================================ FILE: libraries/google/storage/property/objectacl_project_team.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module Storage module Property class ObjectACLProjectTeam attr_reader :project_number attr_reader :team def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_number = args['projectNumber'] @team = args['team'] end def to_s "#{@parent_identifier} ObjectACLProjectTeam" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_completion_stats.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobCompletionStats attr_reader :successful_forecast_point_count attr_reader :incomplete_count attr_reader :failed_count attr_reader :successful_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @successful_forecast_point_count = args['successfulForecastPointCount'] @incomplete_count = args['incompleteCount'] @failed_count = args['failedCount'] @successful_count = args['successfulCount'] end def to_s "#{@parent_identifier} BatchPredictionJobCompletionStats" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_dedicated_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec' module GoogleInSpec module VertexAI module Property class BatchPredictionJobDedicatedResources attr_reader :starting_replica_count attr_reader :max_replica_count attr_reader :machine_spec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @starting_replica_count = args['startingReplicaCount'] @max_replica_count = args['maxReplicaCount'] @machine_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobDedicatedResourcesMachineSpec.new(args['machineSpec'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobDedicatedResources" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobDedicatedResourcesMachineSpec attr_reader :accelerator_type attr_reader :machine_type attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @machine_type = args['machineType'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} BatchPredictionJobDedicatedResourcesMachineSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} BatchPredictionJobEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} BatchPredictionJobError" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_espigabb_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig attr_reader :max_blur_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_blur_sigma = args['maxBlurSigma'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_espigasg_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_espigasgcfn_sigma' require 'google/vertexai/property/batchpredictionjob_espigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig attr_reader :feature_noise_sigma attr_reader :noise_sigma attr_reader :noisy_sample_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) @noise_sigma = args['noiseSigma'] @noisy_sample_count = args['noisySampleCount'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_espigasgcfn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_espigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma attr_reader :noise_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_espigasgcfnsn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma attr_reader :name attr_reader :sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @sigma = args['sigma'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma" end end class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray def self.parse(value, parent_identifier) return if value.nil? return BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_espxasgcfn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_espxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma attr_reader :noise_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_espxasgcfnsn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma attr_reader :name attr_reader :sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @sigma = args['sigma'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma" end end class BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray def self.parse(value, parent_identifier) return if value.nil? return BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata' require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs' require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/batchpredictionjob_espigabb_config' require 'google/vertexai/property/batchpredictionjob_espigasg_config' require 'google/vertexai/property/batchpredictionjob_espigasgcfn_sigma' require 'google/vertexai/property/batchpredictionjob_espigasgcfnsn_sigma' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/batchpredictionjob_espxasgcfn_sigma' require 'google/vertexai/property/batchpredictionjob_espxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpec attr_reader :parameters attr_reader :metadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @parameters = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParameters.new(args['parameters'], to_s) @metadata = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecMetadata.new(args['metadata'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs' require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecMetadata attr_reader :feature_attributions_schema_uri attr_reader :latent_space_source attr_reader :outputs attr_reader :inputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] @latent_space_source = args['latentSpaceSource'] @outputs = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecMetadataOutputs.new(args['outputs'], to_s) @inputs = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecMetadataInputs.new(args['inputs'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecMetadataInputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecMetadataInputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecMetadataOutputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecMetadataOutputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/batchpredictionjob_espigabb_config' require 'google/vertexai/property/batchpredictionjob_espigasg_config' require 'google/vertexai/property/batchpredictionjob_espigasgcfn_sigma' require 'google/vertexai/property/batchpredictionjob_espigasgcfnsn_sigma' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/batchpredictionjob_espxasgcfn_sigma' require 'google/vertexai/property/batchpredictionjob_espxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParameters attr_reader :output_indices attr_reader :examples attr_reader :xrai_attribution attr_reader :top_k attr_reader :integrated_gradients_attribution attr_reader :sampled_shapley_attribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_indices = args['outputIndices'] @examples = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamples.new(args['examples'], to_s) @xrai_attribution = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttribution.new(args['xraiAttribution'], to_s) @top_k = args['topK'] @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttribution.new(args['integratedGradientsAttribution'], to_s) @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersSampledShapleyAttribution.new(args['sampledShapleyAttribution'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParameters" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersExamples attr_reader :presets attr_reader :neighbor_count attr_reader :example_gcs_source attr_reader :nearest_neighbor_search_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @presets = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamplesPresets.new(args['presets'], to_s) @neighbor_count = args['neighborCount'] @example_gcs_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSource.new(args['exampleGcsSource'], to_s) @nearest_neighbor_search_config = args['nearestNeighborSearchConfig'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersExamples" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSource attr_reader :gcs_source attr_reader :data_format def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gcs_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args['gcsSource'], to_s) @data_format = args['dataFormat'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSourceGcsSource attr_reader :uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @uris = args['uris'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSourceGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersExamplesPresets attr_reader :modality attr_reader :query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @modality = args['modality'] @query = args['query'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersExamplesPresets" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_espigabb_config' require 'google/vertexai/property/batchpredictionjob_espigasg_config' require 'google/vertexai/property/batchpredictionjob_espigasgcfn_sigma' require 'google/vertexai/property/batchpredictionjob_espigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttribution attr_reader :step_count attr_reader :smooth_grad_config attr_reader :blur_baseline_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @step_count = args['stepCount'] @smooth_grad_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) @blur_baseline_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersSampledShapleyAttribution attr_reader :path_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_count = args['pathCount'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersSampledShapleyAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/batchpredictionjob_espxasgcfn_sigma' require 'google/vertexai/property/batchpredictionjob_espxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersXraiAttribution attr_reader :smooth_grad_config attr_reader :step_count attr_reader :blur_baseline_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @smooth_grad_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) @step_count = args['stepCount'] @blur_baseline_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersXraiAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersXraiAttributionBlurBaselineConfig attr_reader :max_blur_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_blur_sigma = args['maxBlurSigma'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersXraiAttributionBlurBaselineConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_espxasgcfn_sigma' require 'google/vertexai/property/batchpredictionjob_espxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfig attr_reader :feature_noise_sigma attr_reader :noise_sigma attr_reader :noisy_sample_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) @noise_sigma = args['noiseSigma'] @noisy_sample_count = args['noisySampleCount'] end def to_s "#{@parent_identifier} BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_input_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_input_config_bigquery_source' require 'google/vertexai/property/batchpredictionjob_input_config_gcs_source' module GoogleInSpec module VertexAI module Property class BatchPredictionJobInputConfig attr_reader :instances_format attr_reader :bigquery_source attr_reader :gcs_source def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instances_format = args['instancesFormat'] @bigquery_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfigBigquerySource.new(args['bigquerySource'], to_s) @gcs_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfigGcsSource.new(args['gcsSource'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobInputConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_input_config_bigquery_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobInputConfigBigquerySource attr_reader :input_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @input_uri = args['inputUri'] end def to_s "#{@parent_identifier} BatchPredictionJobInputConfigBigquerySource" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_input_config_gcs_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobInputConfigGcsSource attr_reader :uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @uris = args['uris'] end def to_s "#{@parent_identifier} BatchPredictionJobInputConfigGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_instance_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobInstanceConfig attr_reader :included_fields attr_reader :instance_type attr_reader :excluded_fields attr_reader :key_field def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @included_fields = args['includedFields'] @instance_type = args['instanceType'] @excluded_fields = args['excludedFields'] @key_field = args['keyField'] end def to_s "#{@parent_identifier} BatchPredictionJobInstanceConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} BatchPredictionJobLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_manual_batch_tuning_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobManualBatchTuningParameters attr_reader :batch_size def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @batch_size = args['batchSize'] end def to_s "#{@parent_identifier} BatchPredictionJobManualBatchTuningParameters" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_output_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_output_config_bigquery_destination' require 'google/vertexai/property/batchpredictionjob_output_config_gcs_destination' module GoogleInSpec module VertexAI module Property class BatchPredictionJobOutputConfig attr_reader :gcs_destination attr_reader :predictions_format attr_reader :bigquery_destination def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gcs_destination = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfigGcsDestination.new(args['gcsDestination'], to_s) @predictions_format = args['predictionsFormat'] @bigquery_destination = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfigBigqueryDestination.new(args['bigqueryDestination'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobOutputConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_output_config_bigquery_destination.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobOutputConfigBigqueryDestination attr_reader :output_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri = args['outputUri'] end def to_s "#{@parent_identifier} BatchPredictionJobOutputConfigBigqueryDestination" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_output_config_gcs_destination.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobOutputConfigGcsDestination attr_reader :output_uri_prefix def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri_prefix = args['outputUriPrefix'] end def to_s "#{@parent_identifier} BatchPredictionJobOutputConfigGcsDestination" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_output_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobOutputInfo attr_reader :bigquery_output_dataset attr_reader :gcs_output_directory attr_reader :bigquery_output_table def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @bigquery_output_dataset = args['bigqueryOutputDataset'] @gcs_output_directory = args['gcsOutputDirectory'] @bigquery_output_table = args['bigqueryOutputTable'] end def to_s "#{@parent_identifier} BatchPredictionJobOutputInfo" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_partial_failures.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobPartialFailures attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} BatchPredictionJobPartialFailures" end end class BatchPredictionJobPartialFailuresArray def self.parse(value, parent_identifier) return if value.nil? return BatchPredictionJobPartialFailures.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BatchPredictionJobPartialFailures.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_resources_consumed.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobResourcesConsumed attr_reader :replica_hours def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @replica_hours = args['replicaHours'] end def to_s "#{@parent_identifier} BatchPredictionJobResourcesConsumed" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec' require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env' require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports' require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata' module GoogleInSpec module VertexAI module Property class BatchPredictionJobUnmanagedContainerModel attr_reader :artifact_uri attr_reader :predict_schemata attr_reader :container_spec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @artifact_uri = args['artifactUri'] @predict_schemata = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelPredictSchemata.new(args['predictSchemata'], to_s) @container_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelContainerSpec.new(args['containerSpec'], to_s) end def to_s "#{@parent_identifier} BatchPredictionJobUnmanagedContainerModel" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env' require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports' module GoogleInSpec module VertexAI module Property class BatchPredictionJobUnmanagedContainerModelContainerSpec attr_reader :predict_route attr_reader :image_uri attr_reader :env attr_reader :args attr_reader :command attr_reader :ports attr_reader :health_route def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @predict_route = args['predictRoute'] @image_uri = args['imageUri'] @env = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelContainerSpecEnvArray.parse(args['env'], to_s) @args = args['args'] @command = args['command'] @ports = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelContainerSpecPortsArray.parse(args['ports'], to_s) @health_route = args['healthRoute'] end def to_s "#{@parent_identifier} BatchPredictionJobUnmanagedContainerModelContainerSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobUnmanagedContainerModelContainerSpecEnv attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} BatchPredictionJobUnmanagedContainerModelContainerSpecEnv" end end class BatchPredictionJobUnmanagedContainerModelContainerSpecEnvArray def self.parse(value, parent_identifier) return if value.nil? return BatchPredictionJobUnmanagedContainerModelContainerSpecEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BatchPredictionJobUnmanagedContainerModelContainerSpecEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobUnmanagedContainerModelContainerSpecPorts attr_reader :container_port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @container_port = args['containerPort'] end def to_s "#{@parent_identifier} BatchPredictionJobUnmanagedContainerModelContainerSpecPorts" end end class BatchPredictionJobUnmanagedContainerModelContainerSpecPortsArray def self.parse(value, parent_identifier) return if value.nil? return BatchPredictionJobUnmanagedContainerModelContainerSpecPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| BatchPredictionJobUnmanagedContainerModelContainerSpecPorts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class BatchPredictionJobUnmanagedContainerModelPredictSchemata attr_reader :instance_schema_uri attr_reader :parameters_schema_uri attr_reader :prediction_schema_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_schema_uri = args['instanceSchemaUri'] @parameters_schema_uri = args['parametersSchemaUri'] @prediction_schema_uri = args['predictionSchemaUri'] end def to_s "#{@parent_identifier} BatchPredictionJobUnmanagedContainerModelPredictSchemata" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} CustomJobEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} CustomJobError" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/customjob_job_spec_base_output_directory' require 'google/vertexai/property/customjob_job_spec_scheduling' require 'google/vertexai/property/customjob_job_spec_worker_pool_specs' module GoogleInSpec module VertexAI module Property class CustomJobJobSpec attr_reader :worker_pool_specs attr_reader :enable_web_access attr_reader :tensorboard attr_reader :experiment attr_reader :experiment_run attr_reader :scheduling attr_reader :enable_dashboard_access attr_reader :service_account attr_reader :base_output_directory attr_reader :reserved_ip_ranges attr_reader :network def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @worker_pool_specs = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsArray.parse(args['workerPoolSpecs'], to_s) @enable_web_access = args['enableWebAccess'] @tensorboard = args['tensorboard'] @experiment = args['experiment'] @experiment_run = args['experimentRun'] @scheduling = GoogleInSpec::VertexAI::Property::CustomJobJobSpecScheduling.new(args['scheduling'], to_s) @enable_dashboard_access = args['enableDashboardAccess'] @service_account = args['serviceAccount'] @base_output_directory = GoogleInSpec::VertexAI::Property::CustomJobJobSpecBaseOutputDirectory.new(args['baseOutputDirectory'], to_s) @reserved_ip_ranges = args['reservedIpRanges'] @network = args['network'] end def to_s "#{@parent_identifier} CustomJobJobSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec_base_output_directory.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobJobSpecBaseOutputDirectory attr_reader :output_uri_prefix def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri_prefix = args['outputUriPrefix'] end def to_s "#{@parent_identifier} CustomJobJobSpecBaseOutputDirectory" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobJobSpecScheduling attr_reader :disable_retries attr_reader :timeout attr_reader :restart_job_on_worker_restart def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disable_retries = args['disableRetries'] @timeout = args['timeout'] @restart_job_on_worker_restart = args['restartJobOnWorkerRestart'] end def to_s "#{@parent_identifier} CustomJobJobSpecScheduling" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec' require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env' require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_disk_spec' require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_machine_spec' require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_nfs_mounts' require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec' require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env' module GoogleInSpec module VertexAI module Property class CustomJobJobSpecWorkerPoolSpecs attr_reader :container_spec attr_reader :machine_spec attr_reader :replica_count attr_reader :nfs_mounts attr_reader :python_package_spec attr_reader :disk_spec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @container_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsContainerSpec.new(args['containerSpec'], to_s) @machine_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsMachineSpec.new(args['machineSpec'], to_s) @replica_count = args['replicaCount'] @nfs_mounts = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsNfsMountsArray.parse(args['nfsMounts'], to_s) @python_package_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsPythonPackageSpec.new(args['pythonPackageSpec'], to_s) @disk_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsDiskSpec.new(args['diskSpec'], to_s) end def to_s "#{@parent_identifier} CustomJobJobSpecWorkerPoolSpecs" end end class CustomJobJobSpecWorkerPoolSpecsArray def self.parse(value, parent_identifier) return if value.nil? return CustomJobJobSpecWorkerPoolSpecs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| CustomJobJobSpecWorkerPoolSpecs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env' module GoogleInSpec module VertexAI module Property class CustomJobJobSpecWorkerPoolSpecsContainerSpec attr_reader :env attr_reader :args attr_reader :command attr_reader :image_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @env = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsContainerSpecEnvArray.parse(args['env'], to_s) @args = args['args'] @command = args['command'] @image_uri = args['imageUri'] end def to_s "#{@parent_identifier} CustomJobJobSpecWorkerPoolSpecsContainerSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobJobSpecWorkerPoolSpecsContainerSpecEnv attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} CustomJobJobSpecWorkerPoolSpecsContainerSpecEnv" end end class CustomJobJobSpecWorkerPoolSpecsContainerSpecEnvArray def self.parse(value, parent_identifier) return if value.nil? return CustomJobJobSpecWorkerPoolSpecsContainerSpecEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| CustomJobJobSpecWorkerPoolSpecsContainerSpecEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_disk_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobJobSpecWorkerPoolSpecsDiskSpec attr_reader :boot_disk_type attr_reader :boot_disk_size_gb def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @boot_disk_type = args['bootDiskType'] @boot_disk_size_gb = args['bootDiskSizeGb'] end def to_s "#{@parent_identifier} CustomJobJobSpecWorkerPoolSpecsDiskSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_machine_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobJobSpecWorkerPoolSpecsMachineSpec attr_reader :accelerator_type attr_reader :machine_type attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @machine_type = args['machineType'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} CustomJobJobSpecWorkerPoolSpecsMachineSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_nfs_mounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobJobSpecWorkerPoolSpecsNfsMounts attr_reader :path attr_reader :mount_point attr_reader :server def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] @mount_point = args['mountPoint'] @server = args['server'] end def to_s "#{@parent_identifier} CustomJobJobSpecWorkerPoolSpecsNfsMounts" end end class CustomJobJobSpecWorkerPoolSpecsNfsMountsArray def self.parse(value, parent_identifier) return if value.nil? return CustomJobJobSpecWorkerPoolSpecsNfsMounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| CustomJobJobSpecWorkerPoolSpecsNfsMounts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env' module GoogleInSpec module VertexAI module Property class CustomJobJobSpecWorkerPoolSpecsPythonPackageSpec attr_reader :package_uris attr_reader :env attr_reader :executor_image_uri attr_reader :args attr_reader :python_module def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @package_uris = args['packageUris'] @env = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray.parse(args['env'], to_s) @executor_image_uri = args['executorImageUri'] @args = args['args'] @python_module = args['pythonModule'] end def to_s "#{@parent_identifier} CustomJobJobSpecWorkerPoolSpecsPythonPackageSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobJobSpecWorkerPoolSpecsPythonPackageSpecEnv attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} CustomJobJobSpecWorkerPoolSpecsPythonPackageSpecEnv" end end class CustomJobJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray def self.parse(value, parent_identifier) return if value.nil? return CustomJobJobSpecWorkerPoolSpecsPythonPackageSpecEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| CustomJobJobSpecWorkerPoolSpecsPythonPackageSpecEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} CustomJobLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/customjob_web_access_uris.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class CustomJobWebAccessUris attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} CustomJobWebAccessUris" end end end end end ================================================ FILE: libraries/google/vertexai/property/dataset_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class DatasetEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} DatasetEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/dataset_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class DatasetLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} DatasetLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/dataset_saved_queries.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class DatasetSavedQueries attr_reader :annotation_spec_count attr_reader :update_time attr_reader :support_automl_training attr_reader :metadata attr_reader :problem_type attr_reader :name attr_reader :create_time attr_reader :etag attr_reader :display_name attr_reader :annotation_filter def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @annotation_spec_count = args['annotationSpecCount'] @update_time = args['updateTime'] @support_automl_training = args['supportAutomlTraining'] @metadata = args['metadata'] @problem_type = args['problemType'] @name = args['name'] @create_time = args['createTime'] @etag = args['etag'] @display_name = args['displayName'] @annotation_filter = args['annotationFilter'] end def to_s "#{@parent_identifier} DatasetSavedQueries" end end class DatasetSavedQueriesArray def self.parse(value, parent_identifier) return if value.nil? return DatasetSavedQueries.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| DatasetSavedQueries.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/datasetdataitemannotation_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class DatasetDataItemAnnotationLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} DatasetDataItemAnnotationLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/datasetsdataitem_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class DatasetsDataItemLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} DatasetsDataItemLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_deployed_models_automatic_resources' require 'google/vertexai/property/endpoint_deployed_models_dedicated_resources' require 'google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs' require 'google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/endpoint_dmespigabb_config' require 'google/vertexai/property/endpoint_dmespigasg_config' require 'google/vertexai/property/endpoint_dmespigasgcfn_sigma' require 'google/vertexai/property/endpoint_dmespigasgcfnsn_sigma' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/endpoint_dmespxasgcfn_sigma' require 'google/vertexai/property/endpoint_dmespxasgcfnsn_sigma' require 'google/vertexai/property/endpoint_deployed_models_private_endpoints' module GoogleInSpec module VertexAI module Property class EndpointDeployedModels attr_reader :create_time attr_reader :private_endpoints attr_reader :disable_container_logging attr_reader :model_version_id attr_reader :explanation_spec attr_reader :enable_access_logging attr_reader :service_account attr_reader :dedicated_resources attr_reader :automatic_resources attr_reader :display_name attr_reader :model attr_reader :id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @create_time = args['createTime'] @private_endpoints = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsPrivateEndpoints.new(args['privateEndpoints'], to_s) @disable_container_logging = args['disableContainerLogging'] @model_version_id = args['modelVersionId'] @explanation_spec = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpec.new(args['explanationSpec'], to_s) @enable_access_logging = args['enableAccessLogging'] @service_account = args['serviceAccount'] @dedicated_resources = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsDedicatedResources.new(args['dedicatedResources'], to_s) @automatic_resources = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsAutomaticResources.new(args['automaticResources'], to_s) @display_name = args['displayName'] @model = args['model'] @id = args['id'] end def to_s "#{@parent_identifier} EndpointDeployedModels" end end class EndpointDeployedModelsArray def self.parse(value, parent_identifier) return if value.nil? return EndpointDeployedModels.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| EndpointDeployedModels.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_automatic_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsAutomaticResources attr_reader :max_replica_count attr_reader :min_replica_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_replica_count = args['maxReplicaCount'] @min_replica_count = args['minReplicaCount'] end def to_s "#{@parent_identifier} EndpointDeployedModelsAutomaticResources" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs' require 'google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsDedicatedResources attr_reader :machine_spec attr_reader :max_replica_count attr_reader :autoscaling_metric_specs attr_reader :min_replica_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_spec = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsDedicatedResourcesMachineSpec.new(args['machineSpec'], to_s) @max_replica_count = args['maxReplicaCount'] @autoscaling_metric_specs = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsDedicatedResourcesAutoscalingMetricSpecsArray.parse(args['autoscalingMetricSpecs'], to_s) @min_replica_count = args['minReplicaCount'] end def to_s "#{@parent_identifier} EndpointDeployedModelsDedicatedResources" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsDedicatedResourcesAutoscalingMetricSpecs attr_reader :target attr_reader :metric_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @target = args['target'] @metric_name = args['metricName'] end def to_s "#{@parent_identifier} EndpointDeployedModelsDedicatedResourcesAutoscalingMetricSpecs" end end class EndpointDeployedModelsDedicatedResourcesAutoscalingMetricSpecsArray def self.parse(value, parent_identifier) return if value.nil? return EndpointDeployedModelsDedicatedResourcesAutoscalingMetricSpecs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| EndpointDeployedModelsDedicatedResourcesAutoscalingMetricSpecs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsDedicatedResourcesMachineSpec attr_reader :accelerator_type attr_reader :machine_type attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @machine_type = args['machineType'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} EndpointDeployedModelsDedicatedResourcesMachineSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/endpoint_dmespigabb_config' require 'google/vertexai/property/endpoint_dmespigasg_config' require 'google/vertexai/property/endpoint_dmespigasgcfn_sigma' require 'google/vertexai/property/endpoint_dmespigasgcfnsn_sigma' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/endpoint_dmespxasgcfn_sigma' require 'google/vertexai/property/endpoint_dmespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpec attr_reader :parameters attr_reader :metadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @parameters = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParameters.new(args['parameters'], to_s) @metadata = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecMetadata.new(args['metadata'], to_s) end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecMetadata attr_reader :feature_attributions_schema_uri attr_reader :latent_space_source attr_reader :outputs attr_reader :inputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] @latent_space_source = args['latentSpaceSource'] @outputs = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecMetadataOutputs.new(args['outputs'], to_s) @inputs = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecMetadataInputs.new(args['inputs'], to_s) end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecMetadataInputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecMetadataInputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecMetadataOutputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecMetadataOutputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/endpoint_dmespigabb_config' require 'google/vertexai/property/endpoint_dmespigasg_config' require 'google/vertexai/property/endpoint_dmespigasgcfn_sigma' require 'google/vertexai/property/endpoint_dmespigasgcfnsn_sigma' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/endpoint_dmespxasgcfn_sigma' require 'google/vertexai/property/endpoint_dmespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParameters attr_reader :output_indices attr_reader :examples attr_reader :xrai_attribution attr_reader :top_k attr_reader :integrated_gradients_attribution attr_reader :sampled_shapley_attribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_indices = args['outputIndices'] @examples = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamples.new(args['examples'], to_s) @xrai_attribution = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttribution.new(args['xraiAttribution'], to_s) @top_k = args['topK'] @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttribution.new(args['integratedGradientsAttribution'], to_s) @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersSampledShapleyAttribution.new(args['sampledShapleyAttribution'], to_s) end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParameters" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersExamples attr_reader :presets attr_reader :neighbor_count attr_reader :example_gcs_source attr_reader :nearest_neighbor_search_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @presets = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamplesPresets.new(args['presets'], to_s) @neighbor_count = args['neighborCount'] @example_gcs_source = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSource.new(args['exampleGcsSource'], to_s) @nearest_neighbor_search_config = args['nearestNeighborSearchConfig'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersExamples" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSource attr_reader :gcs_source attr_reader :data_format def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gcs_source = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args['gcsSource'], to_s) @data_format = args['dataFormat'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSourceGcsSource attr_reader :uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @uris = args['uris'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSourceGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersExamplesPresets attr_reader :modality attr_reader :query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @modality = args['modality'] @query = args['query'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersExamplesPresets" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_dmespigabb_config' require 'google/vertexai/property/endpoint_dmespigasg_config' require 'google/vertexai/property/endpoint_dmespigasgcfn_sigma' require 'google/vertexai/property/endpoint_dmespigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttribution attr_reader :step_count attr_reader :smooth_grad_config attr_reader :blur_baseline_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @step_count = args['stepCount'] @smooth_grad_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) @blur_baseline_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersSampledShapleyAttribution attr_reader :path_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_count = args['pathCount'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersSampledShapleyAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/endpoint_dmespxasgcfn_sigma' require 'google/vertexai/property/endpoint_dmespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersXraiAttribution attr_reader :smooth_grad_config attr_reader :step_count attr_reader :blur_baseline_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @smooth_grad_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) @step_count = args['stepCount'] @blur_baseline_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersXraiAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersXraiAttributionBlurBaselineConfig attr_reader :max_blur_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_blur_sigma = args['maxBlurSigma'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersXraiAttributionBlurBaselineConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_dmespxasgcfn_sigma' require 'google/vertexai/property/endpoint_dmespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfig attr_reader :feature_noise_sigma attr_reader :noise_sigma attr_reader :noisy_sample_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) @noise_sigma = args['noiseSigma'] @noisy_sample_count = args['noisySampleCount'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_deployed_models_private_endpoints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsPrivateEndpoints attr_reader :health_http_uri attr_reader :explain_http_uri attr_reader :predict_http_uri attr_reader :service_attachment def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @health_http_uri = args['healthHttpUri'] @explain_http_uri = args['explainHttpUri'] @predict_http_uri = args['predictHttpUri'] @service_attachment = args['serviceAttachment'] end def to_s "#{@parent_identifier} EndpointDeployedModelsPrivateEndpoints" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_dmespigabb_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig attr_reader :max_blur_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_blur_sigma = args['maxBlurSigma'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_dmespigasg_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_dmespigasgcfn_sigma' require 'google/vertexai/property/endpoint_dmespigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig attr_reader :feature_noise_sigma attr_reader :noise_sigma attr_reader :noisy_sample_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) @noise_sigma = args['noiseSigma'] @noisy_sample_count = args['noisySampleCount'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_dmespigasgcfn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_dmespigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma attr_reader :noise_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_dmespigasgcfnsn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma attr_reader :name attr_reader :sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @sigma = args['sigma'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma" end end class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray def self.parse(value, parent_identifier) return if value.nil? return EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_dmespxasgcfn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_dmespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma attr_reader :noise_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_dmespxasgcfnsn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma attr_reader :name attr_reader :sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @sigma = args['sigma'] end def to_s "#{@parent_identifier} EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma" end end class EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray def self.parse(value, parent_identifier) return if value.nil? return EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} EndpointEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} EndpointLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_predict_request_response_logging_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination' module GoogleInSpec module VertexAI module Property class EndpointPredictRequestResponseLoggingConfig attr_reader :sampling_rate attr_reader :enabled attr_reader :bigquery_destination def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @sampling_rate = args['samplingRate'] @enabled = args['enabled'] @bigquery_destination = GoogleInSpec::VertexAI::Property::EndpointPredictRequestResponseLoggingConfigBigqueryDestination.new(args['bigqueryDestination'], to_s) end def to_s "#{@parent_identifier} EndpointPredictRequestResponseLoggingConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointPredictRequestResponseLoggingConfigBigqueryDestination attr_reader :output_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri = args['outputUri'] end def to_s "#{@parent_identifier} EndpointPredictRequestResponseLoggingConfigBigqueryDestination" end end end end end ================================================ FILE: libraries/google/vertexai/property/endpoint_traffic_split.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class EndpointTrafficSplit attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} EndpointTrafficSplit" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestore_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class FeaturestoreEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} FeaturestoreEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestore_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class FeaturestoreLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} FeaturestoreLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestore_online_serving_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/featurestore_online_serving_config_scaling' module GoogleInSpec module VertexAI module Property class FeaturestoreOnlineServingConfig attr_reader :fixed_node_count attr_reader :scaling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fixed_node_count = args['fixedNodeCount'] @scaling = GoogleInSpec::VertexAI::Property::FeaturestoreOnlineServingConfigScaling.new(args['scaling'], to_s) end def to_s "#{@parent_identifier} FeaturestoreOnlineServingConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestore_online_serving_config_scaling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class FeaturestoreOnlineServingConfigScaling attr_reader :max_node_count attr_reader :min_node_count attr_reader :cpu_utilization_target def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_node_count = args['maxNodeCount'] @min_node_count = args['minNodeCount'] @cpu_utilization_target = args['cpuUtilizationTarget'] end def to_s "#{@parent_identifier} FeaturestoreOnlineServingConfigScaling" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestoreentitytypefeature_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class FeaturestoreEntityTypeFeatureLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} FeaturestoreEntityTypeFeatureLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestoresentitytype_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class FeaturestoresEntityTypeLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} FeaturestoresEntityTypeLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestoresentitytype_monitoring_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config' require 'google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis' require 'google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config' require 'google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis' module GoogleInSpec module VertexAI module Property class FeaturestoresEntityTypeMonitoringConfig attr_reader :import_features_analysis attr_reader :numerical_threshold_config attr_reader :categorical_threshold_config attr_reader :snapshot_analysis def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @import_features_analysis = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigImportFeaturesAnalysis.new(args['importFeaturesAnalysis'], to_s) @numerical_threshold_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigNumericalThresholdConfig.new(args['numericalThresholdConfig'], to_s) @categorical_threshold_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigCategoricalThresholdConfig.new(args['categoricalThresholdConfig'], to_s) @snapshot_analysis = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigSnapshotAnalysis.new(args['snapshotAnalysis'], to_s) end def to_s "#{@parent_identifier} FeaturestoresEntityTypeMonitoringConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class FeaturestoresEntityTypeMonitoringConfigCategoricalThresholdConfig attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @value = args['value'] end def to_s "#{@parent_identifier} FeaturestoresEntityTypeMonitoringConfigCategoricalThresholdConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class FeaturestoresEntityTypeMonitoringConfigImportFeaturesAnalysis attr_reader :anomaly_detection_baseline attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @anomaly_detection_baseline = args['anomalyDetectionBaseline'] @state = args['state'] end def to_s "#{@parent_identifier} FeaturestoresEntityTypeMonitoringConfigImportFeaturesAnalysis" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class FeaturestoresEntityTypeMonitoringConfigNumericalThresholdConfig attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @value = args['value'] end def to_s "#{@parent_identifier} FeaturestoresEntityTypeMonitoringConfigNumericalThresholdConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class FeaturestoresEntityTypeMonitoringConfigSnapshotAnalysis attr_reader :monitoring_interval_days attr_reader :staleness_days attr_reader :disabled def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @monitoring_interval_days = args['monitoringIntervalDays'] @staleness_days = args['stalenessDays'] @disabled = args['disabled'] end def to_s "#{@parent_identifier} FeaturestoresEntityTypeMonitoringConfigSnapshotAnalysis" end end end end end ================================================ FILE: libraries/google/vertexai/property/hyperparametertuningjob_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class HyperparameterTuningJobLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} HyperparameterTuningJobLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/index_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class IndexLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} IndexLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/indexendpoint_deployed_indexes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/indexendpoint_deployed_indexes_automatic_resources' require 'google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources' require 'google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs' require 'google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec' require 'google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config' require 'google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider' require 'google/vertexai/property/indexendpoint_deployed_indexes_private_endpoints' module GoogleInSpec module VertexAI module Property class IndexEndpointDeployedIndexes attr_reader :private_endpoints attr_reader :deployment_group attr_reader :dedicated_resources attr_reader :deployed_index_auth_config attr_reader :id attr_reader :index_sync_time attr_reader :automatic_resources attr_reader :enable_access_logging attr_reader :create_time attr_reader :reserved_ip_ranges attr_reader :index attr_reader :display_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @private_endpoints = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesPrivateEndpoints.new(args['privateEndpoints'], to_s) @deployment_group = args['deploymentGroup'] @dedicated_resources = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDedicatedResources.new(args['dedicatedResources'], to_s) @deployed_index_auth_config = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDeployedIndexAuthConfig.new(args['deployedIndexAuthConfig'], to_s) @id = args['id'] @index_sync_time = args['indexSyncTime'] @automatic_resources = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesAutomaticResources.new(args['automaticResources'], to_s) @enable_access_logging = args['enableAccessLogging'] @create_time = args['createTime'] @reserved_ip_ranges = args['reservedIpRanges'] @index = args['index'] @display_name = args['displayName'] end def to_s "#{@parent_identifier} IndexEndpointDeployedIndexes" end end class IndexEndpointDeployedIndexesArray def self.parse(value, parent_identifier) return if value.nil? return IndexEndpointDeployedIndexes.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| IndexEndpointDeployedIndexes.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/indexendpoint_deployed_indexes_automatic_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class IndexEndpointDeployedIndexesAutomaticResources attr_reader :max_replica_count attr_reader :min_replica_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_replica_count = args['maxReplicaCount'] @min_replica_count = args['minReplicaCount'] end def to_s "#{@parent_identifier} IndexEndpointDeployedIndexesAutomaticResources" end end end end end ================================================ FILE: libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs' require 'google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec' module GoogleInSpec module VertexAI module Property class IndexEndpointDeployedIndexesDedicatedResources attr_reader :machine_spec attr_reader :max_replica_count attr_reader :autoscaling_metric_specs attr_reader :min_replica_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @machine_spec = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDedicatedResourcesMachineSpec.new(args['machineSpec'], to_s) @max_replica_count = args['maxReplicaCount'] @autoscaling_metric_specs = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDedicatedResourcesAutoscalingMetricSpecsArray.parse(args['autoscalingMetricSpecs'], to_s) @min_replica_count = args['minReplicaCount'] end def to_s "#{@parent_identifier} IndexEndpointDeployedIndexesDedicatedResources" end end end end end ================================================ FILE: libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class IndexEndpointDeployedIndexesDedicatedResourcesAutoscalingMetricSpecs attr_reader :target attr_reader :metric_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @target = args['target'] @metric_name = args['metricName'] end def to_s "#{@parent_identifier} IndexEndpointDeployedIndexesDedicatedResourcesAutoscalingMetricSpecs" end end class IndexEndpointDeployedIndexesDedicatedResourcesAutoscalingMetricSpecsArray def self.parse(value, parent_identifier) return if value.nil? return IndexEndpointDeployedIndexesDedicatedResourcesAutoscalingMetricSpecs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| IndexEndpointDeployedIndexesDedicatedResourcesAutoscalingMetricSpecs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class IndexEndpointDeployedIndexesDedicatedResourcesMachineSpec attr_reader :accelerator_type attr_reader :machine_type attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @machine_type = args['machineType'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} IndexEndpointDeployedIndexesDedicatedResourcesMachineSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider' module GoogleInSpec module VertexAI module Property class IndexEndpointDeployedIndexesDeployedIndexAuthConfig attr_reader :auth_provider def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @auth_provider = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDeployedIndexAuthConfigAuthProvider.new(args['authProvider'], to_s) end def to_s "#{@parent_identifier} IndexEndpointDeployedIndexesDeployedIndexAuthConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class IndexEndpointDeployedIndexesDeployedIndexAuthConfigAuthProvider attr_reader :audiences attr_reader :allowed_issuers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @audiences = args['audiences'] @allowed_issuers = args['allowedIssuers'] end def to_s "#{@parent_identifier} IndexEndpointDeployedIndexesDeployedIndexAuthConfigAuthProvider" end end end end end ================================================ FILE: libraries/google/vertexai/property/indexendpoint_deployed_indexes_private_endpoints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class IndexEndpointDeployedIndexesPrivateEndpoints attr_reader :service_attachment attr_reader :match_grpc_address def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @service_attachment = args['serviceAttachment'] @match_grpc_address = args['matchGrpcAddress'] end def to_s "#{@parent_identifier} IndexEndpointDeployedIndexesPrivateEndpoints" end end end end end ================================================ FILE: libraries/google/vertexai/property/indexendpoint_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class IndexEndpointLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} IndexEndpointLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/indexendpoint_private_service_connect_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class IndexEndpointPrivateServiceConnectConfig attr_reader :project_allowlist attr_reader :enable_private_service_connect def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @project_allowlist = args['projectAllowlist'] @enable_private_service_connect = args['enablePrivateServiceConnect'] end def to_s "#{@parent_identifier} IndexEndpointPrivateServiceConnectConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/metadatastore_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class MetadataStoreEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} MetadataStoreEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/metadatastore_state.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class MetadataStoreState attr_reader :disk_utilization_bytes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disk_utilization_bytes = args['diskUtilizationBytes'] end def to_s "#{@parent_identifier} MetadataStoreState" end end end end end ================================================ FILE: libraries/google/vertexai/property/metadatastoresartifact_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class MetadataStoresArtifactLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MetadataStoresArtifactLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/metadatastoresartifact_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class MetadataStoresArtifactMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MetadataStoresArtifactMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/metadatastorescontext_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class MetadataStoresContextLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MetadataStoresContextLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/metadatastorescontext_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class MetadataStoresContextMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MetadataStoresContextMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/metadatastoresexecution_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class MetadataStoresExecutionLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MetadataStoresExecutionLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/metadatastoresexecution_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class MetadataStoresExecutionMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} MetadataStoresExecutionMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_container_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_container_spec_env' require 'google/vertexai/property/model_container_spec_ports' module GoogleInSpec module VertexAI module Property class ModelContainerSpec attr_reader :predict_route attr_reader :image_uri attr_reader :env attr_reader :args attr_reader :command attr_reader :ports attr_reader :health_route def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @predict_route = args['predictRoute'] @image_uri = args['imageUri'] @env = GoogleInSpec::VertexAI::Property::ModelContainerSpecEnvArray.parse(args['env'], to_s) @args = args['args'] @command = args['command'] @ports = GoogleInSpec::VertexAI::Property::ModelContainerSpecPortsArray.parse(args['ports'], to_s) @health_route = args['healthRoute'] end def to_s "#{@parent_identifier} ModelContainerSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_container_spec_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelContainerSpecEnv attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} ModelContainerSpecEnv" end end class ModelContainerSpecEnvArray def self.parse(value, parent_identifier) return if value.nil? return ModelContainerSpecEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelContainerSpecEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/model_container_spec_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelContainerSpecPorts attr_reader :container_port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @container_port = args['containerPort'] end def to_s "#{@parent_identifier} ModelContainerSpecPorts" end end class ModelContainerSpecPortsArray def self.parse(value, parent_identifier) return if value.nil? return ModelContainerSpecPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelContainerSpecPorts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/model_deployed_models.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeployedModels attr_reader :deployed_model_id attr_reader :endpoint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @deployed_model_id = args['deployedModelId'] @endpoint = args['endpoint'] end def to_s "#{@parent_identifier} ModelDeployedModels" end end class ModelDeployedModelsArray def self.parse(value, parent_identifier) return if value.nil? return ModelDeployedModels.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelDeployedModels.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/model_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} ModelEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_espigasgcfn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_espigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma attr_reader :noise_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) end def to_s "#{@parent_identifier} ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_espigasgcfnsn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma attr_reader :name attr_reader :sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @sigma = args['sigma'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma" end end class ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray def self.parse(value, parent_identifier) return if value.nil? return ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/model_espxasgcfnsn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma attr_reader :name attr_reader :sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @sigma = args['sigma'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma" end end class ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray def self.parse(value, parent_identifier) return if value.nil? return ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_explanation_spec_metadata' require 'google/vertexai/property/model_explanation_spec_metadata_inputs' require 'google/vertexai/property/model_explanation_spec_metadata_outputs' require 'google/vertexai/property/model_explanation_spec_parameters' require 'google/vertexai/property/model_explanation_spec_parameters_examples' require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/model_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' require 'google/vertexai/property/model_espigasgcfn_sigma' require 'google/vertexai/property/model_espigasgcfnsn_sigma' require 'google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' require 'google/vertexai/property/model_espxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelExplanationSpec attr_reader :parameters attr_reader :metadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @parameters = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParameters.new(args['parameters'], to_s) @metadata = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadata.new(args['metadata'], to_s) end def to_s "#{@parent_identifier} ModelExplanationSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_explanation_spec_metadata_inputs' require 'google/vertexai/property/model_explanation_spec_metadata_outputs' module GoogleInSpec module VertexAI module Property class ModelExplanationSpecMetadata attr_reader :feature_attributions_schema_uri attr_reader :latent_space_source attr_reader :outputs attr_reader :inputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] @latent_space_source = args['latentSpaceSource'] @outputs = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadataOutputs.new(args['outputs'], to_s) @inputs = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadataInputs.new(args['inputs'], to_s) end def to_s "#{@parent_identifier} ModelExplanationSpecMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_metadata_inputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelExplanationSpecMetadataInputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelExplanationSpecMetadataInputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_metadata_outputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelExplanationSpecMetadataOutputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelExplanationSpecMetadataOutputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_explanation_spec_parameters_examples' require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/model_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' require 'google/vertexai/property/model_espigasgcfn_sigma' require 'google/vertexai/property/model_espigasgcfnsn_sigma' require 'google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' require 'google/vertexai/property/model_espxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParameters attr_reader :output_indices attr_reader :examples attr_reader :xrai_attribution attr_reader :top_k attr_reader :integrated_gradients_attribution attr_reader :sampled_shapley_attribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_indices = args['outputIndices'] @examples = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamples.new(args['examples'], to_s) @xrai_attribution = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttribution.new(args['xraiAttribution'], to_s) @top_k = args['topK'] @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttribution.new(args['integratedGradientsAttribution'], to_s) @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersSampledShapleyAttribution.new(args['sampledShapleyAttribution'], to_s) end def to_s "#{@parent_identifier} ModelExplanationSpecParameters" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_examples.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/model_explanation_spec_parameters_examples_presets' module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersExamples attr_reader :presets attr_reader :neighbor_count attr_reader :example_gcs_source attr_reader :nearest_neighbor_search_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @presets = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamplesPresets.new(args['presets'], to_s) @neighbor_count = args['neighborCount'] @example_gcs_source = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamplesExampleGcsSource.new(args['exampleGcsSource'], to_s) @nearest_neighbor_search_config = args['nearestNeighborSearchConfig'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersExamples" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersExamplesExampleGcsSource attr_reader :gcs_source attr_reader :data_format def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gcs_source = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args['gcsSource'], to_s) @data_format = args['dataFormat'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersExamplesExampleGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersExamplesExampleGcsSourceGcsSource attr_reader :uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @uris = args['uris'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersExamplesExampleGcsSourceGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_examples_presets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersExamplesPresets attr_reader :modality attr_reader :query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @modality = args['modality'] @query = args['query'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersExamplesPresets" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' require 'google/vertexai/property/model_espigasgcfn_sigma' require 'google/vertexai/property/model_espigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersIntegratedGradientsAttribution attr_reader :step_count attr_reader :smooth_grad_config attr_reader :blur_baseline_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @step_count = args['stepCount'] @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) end def to_s "#{@parent_identifier} ModelExplanationSpecParametersIntegratedGradientsAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig attr_reader :max_blur_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_blur_sigma = args['maxBlurSigma'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_espigasgcfn_sigma' require 'google/vertexai/property/model_espigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig attr_reader :feature_noise_sigma attr_reader :noise_sigma attr_reader :noisy_sample_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) @noise_sigma = args['noiseSigma'] @noisy_sample_count = args['noisySampleCount'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersSampledShapleyAttribution attr_reader :path_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_count = args['pathCount'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersSampledShapleyAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' require 'google/vertexai/property/model_espxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersXraiAttribution attr_reader :smooth_grad_config attr_reader :step_count attr_reader :blur_baseline_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) @step_count = args['stepCount'] @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) end def to_s "#{@parent_identifier} ModelExplanationSpecParametersXraiAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersXraiAttributionBlurBaselineConfig attr_reader :max_blur_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_blur_sigma = args['maxBlurSigma'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersXraiAttributionBlurBaselineConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' require 'google/vertexai/property/model_espxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersXraiAttributionSmoothGradConfig attr_reader :feature_noise_sigma attr_reader :noise_sigma attr_reader :noisy_sample_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) @noise_sigma = args['noiseSigma'] @noisy_sample_count = args['noisySampleCount'] end def to_s "#{@parent_identifier} ModelExplanationSpecParametersXraiAttributionSmoothGradConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/model_espxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma attr_reader :noise_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) end def to_s "#{@parent_identifier} ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_model_source_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelModelSourceInfo attr_reader :copy attr_reader :source_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @copy = args['copy'] @source_type = args['sourceType'] end def to_s "#{@parent_identifier} ModelModelSourceInfo" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_original_model_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelOriginalModelInfo attr_reader :model def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @model = args['model'] end def to_s "#{@parent_identifier} ModelOriginalModelInfo" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_predict_schemata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelPredictSchemata attr_reader :instance_schema_uri attr_reader :parameters_schema_uri attr_reader :prediction_schema_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_schema_uri = args['instanceSchemaUri'] @parameters_schema_uri = args['parametersSchemaUri'] @prediction_schema_uri = args['predictionSchemaUri'] end def to_s "#{@parent_identifier} ModelPredictSchemata" end end end end end ================================================ FILE: libraries/google/vertexai/property/model_supported_export_formats.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelSupportedExportFormats attr_reader :exportable_contents attr_reader :id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @exportable_contents = args['exportableContents'] @id = args['id'] end def to_s "#{@parent_identifier} ModelSupportedExportFormats" end end class ModelSupportedExportFormatsArray def self.parse(value, parent_identifier) return if value.nil? return ModelSupportedExportFormats.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelSupportedExportFormats.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_bigquery_tables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobBigqueryTables attr_reader :log_source attr_reader :bigquery_table_path attr_reader :log_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @log_source = args['logSource'] @bigquery_table_path = args['bigqueryTablePath'] @log_type = args['logType'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobBigqueryTables" end end class ModelDeploymentMonitoringJobBigqueryTablesArray def self.parse(value, parent_identifier) return if value.nil? return ModelDeploymentMonitoringJobBigqueryTables.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelDeploymentMonitoringJobBigqueryTables.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobError" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadata attr_reader :status attr_reader :run_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @status = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadataStatus.new(args['status'], to_s) @run_time = args['runTime'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadataStatus attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadataStatus" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobLoggingSamplingStrategy attr_reader :random_sample_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @random_sample_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLoggingSamplingStrategyRandomSampleConfig.new(args['randomSampleConfig'], to_s) end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobLoggingSamplingStrategy" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobLoggingSamplingStrategyRandomSampleConfig attr_reader :sample_rate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @sample_rate = args['sampleRate'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobLoggingSamplingStrategyRandomSampleConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococe_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococece_baseline' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococeceb_bigquery' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococeceb_gcs' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfig attr_reader :explanation_baseline attr_reader :enable_feature_attributes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @explanation_baseline = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaseline.new(args['explanationBaseline'], to_s) @enable_feature_attributes = args['enableFeatureAttributes'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococece_baseline.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococeceb_bigquery' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococeceb_gcs' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaseline attr_reader :prediction_format attr_reader :gcs attr_reader :bigquery def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @prediction_format = args['predictionFormat'] @gcs = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaselineGcs.new(args['gcs'], to_s) @bigquery = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaselineBigquery.new(args['bigquery'], to_s) end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaseline" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococeceb_bigquery.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaselineBigquery attr_reader :output_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri = args['outputUri'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaselineBigquery" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococeceb_gcs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaselineGcs attr_reader :output_uri_prefix def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri_prefix = args['outputUriPrefix'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaselineGcs" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococpdd_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcasd_thresholds' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcdd_threshold' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcd_thresholds' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfig attr_reader :attribution_score_drift_thresholds attr_reader :drift_thresholds attr_reader :default_drift_threshold def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @attribution_score_drift_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigAttributionScoreDriftThresholds.new(args['attributionScoreDriftThresholds'], to_s) @drift_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigDriftThresholds.new(args['driftThresholds'], to_s) @default_drift_threshold = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigDefaultDriftThreshold.new(args['defaultDriftThreshold'], to_s) end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcasd_thresholds.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigAttributionScoreDriftThresholds attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigAttributionScoreDriftThresholds" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcd_thresholds.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigDriftThresholds attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigDriftThresholds" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcdd_threshold.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigDefaultDriftThreshold attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @value = args['value'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigDefaultDriftThreshold" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococt_dataset.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdb_source' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdg_source' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdls_strategy' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdlssrs_config' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDataset attr_reader :logging_sampling_strategy attr_reader :dataset attr_reader :gcs_source attr_reader :target_field attr_reader :bigquery_source attr_reader :data_format def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @logging_sampling_strategy = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetLoggingSamplingStrategy.new(args['loggingSamplingStrategy'], to_s) @dataset = args['dataset'] @gcs_source = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetGcsSource.new(args['gcsSource'], to_s) @target_field = args['targetField'] @bigquery_source = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetBigquerySource.new(args['bigquerySource'], to_s) @data_format = args['dataFormat'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDataset" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdb_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetBigquerySource attr_reader :input_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @input_uri = args['inputUri'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetBigquerySource" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdg_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetGcsSource attr_reader :uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @uris = args['uris'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdls_strategy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdlssrs_config' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetLoggingSamplingStrategy attr_reader :random_sample_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @random_sample_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetLoggingSamplingStrategyRandomSampleConfig.new(args['randomSampleConfig'], to_s) end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetLoggingSamplingStrategy" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdlssrs_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetLoggingSamplingStrategyRandomSampleConfig attr_reader :sample_rate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @sample_rate = args['sampleRate'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetLoggingSamplingStrategyRandomSampleConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsd_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcass_thresholds' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcds_threshold' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcs_thresholds' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfig attr_reader :skew_thresholds attr_reader :default_skew_threshold attr_reader :attribution_score_skew_thresholds def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @skew_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigSkewThresholds.new(args['skewThresholds'], to_s) @default_skew_threshold = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigDefaultSkewThreshold.new(args['defaultSkewThreshold'], to_s) @attribution_score_skew_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigAttributionScoreSkewThresholds.new(args['attributionScoreSkewThresholds'], to_s) end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcass_thresholds.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigAttributionScoreSkewThresholds attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigAttributionScoreSkewThresholds" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcds_threshold.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigDefaultSkewThreshold attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @value = args['value'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigDefaultSkewThreshold" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcs_thresholds.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigSkewThresholds attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigSkewThresholds" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococe_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococece_baseline' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococeceb_bigquery' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococeceb_gcs' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpdd_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcasd_thresholds' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcdd_threshold' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcd_thresholds' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococt_dataset' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdb_source' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdg_source' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdls_strategy' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdlssrs_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsd_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcass_thresholds' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcds_threshold' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcs_thresholds' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigs attr_reader :objective_config attr_reader :deployed_model_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @objective_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfig.new(args['objectiveConfig'], to_s) @deployed_model_id = args['deployedModelId'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigs" end end class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsArray def self.parse(value, parent_identifier) return if value.nil? return ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococe_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococece_baseline' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococeceb_bigquery' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococeceb_gcs' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpdd_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcasd_thresholds' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcdd_threshold' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococpddcd_thresholds' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococt_dataset' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdb_source' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdg_source' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdls_strategy' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtdlssrs_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsd_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcass_thresholds' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcds_threshold' require 'google/vertexai/property/modeldeploymentmonitoringjob_mdmococtpsdcs_thresholds' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfig attr_reader :explanation_config attr_reader :training_dataset attr_reader :training_prediction_skew_detection_config attr_reader :prediction_drift_detection_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @explanation_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfig.new(args['explanationConfig'], to_s) @training_dataset = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDataset.new(args['trainingDataset'], to_s) @training_prediction_skew_detection_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfig.new(args['trainingPredictionSkewDetectionConfig'], to_s) @prediction_drift_detection_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfig.new(args['predictionDriftDetectionConfig'], to_s) end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_schedule_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelDeploymentMonitoringScheduleConfig attr_reader :monitor_window attr_reader :monitor_interval def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @monitor_window = args['monitorWindow'] @monitor_interval = args['monitorInterval'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelDeploymentMonitoringScheduleConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config' module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelMonitoringAlertConfig attr_reader :email_alert_config attr_reader :enable_logging def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @email_alert_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelMonitoringAlertConfigEmailAlertConfig.new(args['emailAlertConfig'], to_s) @enable_logging = args['enableLogging'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelMonitoringAlertConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobModelMonitoringAlertConfigEmailAlertConfig attr_reader :user_emails def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @user_emails = args['userEmails'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobModelMonitoringAlertConfigEmailAlertConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modeldeploymentmonitoringjob_stats_anomalies_base_directory.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelDeploymentMonitoringJobStatsAnomaliesBaseDirectory attr_reader :output_uri_prefix def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri_prefix = args['outputUriPrefix'] end def to_s "#{@parent_identifier} ModelDeploymentMonitoringJobStatsAnomaliesBaseDirectory" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelevaluationslice_model_explanation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions' module GoogleInSpec module VertexAI module Property class ModelEvaluationSliceModelExplanation attr_reader :mean_attributions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @mean_attributions = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceModelExplanationMeanAttributionsArray.parse(args['meanAttributions'], to_s) end def to_s "#{@parent_identifier} ModelEvaluationSliceModelExplanation" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelEvaluationSliceModelExplanationMeanAttributions attr_reader :output_display_name attr_reader :baseline_output_value attr_reader :output_name attr_reader :feature_attributions attr_reader :output_index attr_reader :instance_output_value attr_reader :approximation_error def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_display_name = args['outputDisplayName'] @baseline_output_value = args['baselineOutputValue'] @output_name = args['outputName'] @feature_attributions = args['featureAttributions'] @output_index = args['outputIndex'] @instance_output_value = args['instanceOutputValue'] @approximation_error = args['approximationError'] end def to_s "#{@parent_identifier} ModelEvaluationSliceModelExplanationMeanAttributions" end end class ModelEvaluationSliceModelExplanationMeanAttributionsArray def self.parse(value, parent_identifier) return if value.nil? return ModelEvaluationSliceModelExplanationMeanAttributions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelEvaluationSliceModelExplanationMeanAttributions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/modelevaluationslice_slice.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelevaluationslice_slice_slice_spec' require 'google/vertexai/property/modelevaluationslice_slice_slice_spec_configs' module GoogleInSpec module VertexAI module Property class ModelEvaluationSliceSlice attr_reader :value attr_reader :dimension attr_reader :slice_spec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @value = args['value'] @dimension = args['dimension'] @slice_spec = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSliceSliceSpec.new(args['sliceSpec'], to_s) end def to_s "#{@parent_identifier} ModelEvaluationSliceSlice" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelevaluationslice_slice_slice_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelevaluationslice_slice_slice_spec_configs' module GoogleInSpec module VertexAI module Property class ModelEvaluationSliceSliceSliceSpec attr_reader :configs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @configs = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSliceSliceSpecConfigs.new(args['configs'], to_s) end def to_s "#{@parent_identifier} ModelEvaluationSliceSliceSliceSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelevaluationslice_slice_slice_spec_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelEvaluationSliceSliceSliceSpecConfigs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelEvaluationSliceSliceSliceSpecConfigs" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_esespeegsg_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGcsSourceGcsSource attr_reader :uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @uris = args['uris'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGcsSourceGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_esespigabb_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig attr_reader :max_blur_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_blur_sigma = args['maxBlurSigma'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_esespigasg_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_esespigasgcfn_sigma' require 'google/vertexai/property/modelsevaluation_esespigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig attr_reader :feature_noise_sigma attr_reader :noise_sigma attr_reader :noisy_sample_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) @noise_sigma = args['noiseSigma'] @noisy_sample_count = args['noisySampleCount'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_esespigasgcfn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_esespigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma attr_reader :noise_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_esespigasgcfnsn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma attr_reader :name attr_reader :sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @sigma = args['sigma'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma" end end class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray def self.parse(value, parent_identifier) return if value.nil? return ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_esespxabb_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionBlurBaselineConfig attr_reader :max_blur_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_blur_sigma = args['maxBlurSigma'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionBlurBaselineConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_esespxasg_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_esespxasgcfn_sigma' require 'google/vertexai/property/modelsevaluation_esespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfig attr_reader :feature_noise_sigma attr_reader :noise_sigma attr_reader :noisy_sample_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) @noise_sigma = args['noiseSigma'] @noisy_sample_count = args['noisySampleCount'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_esespxasgcfn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_esespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma attr_reader :noise_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_esespxasgcfnsn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma attr_reader :name attr_reader :sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @sigma = args['sigma'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma" end end class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray def self.parse(value, parent_identifier) return if value.nil? return ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/modelsevaluation_esespeegsg_source' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/modelsevaluation_esespigabb_config' require 'google/vertexai/property/modelsevaluation_esespigasg_config' require 'google/vertexai/property/modelsevaluation_esespigasgcfn_sigma' require 'google/vertexai/property/modelsevaluation_esespigasgcfnsn_sigma' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/modelsevaluation_esespxabb_config' require 'google/vertexai/property/modelsevaluation_esespxasg_config' require 'google/vertexai/property/modelsevaluation_esespxasgcfn_sigma' require 'google/vertexai/property/modelsevaluation_esespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecs attr_reader :explanation_spec attr_reader :explanation_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @explanation_spec = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpec.new(args['explanationSpec'], to_s) @explanation_type = args['explanationType'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecs" end end class ModelsEvaluationExplanationSpecsArray def self.parse(value, parent_identifier) return if value.nil? return ModelsEvaluationExplanationSpecs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelsEvaluationExplanationSpecs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/modelsevaluation_esespeegsg_source' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/modelsevaluation_esespigabb_config' require 'google/vertexai/property/modelsevaluation_esespigasg_config' require 'google/vertexai/property/modelsevaluation_esespigasgcfn_sigma' require 'google/vertexai/property/modelsevaluation_esespigasgcfnsn_sigma' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/modelsevaluation_esespxabb_config' require 'google/vertexai/property/modelsevaluation_esespxasg_config' require 'google/vertexai/property/modelsevaluation_esespxasgcfn_sigma' require 'google/vertexai/property/modelsevaluation_esespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpec attr_reader :parameters attr_reader :metadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @parameters = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParameters.new(args['parameters'], to_s) @metadata = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecMetadata.new(args['metadata'], to_s) end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecMetadata attr_reader :feature_attributions_schema_uri attr_reader :latent_space_source attr_reader :outputs attr_reader :inputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] @latent_space_source = args['latentSpaceSource'] @outputs = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecMetadataOutputs.new(args['outputs'], to_s) @inputs = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecMetadataInputs.new(args['inputs'], to_s) end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecMetadataInputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecMetadataInputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecMetadataOutputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecMetadataOutputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/modelsevaluation_esespeegsg_source' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/modelsevaluation_esespigabb_config' require 'google/vertexai/property/modelsevaluation_esespigasg_config' require 'google/vertexai/property/modelsevaluation_esespigasgcfn_sigma' require 'google/vertexai/property/modelsevaluation_esespigasgcfnsn_sigma' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/modelsevaluation_esespxabb_config' require 'google/vertexai/property/modelsevaluation_esespxasg_config' require 'google/vertexai/property/modelsevaluation_esespxasgcfn_sigma' require 'google/vertexai/property/modelsevaluation_esespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParameters attr_reader :output_indices attr_reader :examples attr_reader :xrai_attribution attr_reader :top_k attr_reader :integrated_gradients_attribution attr_reader :sampled_shapley_attribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_indices = args['outputIndices'] @examples = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamples.new(args['examples'], to_s) @xrai_attribution = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttribution.new(args['xraiAttribution'], to_s) @top_k = args['topK'] @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttribution.new(args['integratedGradientsAttribution'], to_s) @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersSampledShapleyAttribution.new(args['sampledShapleyAttribution'], to_s) end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParameters" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/modelsevaluation_esespeegsg_source' require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersExamples attr_reader :presets attr_reader :neighbor_count attr_reader :example_gcs_source attr_reader :nearest_neighbor_search_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @presets = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesPresets.new(args['presets'], to_s) @neighbor_count = args['neighborCount'] @example_gcs_source = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGcsSource.new(args['exampleGcsSource'], to_s) @nearest_neighbor_search_config = args['nearestNeighborSearchConfig'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersExamples" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_esespeegsg_source' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGcsSource attr_reader :gcs_source attr_reader :data_format def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gcs_source = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args['gcsSource'], to_s) @data_format = args['dataFormat'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesPresets attr_reader :modality attr_reader :query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @modality = args['modality'] @query = args['query'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesPresets" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_esespigabb_config' require 'google/vertexai/property/modelsevaluation_esespigasg_config' require 'google/vertexai/property/modelsevaluation_esespigasgcfn_sigma' require 'google/vertexai/property/modelsevaluation_esespigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttribution attr_reader :step_count attr_reader :smooth_grad_config attr_reader :blur_baseline_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @step_count = args['stepCount'] @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersSampledShapleyAttribution attr_reader :path_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_count = args['pathCount'] end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersSampledShapleyAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_esespxabb_config' require 'google/vertexai/property/modelsevaluation_esespxasg_config' require 'google/vertexai/property/modelsevaluation_esespxasgcfn_sigma' require 'google/vertexai/property/modelsevaluation_esespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttribution attr_reader :smooth_grad_config attr_reader :step_count attr_reader :blur_baseline_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) @step_count = args['stepCount'] @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) end def to_s "#{@parent_identifier} ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_model_explanation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/modelsevaluation_model_explanation_mean_attributions' module GoogleInSpec module VertexAI module Property class ModelsEvaluationModelExplanation attr_reader :mean_attributions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @mean_attributions = GoogleInSpec::VertexAI::Property::ModelsEvaluationModelExplanationMeanAttributionsArray.parse(args['meanAttributions'], to_s) end def to_s "#{@parent_identifier} ModelsEvaluationModelExplanation" end end end end end ================================================ FILE: libraries/google/vertexai/property/modelsevaluation_model_explanation_mean_attributions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ModelsEvaluationModelExplanationMeanAttributions attr_reader :output_display_name attr_reader :baseline_output_value attr_reader :output_name attr_reader :feature_attributions attr_reader :output_index attr_reader :instance_output_value attr_reader :approximation_error def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_display_name = args['outputDisplayName'] @baseline_output_value = args['baselineOutputValue'] @output_name = args['outputName'] @feature_attributions = args['featureAttributions'] @output_index = args['outputIndex'] @instance_output_value = args['instanceOutputValue'] @approximation_error = args['approximationError'] end def to_s "#{@parent_identifier} ModelsEvaluationModelExplanationMeanAttributions" end end class ModelsEvaluationModelExplanationMeanAttributionsArray def self.parse(value, parent_identifier) return if value.nil? return ModelsEvaluationModelExplanationMeanAttributions.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ModelsEvaluationModelExplanationMeanAttributions.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} NasJobEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} NasJobError" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} NasJobLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_output.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output' require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials' require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials' module GoogleInSpec module VertexAI module Property class NasJobNasJobOutput attr_reader :multi_trial_job_output def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @multi_trial_job_output = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutput.new(args['multiTrialJobOutput'], to_s) end def to_s "#{@parent_identifier} NasJobNasJobOutput" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials' require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials' module GoogleInSpec module VertexAI module Property class NasJobNasJobOutputMultiTrialJobOutput attr_reader :search_trials attr_reader :train_trials def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @search_trials = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputSearchTrialsArray.parse(args['searchTrials'], to_s) @train_trials = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputTrainTrialsArray.parse(args['trainTrials'], to_s) end def to_s "#{@parent_identifier} NasJobNasJobOutputMultiTrialJobOutput" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement' require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics' module GoogleInSpec module VertexAI module Property class NasJobNasJobOutputMultiTrialJobOutputSearchTrials attr_reader :id attr_reader :state attr_reader :final_measurement attr_reader :start_time attr_reader :end_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @id = args['id'] @state = args['state'] @final_measurement = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurement.new(args['finalMeasurement'], to_s) @start_time = args['startTime'] @end_time = args['endTime'] end def to_s "#{@parent_identifier} NasJobNasJobOutputMultiTrialJobOutputSearchTrials" end end class NasJobNasJobOutputMultiTrialJobOutputSearchTrialsArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobOutputMultiTrialJobOutputSearchTrials.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobOutputMultiTrialJobOutputSearchTrials.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics' module GoogleInSpec module VertexAI module Property class NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurement attr_reader :metrics attr_reader :elapsed_duration attr_reader :step_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metrics = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurementMetricsArray.parse(args['metrics'], to_s) @elapsed_duration = args['elapsedDuration'] @step_count = args['stepCount'] end def to_s "#{@parent_identifier} NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurement" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurementMetrics attr_reader :metric_id attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric_id = args['metricId'] @value = args['value'] end def to_s "#{@parent_identifier} NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurementMetrics" end end class NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurementMetricsArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurementMetrics.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurementMetrics.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement' require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics' module GoogleInSpec module VertexAI module Property class NasJobNasJobOutputMultiTrialJobOutputTrainTrials attr_reader :id attr_reader :state attr_reader :final_measurement attr_reader :start_time attr_reader :end_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @id = args['id'] @state = args['state'] @final_measurement = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurement.new(args['finalMeasurement'], to_s) @start_time = args['startTime'] @end_time = args['endTime'] end def to_s "#{@parent_identifier} NasJobNasJobOutputMultiTrialJobOutputTrainTrials" end end class NasJobNasJobOutputMultiTrialJobOutputTrainTrialsArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobOutputMultiTrialJobOutputTrainTrials.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobOutputMultiTrialJobOutputTrainTrials.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics' module GoogleInSpec module VertexAI module Property class NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurement attr_reader :metrics attr_reader :elapsed_duration attr_reader :step_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metrics = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurementMetricsArray.parse(args['metrics'], to_s) @elapsed_duration = args['elapsedDuration'] @step_count = args['stepCount'] end def to_s "#{@parent_identifier} NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurement" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurementMetrics attr_reader :metric_id attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric_id = args['metricId'] @value = args['value'] end def to_s "#{@parent_identifier} NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurementMetrics" end end class NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurementMetricsArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurementMetrics.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurementMetrics.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec' require 'google/vertexai/property/nasjob_njsmtasstsstjsbo_directory' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling' require 'google/vertexai/property/nasjob_njsmtasstsstjswp_specs' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec' require 'google/vertexai/property/nasjob_njsmtasttsttjsbo_directory' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling' require 'google/vertexai/property/nasjob_njsmtasttsttjswp_specs' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpec attr_reader :search_space_spec attr_reader :resume_nas_job_id attr_reader :multi_trial_algorithm_spec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @search_space_spec = args['searchSpaceSpec'] @resume_nas_job_id = args['resumeNasJobId'] @multi_trial_algorithm_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpec.new(args['multiTrialAlgorithmSpec'], to_s) end def to_s "#{@parent_identifier} NasJobNasJobSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec' require 'google/vertexai/property/nasjob_njsmtasstsstjsbo_directory' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling' require 'google/vertexai/property/nasjob_njsmtasstsstjswp_specs' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec' require 'google/vertexai/property/nasjob_njsmtasttsttjsbo_directory' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling' require 'google/vertexai/property/nasjob_njsmtasttsttjswp_specs' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpec attr_reader :search_trial_spec attr_reader :multi_trial_algorithm attr_reader :train_trial_spec attr_reader :metric def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @search_trial_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpec.new(args['searchTrialSpec'], to_s) @multi_trial_algorithm = args['multiTrialAlgorithm'] @train_trial_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpec.new(args['trainTrialSpec'], to_s) @metric = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecMetric.new(args['metric'], to_s) end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecMetric attr_reader :goal attr_reader :metric_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @goal = args['goal'] @metric_id = args['metricId'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecMetric" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec' require 'google/vertexai/property/nasjob_njsmtasstsstjsbo_directory' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling' require 'google/vertexai/property/nasjob_njsmtasstsstjswp_specs' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpec attr_reader :max_failed_trial_count attr_reader :max_parallel_trial_count attr_reader :search_trial_job_spec attr_reader :max_trial_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_failed_trial_count = args['maxFailedTrialCount'] @max_parallel_trial_count = args['maxParallelTrialCount'] @search_trial_job_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpec.new(args['searchTrialJobSpec'], to_s) @max_trial_count = args['maxTrialCount'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_njsmtasstsstjsbo_directory' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling' require 'google/vertexai/property/nasjob_njsmtasstsstjswp_specs' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpec attr_reader :worker_pool_specs attr_reader :enable_web_access attr_reader :tensorboard attr_reader :experiment attr_reader :experiment_run attr_reader :scheduling attr_reader :enable_dashboard_access attr_reader :service_account attr_reader :base_output_directory attr_reader :reserved_ip_ranges attr_reader :network def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @worker_pool_specs = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsArray.parse(args['workerPoolSpecs'], to_s) @enable_web_access = args['enableWebAccess'] @tensorboard = args['tensorboard'] @experiment = args['experiment'] @experiment_run = args['experimentRun'] @scheduling = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecScheduling.new(args['scheduling'], to_s) @enable_dashboard_access = args['enableDashboardAccess'] @service_account = args['serviceAccount'] @base_output_directory = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecBaseOutputDirectory.new(args['baseOutputDirectory'], to_s) @reserved_ip_ranges = args['reservedIpRanges'] @network = args['network'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecScheduling attr_reader :disable_retries attr_reader :timeout attr_reader :restart_job_on_worker_restart def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disable_retries = args['disableRetries'] @timeout = args['timeout'] @restart_job_on_worker_restart = args['restartJobOnWorkerRestart'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecScheduling" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec' require 'google/vertexai/property/nasjob_njsmtasttsttjsbo_directory' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling' require 'google/vertexai/property/nasjob_njsmtasttsttjswp_specs' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpec attr_reader :frequency attr_reader :max_parallel_trial_count attr_reader :train_trial_job_spec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @frequency = args['frequency'] @max_parallel_trial_count = args['maxParallelTrialCount'] @train_trial_job_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpec.new(args['trainTrialJobSpec'], to_s) end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_njsmtasttsttjsbo_directory' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling' require 'google/vertexai/property/nasjob_njsmtasttsttjswp_specs' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpec attr_reader :worker_pool_specs attr_reader :enable_web_access attr_reader :tensorboard attr_reader :experiment attr_reader :experiment_run attr_reader :scheduling attr_reader :enable_dashboard_access attr_reader :service_account attr_reader :base_output_directory attr_reader :reserved_ip_ranges attr_reader :network def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @worker_pool_specs = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsArray.parse(args['workerPoolSpecs'], to_s) @enable_web_access = args['enableWebAccess'] @tensorboard = args['tensorboard'] @experiment = args['experiment'] @experiment_run = args['experimentRun'] @scheduling = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecScheduling.new(args['scheduling'], to_s) @enable_dashboard_access = args['enableDashboardAccess'] @service_account = args['serviceAccount'] @base_output_directory = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecBaseOutputDirectory.new(args['baseOutputDirectory'], to_s) @reserved_ip_ranges = args['reservedIpRanges'] @network = args['network'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecScheduling attr_reader :disable_retries attr_reader :timeout attr_reader :restart_job_on_worker_restart def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @disable_retries = args['disableRetries'] @timeout = args['timeout'] @restart_job_on_worker_restart = args['restartJobOnWorkerRestart'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecScheduling" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasstsstjsbo_directory.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecBaseOutputDirectory attr_reader :output_uri_prefix def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri_prefix = args['outputUriPrefix'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecBaseOutputDirectory" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasstsstjswp_specs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_njsmtasstsstjswpsc_spec' require 'google/vertexai/property/nasjob_njsmtasstsstjswpscs_env' require 'google/vertexai/property/nasjob_njsmtasstsstjswpsd_spec' require 'google/vertexai/property/nasjob_njsmtasstsstjswpsm_spec' require 'google/vertexai/property/nasjob_njsmtasstsstjswpsn_mounts' require 'google/vertexai/property/nasjob_njsmtasstsstjswpspp_spec' require 'google/vertexai/property/nasjob_njsmtasstsstjswpspps_env' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecs attr_reader :container_spec attr_reader :machine_spec attr_reader :replica_count attr_reader :nfs_mounts attr_reader :python_package_spec attr_reader :disk_spec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @container_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpec.new(args['containerSpec'], to_s) @machine_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsMachineSpec.new(args['machineSpec'], to_s) @replica_count = args['replicaCount'] @nfs_mounts = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsNfsMountsArray.parse(args['nfsMounts'], to_s) @python_package_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpec.new(args['pythonPackageSpec'], to_s) @disk_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsDiskSpec.new(args['diskSpec'], to_s) end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecs" end end class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasstsstjswpsc_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_njsmtasstsstjswpscs_env' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpec attr_reader :env attr_reader :args attr_reader :command attr_reader :image_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpecEnvArray.parse(args['env'], to_s) @args = args['args'] @command = args['command'] @image_uri = args['imageUri'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasstsstjswpscs_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpecEnv attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpecEnv" end end class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpecEnvArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpecEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpecEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasstsstjswpsd_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsDiskSpec attr_reader :boot_disk_type attr_reader :boot_disk_size_gb def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @boot_disk_type = args['bootDiskType'] @boot_disk_size_gb = args['bootDiskSizeGb'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsDiskSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasstsstjswpsm_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsMachineSpec attr_reader :accelerator_type attr_reader :machine_type attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @machine_type = args['machineType'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsMachineSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasstsstjswpsn_mounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsNfsMounts attr_reader :path attr_reader :mount_point attr_reader :server def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] @mount_point = args['mountPoint'] @server = args['server'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsNfsMounts" end end class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsNfsMountsArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsNfsMounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsNfsMounts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasstsstjswpspp_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_njsmtasstsstjswpspps_env' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpec attr_reader :package_uris attr_reader :env attr_reader :executor_image_uri attr_reader :args attr_reader :python_module def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @package_uris = args['packageUris'] @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray.parse(args['env'], to_s) @executor_image_uri = args['executorImageUri'] @args = args['args'] @python_module = args['pythonModule'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasstsstjswpspps_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnv attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnv" end end class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasttsttjsbo_directory.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecBaseOutputDirectory attr_reader :output_uri_prefix def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri_prefix = args['outputUriPrefix'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecBaseOutputDirectory" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasttsttjswp_specs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_njsmtasttsttjswpsc_spec' require 'google/vertexai/property/nasjob_njsmtasttsttjswpscs_env' require 'google/vertexai/property/nasjob_njsmtasttsttjswpsd_spec' require 'google/vertexai/property/nasjob_njsmtasttsttjswpsm_spec' require 'google/vertexai/property/nasjob_njsmtasttsttjswpsn_mounts' require 'google/vertexai/property/nasjob_njsmtasttsttjswpspp_spec' require 'google/vertexai/property/nasjob_njsmtasttsttjswpspps_env' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecs attr_reader :container_spec attr_reader :machine_spec attr_reader :replica_count attr_reader :nfs_mounts attr_reader :python_package_spec attr_reader :disk_spec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @container_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpec.new(args['containerSpec'], to_s) @machine_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsMachineSpec.new(args['machineSpec'], to_s) @replica_count = args['replicaCount'] @nfs_mounts = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsNfsMountsArray.parse(args['nfsMounts'], to_s) @python_package_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpec.new(args['pythonPackageSpec'], to_s) @disk_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsDiskSpec.new(args['diskSpec'], to_s) end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecs" end end class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecs.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecs.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasttsttjswpsc_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_njsmtasttsttjswpscs_env' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpec attr_reader :env attr_reader :args attr_reader :command attr_reader :image_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpecEnvArray.parse(args['env'], to_s) @args = args['args'] @command = args['command'] @image_uri = args['imageUri'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasttsttjswpscs_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpecEnv attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpecEnv" end end class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpecEnvArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpecEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpecEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasttsttjswpsd_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsDiskSpec attr_reader :boot_disk_type attr_reader :boot_disk_size_gb def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @boot_disk_type = args['bootDiskType'] @boot_disk_size_gb = args['bootDiskSizeGb'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsDiskSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasttsttjswpsm_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsMachineSpec attr_reader :accelerator_type attr_reader :machine_type attr_reader :accelerator_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @accelerator_type = args['acceleratorType'] @machine_type = args['machineType'] @accelerator_count = args['acceleratorCount'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsMachineSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasttsttjswpsn_mounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsNfsMounts attr_reader :path attr_reader :mount_point attr_reader :server def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path = args['path'] @mount_point = args['mountPoint'] @server = args['server'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsNfsMounts" end end class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsNfsMountsArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsNfsMounts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsNfsMounts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasttsttjswpspp_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjob_njsmtasttsttjswpspps_env' module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpec attr_reader :package_uris attr_reader :env attr_reader :executor_image_uri attr_reader :args attr_reader :python_module def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @package_uris = args['packageUris'] @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray.parse(args['env'], to_s) @executor_image_uri = args['executorImageUri'] @args = args['args'] @python_module = args['pythonModule'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjob_njsmtasttsttjswpspps_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnv attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnv" end end class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray def self.parse(value, parent_identifier) return if value.nil? return NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement' require 'google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics' module GoogleInSpec module VertexAI module Property class NasJobsNasTrialDetailSearchTrial attr_reader :id attr_reader :state attr_reader :final_measurement attr_reader :start_time attr_reader :end_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @id = args['id'] @state = args['state'] @final_measurement = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrialFinalMeasurement.new(args['finalMeasurement'], to_s) @start_time = args['startTime'] @end_time = args['endTime'] end def to_s "#{@parent_identifier} NasJobsNasTrialDetailSearchTrial" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics' module GoogleInSpec module VertexAI module Property class NasJobsNasTrialDetailSearchTrialFinalMeasurement attr_reader :metrics attr_reader :elapsed_duration attr_reader :step_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metrics = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrialFinalMeasurementMetricsArray.parse(args['metrics'], to_s) @elapsed_duration = args['elapsedDuration'] @step_count = args['stepCount'] end def to_s "#{@parent_identifier} NasJobsNasTrialDetailSearchTrialFinalMeasurement" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobsNasTrialDetailSearchTrialFinalMeasurementMetrics attr_reader :metric_id attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric_id = args['metricId'] @value = args['value'] end def to_s "#{@parent_identifier} NasJobsNasTrialDetailSearchTrialFinalMeasurementMetrics" end end class NasJobsNasTrialDetailSearchTrialFinalMeasurementMetricsArray def self.parse(value, parent_identifier) return if value.nil? return NasJobsNasTrialDetailSearchTrialFinalMeasurementMetrics.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobsNasTrialDetailSearchTrialFinalMeasurementMetrics.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement' require 'google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics' module GoogleInSpec module VertexAI module Property class NasJobsNasTrialDetailTrainTrial attr_reader :id attr_reader :state attr_reader :final_measurement attr_reader :start_time attr_reader :end_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @id = args['id'] @state = args['state'] @final_measurement = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrialFinalMeasurement.new(args['finalMeasurement'], to_s) @start_time = args['startTime'] @end_time = args['endTime'] end def to_s "#{@parent_identifier} NasJobsNasTrialDetailTrainTrial" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics' module GoogleInSpec module VertexAI module Property class NasJobsNasTrialDetailTrainTrialFinalMeasurement attr_reader :metrics attr_reader :elapsed_duration attr_reader :step_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metrics = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrialFinalMeasurementMetricsArray.parse(args['metrics'], to_s) @elapsed_duration = args['elapsedDuration'] @step_count = args['stepCount'] end def to_s "#{@parent_identifier} NasJobsNasTrialDetailTrainTrialFinalMeasurement" end end end end end ================================================ FILE: libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class NasJobsNasTrialDetailTrainTrialFinalMeasurementMetrics attr_reader :metric_id attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric_id = args['metricId'] @value = args['value'] end def to_s "#{@parent_identifier} NasJobsNasTrialDetailTrainTrialFinalMeasurementMetrics" end end class NasJobsNasTrialDetailTrainTrialFinalMeasurementMetricsArray def self.parse(value, parent_identifier) return if value.nil? return NasJobsNasTrialDetailTrainTrialFinalMeasurementMetrics.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| NasJobsNasTrialDetailTrainTrialFinalMeasurementMetrics.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} PipelineJobEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} PipelineJobError" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata' require 'google/vertexai/property/pipelinejob_job_detail_task_details' module GoogleInSpec module VertexAI module Property class PipelineJobJobDetail attr_reader :task_details attr_reader :pipeline_run_context attr_reader :pipeline_context def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @task_details = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsArray.parse(args['taskDetails'], to_s) @pipeline_run_context = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineRunContext.new(args['pipelineRunContext'], to_s) @pipeline_context = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineContext.new(args['pipelineContext'], to_s) end def to_s "#{@parent_identifier} PipelineJobJobDetail" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata' module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailPipelineContext attr_reader :name attr_reader :schema_title attr_reader :etag attr_reader :description attr_reader :display_name attr_reader :schema_version attr_reader :create_time attr_reader :labels attr_reader :metadata attr_reader :update_time attr_reader :parent_contexts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @schema_title = args['schemaTitle'] @etag = args['etag'] @description = args['description'] @display_name = args['displayName'] @schema_version = args['schemaVersion'] @create_time = args['createTime'] @labels = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineContextLabels.new(args['labels'], to_s) @metadata = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineContextMetadata.new(args['metadata'], to_s) @update_time = args['updateTime'] @parent_contexts = args['parentContexts'] end def to_s "#{@parent_identifier} PipelineJobJobDetailPipelineContext" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailPipelineContextLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobJobDetailPipelineContextLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailPipelineContextMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobJobDetailPipelineContextMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata' module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailPipelineRunContext attr_reader :name attr_reader :schema_title attr_reader :etag attr_reader :description attr_reader :display_name attr_reader :schema_version attr_reader :create_time attr_reader :labels attr_reader :metadata attr_reader :update_time attr_reader :parent_contexts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @schema_title = args['schemaTitle'] @etag = args['etag'] @description = args['description'] @display_name = args['displayName'] @schema_version = args['schemaVersion'] @create_time = args['createTime'] @labels = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineRunContextLabels.new(args['labels'], to_s) @metadata = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineRunContextMetadata.new(args['metadata'], to_s) @update_time = args['updateTime'] @parent_contexts = args['parentContexts'] end def to_s "#{@parent_identifier} PipelineJobJobDetailPipelineRunContext" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailPipelineRunContextLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobJobDetailPipelineRunContextLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailPipelineRunContextMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobJobDetailPipelineRunContextMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/pipelinejob_job_detail_task_details_error' require 'google/vertexai/property/pipelinejob_job_detail_task_details_execution' require 'google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels' require 'google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata' require 'google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail' require 'google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail' require 'google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail' require 'google/vertexai/property/pipelinejob_job_detail_task_details_inputs' require 'google/vertexai/property/pipelinejob_job_detail_task_details_outputs' require 'google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status' module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetails attr_reader :inputs attr_reader :pipeline_task_status attr_reader :end_time attr_reader :outputs attr_reader :create_time attr_reader :start_time attr_reader :execution attr_reader :task_name attr_reader :parent_task_id attr_reader :state attr_reader :task_id attr_reader :executor_detail attr_reader :error def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @inputs = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsInputs.new(args['inputs'], to_s) @pipeline_task_status = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsPipelineTaskStatusArray.parse(args['pipelineTaskStatus'], to_s) @end_time = args['endTime'] @outputs = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsOutputs.new(args['outputs'], to_s) @create_time = args['createTime'] @start_time = args['startTime'] @execution = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecution.new(args['execution'], to_s) @task_name = args['taskName'] @parent_task_id = args['parentTaskId'] @state = args['state'] @task_id = args['taskId'] @executor_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutorDetail.new(args['executorDetail'], to_s) @error = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsError.new(args['error'], to_s) end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetails" end end class PipelineJobJobDetailTaskDetailsArray def self.parse(value, parent_identifier) return if value.nil? return PipelineJobJobDetailTaskDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| PipelineJobJobDetailTaskDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsError" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels' require 'google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata' module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsExecution attr_reader :labels attr_reader :create_time attr_reader :schema_version attr_reader :state attr_reader :name attr_reader :etag attr_reader :display_name attr_reader :metadata attr_reader :schema_title attr_reader :description attr_reader :update_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @labels = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutionLabels.new(args['labels'], to_s) @create_time = args['createTime'] @schema_version = args['schemaVersion'] @state = args['state'] @name = args['name'] @etag = args['etag'] @display_name = args['displayName'] @metadata = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutionMetadata.new(args['metadata'], to_s) @schema_title = args['schemaTitle'] @description = args['description'] @update_time = args['updateTime'] end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsExecution" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsExecutionLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsExecutionLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsExecutionMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsExecutionMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail' require 'google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail' module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsExecutorDetail attr_reader :container_detail attr_reader :custom_job_detail def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @container_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail.new(args['containerDetail'], to_s) @custom_job_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail.new(args['customJobDetail'], to_s) end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsExecutorDetail" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail attr_reader :failed_main_jobs attr_reader :main_job attr_reader :pre_caching_check_job attr_reader :failed_pre_caching_check_jobs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @failed_main_jobs = args['failedMainJobs'] @main_job = args['mainJob'] @pre_caching_check_job = args['preCachingCheckJob'] @failed_pre_caching_check_jobs = args['failedPreCachingCheckJobs'] end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail attr_reader :failed_jobs attr_reader :job def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @failed_jobs = args['failedJobs'] @job = args['job'] end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_inputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsInputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsInputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_outputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsOutputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsOutputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status_error' module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsPipelineTaskStatus attr_reader :update_time attr_reader :error attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @update_time = args['updateTime'] @error = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsPipelineTaskStatusError.new(args['error'], to_s) @state = args['state'] end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsPipelineTaskStatus" end end class PipelineJobJobDetailTaskDetailsPipelineTaskStatusArray def self.parse(value, parent_identifier) return if value.nil? return PipelineJobJobDetailTaskDetailsPipelineTaskStatus.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| PipelineJobJobDetailTaskDetailsPipelineTaskStatus.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobJobDetailTaskDetailsPipelineTaskStatusError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} PipelineJobJobDetailTaskDetailsPipelineTaskStatusError" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_pipeline_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobPipelineSpec attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobPipelineSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_runtime_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/pipelinejob_runtime_config_input_artifacts' require 'google/vertexai/property/pipelinejob_runtime_config_parameter_values' require 'google/vertexai/property/pipelinejob_runtime_config_parameters' module GoogleInSpec module VertexAI module Property class PipelineJobRuntimeConfig attr_reader :gcs_output_directory attr_reader :parameter_values attr_reader :failure_policy attr_reader :parameters attr_reader :input_artifacts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gcs_output_directory = args['gcsOutputDirectory'] @parameter_values = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfigParameterValues.new(args['parameterValues'], to_s) @failure_policy = args['failurePolicy'] @parameters = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfigParameters.new(args['parameters'], to_s) @input_artifacts = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfigInputArtifacts.new(args['inputArtifacts'], to_s) end def to_s "#{@parent_identifier} PipelineJobRuntimeConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_runtime_config_input_artifacts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobRuntimeConfigInputArtifacts attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobRuntimeConfigInputArtifacts" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_runtime_config_parameter_values.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobRuntimeConfigParameterValues attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobRuntimeConfigParameterValues" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_runtime_config_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobRuntimeConfigParameters attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} PipelineJobRuntimeConfigParameters" end end end end end ================================================ FILE: libraries/google/vertexai/property/pipelinejob_template_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class PipelineJobTemplateMetadata attr_reader :version def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @version = args['version'] end def to_s "#{@parent_identifier} PipelineJobTemplateMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_cpjrpjjdtdedc_detail.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail attr_reader :failed_main_jobs attr_reader :main_job attr_reader :pre_caching_check_job attr_reader :failed_pre_caching_check_jobs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @failed_main_jobs = args['failedMainJobs'] @main_job = args['mainJob'] @pre_caching_check_job = args['preCachingCheckJob'] @failed_pre_caching_check_jobs = args['failedPreCachingCheckJobs'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_cpjrpjjdtdedcj_detail.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail attr_reader :failed_jobs attr_reader :job def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @failed_jobs = args['failedJobs'] @job = args['job'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_cpjrpjjdtdpts_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatusError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatusError" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata' module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequest attr_reader :pipeline_job attr_reader :pipeline_job_id attr_reader :parent def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @pipeline_job = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJob.new(args['pipelineJob'], to_s) @pipeline_job_id = args['pipelineJobId'] @parent = args['parent'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequest" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata' module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJob attr_reader :encryption_spec attr_reader :end_time attr_reader :error attr_reader :update_time attr_reader :job_detail attr_reader :template_metadata attr_reader :state attr_reader :create_time attr_reader :name attr_reader :schedule_name attr_reader :reserved_ip_ranges attr_reader :start_time attr_reader :service_account attr_reader :display_name attr_reader :template_uri attr_reader :pipeline_spec attr_reader :network attr_reader :labels attr_reader :runtime_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @encryption_spec = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobEncryptionSpec.new(args['encryptionSpec'], to_s) @end_time = args['endTime'] @error = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobError.new(args['error'], to_s) @update_time = args['updateTime'] @job_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetail.new(args['jobDetail'], to_s) @template_metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobTemplateMetadata.new(args['templateMetadata'], to_s) @state = args['state'] @create_time = args['createTime'] @name = args['name'] @schedule_name = args['scheduleName'] @reserved_ip_ranges = args['reservedIpRanges'] @start_time = args['startTime'] @service_account = args['serviceAccount'] @display_name = args['displayName'] @template_uri = args['templateUri'] @pipeline_spec = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobPipelineSpec.new(args['pipelineSpec'], to_s) @network = args['network'] @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobLabels.new(args['labels'], to_s) @runtime_config = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfig.new(args['runtimeConfig'], to_s) end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJob" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobError" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details' module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetail attr_reader :task_details attr_reader :pipeline_run_context attr_reader :pipeline_context def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @task_details = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsArray.parse(args['taskDetails'], to_s) @pipeline_run_context = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContext.new(args['pipelineRunContext'], to_s) @pipeline_context = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContext.new(args['pipelineContext'], to_s) end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetail" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata' module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContext attr_reader :name attr_reader :schema_title attr_reader :etag attr_reader :description attr_reader :display_name attr_reader :schema_version attr_reader :create_time attr_reader :labels attr_reader :metadata attr_reader :update_time attr_reader :parent_contexts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @schema_title = args['schemaTitle'] @etag = args['etag'] @description = args['description'] @display_name = args['displayName'] @schema_version = args['schemaVersion'] @create_time = args['createTime'] @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextLabels.new(args['labels'], to_s) @metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextMetadata.new(args['metadata'], to_s) @update_time = args['updateTime'] @parent_contexts = args['parentContexts'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContext" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata' module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContext attr_reader :name attr_reader :schema_title attr_reader :etag attr_reader :description attr_reader :display_name attr_reader :schema_version attr_reader :create_time attr_reader :labels attr_reader :metadata attr_reader :update_time attr_reader :parent_contexts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @schema_title = args['schemaTitle'] @etag = args['etag'] @description = args['description'] @display_name = args['displayName'] @schema_version = args['schemaVersion'] @create_time = args['createTime'] @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextLabels.new(args['labels'], to_s) @metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextMetadata.new(args['metadata'], to_s) @update_time = args['updateTime'] @parent_contexts = args['parentContexts'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContext" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_error' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail' require 'google/vertexai/property/schedule_cpjrpjjdtdedc_detail' require 'google/vertexai/property/schedule_cpjrpjjdtdedcj_detail' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_inputs' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_outputs' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status' module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetails attr_reader :inputs attr_reader :pipeline_task_status attr_reader :end_time attr_reader :outputs attr_reader :create_time attr_reader :start_time attr_reader :execution attr_reader :task_name attr_reader :parent_task_id attr_reader :state attr_reader :task_id attr_reader :executor_detail attr_reader :error def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @inputs = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsInputs.new(args['inputs'], to_s) @pipeline_task_status = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatusArray.parse(args['pipelineTaskStatus'], to_s) @end_time = args['endTime'] @outputs = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsOutputs.new(args['outputs'], to_s) @create_time = args['createTime'] @start_time = args['startTime'] @execution = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecution.new(args['execution'], to_s) @task_name = args['taskName'] @parent_task_id = args['parentTaskId'] @state = args['state'] @task_id = args['taskId'] @executor_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetail.new(args['executorDetail'], to_s) @error = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsError.new(args['error'], to_s) end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetails" end end class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsArray def self.parse(value, parent_identifier) return if value.nil? return ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetails.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetails.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsError" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata' module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecution attr_reader :labels attr_reader :create_time attr_reader :schema_version attr_reader :state attr_reader :name attr_reader :etag attr_reader :display_name attr_reader :metadata attr_reader :schema_title attr_reader :description attr_reader :update_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionLabels.new(args['labels'], to_s) @create_time = args['createTime'] @schema_version = args['schemaVersion'] @state = args['state'] @name = args['name'] @etag = args['etag'] @display_name = args['displayName'] @metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionMetadata.new(args['metadata'], to_s) @schema_title = args['schemaTitle'] @description = args['description'] @update_time = args['updateTime'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecution" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionMetadata attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/schedule_cpjrpjjdtdedc_detail' require 'google/vertexai/property/schedule_cpjrpjjdtdedcj_detail' module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetail attr_reader :container_detail attr_reader :custom_job_detail def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @container_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail.new(args['containerDetail'], to_s) @custom_job_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail.new(args['customJobDetail'], to_s) end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetail" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_inputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsInputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsInputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_outputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsOutputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsOutputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/schedule_cpjrpjjdtdpts_error' module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatus attr_reader :update_time attr_reader :error attr_reader :state def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @update_time = args['updateTime'] @error = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatusError.new(args['error'], to_s) @state = args['state'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatus" end end class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatusArray def self.parse(value, parent_identifier) return if value.nil? return ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatus.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatus.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobPipelineSpec attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobPipelineSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters' module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfig attr_reader :gcs_output_directory attr_reader :parameter_values attr_reader :failure_policy attr_reader :parameters attr_reader :input_artifacts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gcs_output_directory = args['gcsOutputDirectory'] @parameter_values = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameterValues.new(args['parameterValues'], to_s) @failure_policy = args['failurePolicy'] @parameters = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameters.new(args['parameters'], to_s) @input_artifacts = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigInputArtifacts.new(args['inputArtifacts'], to_s) end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigInputArtifacts attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigInputArtifacts" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameterValues attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameterValues" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameters attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameters" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleCreatePipelineJobRequestPipelineJobTemplateMetadata attr_reader :version def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @version = args['version'] end def to_s "#{@parent_identifier} ScheduleCreatePipelineJobRequestPipelineJobTemplateMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/schedule_last_scheduled_run_response.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class ScheduleLastScheduledRunResponse attr_reader :run_response attr_reader :scheduled_run_time def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @run_response = args['runResponse'] @scheduled_run_time = args['scheduledRunTime'] end def to_s "#{@parent_identifier} ScheduleLastScheduledRunResponse" end end end end end ================================================ FILE: libraries/google/vertexai/property/studiestrial_final_measurement.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/studiestrial_final_measurement_metrics' module GoogleInSpec module VertexAI module Property class StudiesTrialFinalMeasurement attr_reader :metrics attr_reader :elapsed_duration attr_reader :step_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metrics = GoogleInSpec::VertexAI::Property::StudiesTrialFinalMeasurementMetricsArray.parse(args['metrics'], to_s) @elapsed_duration = args['elapsedDuration'] @step_count = args['stepCount'] end def to_s "#{@parent_identifier} StudiesTrialFinalMeasurement" end end end end end ================================================ FILE: libraries/google/vertexai/property/studiestrial_final_measurement_metrics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class StudiesTrialFinalMeasurementMetrics attr_reader :metric_id attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric_id = args['metricId'] @value = args['value'] end def to_s "#{@parent_identifier} StudiesTrialFinalMeasurementMetrics" end end class StudiesTrialFinalMeasurementMetricsArray def self.parse(value, parent_identifier) return if value.nil? return StudiesTrialFinalMeasurementMetrics.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| StudiesTrialFinalMeasurementMetrics.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/studiestrial_measurements.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/studiestrial_measurements_metrics' module GoogleInSpec module VertexAI module Property class StudiesTrialMeasurements attr_reader :metrics attr_reader :elapsed_duration attr_reader :step_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metrics = GoogleInSpec::VertexAI::Property::StudiesTrialMeasurementsMetricsArray.parse(args['metrics'], to_s) @elapsed_duration = args['elapsedDuration'] @step_count = args['stepCount'] end def to_s "#{@parent_identifier} StudiesTrialMeasurements" end end class StudiesTrialMeasurementsArray def self.parse(value, parent_identifier) return if value.nil? return StudiesTrialMeasurements.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| StudiesTrialMeasurements.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/studiestrial_measurements_metrics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class StudiesTrialMeasurementsMetrics attr_reader :metric_id attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @metric_id = args['metricId'] @value = args['value'] end def to_s "#{@parent_identifier} StudiesTrialMeasurementsMetrics" end end class StudiesTrialMeasurementsMetricsArray def self.parse(value, parent_identifier) return if value.nil? return StudiesTrialMeasurementsMetrics.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| StudiesTrialMeasurementsMetrics.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/studiestrial_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class StudiesTrialParameters attr_reader :value attr_reader :parameter_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @value = args['value'] @parameter_id = args['parameterId'] end def to_s "#{@parent_identifier} StudiesTrialParameters" end end class StudiesTrialParametersArray def self.parse(value, parent_identifier) return if value.nil? return StudiesTrialParameters.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| StudiesTrialParameters.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/studiestrial_web_access_uris.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class StudiesTrialWebAccessUris attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} StudiesTrialWebAccessUris" end end end end end ================================================ FILE: libraries/google/vertexai/property/tensorboard_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TensorboardEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} TensorboardEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/tensorboard_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TensorboardLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} TensorboardLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/tensorboardexperimentrun_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TensorboardExperimentRunLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} TensorboardExperimentRunLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/tensorboardsexperiment_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TensorboardsExperimentLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} TensorboardsExperimentLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} TrainingPipelineEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_error.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineError attr_reader :details attr_reader :code attr_reader :message def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @details = args['details'] @code = args['code'] @message = args['message'] end def to_s "#{@parent_identifier} TrainingPipelineError" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_input_data_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination' require 'google/vertexai/property/trainingpipeline_input_data_config_filter_split' require 'google/vertexai/property/trainingpipeline_input_data_config_fraction_split' require 'google/vertexai/property/trainingpipeline_input_data_config_gcs_destination' require 'google/vertexai/property/trainingpipeline_input_data_config_predefined_split' require 'google/vertexai/property/trainingpipeline_input_data_config_stratified_split' require 'google/vertexai/property/trainingpipeline_input_data_config_timestamp_split' module GoogleInSpec module VertexAI module Property class TrainingPipelineInputDataConfig attr_reader :fraction_split attr_reader :persist_ml_use_assignment attr_reader :saved_query_id attr_reader :annotations_filter attr_reader :gcs_destination attr_reader :bigquery_destination attr_reader :stratified_split attr_reader :annotation_schema_uri attr_reader :predefined_split attr_reader :filter_split attr_reader :timestamp_split attr_reader :dataset_id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @fraction_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigFractionSplit.new(args['fractionSplit'], to_s) @persist_ml_use_assignment = args['persistMlUseAssignment'] @saved_query_id = args['savedQueryId'] @annotations_filter = args['annotationsFilter'] @gcs_destination = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigGcsDestination.new(args['gcsDestination'], to_s) @bigquery_destination = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigBigqueryDestination.new(args['bigqueryDestination'], to_s) @stratified_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigStratifiedSplit.new(args['stratifiedSplit'], to_s) @annotation_schema_uri = args['annotationSchemaUri'] @predefined_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigPredefinedSplit.new(args['predefinedSplit'], to_s) @filter_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigFilterSplit.new(args['filterSplit'], to_s) @timestamp_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigTimestampSplit.new(args['timestampSplit'], to_s) @dataset_id = args['datasetId'] end def to_s "#{@parent_identifier} TrainingPipelineInputDataConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineInputDataConfigBigqueryDestination attr_reader :output_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri = args['outputUri'] end def to_s "#{@parent_identifier} TrainingPipelineInputDataConfigBigqueryDestination" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_input_data_config_filter_split.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineInputDataConfigFilterSplit attr_reader :validation_filter attr_reader :test_filter attr_reader :training_filter def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @validation_filter = args['validationFilter'] @test_filter = args['testFilter'] @training_filter = args['trainingFilter'] end def to_s "#{@parent_identifier} TrainingPipelineInputDataConfigFilterSplit" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_input_data_config_fraction_split.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineInputDataConfigFractionSplit attr_reader :training_fraction attr_reader :test_fraction attr_reader :validation_fraction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @training_fraction = args['trainingFraction'] @test_fraction = args['testFraction'] @validation_fraction = args['validationFraction'] end def to_s "#{@parent_identifier} TrainingPipelineInputDataConfigFractionSplit" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_input_data_config_gcs_destination.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineInputDataConfigGcsDestination attr_reader :output_uri_prefix def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_uri_prefix = args['outputUriPrefix'] end def to_s "#{@parent_identifier} TrainingPipelineInputDataConfigGcsDestination" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_input_data_config_predefined_split.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineInputDataConfigPredefinedSplit attr_reader :key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @key = args['key'] end def to_s "#{@parent_identifier} TrainingPipelineInputDataConfigPredefinedSplit" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_input_data_config_stratified_split.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineInputDataConfigStratifiedSplit attr_reader :training_fraction attr_reader :test_fraction attr_reader :key attr_reader :validation_fraction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @training_fraction = args['trainingFraction'] @test_fraction = args['testFraction'] @key = args['key'] @validation_fraction = args['validationFraction'] end def to_s "#{@parent_identifier} TrainingPipelineInputDataConfigStratifiedSplit" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_input_data_config_timestamp_split.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineInputDataConfigTimestampSplit attr_reader :test_fraction attr_reader :training_fraction attr_reader :validation_fraction attr_reader :key def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @test_fraction = args['testFraction'] @training_fraction = args['trainingFraction'] @validation_fraction = args['validationFraction'] @key = args['key'] end def to_s "#{@parent_identifier} TrainingPipelineInputDataConfigTimestampSplit" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} TrainingPipelineLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec' require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env' require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports' require 'google/vertexai/property/trainingpipeline_model_to_upload_deployed_models' require 'google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/trainingpipeline_mtuespeegsg_source' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/trainingpipeline_mtuespigabb_config' require 'google/vertexai/property/trainingpipeline_mtuespigasg_config' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfnsn_sigma' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/trainingpipeline_mtuespxabb_config' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfnsn_sigma' require 'google/vertexai/property/trainingpipeline_model_to_upload_labels' require 'google/vertexai/property/trainingpipeline_model_to_upload_model_source_info' require 'google/vertexai/property/trainingpipeline_model_to_upload_original_model_info' require 'google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata' require 'google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUpload attr_reader :model_source_info attr_reader :name attr_reader :metadata attr_reader :update_time attr_reader :etag attr_reader :description attr_reader :deployed_models attr_reader :create_time attr_reader :explanation_spec attr_reader :encryption_spec attr_reader :pipeline_job attr_reader :predict_schemata attr_reader :version_update_time attr_reader :supported_export_formats attr_reader :original_model_info attr_reader :metadata_artifact attr_reader :supported_input_storage_formats attr_reader :metadata_schema_uri attr_reader :container_spec attr_reader :version_id attr_reader :artifact_uri attr_reader :training_pipeline attr_reader :display_name attr_reader :supported_deployment_resources_types attr_reader :supported_output_storage_formats attr_reader :version_aliases attr_reader :version_create_time attr_reader :version_description attr_reader :labels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @model_source_info = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadModelSourceInfo.new(args['modelSourceInfo'], to_s) @name = args['name'] @metadata = args['metadata'] @update_time = args['updateTime'] @etag = args['etag'] @description = args['description'] @deployed_models = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadDeployedModelsArray.parse(args['deployedModels'], to_s) @create_time = args['createTime'] @explanation_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpec.new(args['explanationSpec'], to_s) @encryption_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadEncryptionSpec.new(args['encryptionSpec'], to_s) @pipeline_job = args['pipelineJob'] @predict_schemata = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadPredictSchemata.new(args['predictSchemata'], to_s) @version_update_time = args['versionUpdateTime'] @supported_export_formats = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadSupportedExportFormatsArray.parse(args['supportedExportFormats'], to_s) @original_model_info = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadOriginalModelInfo.new(args['originalModelInfo'], to_s) @metadata_artifact = args['metadataArtifact'] @supported_input_storage_formats = args['supportedInputStorageFormats'] @metadata_schema_uri = args['metadataSchemaUri'] @container_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadContainerSpec.new(args['containerSpec'], to_s) @version_id = args['versionId'] @artifact_uri = args['artifactUri'] @training_pipeline = args['trainingPipeline'] @display_name = args['displayName'] @supported_deployment_resources_types = args['supportedDeploymentResourcesTypes'] @supported_output_storage_formats = args['supportedOutputStorageFormats'] @version_aliases = args['versionAliases'] @version_create_time = args['versionCreateTime'] @version_description = args['versionDescription'] @labels = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadLabels.new(args['labels'], to_s) end def to_s "#{@parent_identifier} TrainingPipelineModelToUpload" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env' require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadContainerSpec attr_reader :predict_route attr_reader :image_uri attr_reader :env attr_reader :args attr_reader :command attr_reader :ports attr_reader :health_route def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @predict_route = args['predictRoute'] @image_uri = args['imageUri'] @env = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadContainerSpecEnvArray.parse(args['env'], to_s) @args = args['args'] @command = args['command'] @ports = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadContainerSpecPortsArray.parse(args['ports'], to_s) @health_route = args['healthRoute'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadContainerSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadContainerSpecEnv attr_reader :name attr_reader :value def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @value = args['value'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadContainerSpecEnv" end end class TrainingPipelineModelToUploadContainerSpecEnvArray def self.parse(value, parent_identifier) return if value.nil? return TrainingPipelineModelToUploadContainerSpecEnv.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TrainingPipelineModelToUploadContainerSpecEnv.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadContainerSpecPorts attr_reader :container_port def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @container_port = args['containerPort'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadContainerSpecPorts" end end class TrainingPipelineModelToUploadContainerSpecPortsArray def self.parse(value, parent_identifier) return if value.nil? return TrainingPipelineModelToUploadContainerSpecPorts.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TrainingPipelineModelToUploadContainerSpecPorts.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_deployed_models.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadDeployedModels attr_reader :deployed_model_id attr_reader :endpoint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @deployed_model_id = args['deployedModelId'] @endpoint = args['endpoint'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadDeployedModels" end end class TrainingPipelineModelToUploadDeployedModelsArray def self.parse(value, parent_identifier) return if value.nil? return TrainingPipelineModelToUploadDeployedModels.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TrainingPipelineModelToUploadDeployedModels.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadEncryptionSpec attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @kms_key_name = args['kmsKeyName'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadEncryptionSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/trainingpipeline_mtuespeegsg_source' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/trainingpipeline_mtuespigabb_config' require 'google/vertexai/property/trainingpipeline_mtuespigasg_config' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfnsn_sigma' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/trainingpipeline_mtuespxabb_config' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpec attr_reader :parameters attr_reader :metadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @parameters = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParameters.new(args['parameters'], to_s) @metadata = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecMetadata.new(args['metadata'], to_s) end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpec" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecMetadata attr_reader :feature_attributions_schema_uri attr_reader :latent_space_source attr_reader :outputs attr_reader :inputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] @latent_space_source = args['latentSpaceSource'] @outputs = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecMetadataOutputs.new(args['outputs'], to_s) @inputs = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecMetadataInputs.new(args['inputs'], to_s) end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecMetadata" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecMetadataInputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecMetadataInputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecMetadataOutputs attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecMetadataOutputs" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/trainingpipeline_mtuespeegsg_source' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/trainingpipeline_mtuespigabb_config' require 'google/vertexai/property/trainingpipeline_mtuespigasg_config' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfnsn_sigma' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/trainingpipeline_mtuespxabb_config' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParameters attr_reader :output_indices attr_reader :examples attr_reader :xrai_attribution attr_reader :top_k attr_reader :integrated_gradients_attribution attr_reader :sampled_shapley_attribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @output_indices = args['outputIndices'] @examples = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamples.new(args['examples'], to_s) @xrai_attribution = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttribution.new(args['xraiAttribution'], to_s) @top_k = args['topK'] @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttribution.new(args['integratedGradientsAttribution'], to_s) @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersSampledShapleyAttribution.new(args['sampledShapleyAttribution'], to_s) end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParameters" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/trainingpipeline_mtuespeegsg_source' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersExamples attr_reader :presets attr_reader :neighbor_count attr_reader :example_gcs_source attr_reader :nearest_neighbor_search_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @presets = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamplesPresets.new(args['presets'], to_s) @neighbor_count = args['neighborCount'] @example_gcs_source = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSource.new(args['exampleGcsSource'], to_s) @nearest_neighbor_search_config = args['nearestNeighborSearchConfig'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersExamples" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_mtuespeegsg_source' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSource attr_reader :gcs_source attr_reader :data_format def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @gcs_source = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args['gcsSource'], to_s) @data_format = args['dataFormat'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersExamplesPresets attr_reader :modality attr_reader :query def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @modality = args['modality'] @query = args['query'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersExamplesPresets" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_mtuespigabb_config' require 'google/vertexai/property/trainingpipeline_mtuespigasg_config' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttribution attr_reader :step_count attr_reader :smooth_grad_config attr_reader :blur_baseline_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @step_count = args['stepCount'] @smooth_grad_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) @blur_baseline_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersSampledShapleyAttribution attr_reader :path_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @path_count = args['pathCount'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersSampledShapleyAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_mtuespxabb_config' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttribution attr_reader :smooth_grad_config attr_reader :step_count attr_reader :blur_baseline_config def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @smooth_grad_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) @step_count = args['stepCount'] @blur_baseline_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersXraiAttribution" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_mtuespxasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfig attr_reader :feature_noise_sigma attr_reader :noise_sigma attr_reader :noisy_sample_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) @noise_sigma = args['noiseSigma'] @noisy_sample_count = args['noisySampleCount'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_labels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @additional_properties = args['additionalProperties'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadLabels" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_model_source_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadModelSourceInfo attr_reader :copy attr_reader :source_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @copy = args['copy'] @source_type = args['sourceType'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadModelSourceInfo" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_original_model_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadOriginalModelInfo attr_reader :model def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @model = args['model'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadOriginalModelInfo" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadPredictSchemata attr_reader :instance_schema_uri attr_reader :parameters_schema_uri attr_reader :prediction_schema_uri def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @instance_schema_uri = args['instanceSchemaUri'] @parameters_schema_uri = args['parametersSchemaUri'] @prediction_schema_uri = args['predictionSchemaUri'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadPredictSchemata" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadSupportedExportFormats attr_reader :exportable_contents attr_reader :id def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @exportable_contents = args['exportableContents'] @id = args['id'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadSupportedExportFormats" end end class TrainingPipelineModelToUploadSupportedExportFormatsArray def self.parse(value, parent_identifier) return if value.nil? return TrainingPipelineModelToUploadSupportedExportFormats.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TrainingPipelineModelToUploadSupportedExportFormats.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_mtuespeegsg_source.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSourceGcsSource attr_reader :uris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @uris = args['uris'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSourceGcsSource" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_mtuespigabb_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig attr_reader :max_blur_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_blur_sigma = args['maxBlurSigma'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_mtuespigasg_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_mtuespigasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig attr_reader :feature_noise_sigma attr_reader :noise_sigma attr_reader :noisy_sample_count def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @feature_noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) @noise_sigma = args['noiseSigma'] @noisy_sample_count = args['noisySampleCount'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_mtuespigasgcfn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_mtuespigasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma attr_reader :noise_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_mtuespigasgcfnsn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma attr_reader :name attr_reader :sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @sigma = args['sigma'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma" end end class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray def self.parse(value, parent_identifier) return if value.nil? return TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_mtuespxabb_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionBlurBaselineConfig attr_reader :max_blur_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @max_blur_sigma = args['maxBlurSigma'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionBlurBaselineConfig" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_mtuespxasgcfn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'google/vertexai/property/trainingpipeline_mtuespxasgcfnsn_sigma' module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma attr_reader :noise_sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma" end end end end end ================================================ FILE: libraries/google/vertexai/property/trainingpipeline_mtuespxasgcfnsn_sigma.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- module GoogleInSpec module VertexAI module Property class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma attr_reader :name attr_reader :sigma def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @name = args['name'] @sigma = args['sigma'] end def to_s "#{@parent_identifier} TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma" end end class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray def self.parse(value, parent_identifier) return if value.nil? return TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(value, parent_identifier) unless value.is_a?(::Array) value.map { |v| TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigma.new(v, parent_identifier) } end end end end end ================================================ FILE: libraries/google_access_context_manager_access_level.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/accesscontextmanager/property/accesslevel_basic' require 'google/accesscontextmanager/property/accesslevel_basic_conditions' require 'google/accesscontextmanager/property/accesslevel_custom' require 'google/accesscontextmanager/property/accesslevel_custom_expr' # A provider to manage Access Context Manager (VPC Service Controls) resources. class AccessContextManagerAccessLevel < GcpResourceBase name 'google_access_context_manager_access_level' desc 'AccessLevel' supports platform: 'gcp' attr_reader :params attr_reader :title attr_reader :description attr_reader :basic attr_reader :custom attr_reader :parent attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @title = @fetched['title'] @description = @fetched['description'] @basic = GoogleInSpec::AccessContextManager::Property::AccessLevelBasic.new(@fetched['basic'], to_s) @custom = GoogleInSpec::AccessContextManager::Property::AccessLevelCustom.new(@fetched['custom'], to_s) @parent = name_from_self_link(@fetched['parent']) @name = name_from_self_link(@fetched['name']) end def exists? !@fetched.nil? end def to_s "AccessLevel #{@params[:name]}" end private def product_url(_ = nil) 'https://accesscontextmanager.googleapis.com/v1/' end def resource_base_url 'accessPolicies/{{parent}}/accessLevels/{{name}}' end end ================================================ FILE: libraries/google_access_context_manager_access_levels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class AccessContextManagerAccessLevels < GcpResourceBase name 'google_access_context_manager_access_levels' desc 'AccessLevel plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:titles, field: :title) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:basics, field: :basic) filter_table_config.add(:customs, field: :custom) filter_table_config.add(:parents, field: :parent) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('accessLevels') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'title' => ->(obj) { [:title, obj['title']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'basic' => ->(obj) { [:basic, GoogleInSpec::AccessContextManager::Property::AccessLevelBasic.new(obj['basic'], to_s)] }, 'custom' => ->(obj) { [:custom, GoogleInSpec::AccessContextManager::Property::AccessLevelCustom.new(obj['custom'], to_s)] }, 'parent' => ->(obj) { [:parent, name_from_self_link(obj['parent'])] }, 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, } end private def product_url(_ = nil) 'https://accesscontextmanager.googleapis.com/v1/' end def resource_base_url 'accessPolicies/{{parent}}/accessLevels' end end ================================================ FILE: libraries/google_access_context_manager_access_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class AccessContextManagerAccessPolicys < GcpResourceBase name 'google_access_context_manager_access_policies' desc 'AccessPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:parents, field: :parent) filter_table_config.add(:titles, field: :title) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('accessPolicies') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'updateTime' => ->(obj) { [:update_time, parse_time_string(obj['updateTime'])] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, 'title' => ->(obj) { [:title, obj['title']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://accesscontextmanager.googleapis.com/v1/' end def resource_base_url 'accessPolicies?parent=organizations/{{org_id}}' end end ================================================ FILE: libraries/google_access_context_manager_access_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Access Context Manager (VPC Service Controls) resources. class AccessContextManagerAccessPolicy < GcpResourceBase name 'google_access_context_manager_access_policy' desc 'AccessPolicy' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :create_time attr_reader :update_time attr_reader :parent attr_reader :title def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = name_from_self_link(@fetched['name']) @create_time = parse_time_string(@fetched['createTime']) @update_time = parse_time_string(@fetched['updateTime']) @parent = @fetched['parent'] @title = @fetched['title'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "AccessPolicy #{@params[:name]}" end private def product_url(_ = nil) 'https://accesscontextmanager.googleapis.com/v1/' end def resource_base_url 'accessPolicies/{{name}}' end end ================================================ FILE: libraries/google_access_context_manager_service_perimeter.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/accesscontextmanager/property/serviceperimeter_spec' require 'google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services' require 'google/accesscontextmanager/property/serviceperimeter_status' require 'google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services' # A provider to manage Access Context Manager (VPC Service Controls) resources. class AccessContextManagerServicePerimeter < GcpResourceBase name 'google_access_context_manager_service_perimeter' desc 'ServicePerimeter' supports platform: 'gcp' attr_reader :params attr_reader :title attr_reader :description attr_reader :create_time attr_reader :update_time attr_reader :perimeter_type attr_reader :status attr_reader :spec attr_reader :use_explicit_dry_run_spec attr_reader :parent attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @title = @fetched['title'] @description = @fetched['description'] @create_time = parse_time_string(@fetched['createTime']) @update_time = parse_time_string(@fetched['updateTime']) @perimeter_type = @fetched['perimeterType'] @status = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatus.new(@fetched['status'], to_s) @spec = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpec.new(@fetched['spec'], to_s) @use_explicit_dry_run_spec = @fetched['useExplicitDryRunSpec'] @parent = @fetched['parent'] @name = name_from_self_link(@fetched['name']) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "ServicePerimeter #{@params[:name]}" end private def product_url(_ = nil) 'https://accesscontextmanager.googleapis.com/v1/' end def resource_base_url 'accessPolicies/{{policy_name}}/servicePerimeters/{{name}}' end end ================================================ FILE: libraries/google_access_context_manager_service_perimeters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class AccessContextManagerServicePerimeters < GcpResourceBase name 'google_access_context_manager_service_perimeters' desc 'ServicePerimeter plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:titles, field: :title) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:perimeter_types, field: :perimeter_type) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:specs, field: :spec) filter_table_config.add(:use_explicit_dry_run_specs, field: :use_explicit_dry_run_spec) filter_table_config.add(:parents, field: :parent) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('servicePerimeters') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'title' => ->(obj) { [:title, obj['title']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'updateTime' => ->(obj) { [:update_time, parse_time_string(obj['updateTime'])] }, 'perimeterType' => ->(obj) { [:perimeter_type, obj['perimeterType']] }, 'status' => ->(obj) { [:status, GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatus.new(obj['status'], to_s)] }, 'spec' => ->(obj) { [:spec, GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpec.new(obj['spec'], to_s)] }, 'useExplicitDryRunSpec' => ->(obj) { [:use_explicit_dry_run_spec, obj['useExplicitDryRunSpec']] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://accesscontextmanager.googleapis.com/v1/' end def resource_base_url 'accessPolicies/{{policy_name}}/servicePerimeters' end end ================================================ FILE: libraries/google_apigee_endpoint_attachment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Apigee resources. class ApigeeEndpointAttachment < GcpResourceBase name 'google_apigee_endpoint_attachment' desc 'EndpointAttachment' supports platform: 'gcp' attr_reader :params attr_reader :host attr_reader :connection_state attr_reader :service_attachment attr_reader :location attr_reader :name attr_reader :state def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @host = @fetched['host'] @connection_state = @fetched['connectionState'] @service_attachment = @fetched['serviceAttachment'] @location = @fetched['location'] @name = @fetched['name'] @state = @fetched['state'] end def exists? !@fetched.nil? end def to_s "EndpointAttachment #{@params[:name]}" end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_apigee_endpoint_attachments.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ApigeeEndpointAttachments < GcpResourceBase name 'google_apigee_endpoint_attachments' desc 'EndpointAttachment plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:hosts, field: :host) filter_table_config.add(:connection_states, field: :connection_state) filter_table_config.add(:service_attachments, field: :service_attachment) filter_table_config.add(:locations, field: :location) filter_table_config.add(:names, field: :name) filter_table_config.add(:states, field: :state) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('endpointAttachments') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'host' => ->(obj) { [:host, obj['host']] }, 'connectionState' => ->(obj) { [:connection_state, obj['connectionState']] }, 'serviceAttachment' => ->(obj) { [:service_attachment, obj['serviceAttachment']] }, 'location' => ->(obj) { [:location, obj['location']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'state' => ->(obj) { [:state, obj['state']] }, } end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{parent}}/endpointAttachments' end end ================================================ FILE: libraries/google_apigee_organization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/apigee/property/organization_addons_config' require 'google/apigee/property/organization_addons_config_advanced_api_ops_config' require 'google/apigee/property/organization_addons_config_analytics_config' require 'google/apigee/property/organization_addons_config_api_security_config' require 'google/apigee/property/organization_addons_config_connectors_platform_config' require 'google/apigee/property/organization_addons_config_integration_config' require 'google/apigee/property/organization_addons_config_monetization_config' require 'google/apigee/property/organization_properties' require 'google/apigee/property/organization_properties_property' # A provider to manage Apigee resources. class ApigeeOrganization < GcpResourceBase name 'google_apigee_organization' desc 'Organization' supports platform: 'gcp' attr_reader :params attr_reader :api_consumer_data_encryption_key_name attr_reader :runtime_database_encryption_key_name attr_reader :environments attr_reader :runtime_type attr_reader :type attr_reader :portal_disabled attr_reader :authorized_network attr_reader :project_id attr_reader :description attr_reader :ca_certificate attr_reader :subscription_type attr_reader :addons_config attr_reader :customer_name attr_reader :created_at attr_reader :last_modified_at attr_reader :subscription_plan attr_reader :properties attr_reader :state attr_reader :name attr_reader :disable_vpc_peering attr_reader :control_plane_encryption_key_name attr_reader :analytics_region attr_reader :api_consumer_data_location attr_reader :display_name attr_reader :apigee_project_id attr_reader :expires_at attr_reader :attributes attr_reader :billing_type def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @api_consumer_data_encryption_key_name = @fetched['apiConsumerDataEncryptionKeyName'] @runtime_database_encryption_key_name = @fetched['runtimeDatabaseEncryptionKeyName'] @environments = @fetched['environments'] @runtime_type = @fetched['runtimeType'] @type = @fetched['type'] @portal_disabled = @fetched['portalDisabled'] @authorized_network = @fetched['authorizedNetwork'] @project_id = @fetched['projectId'] @description = @fetched['description'] @ca_certificate = @fetched['caCertificate'] @subscription_type = @fetched['subscriptionType'] @addons_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfig.new(@fetched['addonsConfig'], to_s) @customer_name = @fetched['customerName'] @created_at = @fetched['createdAt'] @last_modified_at = @fetched['lastModifiedAt'] @subscription_plan = @fetched['subscriptionPlan'] @properties = GoogleInSpec::Apigee::Property::OrganizationProperties.new(@fetched['properties'], to_s) @state = @fetched['state'] @name = @fetched['name'] @disable_vpc_peering = @fetched['disableVpcPeering'] @control_plane_encryption_key_name = @fetched['controlPlaneEncryptionKeyName'] @analytics_region = @fetched['analyticsRegion'] @api_consumer_data_location = @fetched['apiConsumerDataLocation'] @display_name = @fetched['displayName'] @apigee_project_id = @fetched['apigeeProjectId'] @expires_at = @fetched['expiresAt'] @attributes = @fetched['attributes'] @billing_type = @fetched['billingType'] end def exists? !@fetched.nil? end def to_s "Organization #{@params[:name]}" end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_apigee_organization_api.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/apigee/property/organizationapi_labels' require 'google/apigee/property/organizationapi_meta_data' # A provider to manage Apigee resources. class ApigeeOrganizationApi < GcpResourceBase name 'google_apigee_organization_api' desc 'OrganizationApi' supports platform: 'gcp' attr_reader :params attr_reader :revision attr_reader :latest_revision_id attr_reader :meta_data attr_reader :api_proxy_type attr_reader :read_only attr_reader :labels attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @revision = @fetched['revision'] @latest_revision_id = @fetched['latestRevisionId'] @meta_data = GoogleInSpec::Apigee::Property::OrganizationApiMetaData.new(@fetched['metaData'], to_s) @api_proxy_type = @fetched['apiProxyType'] @read_only = @fetched['readOnly'] @labels = GoogleInSpec::Apigee::Property::OrganizationApiLabels.new(@fetched['labels'], to_s) @name = @fetched['name'] end def exists? !@fetched.nil? end def to_s "OrganizationApi #{@params[:name]}" end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{parent}}/apis/{{name}}' end end ================================================ FILE: libraries/google_apigee_organization_apis.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ApigeeOrganizationApis < GcpResourceBase name 'google_apigee_organization_apis' desc 'OrganizationApi plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:revisions, field: :revision) filter_table_config.add(:latest_revision_ids, field: :latest_revision_id) filter_table_config.add(:meta_data, field: :meta_data) filter_table_config.add(:api_proxy_types, field: :api_proxy_type) filter_table_config.add(:read_onlies, field: :read_only) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('proxies') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'revision' => ->(obj) { [:revision, obj['revision']] }, 'latestRevisionId' => ->(obj) { [:latest_revision_id, obj['latestRevisionId']] }, 'metaData' => ->(obj) { [:meta_data, GoogleInSpec::Apigee::Property::OrganizationApiMetaData.new(obj['metaData'], to_s)] }, 'apiProxyType' => ->(obj) { [:api_proxy_type, obj['apiProxyType']] }, 'readOnly' => ->(obj) { [:read_only, obj['readOnly']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Apigee::Property::OrganizationApiLabels.new(obj['labels'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, } end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{parent}}/apis' end end ================================================ FILE: libraries/google_apigee_organization_envgroup.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Apigee resources. class ApigeeOrganizationEnvgroup < GcpResourceBase name 'google_apigee_organization_envgroup' desc 'OrganizationEnvgroup' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :last_modified_at attr_reader :hostnames attr_reader :state attr_reader :created_at def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @last_modified_at = @fetched['lastModifiedAt'] @hostnames = @fetched['hostnames'] @state = @fetched['state'] @created_at = @fetched['createdAt'] end def exists? !@fetched.nil? end def to_s "OrganizationEnvgroup #{@params[:name]}" end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_apigee_organization_envgroup_attachment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Apigee resources. class ApigeeOrganizationEnvgroupAttachment < GcpResourceBase name 'google_apigee_organization_envgroup_attachment' desc 'OrganizationEnvgroupAttachment' supports platform: 'gcp' attr_reader :params attr_reader :created_at attr_reader :environment attr_reader :environment_group_id attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @created_at = @fetched['createdAt'] @environment = @fetched['environment'] @environment_group_id = @fetched['environmentGroupId'] @name = @fetched['name'] end def exists? !@fetched.nil? end def to_s "OrganizationEnvgroupAttachment #{@params[:name]}" end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_apigee_organization_envgroup_attachments.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ApigeeOrganizationEnvgroupAttachments < GcpResourceBase name 'google_apigee_organization_envgroup_attachments' desc 'OrganizationEnvgroupAttachment plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:created_ats, field: :created_at) filter_table_config.add(:environments, field: :environment) filter_table_config.add(:environment_group_ids, field: :environment_group_id) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('environmentGroupAttachments') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'createdAt' => ->(obj) { [:created_at, obj['createdAt']] }, 'environment' => ->(obj) { [:environment, obj['environment']] }, 'environmentGroupId' => ->(obj) { [:environment_group_id, obj['environmentGroupId']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{parent}}/attachments' end end ================================================ FILE: libraries/google_apigee_organization_envgroups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ApigeeOrganizationEnvgroups < GcpResourceBase name 'google_apigee_organization_envgroups' desc 'OrganizationEnvgroup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:last_modified_ats, field: :last_modified_at) filter_table_config.add(:hostnames, field: :hostnames) filter_table_config.add(:states, field: :state) filter_table_config.add(:created_ats, field: :created_at) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('environmentGroups') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'lastModifiedAt' => ->(obj) { [:last_modified_at, obj['lastModifiedAt']] }, 'hostnames' => ->(obj) { [:hostnames, obj['hostnames']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'createdAt' => ->(obj) { [:created_at, obj['createdAt']] }, } end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{parent}}/envgroups' end end ================================================ FILE: libraries/google_apigee_organization_instance_attachment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Apigee resources. class ApigeeOrganizationInstanceAttachment < GcpResourceBase name 'google_apigee_organization_instance_attachment' desc 'OrganizationInstanceAttachment' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :environment attr_reader :created_at def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @environment = @fetched['environment'] @created_at = @fetched['createdAt'] end def exists? !@fetched.nil? end def to_s "OrganizationInstanceAttachment #{@params[:name]}" end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{parent}}/attachments/{{name}}' end end ================================================ FILE: libraries/google_apigee_organization_instance_attachments.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ApigeeOrganizationInstanceAttachments < GcpResourceBase name 'google_apigee_organization_instance_attachments' desc 'OrganizationInstanceAttachment plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:environments, field: :environment) filter_table_config.add(:created_ats, field: :created_at) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('attachments') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'environment' => ->(obj) { [:environment, obj['environment']] }, 'createdAt' => ->(obj) { [:created_at, obj['createdAt']] }, } end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{parent}}/attachments' end end ================================================ FILE: libraries/google_apigee_organizations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ApigeeOrganizations < GcpResourceBase name 'google_apigee_organizations' desc 'Organization plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:api_consumer_data_encryption_key_names, field: :api_consumer_data_encryption_key_name) filter_table_config.add(:runtime_database_encryption_key_names, field: :runtime_database_encryption_key_name) filter_table_config.add(:environments, field: :environments) filter_table_config.add(:runtime_types, field: :runtime_type) filter_table_config.add(:types, field: :type) filter_table_config.add(:portal_disableds, field: :portal_disabled) filter_table_config.add(:authorized_networks, field: :authorized_network) filter_table_config.add(:project_ids, field: :project_id) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ca_certificates, field: :ca_certificate) filter_table_config.add(:subscription_types, field: :subscription_type) filter_table_config.add(:addons_configs, field: :addons_config) filter_table_config.add(:customer_names, field: :customer_name) filter_table_config.add(:created_ats, field: :created_at) filter_table_config.add(:last_modified_ats, field: :last_modified_at) filter_table_config.add(:subscription_plans, field: :subscription_plan) filter_table_config.add(:properties, field: :properties) filter_table_config.add(:states, field: :state) filter_table_config.add(:names, field: :name) filter_table_config.add(:disable_vpc_peerings, field: :disable_vpc_peering) filter_table_config.add(:control_plane_encryption_key_names, field: :control_plane_encryption_key_name) filter_table_config.add(:analytics_regions, field: :analytics_region) filter_table_config.add(:api_consumer_data_locations, field: :api_consumer_data_location) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:apigee_project_ids, field: :apigee_project_id) filter_table_config.add(:expires_ats, field: :expires_at) filter_table_config.add(:attributes, field: :attributes) filter_table_config.add(:billing_types, field: :billing_type) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('organizations') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'apiConsumerDataEncryptionKeyName' => ->(obj) { [:api_consumer_data_encryption_key_name, obj['apiConsumerDataEncryptionKeyName']] }, 'runtimeDatabaseEncryptionKeyName' => ->(obj) { [:runtime_database_encryption_key_name, obj['runtimeDatabaseEncryptionKeyName']] }, 'environments' => ->(obj) { [:environments, obj['environments']] }, 'runtimeType' => ->(obj) { [:runtime_type, obj['runtimeType']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'portalDisabled' => ->(obj) { [:portal_disabled, obj['portalDisabled']] }, 'authorizedNetwork' => ->(obj) { [:authorized_network, obj['authorizedNetwork']] }, 'projectId' => ->(obj) { [:project_id, obj['projectId']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'caCertificate' => ->(obj) { [:ca_certificate, obj['caCertificate']] }, 'subscriptionType' => ->(obj) { [:subscription_type, obj['subscriptionType']] }, 'addonsConfig' => ->(obj) { [:addons_config, GoogleInSpec::Apigee::Property::OrganizationAddonsConfig.new(obj['addonsConfig'], to_s)] }, 'customerName' => ->(obj) { [:customer_name, obj['customerName']] }, 'createdAt' => ->(obj) { [:created_at, obj['createdAt']] }, 'lastModifiedAt' => ->(obj) { [:last_modified_at, obj['lastModifiedAt']] }, 'subscriptionPlan' => ->(obj) { [:subscription_plan, obj['subscriptionPlan']] }, 'properties' => ->(obj) { [:properties, GoogleInSpec::Apigee::Property::OrganizationProperties.new(obj['properties'], to_s)] }, 'state' => ->(obj) { [:state, obj['state']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'disableVpcPeering' => ->(obj) { [:disable_vpc_peering, obj['disableVpcPeering']] }, 'controlPlaneEncryptionKeyName' => ->(obj) { [:control_plane_encryption_key_name, obj['controlPlaneEncryptionKeyName']] }, 'analyticsRegion' => ->(obj) { [:analytics_region, obj['analyticsRegion']] }, 'apiConsumerDataLocation' => ->(obj) { [:api_consumer_data_location, obj['apiConsumerDataLocation']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'apigeeProjectId' => ->(obj) { [:apigee_project_id, obj['apigeeProjectId']] }, 'expiresAt' => ->(obj) { [:expires_at, obj['expiresAt']] }, 'attributes' => ->(obj) { [:attributes, obj['attributes']] }, 'billingType' => ->(obj) { [:billing_type, obj['billingType']] }, } end private def product_url(_ = nil) 'https://apigee.googleapis.com/v1/' end def resource_base_url '{{parent}}' end end ================================================ FILE: libraries/google_appengine_standard_app_version.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/appengine/property/standardappversion_automatic_scaling' require 'google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings' require 'google/appengine/property/standardappversion_basic_scaling' require 'google/appengine/property/standardappversion_manual_scaling' require 'google/appengine/property/standardappversion_vpc_access_connector' # A provider to manage App Engine resources. class AppEngineStandardAppVersion < GcpResourceBase name 'google_appengine_standard_app_version' desc 'StandardAppVersion' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :version_id attr_reader :runtime attr_reader :threadsafe attr_reader :vpc_access_connector attr_reader :inbound_services attr_reader :instance_class attr_reader :automatic_scaling attr_reader :basic_scaling attr_reader :manual_scaling def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @version_id = @fetched['id'] @runtime = @fetched['runtime'] @threadsafe = @fetched['threadsafe'] @vpc_access_connector = GoogleInSpec::AppEngine::Property::StandardAppVersionVPCAccessConnector.new(@fetched['vpcAccessConnector'], to_s) @inbound_services = @fetched['inboundServices'] @instance_class = @fetched['instanceClass'] @automatic_scaling = GoogleInSpec::AppEngine::Property::StandardAppVersionAutomaticScaling.new(@fetched['automaticScaling'], to_s) @basic_scaling = GoogleInSpec::AppEngine::Property::StandardAppVersionBasicScaling.new(@fetched['basicScaling'], to_s) @manual_scaling = GoogleInSpec::AppEngine::Property::StandardAppVersionManualScaling.new(@fetched['manualScaling'], to_s) end def exists? !@fetched.nil? end def to_s "StandardAppVersion #{@params[:version_id]}" end private def product_url(_ = nil) 'https://appengine.googleapis.com/v1/' end def resource_base_url 'apps/{{project}}/services/{{service}}/versions/{{version_id}}?view=FULL' end end ================================================ FILE: libraries/google_appengine_standard_app_versions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class AppEngineStandardAppVersions < GcpResourceBase name 'google_appengine_standard_app_versions' desc 'StandardAppVersion plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:version_ids, field: :version_id) filter_table_config.add(:runtimes, field: :runtime) filter_table_config.add(:threadsaves, field: :threadsafe) filter_table_config.add(:vpc_access_connectors, field: :vpc_access_connector) filter_table_config.add(:inbound_services, field: :inbound_services) filter_table_config.add(:instance_classes, field: :instance_class) filter_table_config.add(:automatic_scalings, field: :automatic_scaling) filter_table_config.add(:basic_scalings, field: :basic_scaling) filter_table_config.add(:manual_scalings, field: :manual_scaling) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('versions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'id' => ->(obj) { [:version_id, obj['id']] }, 'runtime' => ->(obj) { [:runtime, obj['runtime']] }, 'threadsafe' => ->(obj) { [:threadsafe, obj['threadsafe']] }, 'vpcAccessConnector' => ->(obj) { [:vpc_access_connector, GoogleInSpec::AppEngine::Property::StandardAppVersionVPCAccessConnector.new(obj['vpcAccessConnector'], to_s)] }, 'inboundServices' => ->(obj) { [:inbound_services, obj['inboundServices']] }, 'instanceClass' => ->(obj) { [:instance_class, obj['instanceClass']] }, 'automaticScaling' => ->(obj) { [:automatic_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionAutomaticScaling.new(obj['automaticScaling'], to_s)] }, 'basicScaling' => ->(obj) { [:basic_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionBasicScaling.new(obj['basicScaling'], to_s)] }, 'manualScaling' => ->(obj) { [:manual_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionManualScaling.new(obj['manualScaling'], to_s)] }, } end private def product_url(_ = nil) 'https://appengine.googleapis.com/v1/' end def resource_base_url 'apps/{{project}}/services/{{service}}/versions' end end ================================================ FILE: libraries/google_artifactregistry_project_location_repositories.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ArtifactregistryProjectLocationRepositorys < GcpResourceBase name 'google_artifactregistry_project_location_repositories' desc 'ProjectLocationRepository plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:maven_configs, field: :maven_config) filter_table_config.add(:docker_configs, field: :docker_config) filter_table_config.add(:virtual_repository_configs, field: :virtual_repository_config) filter_table_config.add(:remote_repository_configs, field: :remote_repository_config) filter_table_config.add(:names, field: :name) filter_table_config.add(:formats, field: :format) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:kms_key_names, field: :kms_key_name) filter_table_config.add(:modes, field: :mode) filter_table_config.add(:cleanup_policies, field: :cleanup_policies) filter_table_config.add(:size_bytes, field: :size_bytes) filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) filter_table_config.add(:cleanup_policy_dry_runs, field: :cleanup_policy_dry_run) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('repositories') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'mavenConfig' => ->(obj) { [:maven_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryMavenConfig.new(obj['mavenConfig'], to_s)] }, 'dockerConfig' => ->(obj) { [:docker_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryDockerConfig.new(obj['dockerConfig'], to_s)] }, 'virtualRepositoryConfig' => ->(obj) { [:virtual_repository_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfig.new(obj['virtualRepositoryConfig'], to_s)] }, 'remoteRepositoryConfig' => ->(obj) { [:remote_repository_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfig.new(obj['remoteRepositoryConfig'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'format' => ->(obj) { [:format, obj['format']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryLabels.new(obj['labels'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'kmsKeyName' => ->(obj) { [:kms_key_name, obj['kmsKeyName']] }, 'mode' => ->(obj) { [:mode, obj['mode']] }, 'cleanupPolicies' => ->(obj) { [:cleanup_policies, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryCleanupPolicies.new(obj['cleanupPolicies'], to_s)] }, 'sizeBytes' => ->(obj) { [:size_bytes, obj['sizeBytes']] }, 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, 'cleanupPolicyDryRun' => ->(obj) { [:cleanup_policy_dry_run, obj['cleanupPolicyDryRun']] }, } end private def product_url(_ = nil) 'https://artifactregistry.googleapis.com/v1beta1/' end def resource_base_url '{{parent}}/repositories' end end ================================================ FILE: libraries/google_artifactregistry_project_location_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/artifactregistry/property/projectlocationrepository_cleanup_policies' require 'google/artifactregistry/property/projectlocationrepository_docker_config' require 'google/artifactregistry/property/projectlocationrepository_labels' require 'google/artifactregistry/property/projectlocationrepository_maven_config' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials' require 'google/artifactregistry/property/projectlocationrepository_rrcucup_credentials' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository' require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository' require 'google/artifactregistry/property/projectlocationrepository_virtual_repository_config' require 'google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies' # A provider to manage Artifact Registry resources. class ArtifactregistryProjectLocationRepository < GcpResourceBase name 'google_artifactregistry_project_location_repository' desc 'ProjectLocationRepository' supports platform: 'gcp' attr_reader :params attr_reader :maven_config attr_reader :docker_config attr_reader :virtual_repository_config attr_reader :remote_repository_config attr_reader :name attr_reader :format attr_reader :description attr_reader :labels attr_reader :create_time attr_reader :update_time attr_reader :kms_key_name attr_reader :mode attr_reader :cleanup_policies attr_reader :size_bytes attr_reader :satisfies_pzs attr_reader :cleanup_policy_dry_run def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @maven_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryMavenConfig.new(@fetched['mavenConfig'], to_s) @docker_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryDockerConfig.new(@fetched['dockerConfig'], to_s) @virtual_repository_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfig.new(@fetched['virtualRepositoryConfig'], to_s) @remote_repository_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfig.new(@fetched['remoteRepositoryConfig'], to_s) @name = @fetched['name'] @format = @fetched['format'] @description = @fetched['description'] @labels = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryLabels.new(@fetched['labels'], to_s) @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @kms_key_name = @fetched['kmsKeyName'] @mode = @fetched['mode'] @cleanup_policies = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryCleanupPolicies.new(@fetched['cleanupPolicies'], to_s) @size_bytes = @fetched['sizeBytes'] @satisfies_pzs = @fetched['satisfiesPzs'] @cleanup_policy_dry_run = @fetched['cleanupPolicyDryRun'] end def exists? !@fetched.nil? end def to_s "ProjectLocationRepository #{@params[:name]}" end private def product_url(_ = nil) 'https://artifactregistry.googleapis.com/v1beta1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_bigquery_dataset.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/bigquery/property/dataset_access' require 'google/bigquery/property/dataset_dataset_reference' require 'google/bigquery/property/dataset_default_encryption_configuration' # A provider to manage BigQuery resources. class BigQueryDataset < GcpResourceBase name 'google_bigquery_dataset' desc 'Dataset' supports platform: 'gcp' attr_reader :params attr_reader :access attr_reader :creation_time attr_reader :dataset_reference attr_reader :default_table_expiration_ms attr_reader :default_partition_expiration_ms attr_reader :description attr_reader :etag attr_reader :friendly_name attr_reader :id attr_reader :labels attr_reader :last_modified_time attr_reader :location attr_reader :default_encryption_configuration def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @access = GoogleInSpec::BigQuery::Property::DatasetAccessArray.parse(@fetched['access'], to_s) @creation_time = @fetched['creationTime'] @dataset_reference = GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(@fetched['datasetReference'], to_s) @default_table_expiration_ms = @fetched['defaultTableExpirationMs'] @default_partition_expiration_ms = @fetched['defaultPartitionExpirationMs'] @description = @fetched['description'] @etag = @fetched['etag'] @friendly_name = @fetched['friendlyName'] @id = @fetched['id'] @labels = @fetched['labels'] @last_modified_time = @fetched['lastModifiedTime'] @location = @fetched['location'] @default_encryption_configuration = GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(@fetched['defaultEncryptionConfiguration'], to_s) end def exists? !@fetched.nil? end def to_s "Dataset #{@params[:name]}" end def name dataset_reference&.dataset_id end private def product_url(_ = nil) 'https://bigquery.googleapis.com/bigquery/v2/' end def resource_base_url 'projects/{{project}}/datasets/{{name}}' end end ================================================ FILE: libraries/google_bigquery_datasets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class BigQueryDatasets < GcpResourceBase name 'google_bigquery_datasets' desc 'Dataset plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:dataset_references, field: :dataset_reference) filter_table_config.add(:default_partition_expiration_ms, field: :default_partition_expiration_ms) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:friendly_names, field: :friendly_name) filter_table_config.add(:ids, field: :id) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:locations, field: :location) filter_table_config.add(:default_encryption_configurations, field: :default_encryption_configuration) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('datasets') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'datasetReference' => ->(obj) { [:dataset_reference, GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(obj['datasetReference'], to_s)] }, 'defaultPartitionExpirationMs' => ->(obj) { [:default_partition_expiration_ms, obj['defaultPartitionExpirationMs']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'friendlyName' => ->(obj) { [:friendly_name, obj['friendlyName']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'location' => ->(obj) { [:location, obj['location']] }, 'defaultEncryptionConfiguration' => ->(obj) { [:default_encryption_configuration, GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(obj['defaultEncryptionConfiguration'], to_s)] }, } end private def product_url(_ = nil) 'https://bigquery.googleapis.com/bigquery/v2/' end def resource_base_url 'projects/{{project}}/datasets' end end ================================================ FILE: libraries/google_bigquery_table.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/bigquery/property/table_encryption_configuration' require 'google/bigquery/property/table_external_data_configuration' require 'google/bigquery/property/table_external_data_configuration_bigtable_options' require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' require 'google/bigquery/property/table_external_data_configuration_csv_options' require 'google/bigquery/property/table_external_data_configuration_google_sheets_options' require 'google/bigquery/property/table_external_data_configuration_schema' require 'google/bigquery/property/table_external_data_configuration_schema_fields' require 'google/bigquery/property/table_schema' require 'google/bigquery/property/table_schema_fields' require 'google/bigquery/property/table_streaming_buffer' require 'google/bigquery/property/table_table_reference' require 'google/bigquery/property/table_time_partitioning' require 'google/bigquery/property/table_view' require 'google/bigquery/property/table_view_user_defined_function_resources' # A provider to manage BigQuery resources. class BigQueryTable < GcpResourceBase name 'google_bigquery_table' desc 'Table' supports platform: 'gcp' attr_reader :params attr_reader :table_reference attr_reader :clustering attr_reader :creation_time attr_reader :description attr_reader :friendly_name attr_reader :id attr_reader :labels attr_reader :last_modified_time attr_reader :location attr_reader :name attr_reader :num_bytes attr_reader :num_long_term_bytes attr_reader :num_rows attr_reader :require_partition_filter attr_reader :type attr_reader :view attr_reader :time_partitioning attr_reader :streaming_buffer attr_reader :schema attr_reader :encryption_configuration attr_reader :expiration_time attr_reader :external_data_configuration attr_reader :dataset def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @table_reference = GoogleInSpec::BigQuery::Property::TableTableReference.new(@fetched['tableReference'], to_s) @clustering = @fetched['clustering'] @creation_time = @fetched['creationTime'] @description = @fetched['description'] @friendly_name = @fetched['friendlyName'] @id = @fetched['id'] @labels = @fetched['labels'] @last_modified_time = @fetched['lastModifiedTime'] @location = @fetched['location'] @name = @fetched['name'] @num_bytes = @fetched['numBytes'] @num_long_term_bytes = @fetched['numLongTermBytes'] @num_rows = @fetched['numRows'] @require_partition_filter = @fetched['requirePartitionFilter'] @type = @fetched['type'] @view = GoogleInSpec::BigQuery::Property::TableView.new(@fetched['view'], to_s) @time_partitioning = GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(@fetched['timePartitioning'], to_s) @streaming_buffer = GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(@fetched['streamingBuffer'], to_s) @schema = GoogleInSpec::BigQuery::Property::TableSchema.new(@fetched['schema'], to_s) @encryption_configuration = GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(@fetched['encryptionConfiguration'], to_s) @expiration_time = @fetched['expirationTime'] @external_data_configuration = GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(@fetched['externalDataConfiguration'], to_s) @dataset = @fetched['dataset'] end def exists? !@fetched.nil? end def to_s "Table #{@params[:name]}" end private def product_url(_ = nil) 'https://bigquery.googleapis.com/bigquery/v2/' end def resource_base_url 'projects/{{project}}/datasets/{{dataset}}/tables/{{name}}' end end ================================================ FILE: libraries/google_bigquery_tables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class BigQueryTables < GcpResourceBase name 'google_bigquery_tables' desc 'Table plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:table_references, field: :table_reference) filter_table_config.add(:clusterings, field: :clustering) filter_table_config.add(:creation_times, field: :creation_time) filter_table_config.add(:friendly_names, field: :friendly_name) filter_table_config.add(:ids, field: :id) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:last_modified_times, field: :last_modified_time) filter_table_config.add(:locations, field: :location) filter_table_config.add(:num_bytes, field: :num_bytes) filter_table_config.add(:num_long_term_bytes, field: :num_long_term_bytes) filter_table_config.add(:num_rows, field: :num_rows) filter_table_config.add(:require_partition_filters, field: :require_partition_filter) filter_table_config.add(:types, field: :type) filter_table_config.add(:views, field: :view) filter_table_config.add(:time_partitionings, field: :time_partitioning) filter_table_config.add(:streaming_buffers, field: :streaming_buffer) filter_table_config.add(:schemas, field: :schema) filter_table_config.add(:encryption_configurations, field: :encryption_configuration) filter_table_config.add(:expiration_times, field: :expiration_time) filter_table_config.add(:external_data_configurations, field: :external_data_configuration) filter_table_config.add(:datasets, field: :dataset) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('tables') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'tableReference' => ->(obj) { [:table_reference, GoogleInSpec::BigQuery::Property::TableTableReference.new(obj['tableReference'], to_s)] }, 'clustering' => ->(obj) { [:clustering, obj['clustering']] }, 'creationTime' => ->(obj) { [:creation_time, obj['creationTime']] }, 'friendlyName' => ->(obj) { [:friendly_name, obj['friendlyName']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'lastModifiedTime' => ->(obj) { [:last_modified_time, obj['lastModifiedTime']] }, 'location' => ->(obj) { [:location, obj['location']] }, 'numBytes' => ->(obj) { [:num_bytes, obj['numBytes']] }, 'numLongTermBytes' => ->(obj) { [:num_long_term_bytes, obj['numLongTermBytes']] }, 'numRows' => ->(obj) { [:num_rows, obj['numRows']] }, 'requirePartitionFilter' => ->(obj) { [:require_partition_filter, obj['requirePartitionFilter']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'view' => ->(obj) { [:view, GoogleInSpec::BigQuery::Property::TableView.new(obj['view'], to_s)] }, 'timePartitioning' => ->(obj) { [:time_partitioning, GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(obj['timePartitioning'], to_s)] }, 'streamingBuffer' => ->(obj) { [:streaming_buffer, GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(obj['streamingBuffer'], to_s)] }, 'schema' => ->(obj) { [:schema, GoogleInSpec::BigQuery::Property::TableSchema.new(obj['schema'], to_s)] }, 'encryptionConfiguration' => ->(obj) { [:encryption_configuration, GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(obj['encryptionConfiguration'], to_s)] }, 'expirationTime' => ->(obj) { [:expiration_time, obj['expirationTime']] }, 'externalDataConfiguration' => ->(obj) { [:external_data_configuration, GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(obj['externalDataConfiguration'], to_s)] }, 'dataset' => ->(obj) { [:dataset, obj['dataset']] }, } end private def product_url(_ = nil) 'https://bigquery.googleapis.com/bigquery/v2/' end def resource_base_url 'projects/{{project}}/datasets/{{dataset}}/tables' end end ================================================ FILE: libraries/google_bigtableadmin_cluster.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/bigtableadmin/property/cluster_cluster_config' require 'google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config' require 'google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config_autoscaling_limits' require 'google/bigtableadmin/property/cluster_cluster_config_cluster_autoscaling_config_autoscaling_targets' require 'google/bigtableadmin/property/cluster_encryption_config' # A provider to manage bigtableadmin resources. class BigtableadminCluster < GcpResourceBase name 'google_bigtableadmin_cluster' desc 'Cluster' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :location attr_reader :state attr_reader :serve_nodes attr_reader :cluster_config attr_reader :default_storage_type attr_reader :encryption_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @location = @fetched['location'] @state = @fetched['state'] @serve_nodes = @fetched['serveNodes'] @cluster_config = GoogleInSpec::Bigtableadmin::Property::ClusterClusterConfig.new(@fetched['clusterConfig'], to_s) @default_storage_type = @fetched['defaultStorageType'] @encryption_config = GoogleInSpec::Bigtableadmin::Property::ClusterEncryptionConfig.new(@fetched['encryptionConfig'], to_s) end def exists? !@fetched.nil? end def to_s "Cluster #{@params[:name]}" end private def product_url(_ = nil) 'https://bigtableadmin.googleapis.com/v2/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_bigtableadmin_cluster_backup.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/bigtableadmin/property/clusterbackup_encryption_info' require 'google/bigtableadmin/property/clusterbackup_encryption_info_encryption_status' # A provider to manage bigtableadmin resources. class BigtableadminClusterBackup < GcpResourceBase name 'google_bigtableadmin_cluster_backup' desc 'ClusterBackup' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :source_table attr_reader :source_backup attr_reader :expire_time attr_reader :start_time attr_reader :end_time attr_reader :size_bytes attr_reader :state attr_reader :encryption_info def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @source_table = @fetched['sourceTable'] @source_backup = @fetched['sourceBackup'] @expire_time = @fetched['expireTime'] @start_time = @fetched['startTime'] @end_time = @fetched['endTime'] @size_bytes = @fetched['sizeBytes'] @state = @fetched['state'] @encryption_info = GoogleInSpec::Bigtableadmin::Property::ClusterBackupEncryptionInfo.new(@fetched['encryptionInfo'], to_s) end def exists? !@fetched.nil? end def to_s "ClusterBackup #{@params[:name]}" end private def product_url(_ = nil) 'https://bigtableadmin.googleapis.com/v2/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_bigtableadmin_cluster_backups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class BigtableadminClusterBackups < GcpResourceBase name 'google_bigtableadmin_cluster_backups' desc 'ClusterBackup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:source_tables, field: :source_table) filter_table_config.add(:source_backups, field: :source_backup) filter_table_config.add(:expire_times, field: :expire_time) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:size_bytes, field: :size_bytes) filter_table_config.add(:states, field: :state) filter_table_config.add(:encryption_infos, field: :encryption_info) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('backups') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'sourceTable' => ->(obj) { [:source_table, obj['sourceTable']] }, 'sourceBackup' => ->(obj) { [:source_backup, obj['sourceBackup']] }, 'expireTime' => ->(obj) { [:expire_time, obj['expireTime']] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'sizeBytes' => ->(obj) { [:size_bytes, obj['sizeBytes']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'encryptionInfo' => ->(obj) { [:encryption_info, GoogleInSpec::Bigtableadmin::Property::ClusterBackupEncryptionInfo.new(obj['encryptionInfo'], to_s)] }, } end private def product_url(_ = nil) 'https://bigtableadmin.googleapis.com/v2/' end def resource_base_url '{{parent}}/backups' end end ================================================ FILE: libraries/google_bigtableadmin_clusters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class BigtableadminClusters < GcpResourceBase name 'google_bigtableadmin_clusters' desc 'Cluster plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:locations, field: :location) filter_table_config.add(:states, field: :state) filter_table_config.add(:serve_nodes, field: :serve_nodes) filter_table_config.add(:cluster_configs, field: :cluster_config) filter_table_config.add(:default_storage_types, field: :default_storage_type) filter_table_config.add(:encryption_configs, field: :encryption_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('clusters') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'location' => ->(obj) { [:location, obj['location']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'serveNodes' => ->(obj) { [:serve_nodes, obj['serveNodes']] }, 'clusterConfig' => ->(obj) { [:cluster_config, GoogleInSpec::Bigtableadmin::Property::ClusterClusterConfig.new(obj['clusterConfig'], to_s)] }, 'defaultStorageType' => ->(obj) { [:default_storage_type, obj['defaultStorageType']] }, 'encryptionConfig' => ->(obj) { [:encryption_config, GoogleInSpec::Bigtableadmin::Property::ClusterEncryptionConfig.new(obj['encryptionConfig'], to_s)] }, } end private def product_url(_ = nil) 'https://bigtableadmin.googleapis.com/v2/' end def resource_base_url '{{parent}}/clusters' end end ================================================ FILE: libraries/google_bigtableadmin_instance_app_profile.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/bigtableadmin/property/instanceappprofile_data_boost_isolation_read_only' require 'google/bigtableadmin/property/instanceappprofile_multi_cluster_routing_use_any' require 'google/bigtableadmin/property/instanceappprofile_single_cluster_routing' require 'google/bigtableadmin/property/instanceappprofile_standard_isolation' # A provider to manage bigtableadmin resources. class BigtableadminInstanceAppProfile < GcpResourceBase name 'google_bigtableadmin_instance_app_profile' desc 'InstanceAppProfile' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :etag attr_reader :description attr_reader :multi_cluster_routing_use_any attr_reader :single_cluster_routing attr_reader :priority attr_reader :standard_isolation attr_reader :data_boost_isolation_read_only def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @etag = @fetched['etag'] @description = @fetched['description'] @multi_cluster_routing_use_any = GoogleInSpec::Bigtableadmin::Property::InstanceAppProfileMultiClusterRoutingUseAny.new(@fetched['multiClusterRoutingUseAny'], to_s) @single_cluster_routing = GoogleInSpec::Bigtableadmin::Property::InstanceAppProfileSingleClusterRouting.new(@fetched['singleClusterRouting'], to_s) @priority = @fetched['priority'] @standard_isolation = GoogleInSpec::Bigtableadmin::Property::InstanceAppProfileStandardIsolation.new(@fetched['standardIsolation'], to_s) @data_boost_isolation_read_only = GoogleInSpec::Bigtableadmin::Property::InstanceAppProfileDataBoostIsolationReadOnly.new(@fetched['dataBoostIsolationReadOnly'], to_s) end def exists? !@fetched.nil? end def to_s "InstanceAppProfile #{@params[:name]}" end private def product_url(_ = nil) 'https://bigtableadmin.googleapis.com/v2/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_bigtableadmin_instance_app_profiles.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class BigtableadminInstanceAppProfiles < GcpResourceBase name 'google_bigtableadmin_instance_app_profiles' desc 'InstanceAppProfile plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:multi_cluster_routing_use_anies, field: :multi_cluster_routing_use_any) filter_table_config.add(:single_cluster_routings, field: :single_cluster_routing) filter_table_config.add(:priorities, field: :priority) filter_table_config.add(:standard_isolations, field: :standard_isolation) filter_table_config.add(:data_boost_isolation_read_onlies, field: :data_boost_isolation_read_only) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('appProfiles') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'multiClusterRoutingUseAny' => ->(obj) { [:multi_cluster_routing_use_any, GoogleInSpec::Bigtableadmin::Property::InstanceAppProfileMultiClusterRoutingUseAny.new(obj['multiClusterRoutingUseAny'], to_s)] }, 'singleClusterRouting' => ->(obj) { [:single_cluster_routing, GoogleInSpec::Bigtableadmin::Property::InstanceAppProfileSingleClusterRouting.new(obj['singleClusterRouting'], to_s)] }, 'priority' => ->(obj) { [:priority, obj['priority']] }, 'standardIsolation' => ->(obj) { [:standard_isolation, GoogleInSpec::Bigtableadmin::Property::InstanceAppProfileStandardIsolation.new(obj['standardIsolation'], to_s)] }, 'dataBoostIsolationReadOnly' => ->(obj) { [:data_boost_isolation_read_only, GoogleInSpec::Bigtableadmin::Property::InstanceAppProfileDataBoostIsolationReadOnly.new(obj['dataBoostIsolationReadOnly'], to_s)] }, } end private def product_url(_ = nil) 'https://bigtableadmin.googleapis.com/v2/' end def resource_base_url '{{parent}}/appProfiles' end end ================================================ FILE: libraries/google_billing_project_billing_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud Billing resources. class BillingProjectBillingInfo < GcpResourceBase name 'google_billing_project_billing_info' desc 'ProjectBillingInfo' supports platform: 'gcp' attr_reader :params attr_reader :project_id attr_reader :billing_account_name attr_reader :billing_enabled def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @project_id = @fetched['projectId'] @billing_account_name = @fetched['billingAccountName'] @billing_enabled = @fetched['billingEnabled'] end def exists? !@fetched.nil? end def to_s "ProjectBillingInfo #{@params[:projectId]}" end private def product_url(_ = nil) 'https://cloudbilling.googleapis.com/v1/' end def resource_base_url 'projects/{{project_id}}/billingInfo' end end ================================================ FILE: libraries/google_cloud_scheduler_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/cloudscheduler/property/job_app_engine_http_target' require 'google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing' require 'google/cloudscheduler/property/job_http_target' require 'google/cloudscheduler/property/job_http_target_oauth_token' require 'google/cloudscheduler/property/job_http_target_oidc_token' require 'google/cloudscheduler/property/job_pubsub_target' require 'google/cloudscheduler/property/job_retry_config' # A provider to manage Cloud Scheduler resources. class CloudSchedulerJob < GcpResourceBase name 'google_cloud_scheduler_job' desc 'Job' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :schedule attr_reader :time_zone attr_reader :state attr_reader :attempt_deadline attr_reader :retry_config attr_reader :pubsub_target attr_reader :app_engine_http_target attr_reader :http_target attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @schedule = @fetched['schedule'] @time_zone = @fetched['timeZone'] @state = @fetched['state'] @attempt_deadline = @fetched['attemptDeadline'] @retry_config = GoogleInSpec::CloudScheduler::Property::JobRetryConfig.new(@fetched['retryConfig'], to_s) @pubsub_target = GoogleInSpec::CloudScheduler::Property::JobPubsubTarget.new(@fetched['pubsubTarget'], to_s) @app_engine_http_target = GoogleInSpec::CloudScheduler::Property::JobAppEngineHttpTarget.new(@fetched['appEngineHttpTarget'], to_s) @http_target = GoogleInSpec::CloudScheduler::Property::JobHttpTarget.new(@fetched['httpTarget'], to_s) @region = @fetched['region'] end def exists? !@fetched.nil? end def to_s "Job #{@params[:name]}" end private def product_url(_ = nil) 'https://cloudscheduler.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{region}}/jobs/{{name}}' end end ================================================ FILE: libraries/google_cloud_scheduler_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class CloudSchedulerJobs < GcpResourceBase name 'google_cloud_scheduler_jobs' desc 'Job plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:schedules, field: :schedule) filter_table_config.add(:time_zones, field: :time_zone) filter_table_config.add(:states, field: :state) filter_table_config.add(:attempt_deadlines, field: :attempt_deadline) filter_table_config.add(:retry_configs, field: :retry_config) filter_table_config.add(:pubsub_targets, field: :pubsub_target) filter_table_config.add(:app_engine_http_targets, field: :app_engine_http_target) filter_table_config.add(:http_targets, field: :http_target) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('jobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'schedule' => ->(obj) { [:schedule, obj['schedule']] }, 'timeZone' => ->(obj) { [:time_zone, obj['timeZone']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'attemptDeadline' => ->(obj) { [:attempt_deadline, obj['attemptDeadline']] }, 'retryConfig' => ->(obj) { [:retry_config, GoogleInSpec::CloudScheduler::Property::JobRetryConfig.new(obj['retryConfig'], to_s)] }, 'pubsubTarget' => ->(obj) { [:pubsub_target, GoogleInSpec::CloudScheduler::Property::JobPubsubTarget.new(obj['pubsubTarget'], to_s)] }, 'appEngineHttpTarget' => ->(obj) { [:app_engine_http_target, GoogleInSpec::CloudScheduler::Property::JobAppEngineHttpTarget.new(obj['appEngineHttpTarget'], to_s)] }, 'httpTarget' => ->(obj) { [:http_target, GoogleInSpec::CloudScheduler::Property::JobHttpTarget.new(obj['httpTarget'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, } end private def product_url(_ = nil) 'https://cloudscheduler.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{region}}/jobs' end end ================================================ FILE: libraries/google_cloudbuild_trigger.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/cloudbuild/property/trigger_build' require 'google/cloudbuild/property/trigger_build_artifacts' require 'google/cloudbuild/property/trigger_build_artifacts_objects' require 'google/cloudbuild/property/trigger_build_artifacts_objects_timing' require 'google/cloudbuild/property/trigger_build_options' require 'google/cloudbuild/property/trigger_build_options_volumes' require 'google/cloudbuild/property/trigger_build_secrets' require 'google/cloudbuild/property/trigger_build_source' require 'google/cloudbuild/property/trigger_build_source_repo_source' require 'google/cloudbuild/property/trigger_build_source_storage_source' require 'google/cloudbuild/property/trigger_build_steps' require 'google/cloudbuild/property/trigger_github' require 'google/cloudbuild/property/trigger_github_pull_request' require 'google/cloudbuild/property/trigger_github_push' require 'google/cloudbuild/property/trigger_trigger_template' # A provider to manage Cloud Build resources. class CloudBuildTrigger < GcpResourceBase name 'google_cloudbuild_trigger' desc 'Trigger' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :name attr_reader :description attr_reader :tags attr_reader :disabled attr_reader :create_time attr_reader :substitutions attr_reader :filename attr_reader :ignored_files attr_reader :included_files attr_reader :trigger_template attr_reader :github attr_reader :build def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @id = @fetched['id'] @name = @fetched['name'] @description = @fetched['description'] @tags = @fetched['tags'] @disabled = @fetched['disabled'] @create_time = parse_time_string(@fetched['createTime']) @substitutions = @fetched['substitutions'] @filename = @fetched['filename'] @ignored_files = @fetched['ignoredFiles'] @included_files = @fetched['includedFiles'] @trigger_template = GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(@fetched['triggerTemplate'], to_s) @github = GoogleInSpec::CloudBuild::Property::TriggerGithub.new(@fetched['github'], to_s) @build = GoogleInSpec::CloudBuild::Property::TriggerBuild.new(@fetched['build'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Trigger #{@params[:id]}" end private def product_url(_ = nil) 'https://cloudbuild.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/triggers/{{id}}' end end ================================================ FILE: libraries/google_cloudbuild_triggers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class CloudBuildTriggers < GcpResourceBase name 'google_cloudbuild_triggers' desc 'Trigger plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:tags, field: :tags) filter_table_config.add(:disableds, field: :disabled) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:substitutions, field: :substitutions) filter_table_config.add(:filenames, field: :filename) filter_table_config.add(:ignored_files, field: :ignored_files) filter_table_config.add(:included_files, field: :included_files) filter_table_config.add(:trigger_templates, field: :trigger_template) filter_table_config.add(:githubs, field: :github) filter_table_config.add(:builds, field: :build) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('triggers') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'tags' => ->(obj) { [:tags, obj['tags']] }, 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'substitutions' => ->(obj) { [:substitutions, obj['substitutions']] }, 'filename' => ->(obj) { [:filename, obj['filename']] }, 'ignoredFiles' => ->(obj) { [:ignored_files, obj['ignoredFiles']] }, 'includedFiles' => ->(obj) { [:included_files, obj['includedFiles']] }, 'triggerTemplate' => ->(obj) { [:trigger_template, GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(obj['triggerTemplate'], to_s)] }, 'github' => ->(obj) { [:github, GoogleInSpec::CloudBuild::Property::TriggerGithub.new(obj['github'], to_s)] }, 'build' => ->(obj) { [:build, GoogleInSpec::CloudBuild::Property::TriggerBuild.new(obj['build'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://cloudbuild.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/triggers' end end ================================================ FILE: libraries/google_cloudfunctions_cloud_function.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/cloudfunctions/property/cloudfunction_event_trigger' require 'google/cloudfunctions/property/cloudfunction_https_trigger' require 'google/cloudfunctions/property/cloudfunction_source_repository' # A provider to manage Cloud Functions resources. class CloudFunctionsCloudFunction < GcpResourceBase name 'google_cloudfunctions_cloud_function' desc 'CloudFunction' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :status attr_reader :entry_point attr_reader :runtime attr_reader :timeout attr_reader :available_memory_mb attr_reader :service_account_email attr_reader :update_time attr_reader :version_id attr_reader :labels attr_reader :environment_variables attr_reader :source_archive_url attr_reader :source_upload_url attr_reader :source_repository attr_reader :https_trigger attr_reader :event_trigger attr_reader :location def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @status = @fetched['status'] @entry_point = @fetched['entryPoint'] @runtime = @fetched['runtime'] @timeout = @fetched['timeout'] @available_memory_mb = @fetched['availableMemoryMb'] @service_account_email = @fetched['serviceAccountEmail'] @update_time = @fetched['updateTime'] @version_id = @fetched['versionId'] @labels = @fetched['labels'] @environment_variables = @fetched['environmentVariables'] @source_archive_url = @fetched['sourceArchiveUrl'] @source_upload_url = @fetched['sourceUploadUrl'] @source_repository = GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(@fetched['sourceRepository'], to_s) @https_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(@fetched['httpsTrigger'], to_s) @event_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(@fetched['eventTrigger'], to_s) @location = @fetched['location'] end def exists? !@fetched.nil? end def to_s "CloudFunction #{@params[:name]}" end private def product_url(_ = nil) 'https://cloudfunctions.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/functions/{{name}}' end end ================================================ FILE: libraries/google_cloudfunctions_cloud_functions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class CloudFunctionsCloudFunctions < GcpResourceBase name 'google_cloudfunctions_cloud_functions' desc 'CloudFunction plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:entry_points, field: :entry_point) filter_table_config.add(:runtimes, field: :runtime) filter_table_config.add(:timeouts, field: :timeout) filter_table_config.add(:available_memory_mbs, field: :available_memory_mb) filter_table_config.add(:service_account_emails, field: :service_account_email) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:version_ids, field: :version_id) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:environment_variables, field: :environment_variables) filter_table_config.add(:source_archive_urls, field: :source_archive_url) filter_table_config.add(:source_upload_urls, field: :source_upload_url) filter_table_config.add(:source_repositories, field: :source_repository) filter_table_config.add(:https_triggers, field: :https_trigger) filter_table_config.add(:event_triggers, field: :event_trigger) filter_table_config.add(:locations, field: :location) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('functions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'entryPoint' => ->(obj) { [:entry_point, obj['entryPoint']] }, 'runtime' => ->(obj) { [:runtime, obj['runtime']] }, 'timeout' => ->(obj) { [:timeout, obj['timeout']] }, 'availableMemoryMb' => ->(obj) { [:available_memory_mb, obj['availableMemoryMb']] }, 'serviceAccountEmail' => ->(obj) { [:service_account_email, obj['serviceAccountEmail']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'versionId' => ->(obj) { [:version_id, obj['versionId']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'environmentVariables' => ->(obj) { [:environment_variables, obj['environmentVariables']] }, 'sourceArchiveUrl' => ->(obj) { [:source_archive_url, obj['sourceArchiveUrl']] }, 'sourceUploadUrl' => ->(obj) { [:source_upload_url, obj['sourceUploadUrl']] }, 'sourceRepository' => ->(obj) { [:source_repository, GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(obj['sourceRepository'], to_s)] }, 'httpsTrigger' => ->(obj) { [:https_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(obj['httpsTrigger'], to_s)] }, 'eventTrigger' => ->(obj) { [:event_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(obj['eventTrigger'], to_s)] }, 'location' => ->(obj) { [:location, obj['location']] }, } end private def product_url(_ = nil) 'https://cloudfunctions.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/functions' end end ================================================ FILE: libraries/google_composer_project_location_environment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/composer/property/projectlocationenvironment_config' require 'google/composer/property/projectlocationenvironment_config_database_config' require 'google/composer/property/projectlocationenvironment_config_encryption_config' require 'google/composer/property/projectlocationenvironment_config_maintenance_window' require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config' require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks' require 'google/composer/property/projectlocationenvironment_config_node_config' require 'google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy' require 'google/composer/property/projectlocationenvironment_config_private_environment_config' require 'google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config' require 'google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config' require 'google/composer/property/projectlocationenvironment_config_recovery_config' require 'google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config' require 'google/composer/property/projectlocationenvironment_config_software_config' require 'google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides' require 'google/composer/property/projectlocationenvironment_config_software_config_env_variables' require 'google/composer/property/projectlocationenvironment_config_software_config_pypi_packages' require 'google/composer/property/projectlocationenvironment_config_web_server_config' require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control' require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges' require 'google/composer/property/projectlocationenvironment_config_workloads_config' require 'google/composer/property/projectlocationenvironment_config_workloads_config_scheduler' require 'google/composer/property/projectlocationenvironment_config_workloads_config_triggerer' require 'google/composer/property/projectlocationenvironment_config_workloads_config_web_server' require 'google/composer/property/projectlocationenvironment_config_workloads_config_worker' require 'google/composer/property/projectlocationenvironment_labels' require 'google/composer/property/projectlocationenvironment_storage_config' # A provider to manage composer resources. class ComposerProjectLocationEnvironment < GcpResourceBase name 'google_composer_project_location_environment' desc 'ProjectLocationEnvironment' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :config attr_reader :uuid attr_reader :state attr_reader :create_time attr_reader :update_time attr_reader :labels attr_reader :satisfies_pzs attr_reader :storage_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfig.new(@fetched['config'], to_s) @uuid = @fetched['uuid'] @state = @fetched['state'] @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @labels = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentLabels.new(@fetched['labels'], to_s) @satisfies_pzs = @fetched['satisfiesPzs'] @storage_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentStorageConfig.new(@fetched['storageConfig'], to_s) end def exists? !@fetched.nil? end def to_s "ProjectLocationEnvironment #{@params[:name]}" end private def product_url(_ = nil) 'https://composer.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_composer_project_location_environments.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComposerProjectLocationEnvironments < GcpResourceBase name 'google_composer_project_location_environments' desc 'ProjectLocationEnvironment plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:configs, field: :config) filter_table_config.add(:uuids, field: :uuid) filter_table_config.add(:states, field: :state) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) filter_table_config.add(:storage_configs, field: :storage_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('environments') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'config' => ->(obj) { [:config, GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfig.new(obj['config'], to_s)] }, 'uuid' => ->(obj) { [:uuid, obj['uuid']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Composer::Property::ProjectLocationEnvironmentLabels.new(obj['labels'], to_s)] }, 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, 'storageConfig' => ->(obj) { [:storage_config, GoogleInSpec::Composer::Property::ProjectLocationEnvironmentStorageConfig.new(obj['storageConfig'], to_s)] }, } end private def product_url(_ = nil) 'https://composer.googleapis.com/v1/' end def resource_base_url '{{parent}}/environments' end end ================================================ FILE: libraries/google_composer_project_location_image_versions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComposerProjectLocationImageVersions < GcpResourceBase name 'google_composer_project_location_image_versions' desc 'ProjectLocationImageVersion plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:image_versions, field: :image_versions) filter_table_config.add(:next_page_tokens, field: :next_page_token) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('imageVersions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'imageVersions' => ->(obj) { [:image_versions, obj['imageVersions']] }, 'nextPageToken' => ->(obj) { [:next_page_token, obj['nextPageToken']] }, } end private def product_url(_ = nil) 'https://composer.googleapis.com/v1/' end def resource_base_url '{{parent}}/imageVersions' end end ================================================ FILE: libraries/google_compute_accelerator_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/acceleratortype_deprecated' # A provider to manage Compute Engine resources. class ComputeAcceleratorType < GcpResourceBase name 'google_compute_accelerator_type' desc 'AcceleratorType' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :deprecated attr_reader :description attr_reader :id attr_reader :name attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @deprecated = GoogleInSpec::Compute::Property::AcceleratorTypeDeprecated.new(@fetched['deprecated'], to_s) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "AcceleratorType #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/acceleratorTypes/{{name}}' end end ================================================ FILE: libraries/google_compute_accelerator_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeAcceleratorTypes < GcpResourceBase name 'google_compute_accelerator_types' desc 'AcceleratorType plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:deprecateds, field: :deprecated) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::AcceleratorTypeDeprecated.new(obj['deprecated'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/acceleratorTypes' end end ================================================ FILE: libraries/google_compute_address.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeAddress < GcpResourceBase name 'google_compute_address' desc 'Address' supports platform: 'gcp' attr_reader :params attr_reader :address attr_reader :address_type attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :purpose attr_reader :network_tier attr_reader :subnetwork attr_reader :users attr_reader :labels attr_reader :label_fingerprint attr_reader :status attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @address = @fetched['address'] @address_type = @fetched['addressType'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @purpose = @fetched['purpose'] @network_tier = @fetched['networkTier'] @subnetwork = @fetched['subnetwork'] @users = @fetched['users'] @labels = @fetched['labels'] @label_fingerprint = @fetched['labelFingerprint'] @status = @fetched['status'] @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Address #{@params[:name]}" end def address_ip_exists !@address.nil? end # How many users are there for the address def user_count return 0 if @users.nil? @users.count end # Return the first user resource base name def user_resource_name @users.first.split('/').last end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{location}}/addresses/{{name}}' end end ================================================ FILE: libraries/google_compute_addresses.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeAddresss < GcpResourceBase name 'google_compute_addresses' desc 'Address plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:addresses, field: :address) filter_table_config.add(:address_types, field: :address_type) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:purposes, field: :purpose) filter_table_config.add(:network_tiers, field: :network_tier) filter_table_config.add(:subnetworks, field: :subnetwork) filter_table_config.add(:users, field: :users) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'address' => ->(obj) { [:address, obj['address']] }, 'addressType' => ->(obj) { [:address_type, obj['addressType']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'purpose' => ->(obj) { [:purpose, obj['purpose']] }, 'networkTier' => ->(obj) { [:network_tier, obj['networkTier']] }, 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, 'users' => ->(obj) { [:users, obj['users']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{location}}/addresses' end end ================================================ FILE: libraries/google_compute_autoscaler.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/autoscaler_autoscaling_policy' require 'google/compute/property/autoscaler_autoscaling_policy_cpu_utilization' require 'google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations' require 'google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization' require 'google/compute/property/autoscaler_autoscaling_policy_scale_down_control' require 'google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas' require 'google/compute/property/autoscaler_autoscaling_policy_scale_in_control' require 'google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas' require 'google/compute/property/autoscaler_autoscaling_policy_scaling_schedules' # A provider to manage Compute Engine resources. class ComputeAutoscaler < GcpResourceBase name 'google_compute_autoscaler' desc 'Autoscaler' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :autoscaling_policy attr_reader :target attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @id = @fetched['id'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @name = @fetched['name'] @description = @fetched['description'] @autoscaling_policy = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(@fetched['autoscalingPolicy'], to_s) @target = @fetched['target'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Autoscaler #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/autoscalers/{{name}}' end end ================================================ FILE: libraries/google_compute_autoscalers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeAutoscalers < GcpResourceBase name 'google_compute_autoscalers' desc 'Autoscaler plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:autoscaling_policies, field: :autoscaling_policy) filter_table_config.add(:targets, field: :target) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'autoscalingPolicy' => ->(obj) { [:autoscaling_policy, GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(obj['autoscalingPolicy'], to_s)] }, 'target' => ->(obj) { [:target, obj['target']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/autoscalers' end end ================================================ FILE: libraries/google_compute_backend_bucket.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/backendbucket_cdn_policy' require 'google/compute/property/backendbucket_cdn_policy_negative_caching_policy' # A provider to manage Compute Engine resources. class ComputeBackendBucket < GcpResourceBase name 'google_compute_backend_bucket' desc 'BackendBucket' supports platform: 'gcp' attr_reader :params attr_reader :bucket_name attr_reader :cdn_policy attr_reader :custom_response_headers attr_reader :creation_timestamp attr_reader :description attr_reader :enable_cdn attr_reader :id attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bucket_name = @fetched['bucketName'] @cdn_policy = GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(@fetched['cdnPolicy'], to_s) @custom_response_headers = @fetched['customResponseHeaders'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @enable_cdn = @fetched['enableCdn'] @id = @fetched['id'] @name = @fetched['name'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "BackendBucket #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/backendBuckets/{{name}}' end end ================================================ FILE: libraries/google_compute_backend_buckets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeBackendBuckets < GcpResourceBase name 'google_compute_backend_buckets' desc 'BackendBucket plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:bucket_names, field: :bucket_name) filter_table_config.add(:cdn_policies, field: :cdn_policy) filter_table_config.add(:custom_response_headers, field: :custom_response_headers) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:enable_cdns, field: :enable_cdn) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'bucketName' => ->(obj) { [:bucket_name, obj['bucketName']] }, 'cdnPolicy' => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(obj['cdnPolicy'], to_s)] }, 'customResponseHeaders' => ->(obj) { [:custom_response_headers, obj['customResponseHeaders']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'enableCdn' => ->(obj) { [:enable_cdn, obj['enableCdn']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/backendBuckets' end end ================================================ FILE: libraries/google_compute_backend_service.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/backendservice_backends' require 'google/compute/property/backendservice_cdn_policy' require 'google/compute/property/backendservice_cdn_policy_cache_key_policy' require 'google/compute/property/backendservice_cdn_policy_negative_caching_policy' require 'google/compute/property/backendservice_circuit_breakers' require 'google/compute/property/backendservice_circuit_breakers_connect_timeout' require 'google/compute/property/backendservice_connection_draining' require 'google/compute/property/backendservice_consistent_hash' require 'google/compute/property/backendservice_consistent_hash_http_cookie' require 'google/compute/property/backendservice_consistent_hash_http_cookie_ttl' require 'google/compute/property/backendservice_iap' require 'google/compute/property/backendservice_log_config' require 'google/compute/property/backendservice_outlier_detection' require 'google/compute/property/backendservice_outlier_detection_base_ejection_time' require 'google/compute/property/backendservice_outlier_detection_interval' # A provider to manage Compute Engine resources. class ComputeBackendService < GcpResourceBase name 'google_compute_backend_service' desc 'BackendService' supports platform: 'gcp' attr_reader :params attr_reader :affinity_cookie_ttl_sec attr_reader :backends attr_reader :circuit_breakers attr_reader :consistent_hash attr_reader :cdn_policy attr_reader :connection_draining attr_reader :creation_timestamp attr_reader :custom_request_headers attr_reader :custom_response_headers attr_reader :fingerprint attr_reader :description attr_reader :enable_cdn attr_reader :health_checks attr_reader :id attr_reader :iap attr_reader :load_balancing_scheme attr_reader :locality_lb_policy attr_reader :name attr_reader :outlier_detection attr_reader :port_name attr_reader :protocol attr_reader :security_policy attr_reader :session_affinity attr_reader :timeout_sec attr_reader :log_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @affinity_cookie_ttl_sec = @fetched['affinityCookieTtlSec'] @backends = GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(@fetched['backends'], to_s) @circuit_breakers = GoogleInSpec::Compute::Property::BackendServiceCircuitBreakers.new(@fetched['circuitBreakers'], to_s) @consistent_hash = GoogleInSpec::Compute::Property::BackendServiceConsistentHash.new(@fetched['consistentHash'], to_s) @cdn_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(@fetched['cdnPolicy'], to_s) @connection_draining = GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(@fetched['connectionDraining'], to_s) @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @custom_request_headers = @fetched['customRequestHeaders'] @custom_response_headers = @fetched['customResponseHeaders'] @fingerprint = @fetched['fingerprint'] @description = @fetched['description'] @enable_cdn = @fetched['enableCDN'] @health_checks = @fetched['healthChecks'] @id = @fetched['id'] @iap = GoogleInSpec::Compute::Property::BackendServiceIap.new(@fetched['iap'], to_s) @load_balancing_scheme = @fetched['loadBalancingScheme'] @locality_lb_policy = @fetched['localityLbPolicy'] @name = @fetched['name'] @outlier_detection = GoogleInSpec::Compute::Property::BackendServiceOutlierDetection.new(@fetched['outlierDetection'], to_s) @port_name = @fetched['portName'] @protocol = @fetched['protocol'] @security_policy = @fetched['securityPolicy'] @session_affinity = @fetched['sessionAffinity'] @timeout_sec = @fetched['timeoutSec'] @log_config = GoogleInSpec::Compute::Property::BackendServiceLogConfig.new(@fetched['logConfig'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "BackendService #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/backendServices/{{name}}' end end ================================================ FILE: libraries/google_compute_backend_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeBackendServices < GcpResourceBase name 'google_compute_backend_services' desc 'BackendService plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:affinity_cookie_ttl_secs, field: :affinity_cookie_ttl_sec) filter_table_config.add(:backends, field: :backends) filter_table_config.add(:circuit_breakers, field: :circuit_breakers) filter_table_config.add(:consistent_hashes, field: :consistent_hash) filter_table_config.add(:cdn_policies, field: :cdn_policy) filter_table_config.add(:connection_drainings, field: :connection_draining) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:custom_request_headers, field: :custom_request_headers) filter_table_config.add(:custom_response_headers, field: :custom_response_headers) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:enable_cdns, field: :enable_cdn) filter_table_config.add(:health_checks, field: :health_checks) filter_table_config.add(:ids, field: :id) filter_table_config.add(:iaps, field: :iap) filter_table_config.add(:load_balancing_schemes, field: :load_balancing_scheme) filter_table_config.add(:locality_lb_policies, field: :locality_lb_policy) filter_table_config.add(:names, field: :name) filter_table_config.add(:outlier_detections, field: :outlier_detection) filter_table_config.add(:port_names, field: :port_name) filter_table_config.add(:protocols, field: :protocol) filter_table_config.add(:security_policies, field: :security_policy) filter_table_config.add(:session_affinities, field: :session_affinity) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.add(:log_configs, field: :log_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'affinityCookieTtlSec' => ->(obj) { [:affinity_cookie_ttl_sec, obj['affinityCookieTtlSec']] }, 'backends' => ->(obj) { [:backends, GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(obj['backends'], to_s)] }, 'circuitBreakers' => ->(obj) { [:circuit_breakers, GoogleInSpec::Compute::Property::BackendServiceCircuitBreakers.new(obj['circuitBreakers'], to_s)] }, 'consistentHash' => ->(obj) { [:consistent_hash, GoogleInSpec::Compute::Property::BackendServiceConsistentHash.new(obj['consistentHash'], to_s)] }, 'cdnPolicy' => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(obj['cdnPolicy'], to_s)] }, 'connectionDraining' => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(obj['connectionDraining'], to_s)] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'customRequestHeaders' => ->(obj) { [:custom_request_headers, obj['customRequestHeaders']] }, 'customResponseHeaders' => ->(obj) { [:custom_response_headers, obj['customResponseHeaders']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'enableCDN' => ->(obj) { [:enable_cdn, obj['enableCDN']] }, 'healthChecks' => ->(obj) { [:health_checks, obj['healthChecks']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'iap' => ->(obj) { [:iap, GoogleInSpec::Compute::Property::BackendServiceIap.new(obj['iap'], to_s)] }, 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, 'localityLbPolicy' => ->(obj) { [:locality_lb_policy, obj['localityLbPolicy']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'outlierDetection' => ->(obj) { [:outlier_detection, GoogleInSpec::Compute::Property::BackendServiceOutlierDetection.new(obj['outlierDetection'], to_s)] }, 'portName' => ->(obj) { [:port_name, obj['portName']] }, 'protocol' => ->(obj) { [:protocol, obj['protocol']] }, 'securityPolicy' => ->(obj) { [:security_policy, obj['securityPolicy']] }, 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::BackendServiceLogConfig.new(obj['logConfig'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/backendServices' end end ================================================ FILE: libraries/google_compute_disk.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/disk_disk_encryption_key' require 'google/compute/property/disk_source_image_encryption_key' require 'google/compute/property/disk_source_snapshot_encryption_key' # A provider to manage Compute Engine resources. class ComputeDisk < GcpResourceBase name 'google_compute_disk' desc 'Disk' supports platform: 'gcp' attr_reader :params attr_reader :label_fingerprint attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :last_attach_timestamp attr_reader :last_detach_timestamp attr_reader :labels attr_reader :licenses attr_reader :name attr_reader :size_gb attr_reader :users attr_reader :physical_block_size_bytes attr_reader :interface attr_reader :type attr_reader :source_image attr_reader :resource_policies attr_reader :multi_writer attr_reader :zone attr_reader :source_image_encryption_key attr_reader :source_image_id attr_reader :disk_encryption_key attr_reader :source_snapshot attr_reader :source_snapshot_encryption_key attr_reader :source_snapshot_id def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @label_fingerprint = @fetched['labelFingerprint'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @last_attach_timestamp = parse_time_string(@fetched['lastAttachTimestamp']) @last_detach_timestamp = parse_time_string(@fetched['lastDetachTimestamp']) @labels = @fetched['labels'] @licenses = @fetched['licenses'] @name = @fetched['name'] @size_gb = @fetched['sizeGb'] @users = @fetched['users'] @physical_block_size_bytes = @fetched['physicalBlockSizeBytes'] @interface = @fetched['interface'] @type = @fetched['type'] @source_image = @fetched['sourceImage'] @resource_policies = @fetched['resourcePolicies'] @multi_writer = @fetched['multiWriter'] @zone = @fetched['zone'] @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched['sourceImageEncryptionKey'], to_s) @source_image_id = @fetched['sourceImageId'] @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched['diskEncryptionKey'], to_s) @source_snapshot = @fetched['sourceSnapshot'] @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched['sourceSnapshotEncryptionKey'], to_s) @source_snapshot_id = @fetched['sourceSnapshotId'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Disk #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/disks/{{name}}' end end ================================================ FILE: libraries/google_compute_disk_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/disktype_deprecated' # A provider to manage Compute Engine resources. class ComputeDiskType < GcpResourceBase name 'google_compute_disk_type' desc 'DiskType' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :default_disk_size_gb attr_reader :deprecated attr_reader :description attr_reader :id attr_reader :name attr_reader :valid_disk_size attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @default_disk_size_gb = @fetched['defaultDiskSizeGb'] @deprecated = GoogleInSpec::Compute::Property::DiskTypeDeprecated.new(@fetched['deprecated'], to_s) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @valid_disk_size = @fetched['validDiskSize'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "DiskType #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/diskTypes/{{name}}' end end ================================================ FILE: libraries/google_compute_disk_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeDiskTypes < GcpResourceBase name 'google_compute_disk_types' desc 'DiskType plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:default_disk_size_gbs, field: :default_disk_size_gb) filter_table_config.add(:deprecateds, field: :deprecated) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:valid_disk_sizes, field: :valid_disk_size) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'defaultDiskSizeGb' => ->(obj) { [:default_disk_size_gb, obj['defaultDiskSizeGb']] }, 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::DiskTypeDeprecated.new(obj['deprecated'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'validDiskSize' => ->(obj) { [:valid_disk_size, obj['validDiskSize']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/diskTypes' end end ================================================ FILE: libraries/google_compute_disks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeDisks < GcpResourceBase name 'google_compute_disks' desc 'Disk plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:last_attach_timestamps, field: :last_attach_timestamp) filter_table_config.add(:last_detach_timestamps, field: :last_detach_timestamp) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:licenses, field: :licenses) filter_table_config.add(:names, field: :name) filter_table_config.add(:size_gbs, field: :size_gb) filter_table_config.add(:users, field: :users) filter_table_config.add(:physical_block_size_bytes, field: :physical_block_size_bytes) filter_table_config.add(:interfaces, field: :interface) filter_table_config.add(:types, field: :type) filter_table_config.add(:source_images, field: :source_image) filter_table_config.add(:resource_policies, field: :resource_policies) filter_table_config.add(:multi_writers, field: :multi_writer) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:source_image_encryption_keys, field: :source_image_encryption_key) filter_table_config.add(:source_image_ids, field: :source_image_id) filter_table_config.add(:disk_encryption_keys, field: :disk_encryption_key) filter_table_config.add(:source_snapshots, field: :source_snapshot) filter_table_config.add(:source_snapshot_encryption_keys, field: :source_snapshot_encryption_key) filter_table_config.add(:source_snapshot_ids, field: :source_snapshot_id) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'lastAttachTimestamp' => ->(obj) { [:last_attach_timestamp, parse_time_string(obj['lastAttachTimestamp'])] }, 'lastDetachTimestamp' => ->(obj) { [:last_detach_timestamp, parse_time_string(obj['lastDetachTimestamp'])] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'licenses' => ->(obj) { [:licenses, obj['licenses']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'sizeGb' => ->(obj) { [:size_gb, obj['sizeGb']] }, 'users' => ->(obj) { [:users, obj['users']] }, 'physicalBlockSizeBytes' => ->(obj) { [:physical_block_size_bytes, obj['physicalBlockSizeBytes']] }, 'interface' => ->(obj) { [:interface, obj['interface']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'sourceImage' => ->(obj) { [:source_image, obj['sourceImage']] }, 'resourcePolicies' => ->(obj) { [:resource_policies, obj['resourcePolicies']] }, 'multiWriter' => ->(obj) { [:multi_writer, obj['multiWriter']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'sourceImageEncryptionKey' => ->(obj) { [:source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj['sourceImageEncryptionKey'], to_s)] }, 'sourceImageId' => ->(obj) { [:source_image_id, obj['sourceImageId']] }, 'diskEncryptionKey' => ->(obj) { [:disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj['diskEncryptionKey'], to_s)] }, 'sourceSnapshot' => ->(obj) { [:source_snapshot, obj['sourceSnapshot']] }, 'sourceSnapshotEncryptionKey' => ->(obj) { [:source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj['sourceSnapshotEncryptionKey'], to_s)] }, 'sourceSnapshotId' => ->(obj) { [:source_snapshot_id, obj['sourceSnapshotId']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/disks' end end ================================================ FILE: libraries/google_compute_external_vpn_gateway.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/externalvpngateway_interfaces' # A provider to manage Compute Engine resources. class ComputeexternalVpnGateway < GcpResourceBase name 'google_compute_external_vpn_gateway' desc 'externalVpnGateway' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :redundancy_type attr_reader :interfaces attr_reader :labels attr_reader :label_fingerprint attr_reader :next_page_token attr_reader :description attr_reader :id attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @redundancy_type = @fetched['redundancyType'] @interfaces = GoogleInSpec::Compute::Property::ExternalVpnGatewayInterfacesArray.parse(@fetched['interfaces'], to_s) @labels = @fetched['labels'] @label_fingerprint = @fetched['labelFingerprint'] @next_page_token = @fetched['nextPageToken'] @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "externalVpnGateway #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/externalVpnGateways/{{name}}' end end ================================================ FILE: libraries/google_compute_external_vpn_gateways.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeexternalVpnGateways < GcpResourceBase name 'google_compute_external_vpn_gateways' desc 'externalVpnGateway plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:redundancy_types, field: :redundancy_type) filter_table_config.add(:interfaces, field: :interfaces) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:next_page_tokens, field: :next_page_token) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'redundancyType' => ->(obj) { [:redundancy_type, obj['redundancyType']] }, 'interfaces' => ->(obj) { [:interfaces, GoogleInSpec::Compute::Property::ExternalVpnGatewayInterfacesArray.parse(obj['interfaces'], to_s)] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'nextPageToken' => ->(obj) { [:next_page_token, obj['nextPageToken']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/externalVpnGateways' end end ================================================ FILE: libraries/google_compute_firewall.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/firewall_allowed' require 'google/compute/property/firewall_denied' require 'google/compute/property/firewall_log_config' # A provider to manage Compute Engine resources. class ComputeFirewall < GcpResourceBase name 'google_compute_firewall' desc 'Firewall' supports platform: 'gcp' attr_reader :params attr_reader :allowed attr_reader :creation_timestamp attr_reader :denied attr_reader :description attr_reader :destination_ranges attr_reader :direction attr_reader :disabled attr_reader :log_config attr_reader :id attr_reader :name attr_reader :network attr_reader :priority attr_reader :source_ranges attr_reader :source_service_accounts attr_reader :source_tags attr_reader :target_service_accounts attr_reader :target_tags attr_reader :action def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @allowed = GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(@fetched['allowed'], to_s) @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @denied = GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(@fetched['denied'], to_s) @description = @fetched['description'] @destination_ranges = @fetched['destinationRanges'] @direction = @fetched['direction'] @disabled = @fetched['disabled'] @log_config = GoogleInSpec::Compute::Property::FirewallLogConfig.new(@fetched['logConfig'], to_s) @id = @fetched['id'] @name = @fetched['name'] @network = @fetched['network'] @priority = @fetched['priority'] @source_ranges = @fetched['sourceRanges'] @source_service_accounts = @fetched['sourceServiceAccounts'] @source_tags = @fetched['sourceTags'] @target_service_accounts = @fetched['targetServiceAccounts'] @target_tags = @fetched['targetTags'] @action = @allowed.nil? ? 'deny' : 'allow' end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Firewall #{@params[:name]}" end # Check whether the firewall rule allows HTTP access (tcp ingress on port 80) def allowed_http? port_protocol_allowed('80') end def denied_http? port_protocol_denied('80') end # Check whether the firewall rule allows SSH access (tcp ingress on port 22) def allowed_ssh? port_protocol_allowed('22') end def denied_ssh? port_protocol_denied('22') end def allowed_https? port_protocol_allowed('443') end def denied_https? port_protocol_denied('443') end def allowed_rdp? port_protocol_allowed('3389') end def denied_rdp? port_protocol_denied('3389') end def allowed_dns? port_protocol_allowed('53') || port_protocol_allowed('53', 'udp') end def allowed_cifs? port_protocol_allowed('445', 'udp') end def allowed_ftp? port_protocol_allowed('20') || port_protocol_allowed('21') end def allowed_hdfs_name_node_service? port_protocol_allowed('8020') end def allowed_name_node_webui_service? port_protocol_allowed('50070') || port_protocol_allowed('50470') end def allowed_kibana? port_protocol_allowed('5601') end def allowed_mysql? port_protocol_allowed('4333') || port_protocol_allowed('3306') end def allowed_net_bios? port_protocol_allowed('137', 'udp') || port_protocol_allowed('138', 'udp') end def allowed_oracle? port_protocol_allowed('1521') end def allowed_postgre_sql? port_protocol_allowed('5432') end def allowed_rpc? port_protocol_allowed('135') end def allowed_sql_server? port_protocol_allowed('1434') || port_protocol_allowed('1433') end def allowed_smtp? port_protocol_allowed('25') end def allowed_windows_smb? port_protocol_allowed('445') end def allowed_vnc_server? port_protocol_allowed('5900') end def allowed_vnc_client? port_protocol_allowed('5500') end def allowed_telnet? port_protocol_allowed('23') end def allowed_oracle_auto_data_warehouse? port_protocol_allowed('1522') end def allowed_salt_master? port_protocol_allowed('4505') || port_protocol_allowed('4506') end def allowed_docker? port_protocol_allowed('2375') || port_protocol_allowed('2376') end def allow_port_protocol?(port, protocol) port_protocol_allowed(port, protocol) end RSpec::Matchers.alias_matcher :allow_port_protocol, :be_allow_port_protocol def deny_port_protocol?(port, protocol) port_protocol_denied(port, protocol) end RSpec::Matchers.alias_matcher :deny_port_protocol, :be_deny_port_protocol # initial implementation allows to search for target source and destination tags - can # filter plural firewalls based on direction to pin down the desired rules and choose the appropriate method # see similar below example for ip_range_list def allow_source_tags?(tag_list) return false if !defined?(source_tags) || source_tags.nil? match_list_helper(source_tags, tag_list) end RSpec::Matchers.alias_matcher :allow_source_tags, :be_allow_source_tags def deny_source_tags?(tag_list) return false if !defined?(source_tags) || source_tags.nil? match_list_helper(source_tags, tag_list) end RSpec::Matchers.alias_matcher :deny_source_tags, :be_deny_source_tags def allow_target_tags?(tag_list) return false if !defined?(target_tags) || target_tags.nil? match_list_helper(target_tags, tag_list) end RSpec::Matchers.alias_matcher :allow_target_tags, :be_allow_target_tags def deny_target_tags?(tag_list) return false if !defined?(target_tags) || target_tags.nil? match_list_helper(target_tags, tag_list) end RSpec::Matchers.alias_matcher :deny_target_tags, :be_deny_target_tags def allow_source_tags_only?(tag_list) return false if !defined?(source_tags) || source_tags.nil? match_list_helper(source_tags, tag_list, true) end RSpec::Matchers.alias_matcher :allow_source_tags_only, :be_allow_source_tags_only def deny_source_tags_only?(tag_list) return false if !defined?(source_tags) || source_tags.nil? match_list_helper(source_tags, tag_list, true) end RSpec::Matchers.alias_matcher :deny_source_tags_only, :be_deny_source_tags_only def allow_target_tags_only?(tag_list) return false if !defined?(target_tags) || target_tags.nil? match_list_helper(target_tags, tag_list, true) end RSpec::Matchers.alias_matcher :allow_target_tags_only, :be_allow_target_tags_only def deny_target_tags_only?(tag_list) return false if !defined?(target_tags) || target_tags.nil? match_list_helper(target_tags, tag_list, true) end RSpec::Matchers.alias_matcher :deny_target_tags_only, :be_deny_target_tags_only def match_list_helper(source_list, target_list, only = false) # helps streamline matching exact equality versus inclusion of target and source lists return source_list.sort == target_list.sort if only # i.e. exact equality # check the source list includes at least all specified target list elements target_list.each do |must_be_present| return false if !source_list.include? must_be_present end true end # initial implementation is direction agnostic and treats IP ranges separately # Can revisit in the future to include AWS style matchers such as allow_in/out with multiple criteria # including protocols/ports for example def allow_ip_ranges_only?(ip_range_list) allow_ip_range_list(ip_range_list, true) end RSpec::Matchers.alias_matcher :allow_ip_ranges_only, :be_allow_ip_ranges_only def deny_ip_ranges_only?(ip_range_list) deny_ip_range_list(ip_range_list, true) end RSpec::Matchers.alias_matcher :deny_ip_ranges_only, :be_deny_ip_ranges_only def allow_ip_ranges?(ip_range_list) allow_ip_range_list(ip_range_list) end RSpec::Matchers.alias_matcher :allow_ip_ranges, :be_allow_ip_ranges def deny_ip_ranges?(ip_range_list) deny_ip_range_list(ip_range_list) end RSpec::Matchers.alias_matcher :deny_ip_ranges, :be_deny_ip_ranges def allow_ip_range_list(ip_range_list, only = false) raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall is missing expected property 'direction'" if !defined?(direction) || direction.nil? raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall is missing expected property 'allowed'" if !defined?(allowed) || allowed.nil? # the intention here is for firewall rules plural to be filtered based on direction, then tested for particular IP ranges # e.g. describe google_compute_firewalls(project: 'chef-inspec-gcp').where(firewall_direction: 'INGRESS').firewall_names.each do |firewall_name| do # describe google_compute_firewall(project: 'chef-inspec-gcp', name: firewall_name) do # it { should_not allow_ip_ranges ["0.0.0.0/0"] } # end # end # direction affects what the property is e.g. INGRESS->source_ranges, EGRESS->destination_ranges ranges = nil if direction == 'INGRESS' return false if !defined?(source_ranges) || source_ranges.nil? ranges = source_ranges else return false if !defined?(destination_ranges) || destination_ranges.nil? ranges = destination_ranges end return false if !defined?(ranges) || ranges.nil? # so now we have a list of IP addresses to compare match_list_helper(ranges, ip_range_list, only) end def deny_ip_range_list(ip_range_list, only = false) raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall is missing expected property 'direction'" if !defined?(direction) || direction.nil? raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall is missing expected property 'denied'" if !defined?(denied) || denied.nil? ranges = nil if direction == 'INGRESS' return false if !defined?(source_ranges) || source_ranges.nil? ranges = source_ranges else return false if !defined?(destination_ranges) || destination_ranges.nil? ranges = destination_ranges end return false if !defined?(ranges) || ranges.nil? # so now we have a list of IP addresses to compare match_list_helper(ranges, ip_range_list, only) end def match_rule_protocol(property, single_port, protocol, allowed_flag) # this covers both property 'allowed' and 'denied' as they have the same structure # however in the case of 'denied' the logic of allowed is inverted # first consider the special case of 'all' where no ports/protocols are listed explicitly # and applies to all protocols if property.count == 1 and property[0].ip_protocol == 'all' return true if allowed_flag # an allowed rule that will match all ports/protocols return false # i.e. this is a deny all rule and will block all ports/protocols end # "allowed"/"denied" can have several port/protocol pairing entries e.g. tcp:80 or udp:4000-5000 # first, let's find the matching protocol indexes to compare against protocol_match_indexes = [] property.each_with_index do |rule, index| next if !defined?(rule.ip_protocol) protocol_match_indexes << index if rule.ip_protocol == protocol end # Now we know the list of matching protocol entries to check against. # Note the syntax for protocol port definitions versus what we see here is: # "tcp:80" -> "tcp" ["80"] # "tcp:90,91" -> "tcp:90", "tcp:91" -> "tcp" ["90","91"] # "udp:3000-4000" -> "udp" ["3000-4000"] # can also potentially include single port combinations in the list for a single rule here # We now check for a match based on each of the above cases protocol_match_indexes.each do |protocol_index| # there can be multiple protocol rules for different ports etc. ["22"] or ["123-126"] ports_in_rule = property[protocol_index].ports next if ports_in_rule.nil? ports_in_rule.each do |rule_port| matched_result = single_port_matches(rule_port, single_port) return true if matched_result and allowed_flag return false if matched_result and !allowed_flag end end return true if !allowed_flag # i.e. here we matched no port/protocol rules for a deny rule and therefore result in allowing false end # NOTE: that port_list only accepts individual ports to match, not ranges def port_protocol_allowed(single_port, protocol = 'tcp') raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall is missing expected property 'allowed' or 'denied'" if !defined?(allowed) || !defined?(denied) raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall 'allowed' and 'denied' cannot both be nil" if allowed.nil? && denied.nil? allowed_flag = denied.nil? return match_rule_protocol(allowed, single_port, protocol, allowed_flag) if allowed_flag match_rule_protocol(denied, single_port, protocol, allowed_flag) end def port_protocol_denied(single_port, protocol = 'tcp') port_protocol_allowed(single_port, protocol) end def single_port_matches(rule_port, single_port) # if '-' in there it means we should check each provided port for existence in a range if !rule_port.include? '-' # simplest case, only one port string specified return true if rule_port == single_port # if not, no match else # the rule_port here is a range such as "4000-5000", protect against any non-integer input by checking for nil values upper_limit = rule_port.split('-')[1].to_i lower_limit = rule_port.split('-')[0].to_i raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall unexpected port range specified: '#{rule_port}'" if upper_limit.nil? || lower_limit.nil? return true if single_port.to_i.between?(lower_limit, upper_limit) # if not, no match end false end def log_config_enabled? return false if !defined?(log_config) || !defined?(log_config.enable_logging) log_config.enable_logging end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/firewalls/{{name}}' end end ================================================ FILE: libraries/google_compute_firewalls.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeFirewalls < GcpResourceBase name 'google_compute_firewalls' desc 'Firewall plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:alloweds, field: :allowed) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:denieds, field: :denied) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:destination_ranges, field: :destination_ranges) filter_table_config.add(:firewall_directions, field: :firewall_direction) filter_table_config.add(:disableds, field: :disabled) filter_table_config.add(:log_configs, field: :log_config) filter_table_config.add(:firewall_ids, field: :firewall_id) filter_table_config.add(:firewall_names, field: :firewall_name) filter_table_config.add(:networks, field: :network) filter_table_config.add(:priorities, field: :priority) filter_table_config.add(:source_ranges, field: :source_ranges) filter_table_config.add(:source_service_accounts, field: :source_service_accounts) filter_table_config.add(:source_tags, field: :source_tags) filter_table_config.add(:target_service_accounts, field: :target_service_accounts) filter_table_config.add(:target_tags, field: :target_tags) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'allowed' => ->(obj) { [:allowed, GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(obj['allowed'], to_s)] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'denied' => ->(obj) { [:denied, GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(obj['denied'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'destinationRanges' => ->(obj) { [:destination_ranges, obj['destinationRanges']] }, 'direction' => ->(obj) { [:firewall_direction, obj['direction']] }, 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::FirewallLogConfig.new(obj['logConfig'], to_s)] }, 'id' => ->(obj) { [:firewall_id, obj['id']] }, 'name' => ->(obj) { [:firewall_name, obj['name']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'priority' => ->(obj) { [:priority, obj['priority']] }, 'sourceRanges' => ->(obj) { [:source_ranges, obj['sourceRanges']] }, 'sourceServiceAccounts' => ->(obj) { [:source_service_accounts, obj['sourceServiceAccounts']] }, 'sourceTags' => ->(obj) { [:source_tags, obj['sourceTags']] }, 'targetServiceAccounts' => ->(obj) { [:target_service_accounts, obj['targetServiceAccounts']] }, 'targetTags' => ->(obj) { [:target_tags, obj['targetTags']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/firewalls' end end ================================================ FILE: libraries/google_compute_forwarding_rule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeForwardingRule < GcpResourceBase name 'google_compute_forwarding_rule' desc 'ForwardingRule' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :is_mirroring_collector attr_reader :description attr_reader :id attr_reader :ip_address attr_reader :ip_protocol attr_reader :backend_service attr_reader :load_balancing_scheme attr_reader :name attr_reader :network attr_reader :port_range attr_reader :ports attr_reader :subnetwork attr_reader :target attr_reader :allow_global_access attr_reader :labels attr_reader :label_fingerprint attr_reader :all_ports attr_reader :network_tier attr_reader :service_label attr_reader :service_name attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @is_mirroring_collector = @fetched['isMirroringCollector'] @description = @fetched['description'] @id = @fetched['id'] @ip_address = @fetched['IPAddress'] @ip_protocol = @fetched['IPProtocol'] @backend_service = @fetched['backendService'] @load_balancing_scheme = @fetched['loadBalancingScheme'] @name = @fetched['name'] @network = name_from_self_link(@fetched['network']) @port_range = @fetched['portRange'] @ports = @fetched['ports'] @subnetwork = @fetched['subnetwork'] @target = @fetched['target'] @allow_global_access = @fetched['allowGlobalAccess'] @labels = @fetched['labels'] @label_fingerprint = @fetched['labelFingerprint'] @all_ports = @fetched['allPorts'] @network_tier = @fetched['networkTier'] @service_label = @fetched['serviceLabel'] @service_name = @fetched['serviceName'] @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "ForwardingRule #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/forwardingRules/{{name}}' end end ================================================ FILE: libraries/google_compute_forwarding_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeForwardingRules < GcpResourceBase name 'google_compute_forwarding_rules' desc 'ForwardingRule plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:is_mirroring_collectors, field: :is_mirroring_collector) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:forwarding_rule_ids, field: :forwarding_rule_id) filter_table_config.add(:ip_addresses, field: :ip_address) filter_table_config.add(:ip_protocols, field: :ip_protocol) filter_table_config.add(:backend_services, field: :backend_service) filter_table_config.add(:forwarding_rule_load_balancing_schemes, field: :forwarding_rule_load_balancing_scheme) filter_table_config.add(:forwarding_rule_names, field: :forwarding_rule_name) filter_table_config.add(:forwarding_rule_networks, field: :forwarding_rule_network) filter_table_config.add(:port_ranges, field: :port_range) filter_table_config.add(:ports, field: :ports) filter_table_config.add(:subnetworks, field: :subnetwork) filter_table_config.add(:targets, field: :target) filter_table_config.add(:allow_global_accesses, field: :allow_global_access) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:all_ports, field: :all_ports) filter_table_config.add(:network_tiers, field: :network_tier) filter_table_config.add(:service_labels, field: :service_label) filter_table_config.add(:service_names, field: :service_name) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'isMirroringCollector' => ->(obj) { [:is_mirroring_collector, obj['isMirroringCollector']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:forwarding_rule_id, obj['id']] }, 'IPAddress' => ->(obj) { [:ip_address, obj['IPAddress']] }, 'IPProtocol' => ->(obj) { [:ip_protocol, obj['IPProtocol']] }, 'backendService' => ->(obj) { [:backend_service, obj['backendService']] }, 'loadBalancingScheme' => ->(obj) { [:forwarding_rule_load_balancing_scheme, obj['loadBalancingScheme']] }, 'name' => ->(obj) { [:forwarding_rule_name, obj['name']] }, 'network' => ->(obj) { [:forwarding_rule_network, name_from_self_link(obj['network'])] }, 'portRange' => ->(obj) { [:port_range, obj['portRange']] }, 'ports' => ->(obj) { [:ports, obj['ports']] }, 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, 'target' => ->(obj) { [:target, obj['target']] }, 'allowGlobalAccess' => ->(obj) { [:allow_global_access, obj['allowGlobalAccess']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'allPorts' => ->(obj) { [:all_ports, obj['allPorts']] }, 'networkTier' => ->(obj) { [:network_tier, obj['networkTier']] }, 'serviceLabel' => ->(obj) { [:service_label, obj['serviceLabel']] }, 'serviceName' => ->(obj) { [:service_name, obj['serviceName']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/forwardingRules' end end ================================================ FILE: libraries/google_compute_global_address.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeGlobalAddress < GcpResourceBase name 'google_compute_global_address' desc 'GlobalAddress' supports platform: 'gcp' attr_reader :params attr_reader :address attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :labels attr_reader :label_fingerprint attr_reader :ip_version attr_reader :region attr_reader :prefix_length attr_reader :address_type attr_reader :purpose attr_reader :network def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @address = @fetched['address'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @labels = @fetched['labels'] @label_fingerprint = @fetched['labelFingerprint'] @ip_version = @fetched['ipVersion'] @region = @fetched['region'] @prefix_length = @fetched['prefixLength'] @address_type = @fetched['addressType'] @purpose = @fetched['purpose'] @network = @fetched['network'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "GlobalAddress #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/addresses/{{name}}' end end ================================================ FILE: libraries/google_compute_global_addresses.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeGlobalAddresss < GcpResourceBase name 'google_compute_global_addresses' desc 'GlobalAddress plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:addresses, field: :address) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:ip_versions, field: :ip_version) filter_table_config.add(:regions, field: :region) filter_table_config.add(:prefix_lengths, field: :prefix_length) filter_table_config.add(:address_types, field: :address_type) filter_table_config.add(:purposes, field: :purpose) filter_table_config.add(:networks, field: :network) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'address' => ->(obj) { [:address, obj['address']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'ipVersion' => ->(obj) { [:ip_version, obj['ipVersion']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'prefixLength' => ->(obj) { [:prefix_length, obj['prefixLength']] }, 'addressType' => ->(obj) { [:address_type, obj['addressType']] }, 'purpose' => ->(obj) { [:purpose, obj['purpose']] }, 'network' => ->(obj) { [:network, obj['network']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/addresses' end end ================================================ FILE: libraries/google_compute_global_forwarding_rule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/globalforwardingrule_metadata_filters' # A provider to manage Compute Engine resources. class ComputeGlobalForwardingRule < GcpResourceBase name 'google_compute_global_forwarding_rule' desc 'GlobalForwardingRule' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :ip_address attr_reader :ip_protocol attr_reader :ip_version attr_reader :labels attr_reader :label_fingerprint attr_reader :load_balancing_scheme attr_reader :metadata_filters attr_reader :name attr_reader :network attr_reader :port_range attr_reader :target def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @ip_address = @fetched['IPAddress'] @ip_protocol = @fetched['IPProtocol'] @ip_version = @fetched['ipVersion'] @labels = @fetched['labels'] @label_fingerprint = @fetched['labelFingerprint'] @load_balancing_scheme = @fetched['loadBalancingScheme'] @metadata_filters = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(@fetched['metadataFilters'], to_s) @name = @fetched['name'] @network = @fetched['network'] @port_range = @fetched['portRange'] @target = @fetched['target'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "GlobalForwardingRule #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/forwardingRules/{{name}}' end end ================================================ FILE: libraries/google_compute_global_forwarding_rules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeGlobalForwardingRules < GcpResourceBase name 'google_compute_global_forwarding_rules' desc 'GlobalForwardingRule plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:ip_addresses, field: :ip_address) filter_table_config.add(:ip_protocols, field: :ip_protocol) filter_table_config.add(:ip_versions, field: :ip_version) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:load_balancing_schemes, field: :load_balancing_scheme) filter_table_config.add(:metadata_filters, field: :metadata_filters) filter_table_config.add(:names, field: :name) filter_table_config.add(:networks, field: :network) filter_table_config.add(:port_ranges, field: :port_range) filter_table_config.add(:targets, field: :target) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'IPAddress' => ->(obj) { [:ip_address, obj['IPAddress']] }, 'IPProtocol' => ->(obj) { [:ip_protocol, obj['IPProtocol']] }, 'ipVersion' => ->(obj) { [:ip_version, obj['ipVersion']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, 'metadataFilters' => ->(obj) { [:metadata_filters, GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(obj['metadataFilters'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'portRange' => ->(obj) { [:port_range, obj['portRange']] }, 'target' => ->(obj) { [:target, obj['target']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/forwardingRules' end end ================================================ FILE: libraries/google_compute_global_network_endpoint_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/globalnetworkendpointgroup_annotations' require 'google/compute/property/globalnetworkendpointgroup_app_engine' require 'google/compute/property/globalnetworkendpointgroup_cloud_function' require 'google/compute/property/globalnetworkendpointgroup_cloud_run' require 'google/compute/property/globalnetworkendpointgroup_psc_data' # A provider to manage Compute Engine resources. class ComputeGlobalNetworkEndpointGroup < GcpResourceBase name 'google_compute_global_network_endpoint_group' desc 'GlobalNetworkEndpointGroup' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :self_link attr_reader :name attr_reader :description attr_reader :network_endpoint_type attr_reader :size attr_reader :region attr_reader :zone attr_reader :network attr_reader :subnetwork attr_reader :default_port attr_reader :annotations attr_reader :cloud_run attr_reader :app_engine attr_reader :cloud_function attr_reader :psc_target_service attr_reader :psc_data def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @self_link = @fetched['selfLink'] @name = @fetched['name'] @description = @fetched['description'] @network_endpoint_type = @fetched['networkEndpointType'] @size = @fetched['size'] @region = @fetched['region'] @zone = @fetched['zone'] @network = @fetched['network'] @subnetwork = @fetched['subnetwork'] @default_port = @fetched['defaultPort'] @annotations = GoogleInSpec::Compute::Property::GlobalNetworkEndpointGroupAnnotations.new(@fetched['annotations'], to_s) @cloud_run = GoogleInSpec::Compute::Property::GlobalNetworkEndpointGroupCloudRun.new(@fetched['cloudRun'], to_s) @app_engine = GoogleInSpec::Compute::Property::GlobalNetworkEndpointGroupAppEngine.new(@fetched['appEngine'], to_s) @cloud_function = GoogleInSpec::Compute::Property::GlobalNetworkEndpointGroupCloudFunction.new(@fetched['cloudFunction'], to_s) @psc_target_service = @fetched['pscTargetService'] @psc_data = GoogleInSpec::Compute::Property::GlobalNetworkEndpointGroupPscData.new(@fetched['pscData'], to_s) end def exists? !@fetched.nil? end def to_s "GlobalNetworkEndpointGroup #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/networkEndpointGroups/{{name}}' end end ================================================ FILE: libraries/google_compute_global_network_endpoint_groups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeGlobalNetworkEndpointGroups < GcpResourceBase name 'google_compute_global_network_endpoint_groups' desc 'GlobalNetworkEndpointGroup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:network_endpoint_types, field: :network_endpoint_type) filter_table_config.add(:sizes, field: :size) filter_table_config.add(:regions, field: :region) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:networks, field: :network) filter_table_config.add(:subnetworks, field: :subnetwork) filter_table_config.add(:default_ports, field: :default_port) filter_table_config.add(:annotations, field: :annotations) filter_table_config.add(:cloud_runs, field: :cloud_run) filter_table_config.add(:app_engines, field: :app_engine) filter_table_config.add(:cloud_functions, field: :cloud_function) filter_table_config.add(:psc_target_services, field: :psc_target_service) filter_table_config.add(:psc_data, field: :psc_data) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'networkEndpointType' => ->(obj) { [:network_endpoint_type, obj['networkEndpointType']] }, 'size' => ->(obj) { [:size, obj['size']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, 'defaultPort' => ->(obj) { [:default_port, obj['defaultPort']] }, 'annotations' => ->(obj) { [:annotations, GoogleInSpec::Compute::Property::GlobalNetworkEndpointGroupAnnotations.new(obj['annotations'], to_s)] }, 'cloudRun' => ->(obj) { [:cloud_run, GoogleInSpec::Compute::Property::GlobalNetworkEndpointGroupCloudRun.new(obj['cloudRun'], to_s)] }, 'appEngine' => ->(obj) { [:app_engine, GoogleInSpec::Compute::Property::GlobalNetworkEndpointGroupAppEngine.new(obj['appEngine'], to_s)] }, 'cloudFunction' => ->(obj) { [:cloud_function, GoogleInSpec::Compute::Property::GlobalNetworkEndpointGroupCloudFunction.new(obj['cloudFunction'], to_s)] }, 'pscTargetService' => ->(obj) { [:psc_target_service, obj['pscTargetService']] }, 'pscData' => ->(obj) { [:psc_data, GoogleInSpec::Compute::Property::GlobalNetworkEndpointGroupPscData.new(obj['pscData'], to_s)] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/networkEndpointGroups' end end ================================================ FILE: libraries/google_compute_global_operation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeGlobalOperation < GcpResourceBase name 'google_compute_global_operation' desc 'GlobalOperation' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :zone attr_reader :client_operation_id attr_reader :operation_type attr_reader :user attr_reader :progress attr_reader :insert_time attr_reader :start_time attr_reader :end_time attr_reader :status attr_reader :status_message def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @zone = @fetched['zone'] @client_operation_id = @fetched['clientOperationId'] @operation_type = @fetched['operationType'] @user = @fetched['user'] @progress = @fetched['progress'] @insert_time = parse_time_string(@fetched['insertTime']) @start_time = parse_time_string(@fetched['startTime']) @end_time = parse_time_string(@fetched['endTime']) @status = @fetched['status'] @status_message = @fetched['statusMessage'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "GlobalOperation #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/operations/{{name}}' end end ================================================ FILE: libraries/google_compute_global_operations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeGlobalOperations < GcpResourceBase name 'google_compute_global_operations' desc 'GlobalOperation plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:client_operation_ids, field: :client_operation_id) filter_table_config.add(:operation_types, field: :operation_type) filter_table_config.add(:users, field: :user) filter_table_config.add(:progresses, field: :progress) filter_table_config.add(:insert_times, field: :insert_time) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:status_messages, field: :status_message) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'clientOperationId' => ->(obj) { [:client_operation_id, obj['clientOperationId']] }, 'operationType' => ->(obj) { [:operation_type, obj['operationType']] }, 'user' => ->(obj) { [:user, obj['user']] }, 'progress' => ->(obj) { [:progress, obj['progress']] }, 'insertTime' => ->(obj) { [:insert_time, parse_time_string(obj['insertTime'])] }, 'startTime' => ->(obj) { [:start_time, parse_time_string(obj['startTime'])] }, 'endTime' => ->(obj) { [:end_time, parse_time_string(obj['endTime'])] }, 'status' => ->(obj) { [:status, obj['status']] }, 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/operations' end end ================================================ FILE: libraries/google_compute_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/healthcheck_grpc_health_check' require 'google/compute/property/healthcheck_http2_health_check' require 'google/compute/property/healthcheck_http_health_check' require 'google/compute/property/healthcheck_https_health_check' require 'google/compute/property/healthcheck_log_config' require 'google/compute/property/healthcheck_ssl_health_check' require 'google/compute/property/healthcheck_tcp_health_check' # A provider to manage Compute Engine resources. class ComputeHealthCheck < GcpResourceBase name 'google_compute_health_check' desc 'HealthCheck' supports platform: 'gcp' attr_reader :params attr_reader :check_interval_sec attr_reader :creation_timestamp attr_reader :description attr_reader :healthy_threshold attr_reader :id attr_reader :name attr_reader :timeout_sec attr_reader :unhealthy_threshold attr_reader :type attr_reader :http_health_check attr_reader :https_health_check attr_reader :tcp_health_check attr_reader :ssl_health_check attr_reader :http2_health_check attr_reader :grpc_health_check attr_reader :log_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @check_interval_sec = @fetched['checkIntervalSec'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @healthy_threshold = @fetched['healthyThreshold'] @id = @fetched['id'] @name = @fetched['name'] @timeout_sec = @fetched['timeoutSec'] @unhealthy_threshold = @fetched['unhealthyThreshold'] @type = @fetched['type'] @http_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(@fetched['httpHealthCheck'], to_s) @https_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(@fetched['httpsHealthCheck'], to_s) @tcp_health_check = GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(@fetched['tcpHealthCheck'], to_s) @ssl_health_check = GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(@fetched['sslHealthCheck'], to_s) @http2_health_check = GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(@fetched['http2HealthCheck'], to_s) @grpc_health_check = GoogleInSpec::Compute::Property::HealthCheckGrpcHealthCheck.new(@fetched['grpcHealthCheck'], to_s) @log_config = GoogleInSpec::Compute::Property::HealthCheckLogConfig.new(@fetched['logConfig'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "HealthCheck #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/healthChecks/{{name}}' end end ================================================ FILE: libraries/google_compute_health_check_service.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeHealthCheckService < GcpResourceBase name 'google_compute_health_check_service' desc 'HealthCheckService' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :health_status_aggregation_policy attr_reader :health_checks attr_reader :network_endpoint_groups attr_reader :notification_endpoints attr_reader :fingerprint attr_reader :next_page_token def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @health_status_aggregation_policy = @fetched['healthStatusAggregationPolicy'] @health_checks = @fetched['healthChecks'] @network_endpoint_groups = @fetched['networkEndpointGroups'] @notification_endpoints = @fetched['notificationEndpoints'] @fingerprint = @fetched['fingerprint'] @next_page_token = @fetched['nextPageToken'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "HealthCheckService #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/healthCheckServices/{{name}}' end end ================================================ FILE: libraries/google_compute_health_check_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeHealthCheckServices < GcpResourceBase name 'google_compute_health_check_services' desc 'HealthCheckService plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:health_status_aggregation_policies, field: :health_status_aggregation_policy) filter_table_config.add(:health_checks, field: :health_checks) filter_table_config.add(:network_endpoint_groups, field: :network_endpoint_groups) filter_table_config.add(:notification_endpoints, field: :notification_endpoints) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:next_page_tokens, field: :next_page_token) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'healthStatusAggregationPolicy' => ->(obj) { [:health_status_aggregation_policy, obj['healthStatusAggregationPolicy']] }, 'healthChecks' => ->(obj) { [:health_checks, obj['healthChecks']] }, 'networkEndpointGroups' => ->(obj) { [:network_endpoint_groups, obj['networkEndpointGroups']] }, 'notificationEndpoints' => ->(obj) { [:notification_endpoints, obj['notificationEndpoints']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'nextPageToken' => ->(obj) { [:next_page_token, obj['nextPageToken']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/healthCheckServices' end end ================================================ FILE: libraries/google_compute_health_checks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeHealthChecks < GcpResourceBase name 'google_compute_health_checks' desc 'HealthCheck plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:check_interval_secs, field: :check_interval_sec) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:healthy_thresholds, field: :healthy_threshold) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.add(:unhealthy_thresholds, field: :unhealthy_threshold) filter_table_config.add(:types, field: :type) filter_table_config.add(:http_health_checks, field: :http_health_check) filter_table_config.add(:https_health_checks, field: :https_health_check) filter_table_config.add(:tcp_health_checks, field: :tcp_health_check) filter_table_config.add(:ssl_health_checks, field: :ssl_health_check) filter_table_config.add(:http2_health_checks, field: :http2_health_check) filter_table_config.add(:grpc_health_checks, field: :grpc_health_check) filter_table_config.add(:log_configs, field: :log_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'httpHealthCheck' => ->(obj) { [:http_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(obj['httpHealthCheck'], to_s)] }, 'httpsHealthCheck' => ->(obj) { [:https_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(obj['httpsHealthCheck'], to_s)] }, 'tcpHealthCheck' => ->(obj) { [:tcp_health_check, GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(obj['tcpHealthCheck'], to_s)] }, 'sslHealthCheck' => ->(obj) { [:ssl_health_check, GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(obj['sslHealthCheck'], to_s)] }, 'http2HealthCheck' => ->(obj) { [:http2_health_check, GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(obj['http2HealthCheck'], to_s)] }, 'grpcHealthCheck' => ->(obj) { [:grpc_health_check, GoogleInSpec::Compute::Property::HealthCheckGrpcHealthCheck.new(obj['grpcHealthCheck'], to_s)] }, 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::HealthCheckLogConfig.new(obj['logConfig'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/healthChecks' end end ================================================ FILE: libraries/google_compute_http_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeHttpHealthCheck < GcpResourceBase name 'google_compute_http_health_check' desc 'HttpHealthCheck' supports platform: 'gcp' attr_reader :params attr_reader :check_interval_sec attr_reader :creation_timestamp attr_reader :description attr_reader :healthy_threshold attr_reader :host attr_reader :id attr_reader :name attr_reader :port attr_reader :request_path attr_reader :timeout_sec attr_reader :unhealthy_threshold def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @check_interval_sec = @fetched['checkIntervalSec'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @healthy_threshold = @fetched['healthyThreshold'] @host = @fetched['host'] @id = @fetched['id'] @name = @fetched['name'] @port = @fetched['port'] @request_path = @fetched['requestPath'] @timeout_sec = @fetched['timeoutSec'] @unhealthy_threshold = @fetched['unhealthyThreshold'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "HttpHealthCheck #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/httpHealthChecks/{{name}}' end end ================================================ FILE: libraries/google_compute_http_health_checks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeHttpHealthChecks < GcpResourceBase name 'google_compute_http_health_checks' desc 'HttpHealthCheck plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:check_interval_secs, field: :check_interval_sec) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:healthy_thresholds, field: :healthy_threshold) filter_table_config.add(:hosts, field: :host) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:ports, field: :port) filter_table_config.add(:request_paths, field: :request_path) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.add(:unhealthy_thresholds, field: :unhealthy_threshold) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, 'host' => ->(obj) { [:host, obj['host']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'port' => ->(obj) { [:port, obj['port']] }, 'requestPath' => ->(obj) { [:request_path, obj['requestPath']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/httpHealthChecks' end end ================================================ FILE: libraries/google_compute_https_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeHttpsHealthCheck < GcpResourceBase name 'google_compute_https_health_check' desc 'HttpsHealthCheck' supports platform: 'gcp' attr_reader :params attr_reader :check_interval_sec attr_reader :creation_timestamp attr_reader :description attr_reader :healthy_threshold attr_reader :host attr_reader :id attr_reader :name attr_reader :port attr_reader :request_path attr_reader :timeout_sec attr_reader :unhealthy_threshold def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @check_interval_sec = @fetched['checkIntervalSec'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @healthy_threshold = @fetched['healthyThreshold'] @host = @fetched['host'] @id = @fetched['id'] @name = @fetched['name'] @port = @fetched['port'] @request_path = @fetched['requestPath'] @timeout_sec = @fetched['timeoutSec'] @unhealthy_threshold = @fetched['unhealthyThreshold'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "HttpsHealthCheck #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/httpsHealthChecks/{{name}}' end end ================================================ FILE: libraries/google_compute_https_health_checks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeHttpsHealthChecks < GcpResourceBase name 'google_compute_https_health_checks' desc 'HttpsHealthCheck plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:check_interval_secs, field: :check_interval_sec) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:healthy_thresholds, field: :healthy_threshold) filter_table_config.add(:hosts, field: :host) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:ports, field: :port) filter_table_config.add(:request_paths, field: :request_path) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.add(:unhealthy_thresholds, field: :unhealthy_threshold) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, 'host' => ->(obj) { [:host, obj['host']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'port' => ->(obj) { [:port, obj['port']] }, 'requestPath' => ->(obj) { [:request_path, obj['requestPath']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/httpsHealthChecks' end end ================================================ FILE: libraries/google_compute_image.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/image_deprecated' require 'google/compute/property/image_guest_os_features' require 'google/compute/property/image_image_encryption_key' require 'google/compute/property/image_raw_disk' require 'google/compute/property/image_source_disk_encryption_key' # A provider to manage Compute Engine resources. class ComputeImage < GcpResourceBase name 'google_compute_image' desc 'Image' supports platform: 'gcp' attr_reader :params attr_reader :archive_size_bytes attr_reader :creation_timestamp attr_reader :deprecated attr_reader :description attr_reader :disk_size_gb attr_reader :family attr_reader :guest_os_features attr_reader :id attr_reader :image_encryption_key attr_reader :labels attr_reader :label_fingerprint attr_reader :licenses attr_reader :name attr_reader :raw_disk attr_reader :source_disk attr_reader :source_disk_encryption_key attr_reader :source_disk_id attr_reader :source_image attr_reader :source_snapshot attr_reader :source_type attr_reader :self_link attr_reader :status def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') if @fetched.nil? @fetched = @connection.fetch(product_url(params[:beta]), 'projects/{{project}}/global/images/family/{{name}}', params, 'Get') end parse unless @fetched.nil? end def parse @archive_size_bytes = @fetched['archiveSizeBytes'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @deprecated = GoogleInSpec::Compute::Property::ImageDeprecated.new(@fetched['deprecated'], to_s) @description = @fetched['description'] @disk_size_gb = @fetched['diskSizeGb'] @family = @fetched['family'] @guest_os_features = GoogleInSpec::Compute::Property::ImageGuestOsFeaturesArray.parse(@fetched['guestOsFeatures'], to_s) @id = @fetched['id'] @image_encryption_key = GoogleInSpec::Compute::Property::ImageImageEncryptionKey.new(@fetched['imageEncryptionKey'], to_s) @labels = @fetched['labels'] @label_fingerprint = @fetched['labelFingerprint'] @licenses = @fetched['licenses'] @name = @fetched['name'] @raw_disk = GoogleInSpec::Compute::Property::ImageRawDisk.new(@fetched['rawDisk'], to_s) @source_disk = @fetched['sourceDisk'] @source_disk_encryption_key = GoogleInSpec::Compute::Property::ImageSourceDiskEncryptionKey.new(@fetched['sourceDiskEncryptionKey'], to_s) @source_disk_id = @fetched['sourceDiskId'] @source_image = @fetched['sourceImage'] @source_snapshot = @fetched['sourceSnapshot'] @source_type = @fetched['sourceType'] @self_link = @fetched['selfLink'] @status = @fetched['status'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Image #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/images/{{name}}' end end ================================================ FILE: libraries/google_compute_image_family_view.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/imagefamilyview_image' require 'google/compute/property/imagefamilyview_image_deprecated' require 'google/compute/property/imagefamilyview_image_image_encryption_key' require 'google/compute/property/imagefamilyview_image_raw_disk' require 'google/compute/property/imagefamilyview_image_source_disk_encryption_key' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks' require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk' # A provider to manage Compute Engine resources. class ComputeImageFamilyView < GcpResourceBase name 'google_compute_image_family_view' desc 'ImageFamilyView' supports platform: 'gcp' attr_reader :params attr_reader :image def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @image = GoogleInSpec::Compute::Property::ImageFamilyViewImage.new(@fetched['image'], to_s) end def exists? !@fetched.nil? end def to_s "ImageFamilyView #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/imageFamilyViews/{{name}}' end end ================================================ FILE: libraries/google_compute_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/instance_disks' require 'google/compute/property/instance_guest_accelerators' require 'google/compute/property/instance_network_interfaces' require 'google/compute/property/instance_scheduling' require 'google/compute/property/instance_service_accounts' require 'google/compute/property/instance_shielded_instance_config' require 'google/compute/property/instance_tags' # A provider to manage Compute Engine resources. class ComputeInstance < GcpResourceBase name 'google_compute_instance' desc 'Instance' supports platform: 'gcp' attr_reader :params attr_reader :can_ip_forward attr_reader :cpu_platform attr_reader :creation_timestamp attr_reader :deletion_protection attr_reader :disks attr_reader :guest_accelerators attr_reader :hostname attr_reader :id attr_reader :label_fingerprint attr_reader :labels attr_reader :metadata attr_reader :machine_type attr_reader :min_cpu_platform attr_reader :name attr_reader :network_interfaces attr_reader :scheduling attr_reader :service_accounts attr_reader :shielded_instance_config attr_reader :status attr_reader :status_message attr_reader :tags attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @can_ip_forward = @fetched['canIpForward'] @cpu_platform = @fetched['cpuPlatform'] @creation_timestamp = @fetched['creationTimestamp'] @deletion_protection = @fetched['deletionProtection'] @disks = GoogleInSpec::Compute::Property::InstanceDisksArray.parse(@fetched['disks'], to_s) @guest_accelerators = GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(@fetched['guestAccelerators'], to_s) @hostname = @fetched['hostname'] @id = @fetched['id'] @label_fingerprint = @fetched['labelFingerprint'] @labels = @fetched['labels'] @metadata = @fetched['metadata'] @machine_type = @fetched['machineType'] @min_cpu_platform = @fetched['minCpuPlatform'] @name = @fetched['name'] @network_interfaces = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(@fetched['networkInterfaces'], to_s) @scheduling = GoogleInSpec::Compute::Property::InstanceScheduling.new(@fetched['scheduling'], to_s) @service_accounts = GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(@fetched['serviceAccounts'], to_s) @shielded_instance_config = GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(@fetched['shieldedInstanceConfig'], to_s) @status = @fetched['status'] @status_message = @fetched['statusMessage'] @tags = GoogleInSpec::Compute::Property::InstanceTags.new(@fetched['tags'], to_s) @zone = @fetched['zone'] end def exists? !@fetched.nil? end def to_s "Instance #{@params[:name]}" end def disk_count @disks&.count || 0 end def tag_count @tags&.items&.count || 0 end def network_interfaces_count @network_interfaces&.count || 0 end # TBD: Below few methods are present to make the tests simpler e.g. avoid looping over arrays etc. # but passing index arguments from the inspec test would be better def first_network_interface_nat_ip_exists !@network_interfaces[0].access_configs[0].nat_ip.nil? end def first_network_interface_name @network_interfaces[0].access_configs[0].name end def first_network_interface_type @network_interfaces[0].access_configs[0].type.downcase end def first_disks_source_name disks_source_name(0) end def first_disks_first_license disks_license(0, 0) end def second_disks_device_name return '' if @disks[1].nil? || !defined?(@disks[1].device_name) || @disks[1].device_name.nil? disks[1].device_name end def second_disks_source_name disks_source_name(1) end def second_disks_first_license disks_license(1, 0) end # helper method for retrieving a disk source basename def disks_source_name(index = 0) return '' if @disks[index].nil? || !defined?(@disks[index].source) || @disks[index].source.nil? @disks[index].source.split('/').last end # helper method for retrieving a disk license string def disks_license(disk_index = 0, license_index = 0) return '' if @disks[disk_index].nil? || !defined?(@disks[disk_index].licenses[license_index]) || @disks[disk_index].licenses[license_index].nil? @disks[disk_index].licenses[license_index].downcase end def machine_size return '' if !defined?(@machine_type) || @machine_type.nil? @machine_type.split('/').last end # helper for returning label keys to perform checks def labels_keys return [] if !defined?(@labels) || @labels.nil? @labels.keys end # helper for returning label values to perform checks def labels_values return [] if !defined?(@labels) || @labels.nil? @labels.values end def label_value_by_key(label_key) return [] if !defined?(@labels) || @labels.nil? @labels[label_key] end def metadata_keys return [] if !defined?(@metadata) || @metadata.nil? @metadata['items']&.map { |m| m['key'] } end def metadata_values return [] if !defined?(@metadata) || @metadata.nil? @metadata['items']&.map { |m| m['value'] } end def metadata_value_by_key(metadata_key) return [] if !defined?(@metadata) || @metadata.nil? @metadata['items']&.each do |item| if item['key'] == metadata_key return item['value'] end end [] end def service_account_scopes # NOTE: instances can have only one service account defined return [] if @service_accounts[0].nil? || !defined?(@service_accounts[0].scopes) || @service_accounts[0].scopes.nil? @service_accounts[0].scopes end def block_project_ssh_keys return false if !defined?(@metadata['items']) || @metadata['items'].nil? @metadata['items'].each do |element| return true if element['key']=='block-project-ssh-keys' and element['value'].casecmp('true').zero? return true if element['key']=='block-project-ssh-keys' and element['value']=='1' end false end def has_serial_port_disabled? return false if !defined?(@metadata['items']) || @metadata['items'].nil? @metadata['items'].each do |element| return false if element['key']=='serial-port-enable' and element['value'].casecmp('true').zero? return false if element['key']=='serial-port-enable' and element['value']=='1' end true end def has_disks_encrypted_with_csek? return false if !defined?(@disks) || @disks.nil? @disks.each do |disk| return false if !defined?(disk.disk_encryption_key) return false if disk.disk_encryption_key.nil? return false if !defined?(disk.disk_encryption_key.sha256) return false if disk.disk_encryption_key.sha256.nil? end true end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/instances/{{name}}' end end ================================================ FILE: libraries/google_compute_instance_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/instancegroup_named_ports' # A provider to manage Compute Engine resources. class ComputeInstanceGroup < GcpResourceBase name 'google_compute_instance_group' desc 'InstanceGroup' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :named_ports attr_reader :network attr_reader :region attr_reader :subnetwork attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @named_ports = GoogleInSpec::Compute::Property::InstanceGroupNamedPortsArray.parse(@fetched['namedPorts'], to_s) @network = @fetched['network'] @region = @fetched['region'] @subnetwork = @fetched['subnetwork'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "InstanceGroup #{@params[:name]}" end def port_name find_named_ports(:name) end RSpec::Matchers.alias_matcher :has_port_name, :be_allow_port_name def port_value find_named_ports(:port) end RSpec::Matchers.alias_matcher :has_port_value, :be_allow_port_value def find_named_ports(key = :name) # check all name/port values for a match @named_ports.each do |named_port| next if !defined?(named_port.item[key]) || named_port.item[key].nil? return named_port.item[key] end false end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/instanceGroups/{{name}}' end end ================================================ FILE: libraries/google_compute_instance_group_manager.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/instancegroupmanager_current_actions' require 'google/compute/property/instancegroupmanager_named_ports' # A provider to manage Compute Engine resources. class ComputeInstanceGroupManager < GcpResourceBase name 'google_compute_instance_group_manager' desc 'InstanceGroupManager' supports platform: 'gcp' attr_reader :params attr_reader :base_instance_name attr_reader :creation_timestamp attr_reader :current_actions attr_reader :description attr_reader :id attr_reader :instance_group attr_reader :instance_template attr_reader :name attr_reader :named_ports attr_reader :region attr_reader :target_pools attr_reader :target_size attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @base_instance_name = @fetched['baseInstanceName'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @current_actions = GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(@fetched['currentActions'], to_s) @description = @fetched['description'] @id = @fetched['id'] @instance_group = @fetched['instanceGroup'] @instance_template = @fetched['instanceTemplate'] @name = @fetched['name'] @named_ports = GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(@fetched['namedPorts'], to_s) @region = @fetched['region'] @target_pools = @fetched['targetPools'] @target_size = @fetched['targetSize'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "InstanceGroupManager #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{name}}' end end ================================================ FILE: libraries/google_compute_instance_group_managers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeInstanceGroupManagers < GcpResourceBase name 'google_compute_instance_group_managers' desc 'InstanceGroupManager plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:base_instance_names, field: :base_instance_name) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:current_actions, field: :current_actions) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:instance_groups, field: :instance_group) filter_table_config.add(:instance_templates, field: :instance_template) filter_table_config.add(:names, field: :name) filter_table_config.add(:named_ports, field: :named_ports) filter_table_config.add(:regions, field: :region) filter_table_config.add(:target_pools, field: :target_pools) filter_table_config.add(:target_sizes, field: :target_size) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'baseInstanceName' => ->(obj) { [:base_instance_name, obj['baseInstanceName']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'currentActions' => ->(obj) { [:current_actions, GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(obj['currentActions'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'instanceGroup' => ->(obj) { [:instance_group, obj['instanceGroup']] }, 'instanceTemplate' => ->(obj) { [:instance_template, obj['instanceTemplate']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'namedPorts' => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(obj['namedPorts'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, 'targetPools' => ->(obj) { [:target_pools, obj['targetPools']] }, 'targetSize' => ->(obj) { [:target_size, obj['targetSize']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/instanceGroupManagers' end end ================================================ FILE: libraries/google_compute_instance_groups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeInstanceGroups < GcpResourceBase name 'google_compute_instance_groups' desc 'InstanceGroup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:instance_group_ids, field: :instance_group_id) filter_table_config.add(:instance_group_names, field: :instance_group_name) filter_table_config.add(:named_ports, field: :named_ports) filter_table_config.add(:networks, field: :network) filter_table_config.add(:regions, field: :region) filter_table_config.add(:subnetworks, field: :subnetwork) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:instance_group_id, obj['id']] }, 'name' => ->(obj) { [:instance_group_name, obj['name']] }, 'namedPorts' => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::InstanceGroupNamedPortsArray.parse(obj['namedPorts'], to_s)] }, 'network' => ->(obj) { [:network, obj['network']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/instanceGroups' end end ================================================ FILE: libraries/google_compute_instance_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/instancetemplate_properties' require 'google/compute/property/instancetemplate_properties_disks' require 'google/compute/property/instancetemplate_properties_guest_accelerators' require 'google/compute/property/instancetemplate_properties_network_interfaces' require 'google/compute/property/instancetemplate_properties_scheduling' require 'google/compute/property/instancetemplate_properties_service_accounts' require 'google/compute/property/instancetemplate_properties_tags' # A provider to manage Compute Engine resources. class ComputeInstanceTemplate < GcpResourceBase name 'google_compute_instance_template' desc 'InstanceTemplate' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :properties def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @properties = GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(@fetched['properties'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "InstanceTemplate #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/instanceTemplates/{{name}}' end end ================================================ FILE: libraries/google_compute_instance_templates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeInstanceTemplates < GcpResourceBase name 'google_compute_instance_templates' desc 'InstanceTemplate plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:properties, field: :properties) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'properties' => ->(obj) { [:properties, GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(obj['properties'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/instanceTemplates' end end ================================================ FILE: libraries/google_compute_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeInstances < GcpResourceBase name 'google_compute_instances' desc 'Instance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:can_ip_forwards, field: :can_ip_forward) filter_table_config.add(:cpu_platforms, field: :cpu_platform) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:deletion_protections, field: :deletion_protection) filter_table_config.add(:disks, field: :disks) filter_table_config.add(:guest_accelerators, field: :guest_accelerators) filter_table_config.add(:hostnames, field: :hostname) filter_table_config.add(:instance_ids, field: :instance_id) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:machine_types, field: :machine_type) filter_table_config.add(:min_cpu_platforms, field: :min_cpu_platform) filter_table_config.add(:instance_names, field: :instance_name) filter_table_config.add(:network_interfaces, field: :network_interfaces) filter_table_config.add(:schedulings, field: :scheduling) filter_table_config.add(:service_accounts, field: :service_accounts) filter_table_config.add(:shielded_instance_configs, field: :shielded_instance_config) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:status_messages, field: :status_message) filter_table_config.add(:tags, field: :tags) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'canIpForward' => ->(obj) { [:can_ip_forward, obj['canIpForward']] }, 'cpuPlatform' => ->(obj) { [:cpu_platform, obj['cpuPlatform']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'deletionProtection' => ->(obj) { [:deletion_protection, obj['deletionProtection']] }, 'disks' => ->(obj) { [:disks, GoogleInSpec::Compute::Property::InstanceDisksArray.parse(obj['disks'], to_s)] }, 'guestAccelerators' => ->(obj) { [:guest_accelerators, GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(obj['guestAccelerators'], to_s)] }, 'hostname' => ->(obj) { [:hostname, obj['hostname']] }, 'id' => ->(obj) { [:instance_id, obj['id']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, 'machineType' => ->(obj) { [:machine_type, obj['machineType']] }, 'minCpuPlatform' => ->(obj) { [:min_cpu_platform, obj['minCpuPlatform']] }, 'name' => ->(obj) { [:instance_name, obj['name']] }, 'networkInterfaces' => ->(obj) { [:network_interfaces, GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(obj['networkInterfaces'], to_s)] }, 'scheduling' => ->(obj) { [:scheduling, GoogleInSpec::Compute::Property::InstanceScheduling.new(obj['scheduling'], to_s)] }, 'serviceAccounts' => ->(obj) { [:service_accounts, GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(obj['serviceAccounts'], to_s)] }, 'shieldedInstanceConfig' => ->(obj) { [:shielded_instance_config, GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(obj['shieldedInstanceConfig'], to_s)] }, 'status' => ->(obj) { [:status, obj['status']] }, 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, 'tags' => ->(obj) { [:tags, GoogleInSpec::Compute::Property::InstanceTags.new(obj['tags'], to_s)] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/instances' end end ================================================ FILE: libraries/google_compute_interconnect.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/interconnect_circuit_infos' require 'google/compute/property/interconnect_expected_outages' # A provider to manage Compute Engine resources. class ComputeInterconnect < GcpResourceBase name 'google_compute_interconnect' desc 'Interconnect' supports platform: 'gcp' attr_reader :params attr_reader :admin_enabled attr_reader :creation_timestamp attr_reader :description attr_reader :location attr_reader :id attr_reader :name attr_reader :noc_contact_email attr_reader :peer_ip_address attr_reader :google_ip_address attr_reader :client_operation_id attr_reader :google_reference_id attr_reader :provisioned_link_count attr_reader :customer_name attr_reader :requested_link_count attr_reader :operational_status attr_reader :link_type attr_reader :interconnect_type attr_reader :interconnect_attachments attr_reader :expected_outages attr_reader :circuit_infos attr_reader :satisfies_pzs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @admin_enabled = @fetched['adminEnabled'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @location = @fetched['location'] @id = @fetched['id'] @name = @fetched['name'] @noc_contact_email = @fetched['nocContactEmail'] @peer_ip_address = @fetched['peerIpAddress'] @google_ip_address = @fetched['googleIpAddress'] @client_operation_id = @fetched['clientOperationId'] @google_reference_id = @fetched['googleReferenceId'] @provisioned_link_count = @fetched['provisionedLinkCount'] @customer_name = @fetched['customerName'] @requested_link_count = @fetched['requestedLinkCount'] @operational_status = @fetched['operationalStatus'] @link_type = @fetched['linkType'] @interconnect_type = @fetched['interconnectType'] @interconnect_attachments = @fetched['interconnectAttachments'] @expected_outages = GoogleInSpec::Compute::Property::InterconnectExpectedOutagesArray.parse(@fetched['expectedOutages'], to_s) @circuit_infos = GoogleInSpec::Compute::Property::InterconnectCircuitInfosArray.parse(@fetched['circuitInfos'], to_s) @satisfies_pzs = @fetched['satisfiesPzs'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Interconnect #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/interconnects/{{name}}' end end ================================================ FILE: libraries/google_compute_interconnect_attachment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/interconnectattachment_configuration_constraints' require 'google/compute/property/interconnectattachment_configuration_constraints_bgp_peer_asn_ranges' require 'google/compute/property/interconnectattachment_labels' require 'google/compute/property/interconnectattachment_partner_metadata' require 'google/compute/property/interconnectattachment_private_interconnect_info' # A provider to manage Compute Engine resources. class ComputeInterconnectAttachment < GcpResourceBase name 'google_compute_interconnect_attachment' desc 'InterconnectAttachment' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :description attr_reader :self_link attr_reader :self_link_with_id attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :interconnect attr_reader :router attr_reader :region attr_reader :google_reference_id attr_reader :mtu attr_reader :private_interconnect_info attr_reader :operational_status attr_reader :cloud_router_ip_address attr_reader :customer_router_ip_address attr_reader :type attr_reader :pairing_key attr_reader :admin_enabled attr_reader :vlan_tag8021q attr_reader :edge_availability_domain attr_reader :candidate_subnets attr_reader :bandwidth attr_reader :partner_metadata attr_reader :labels attr_reader :label_fingerprint attr_reader :state attr_reader :partner_asn attr_reader :encryption attr_reader :ipsec_internal_addresses attr_reader :dataplane_version attr_reader :satisfies_pzs attr_reader :stack_type attr_reader :cloud_router_ipv6_address attr_reader :customer_router_ipv6_address attr_reader :candidate_ipv6_subnets attr_reader :cloud_router_ipv6_interface_id attr_reader :customer_router_ipv6_interface_id attr_reader :subnet_length attr_reader :remote_service attr_reader :configuration_constraints attr_reader :multicast_enabled def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @description = @fetched['description'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @interconnect = @fetched['interconnect'] @router = @fetched['router'] @region = @fetched['region'] @google_reference_id = @fetched['googleReferenceId'] @mtu = @fetched['mtu'] @private_interconnect_info = GoogleInSpec::Compute::Property::InterconnectAttachmentPrivateInterconnectInfo.new(@fetched['privateInterconnectInfo'], to_s) @operational_status = @fetched['operationalStatus'] @cloud_router_ip_address = @fetched['cloudRouterIpAddress'] @customer_router_ip_address = @fetched['customerRouterIpAddress'] @type = @fetched['type'] @pairing_key = @fetched['pairingKey'] @admin_enabled = @fetched['adminEnabled'] @vlan_tag8021q = @fetched['vlanTag8021q'] @edge_availability_domain = @fetched['edgeAvailabilityDomain'] @candidate_subnets = @fetched['candidateSubnets'] @bandwidth = @fetched['bandwidth'] @partner_metadata = GoogleInSpec::Compute::Property::InterconnectAttachmentPartnerMetadata.new(@fetched['partnerMetadata'], to_s) @labels = GoogleInSpec::Compute::Property::InterconnectAttachmentLabels.new(@fetched['labels'], to_s) @label_fingerprint = @fetched['labelFingerprint'] @state = @fetched['state'] @partner_asn = @fetched['partnerAsn'] @encryption = @fetched['encryption'] @ipsec_internal_addresses = @fetched['ipsecInternalAddresses'] @dataplane_version = @fetched['dataplaneVersion'] @satisfies_pzs = @fetched['satisfiesPzs'] @stack_type = @fetched['stackType'] @cloud_router_ipv6_address = @fetched['cloudRouterIpv6Address'] @customer_router_ipv6_address = @fetched['customerRouterIpv6Address'] @candidate_ipv6_subnets = @fetched['candidateIpv6Subnets'] @cloud_router_ipv6_interface_id = @fetched['cloudRouterIpv6InterfaceId'] @customer_router_ipv6_interface_id = @fetched['customerRouterIpv6InterfaceId'] @subnet_length = @fetched['subnetLength'] @remote_service = @fetched['remoteService'] @configuration_constraints = GoogleInSpec::Compute::Property::InterconnectAttachmentConfigurationConstraints.new(@fetched['configurationConstraints'], to_s) @multicast_enabled = @fetched['multicastEnabled'] end def exists? !@fetched.nil? end def to_s "InterconnectAttachment #{@params[:interconnectAttachment]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/interconnectAttachments/{{name}}' end end ================================================ FILE: libraries/google_compute_interconnect_attachments.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeInterconnectAttachments < GcpResourceBase name 'google_compute_interconnect_attachments' desc 'InterconnectAttachment plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:interconnects, field: :interconnect) filter_table_config.add(:routers, field: :router) filter_table_config.add(:regions, field: :region) filter_table_config.add(:google_reference_ids, field: :google_reference_id) filter_table_config.add(:mtus, field: :mtu) filter_table_config.add(:private_interconnect_infos, field: :private_interconnect_info) filter_table_config.add(:operational_statuses, field: :operational_status) filter_table_config.add(:cloud_router_ip_addresses, field: :cloud_router_ip_address) filter_table_config.add(:customer_router_ip_addresses, field: :customer_router_ip_address) filter_table_config.add(:types, field: :type) filter_table_config.add(:pairing_keys, field: :pairing_key) filter_table_config.add(:admin_enableds, field: :admin_enabled) filter_table_config.add(:vlan_tag8021qs, field: :vlan_tag8021q) filter_table_config.add(:edge_availability_domains, field: :edge_availability_domain) filter_table_config.add(:candidate_subnets, field: :candidate_subnets) filter_table_config.add(:bandwidths, field: :bandwidth) filter_table_config.add(:partner_metadata, field: :partner_metadata) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:states, field: :state) filter_table_config.add(:partner_asns, field: :partner_asn) filter_table_config.add(:encryptions, field: :encryption) filter_table_config.add(:ipsec_internal_addresses, field: :ipsec_internal_addresses) filter_table_config.add(:dataplane_versions, field: :dataplane_version) filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) filter_table_config.add(:stack_types, field: :stack_type) filter_table_config.add(:cloud_router_ipv6_addresses, field: :cloud_router_ipv6_address) filter_table_config.add(:customer_router_ipv6_addresses, field: :customer_router_ipv6_address) filter_table_config.add(:candidate_ipv6_subnets, field: :candidate_ipv6_subnets) filter_table_config.add(:cloud_router_ipv6_interface_ids, field: :cloud_router_ipv6_interface_id) filter_table_config.add(:customer_router_ipv6_interface_ids, field: :customer_router_ipv6_interface_id) filter_table_config.add(:subnet_lengths, field: :subnet_length) filter_table_config.add(:remote_services, field: :remote_service) filter_table_config.add(:configuration_constraints, field: :configuration_constraints) filter_table_config.add(:multicast_enableds, field: :multicast_enabled) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'interconnect' => ->(obj) { [:interconnect, obj['interconnect']] }, 'router' => ->(obj) { [:router, obj['router']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'googleReferenceId' => ->(obj) { [:google_reference_id, obj['googleReferenceId']] }, 'mtu' => ->(obj) { [:mtu, obj['mtu']] }, 'privateInterconnectInfo' => ->(obj) { [:private_interconnect_info, GoogleInSpec::Compute::Property::InterconnectAttachmentPrivateInterconnectInfo.new(obj['privateInterconnectInfo'], to_s)] }, 'operationalStatus' => ->(obj) { [:operational_status, obj['operationalStatus']] }, 'cloudRouterIpAddress' => ->(obj) { [:cloud_router_ip_address, obj['cloudRouterIpAddress']] }, 'customerRouterIpAddress' => ->(obj) { [:customer_router_ip_address, obj['customerRouterIpAddress']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'pairingKey' => ->(obj) { [:pairing_key, obj['pairingKey']] }, 'adminEnabled' => ->(obj) { [:admin_enabled, obj['adminEnabled']] }, 'vlanTag8021q' => ->(obj) { [:vlan_tag8021q, obj['vlanTag8021q']] }, 'edgeAvailabilityDomain' => ->(obj) { [:edge_availability_domain, obj['edgeAvailabilityDomain']] }, 'candidateSubnets' => ->(obj) { [:candidate_subnets, obj['candidateSubnets']] }, 'bandwidth' => ->(obj) { [:bandwidth, obj['bandwidth']] }, 'partnerMetadata' => ->(obj) { [:partner_metadata, GoogleInSpec::Compute::Property::InterconnectAttachmentPartnerMetadata.new(obj['partnerMetadata'], to_s)] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Compute::Property::InterconnectAttachmentLabels.new(obj['labels'], to_s)] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'partnerAsn' => ->(obj) { [:partner_asn, obj['partnerAsn']] }, 'encryption' => ->(obj) { [:encryption, obj['encryption']] }, 'ipsecInternalAddresses' => ->(obj) { [:ipsec_internal_addresses, obj['ipsecInternalAddresses']] }, 'dataplaneVersion' => ->(obj) { [:dataplane_version, obj['dataplaneVersion']] }, 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, 'stackType' => ->(obj) { [:stack_type, obj['stackType']] }, 'cloudRouterIpv6Address' => ->(obj) { [:cloud_router_ipv6_address, obj['cloudRouterIpv6Address']] }, 'customerRouterIpv6Address' => ->(obj) { [:customer_router_ipv6_address, obj['customerRouterIpv6Address']] }, 'candidateIpv6Subnets' => ->(obj) { [:candidate_ipv6_subnets, obj['candidateIpv6Subnets']] }, 'cloudRouterIpv6InterfaceId' => ->(obj) { [:cloud_router_ipv6_interface_id, obj['cloudRouterIpv6InterfaceId']] }, 'customerRouterIpv6InterfaceId' => ->(obj) { [:customer_router_ipv6_interface_id, obj['customerRouterIpv6InterfaceId']] }, 'subnetLength' => ->(obj) { [:subnet_length, obj['subnetLength']] }, 'remoteService' => ->(obj) { [:remote_service, obj['remoteService']] }, 'configurationConstraints' => ->(obj) { [:configuration_constraints, GoogleInSpec::Compute::Property::InterconnectAttachmentConfigurationConstraints.new(obj['configurationConstraints'], to_s)] }, 'multicastEnabled' => ->(obj) { [:multicast_enabled, obj['multicastEnabled']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/interconnectAttachments' end end ================================================ FILE: libraries/google_compute_interconnect_location.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeInterconnectLocation < GcpResourceBase name 'google_compute_interconnect_location' desc 'InterconnectLocation' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :availability_zone attr_reader :client_operation_id attr_reader :facility_provider attr_reader :facility_provider_facility_id attr_reader :status def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @availability_zone = @fetched['availabilityZone'] @client_operation_id = @fetched['clientOperationId'] @facility_provider = @fetched['facilityProvider'] @facility_provider_facility_id = @fetched['facilityProviderFacilityId'] @status = @fetched['status'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "InterconnectLocation #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/interconnectLocations/{{name}}' end end ================================================ FILE: libraries/google_compute_interconnect_locations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeInterconnectLocations < GcpResourceBase name 'google_compute_interconnect_locations' desc 'InterconnectLocation plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:availability_zones, field: :availability_zone) filter_table_config.add(:client_operation_ids, field: :client_operation_id) filter_table_config.add(:facility_providers, field: :facility_provider) filter_table_config.add(:facility_provider_facility_ids, field: :facility_provider_facility_id) filter_table_config.add(:statuses, field: :status) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'availabilityZone' => ->(obj) { [:availability_zone, obj['availabilityZone']] }, 'clientOperationId' => ->(obj) { [:client_operation_id, obj['clientOperationId']] }, 'facilityProvider' => ->(obj) { [:facility_provider, obj['facilityProvider']] }, 'facilityProviderFacilityId' => ->(obj) { [:facility_provider_facility_id, obj['facilityProviderFacilityId']] }, 'status' => ->(obj) { [:status, obj['status']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/interconnectLocations' end end ================================================ FILE: libraries/google_compute_interconnects.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeInterconnects < GcpResourceBase name 'google_compute_interconnects' desc 'Interconnect plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:admin_enableds, field: :admin_enabled) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:locations, field: :location) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:noc_contact_emails, field: :noc_contact_email) filter_table_config.add(:peer_ip_addresses, field: :peer_ip_address) filter_table_config.add(:google_ip_addresses, field: :google_ip_address) filter_table_config.add(:client_operation_ids, field: :client_operation_id) filter_table_config.add(:google_reference_ids, field: :google_reference_id) filter_table_config.add(:provisioned_link_counts, field: :provisioned_link_count) filter_table_config.add(:customer_names, field: :customer_name) filter_table_config.add(:requested_link_counts, field: :requested_link_count) filter_table_config.add(:operational_statuses, field: :operational_status) filter_table_config.add(:link_types, field: :link_type) filter_table_config.add(:interconnect_types, field: :interconnect_type) filter_table_config.add(:interconnect_attachments, field: :interconnect_attachments) filter_table_config.add(:expected_outages, field: :expected_outages) filter_table_config.add(:circuit_infos, field: :circuit_infos) filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'adminEnabled' => ->(obj) { [:admin_enabled, obj['adminEnabled']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'location' => ->(obj) { [:location, obj['location']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'nocContactEmail' => ->(obj) { [:noc_contact_email, obj['nocContactEmail']] }, 'peerIpAddress' => ->(obj) { [:peer_ip_address, obj['peerIpAddress']] }, 'googleIpAddress' => ->(obj) { [:google_ip_address, obj['googleIpAddress']] }, 'clientOperationId' => ->(obj) { [:client_operation_id, obj['clientOperationId']] }, 'googleReferenceId' => ->(obj) { [:google_reference_id, obj['googleReferenceId']] }, 'provisionedLinkCount' => ->(obj) { [:provisioned_link_count, obj['provisionedLinkCount']] }, 'customerName' => ->(obj) { [:customer_name, obj['customerName']] }, 'requestedLinkCount' => ->(obj) { [:requested_link_count, obj['requestedLinkCount']] }, 'operationalStatus' => ->(obj) { [:operational_status, obj['operationalStatus']] }, 'linkType' => ->(obj) { [:link_type, obj['linkType']] }, 'interconnectType' => ->(obj) { [:interconnect_type, obj['interconnectType']] }, 'interconnectAttachments' => ->(obj) { [:interconnect_attachments, obj['interconnectAttachments']] }, 'expectedOutages' => ->(obj) { [:expected_outages, GoogleInSpec::Compute::Property::InterconnectExpectedOutagesArray.parse(obj['expectedOutages'], to_s)] }, 'circuitInfos' => ->(obj) { [:circuit_infos, GoogleInSpec::Compute::Property::InterconnectCircuitInfosArray.parse(obj['circuitInfos'], to_s)] }, 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/interconnects' end end ================================================ FILE: libraries/google_compute_license.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/license_resource_requirements' # A provider to manage Compute Engine resources. class ComputeLicense < GcpResourceBase name 'google_compute_license' desc 'License' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :name attr_reader :charges_use_fee attr_reader :id attr_reader :license_code attr_reader :creation_timestamp attr_reader :description attr_reader :transferable attr_reader :self_link attr_reader :resource_requirements def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @name = @fetched['name'] @charges_use_fee = @fetched['chargesUseFee'] @id = @fetched['id'] @license_code = @fetched['licenseCode'] @creation_timestamp = @fetched['creationTimestamp'] @description = @fetched['description'] @transferable = @fetched['transferable'] @self_link = @fetched['selfLink'] @resource_requirements = GoogleInSpec::Compute::Property::LicenseResourceRequirements.new(@fetched['resourceRequirements'], to_s) end def exists? !@fetched.nil? end def to_s "License #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/licenses/{{name}}' end end ================================================ FILE: libraries/google_compute_license_code.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/licensecode_license_alias' # A provider to manage Compute Engine resources. class ComputeLicenseCode < GcpResourceBase name 'google_compute_license_code' desc 'LicenseCode' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :transferable attr_reader :state attr_reader :license_alias def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @transferable = @fetched['transferable'] @state = @fetched['state'] @license_alias = GoogleInSpec::Compute::Property::LicenseCodeLicenseAliasArray.parse(@fetched['licenseAlias'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "LicenseCode #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/licenseCodes/{{name}}' end end ================================================ FILE: libraries/google_compute_licenses.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeLicenses < GcpResourceBase name 'google_compute_licenses' desc 'License plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:names, field: :name) filter_table_config.add(:charges_use_fees, field: :charges_use_fee) filter_table_config.add(:ids, field: :id) filter_table_config.add(:license_codes, field: :license_code) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:transferables, field: :transferable) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:resource_requirements, field: :resource_requirements) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'chargesUseFee' => ->(obj) { [:charges_use_fee, obj['chargesUseFee']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'licenseCode' => ->(obj) { [:license_code, obj['licenseCode']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'transferable' => ->(obj) { [:transferable, obj['transferable']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'resourceRequirements' => ->(obj) { [:resource_requirements, GoogleInSpec::Compute::Property::LicenseResourceRequirements.new(obj['resourceRequirements'], to_s)] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/licenses' end end ================================================ FILE: libraries/google_compute_machine_image.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/machineimage_instance_properties' require 'google/compute/property/machineimage_instance_properties_advanced_machine_features' require 'google/compute/property/machineimage_instance_properties_confidential_instance_config' require 'google/compute/property/machineimage_instance_properties_disks' require 'google/compute/property/machineimage_instance_properties_guest_accelerators' require 'google/compute/property/machineimage_instance_properties_labels' require 'google/compute/property/machineimage_instance_properties_metadata' require 'google/compute/property/machineimage_instance_properties_metadata_items' require 'google/compute/property/machineimage_instance_properties_network_interfaces' require 'google/compute/property/machineimage_instance_properties_network_performance_config' require 'google/compute/property/machineimage_instance_properties_reservation_affinity' require 'google/compute/property/machineimage_instance_properties_resource_manager_tags' require 'google/compute/property/machineimage_instance_properties_scheduling' require 'google/compute/property/machineimage_instance_properties_scheduling_local_ssd_recovery_timeout' require 'google/compute/property/machineimage_instance_properties_scheduling_node_affinities' require 'google/compute/property/machineimage_instance_properties_service_accounts' require 'google/compute/property/machineimage_instance_properties_shielded_instance_config' require 'google/compute/property/machineimage_instance_properties_tags' require 'google/compute/property/machineimage_machine_image_encryption_key' require 'google/compute/property/machineimage_saved_disks' require 'google/compute/property/machineimage_source_disk_encryption_keys' require 'google/compute/property/machineimage_source_instance_properties' require 'google/compute/property/machineimage_source_instance_properties_disks' require 'google/compute/property/machineimage_source_instance_properties_guest_accelerators' require 'google/compute/property/machineimage_source_instance_properties_labels' require 'google/compute/property/machineimage_source_instance_properties_metadata' require 'google/compute/property/machineimage_source_instance_properties_metadata_items' require 'google/compute/property/machineimage_source_instance_properties_network_interfaces' require 'google/compute/property/machineimage_source_instance_properties_scheduling' require 'google/compute/property/machineimage_source_instance_properties_scheduling_local_ssd_recovery_timeout' require 'google/compute/property/machineimage_source_instance_properties_scheduling_node_affinities' require 'google/compute/property/machineimage_source_instance_properties_service_accounts' require 'google/compute/property/machineimage_source_instance_properties_tags' # A provider to manage Compute Engine resources. class ComputeMachineImage < GcpResourceBase name 'google_compute_machine_image' desc 'MachineImage' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :self_link attr_reader :source_instance attr_reader :status attr_reader :source_instance_properties attr_reader :instance_properties attr_reader :saved_disks attr_reader :storage_locations attr_reader :machine_image_encryption_key attr_reader :guest_flush attr_reader :source_disk_encryption_keys attr_reader :total_storage_bytes attr_reader :satisfies_pzs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @self_link = @fetched['selfLink'] @source_instance = @fetched['sourceInstance'] @status = @fetched['status'] @source_instance_properties = GoogleInSpec::Compute::Property::MachineImageSourceInstanceProperties.new(@fetched['sourceInstanceProperties'], to_s) @instance_properties = GoogleInSpec::Compute::Property::MachineImageInstanceProperties.new(@fetched['instanceProperties'], to_s) @saved_disks = GoogleInSpec::Compute::Property::MachineImageSavedDisksArray.parse(@fetched['savedDisks'], to_s) @storage_locations = @fetched['storageLocations'] @machine_image_encryption_key = GoogleInSpec::Compute::Property::MachineImageMachineImageEncryptionKey.new(@fetched['machineImageEncryptionKey'], to_s) @guest_flush = @fetched['guestFlush'] @source_disk_encryption_keys = GoogleInSpec::Compute::Property::MachineImageSourceDiskEncryptionKeysArray.parse(@fetched['sourceDiskEncryptionKeys'], to_s) @total_storage_bytes = @fetched['totalStorageBytes'] @satisfies_pzs = @fetched['satisfiesPzs'] end def exists? !@fetched.nil? end def to_s "MachineImage #{@params[:machineImage]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/machineImages/{{name}}' end end ================================================ FILE: libraries/google_compute_machine_images.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeMachineImages < GcpResourceBase name 'google_compute_machine_images' desc 'MachineImage plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:source_instances, field: :source_instance) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:source_instance_properties, field: :source_instance_properties) filter_table_config.add(:instance_properties, field: :instance_properties) filter_table_config.add(:saved_disks, field: :saved_disks) filter_table_config.add(:storage_locations, field: :storage_locations) filter_table_config.add(:machine_image_encryption_keys, field: :machine_image_encryption_key) filter_table_config.add(:guest_flushes, field: :guest_flush) filter_table_config.add(:source_disk_encryption_keys, field: :source_disk_encryption_keys) filter_table_config.add(:total_storage_bytes, field: :total_storage_bytes) filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'sourceInstance' => ->(obj) { [:source_instance, obj['sourceInstance']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'sourceInstanceProperties' => ->(obj) { [:source_instance_properties, GoogleInSpec::Compute::Property::MachineImageSourceInstanceProperties.new(obj['sourceInstanceProperties'], to_s)] }, 'instanceProperties' => ->(obj) { [:instance_properties, GoogleInSpec::Compute::Property::MachineImageInstanceProperties.new(obj['instanceProperties'], to_s)] }, 'savedDisks' => ->(obj) { [:saved_disks, GoogleInSpec::Compute::Property::MachineImageSavedDisksArray.parse(obj['savedDisks'], to_s)] }, 'storageLocations' => ->(obj) { [:storage_locations, obj['storageLocations']] }, 'machineImageEncryptionKey' => ->(obj) { [:machine_image_encryption_key, GoogleInSpec::Compute::Property::MachineImageMachineImageEncryptionKey.new(obj['machineImageEncryptionKey'], to_s)] }, 'guestFlush' => ->(obj) { [:guest_flush, obj['guestFlush']] }, 'sourceDiskEncryptionKeys' => ->(obj) { [:source_disk_encryption_keys, GoogleInSpec::Compute::Property::MachineImageSourceDiskEncryptionKeysArray.parse(obj['sourceDiskEncryptionKeys'], to_s)] }, 'totalStorageBytes' => ->(obj) { [:total_storage_bytes, obj['totalStorageBytes']] }, 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/machineImages' end end ================================================ FILE: libraries/google_compute_machine_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/machinetype_accelerators' require 'google/compute/property/machinetype_deprecated' require 'google/compute/property/machinetype_scratch_disks' # A provider to manage Compute Engine resources. class ComputeMachineType < GcpResourceBase name 'google_compute_machine_type' desc 'MachineType' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :guest_cpus attr_reader :memory_mb attr_reader :image_space_gb attr_reader :scratch_disks attr_reader :maximum_persistent_disks attr_reader :maximum_persistent_disks_size_gb attr_reader :deprecated attr_reader :zone attr_reader :self_link attr_reader :is_shared_cpu attr_reader :accelerators def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @guest_cpus = @fetched['guestCpus'] @memory_mb = @fetched['memoryMb'] @image_space_gb = @fetched['imageSpaceGb'] @scratch_disks = GoogleInSpec::Compute::Property::MachineTypeScratchDisksArray.parse(@fetched['scratchDisks'], to_s) @maximum_persistent_disks = @fetched['maximumPersistentDisks'] @maximum_persistent_disks_size_gb = @fetched['maximumPersistentDisksSizeGb'] @deprecated = GoogleInSpec::Compute::Property::MachineTypeDeprecated.new(@fetched['deprecated'], to_s) @zone = @fetched['zone'] @self_link = @fetched['selfLink'] @is_shared_cpu = @fetched['isSharedCpu'] @accelerators = GoogleInSpec::Compute::Property::MachineTypeAcceleratorsArray.parse(@fetched['accelerators'], to_s) end def exists? !@fetched.nil? end def to_s "MachineType #{@params[:machineType]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/machineTypes/{{name}}' end end ================================================ FILE: libraries/google_compute_machine_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeMachineTypes < GcpResourceBase name 'google_compute_machine_types' desc 'MachineType plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:guest_cpus, field: :guest_cpus) filter_table_config.add(:memory_mbs, field: :memory_mb) filter_table_config.add(:image_space_gbs, field: :image_space_gb) filter_table_config.add(:scratch_disks, field: :scratch_disks) filter_table_config.add(:maximum_persistent_disks, field: :maximum_persistent_disks) filter_table_config.add(:maximum_persistent_disks_size_gbs, field: :maximum_persistent_disks_size_gb) filter_table_config.add(:deprecateds, field: :deprecated) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:is_shared_cpus, field: :is_shared_cpu) filter_table_config.add(:accelerators, field: :accelerators) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'guestCpus' => ->(obj) { [:guest_cpus, obj['guestCpus']] }, 'memoryMb' => ->(obj) { [:memory_mb, obj['memoryMb']] }, 'imageSpaceGb' => ->(obj) { [:image_space_gb, obj['imageSpaceGb']] }, 'scratchDisks' => ->(obj) { [:scratch_disks, GoogleInSpec::Compute::Property::MachineTypeScratchDisksArray.parse(obj['scratchDisks'], to_s)] }, 'maximumPersistentDisks' => ->(obj) { [:maximum_persistent_disks, obj['maximumPersistentDisks']] }, 'maximumPersistentDisksSizeGb' => ->(obj) { [:maximum_persistent_disks_size_gb, obj['maximumPersistentDisksSizeGb']] }, 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::MachineTypeDeprecated.new(obj['deprecated'], to_s)] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'isSharedCpu' => ->(obj) { [:is_shared_cpu, obj['isSharedCpu']] }, 'accelerators' => ->(obj) { [:accelerators, GoogleInSpec::Compute::Property::MachineTypeAcceleratorsArray.parse(obj['accelerators'], to_s)] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/machineTypes' end end ================================================ FILE: libraries/google_compute_network.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/network_peerings' require 'google/compute/property/network_routing_config' # A provider to manage Compute Engine resources. class ComputeNetwork < GcpResourceBase name 'google_compute_network' desc 'Network' supports platform: 'gcp' attr_reader :params attr_reader :description attr_reader :gateway_ipv4 attr_reader :id attr_reader :name attr_reader :subnetworks attr_reader :auto_create_subnetworks attr_reader :creation_timestamp attr_reader :routing_config attr_reader :peerings attr_reader :mtu def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @description = @fetched['description'] @gateway_ipv4 = @fetched['gatewayIPv4'] @id = @fetched['id'] @name = @fetched['name'] @subnetworks = @fetched['subnetworks'] @auto_create_subnetworks = @fetched['autoCreateSubnetworks'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @routing_config = GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(@fetched['routingConfig'], to_s) @peerings = GoogleInSpec::Compute::Property::NetworkPeeringsArray.parse(@fetched['peerings'], to_s) @mtu = @fetched['mtu'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Network #{@params[:name]}" end def legacy? return false if @auto_create_subnetworks return false if !defined?(@gateway_ipv4) return false if !defined?(@network.ipv4_range) return false if @ipv4_range.nil? return false if @gateway_i_pv4.nil? true end def creation_timestamp_date @creation_timestamp end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/networks/{{name}}' end end ================================================ FILE: libraries/google_compute_network_attachment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/networkattachment_connection_endpoints' # A provider to manage Compute Engine resources. class ComputeNetworkAttachment < GcpResourceBase name 'google_compute_network_attachment' desc 'NetworkAttachment' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :self_link attr_reader :self_link_with_id attr_reader :region attr_reader :connection_preference attr_reader :connection_endpoints attr_reader :subnetworks attr_reader :producer_reject_lists attr_reader :producer_accept_lists attr_reader :fingerprint attr_reader :network def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @region = @fetched['region'] @connection_preference = @fetched['connectionPreference'] @connection_endpoints = GoogleInSpec::Compute::Property::NetworkAttachmentConnectionEndpointsArray.parse(@fetched['connectionEndpoints'], to_s) @subnetworks = @fetched['subnetworks'] @producer_reject_lists = @fetched['producerRejectLists'] @producer_accept_lists = @fetched['producerAcceptLists'] @fingerprint = @fetched['fingerprint'] @network = @fetched['network'] end def exists? !@fetched.nil? end def to_s "NetworkAttachment #{@params[:networkAttachment]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/networkAttachments/{{name}}' end end ================================================ FILE: libraries/google_compute_network_attachments.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNetworkAttachments < GcpResourceBase name 'google_compute_network_attachments' desc 'NetworkAttachment plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:regions, field: :region) filter_table_config.add(:connection_preferences, field: :connection_preference) filter_table_config.add(:connection_endpoints, field: :connection_endpoints) filter_table_config.add(:subnetworks, field: :subnetworks) filter_table_config.add(:producer_reject_lists, field: :producer_reject_lists) filter_table_config.add(:producer_accept_lists, field: :producer_accept_lists) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:networks, field: :network) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'connectionPreference' => ->(obj) { [:connection_preference, obj['connectionPreference']] }, 'connectionEndpoints' => ->(obj) { [:connection_endpoints, GoogleInSpec::Compute::Property::NetworkAttachmentConnectionEndpointsArray.parse(obj['connectionEndpoints'], to_s)] }, 'subnetworks' => ->(obj) { [:subnetworks, obj['subnetworks']] }, 'producerRejectLists' => ->(obj) { [:producer_reject_lists, obj['producerRejectLists']] }, 'producerAcceptLists' => ->(obj) { [:producer_accept_lists, obj['producerAcceptLists']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'network' => ->(obj) { [:network, obj['network']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/networkAttachments' end end ================================================ FILE: libraries/google_compute_network_edge_security_service.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeNetworkEdgeSecurityService < GcpResourceBase name 'google_compute_network_edge_security_service' desc 'NetworkEdgeSecurityService' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :self_link attr_reader :self_link_with_id attr_reader :region attr_reader :fingerprint attr_reader :security_policy def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @region = @fetched['region'] @fingerprint = @fetched['fingerprint'] @security_policy = @fetched['securityPolicy'] end def exists? !@fetched.nil? end def to_s "NetworkEdgeSecurityService #{@params[:networkEdgeSecurityService]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/networkEdgeSecurityServices/{{name}}' end end ================================================ FILE: libraries/google_compute_network_endpoint_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeNetworkEndpointGroup < GcpResourceBase name 'google_compute_network_endpoint_group' desc 'NetworkEndpointGroup' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :name attr_reader :description attr_reader :network_endpoint_type attr_reader :size attr_reader :network attr_reader :subnetwork attr_reader :default_port attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @id = @fetched['id'] @name = @fetched['name'] @description = @fetched['description'] @network_endpoint_type = @fetched['networkEndpointType'] @size = @fetched['size'] @network = @fetched['network'] @subnetwork = @fetched['subnetwork'] @default_port = @fetched['defaultPort'] @zone = @fetched['zone'] end def exists? !@fetched.nil? end def to_s "NetworkEndpointGroup #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{name}}' end end ================================================ FILE: libraries/google_compute_network_endpoint_groups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNetworkEndpointGroups < GcpResourceBase name 'google_compute_network_endpoint_groups' desc 'NetworkEndpointGroup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:network_endpoint_types, field: :network_endpoint_type) filter_table_config.add(:sizes, field: :size) filter_table_config.add(:networks, field: :network) filter_table_config.add(:subnetworks, field: :subnetwork) filter_table_config.add(:default_ports, field: :default_port) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'networkEndpointType' => ->(obj) { [:network_endpoint_type, obj['networkEndpointType']] }, 'size' => ->(obj) { [:size, obj['size']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, 'defaultPort' => ->(obj) { [:default_port, obj['defaultPort']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/networkEndpointGroups' end end ================================================ FILE: libraries/google_compute_network_firewall_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNetworkFirewallPolicys < GcpResourceBase name 'google_compute_network_firewall_policies' desc 'NetworkFirewallPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:rules, field: :rules) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:associations, field: :associations) filter_table_config.add(:rule_tuple_counts, field: :rule_tuple_count) filter_table_config.add(:short_names, field: :short_name) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:parents, field: :parent) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'rules' => ->(obj) { [:rules, GoogleInSpec::Compute::Property::NetworkFirewallPolicyRulesArray.parse(obj['rules'], to_s)] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'associations' => ->(obj) { [:associations, GoogleInSpec::Compute::Property::NetworkFirewallPolicyAssociationsArray.parse(obj['associations'], to_s)] }, 'ruleTupleCount' => ->(obj) { [:rule_tuple_count, obj['ruleTupleCount']] }, 'shortName' => ->(obj) { [:short_name, obj['shortName']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/firewallPolicies' end end ================================================ FILE: libraries/google_compute_network_firewall_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/networkfirewallpolicy_associations' require 'google/compute/property/networkfirewallpolicy_rules' # A provider to manage Compute Engine resources. class ComputeNetworkFirewallPolicy < GcpResourceBase name 'google_compute_network_firewall_policy' desc 'NetworkFirewallPolicy' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :rules attr_reader :fingerprint attr_reader :self_link attr_reader :self_link_with_id attr_reader :associations attr_reader :rule_tuple_count attr_reader :short_name attr_reader :display_name attr_reader :parent attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @rules = GoogleInSpec::Compute::Property::NetworkFirewallPolicyRulesArray.parse(@fetched['rules'], to_s) @fingerprint = @fetched['fingerprint'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @associations = GoogleInSpec::Compute::Property::NetworkFirewallPolicyAssociationsArray.parse(@fetched['associations'], to_s) @rule_tuple_count = @fetched['ruleTupleCount'] @short_name = @fetched['shortName'] @display_name = @fetched['displayName'] @parent = @fetched['parent'] @region = @fetched['region'] end def exists? !@fetched.nil? end def to_s "NetworkFirewallPolicy #{@params[:firewallPolicy]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/firewallPolicies/{{name}}' end end ================================================ FILE: libraries/google_compute_networks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNetworks < GcpResourceBase name 'google_compute_networks' desc 'Network plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:gateway_ipv4s, field: :gateway_ipv4) filter_table_config.add(:network_ids, field: :network_id) filter_table_config.add(:network_names, field: :network_name) filter_table_config.add(:subnetworks, field: :subnetworks) filter_table_config.add(:auto_create_subnetworks, field: :auto_create_subnetworks) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:routing_configs, field: :routing_config) filter_table_config.add(:peerings, field: :peerings) filter_table_config.add(:mtus, field: :mtu) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'description' => ->(obj) { [:description, obj['description']] }, 'gatewayIPv4' => ->(obj) { [:gateway_ipv4, obj['gatewayIPv4']] }, 'id' => ->(obj) { [:network_id, obj['id']] }, 'name' => ->(obj) { [:network_name, obj['name']] }, 'subnetworks' => ->(obj) { [:subnetworks, obj['subnetworks']] }, 'autoCreateSubnetworks' => ->(obj) { [:auto_create_subnetworks, obj['autoCreateSubnetworks']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'routingConfig' => ->(obj) { [:routing_config, GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(obj['routingConfig'], to_s)] }, 'peerings' => ->(obj) { [:peerings, GoogleInSpec::Compute::Property::NetworkPeeringsArray.parse(obj['peerings'], to_s)] }, 'mtu' => ->(obj) { [:mtu, obj['mtu']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/networks' end end ================================================ FILE: libraries/google_compute_node_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/nodegroup_autoscaling_policy' # A provider to manage Compute Engine resources. class ComputeNodeGroup < GcpResourceBase name 'google_compute_node_group' desc 'NodeGroup' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :name attr_reader :node_template attr_reader :size attr_reader :maintenance_policy attr_reader :autoscaling_policy attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @name = @fetched['name'] @node_template = @fetched['nodeTemplate'] @size = @fetched['size'] @maintenance_policy = @fetched['maintenancePolicy'] @autoscaling_policy = GoogleInSpec::Compute::Property::NodeGroupAutoscalingPolicy.new(@fetched['autoscalingPolicy'], to_s) @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "NodeGroup #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/nodeGroups/{{name}}' end end ================================================ FILE: libraries/google_compute_node_groups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNodeGroups < GcpResourceBase name 'google_compute_node_groups' desc 'NodeGroup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.add(:node_templates, field: :node_template) filter_table_config.add(:sizes, field: :size) filter_table_config.add(:maintenance_policies, field: :maintenance_policy) filter_table_config.add(:autoscaling_policies, field: :autoscaling_policy) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'nodeTemplate' => ->(obj) { [:node_template, obj['nodeTemplate']] }, 'size' => ->(obj) { [:size, obj['size']] }, 'maintenancePolicy' => ->(obj) { [:maintenance_policy, obj['maintenancePolicy']] }, 'autoscalingPolicy' => ->(obj) { [:autoscaling_policy, GoogleInSpec::Compute::Property::NodeGroupAutoscalingPolicy.new(obj['autoscalingPolicy'], to_s)] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{zone}}/nodeGroups' end end ================================================ FILE: libraries/google_compute_node_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/nodetemplate_node_type_flexibility' require 'google/compute/property/nodetemplate_server_binding' # A provider to manage Compute Engine resources. class ComputeNodeTemplate < GcpResourceBase name 'google_compute_node_template' desc 'NodeTemplate' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :name attr_reader :node_affinity_labels attr_reader :node_type attr_reader :node_type_flexibility attr_reader :server_binding attr_reader :cpu_overcommit_type attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @name = @fetched['name'] @node_affinity_labels = @fetched['nodeAffinityLabels'] @node_type = @fetched['nodeType'] @node_type_flexibility = GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(@fetched['nodeTypeFlexibility'], to_s) @server_binding = GoogleInSpec::Compute::Property::NodeTemplateServerBinding.new(@fetched['serverBinding'], to_s) @cpu_overcommit_type = @fetched['cpuOvercommitType'] @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "NodeTemplate #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/nodeTemplates/{{name}}' end end ================================================ FILE: libraries/google_compute_node_templates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNodeTemplates < GcpResourceBase name 'google_compute_node_templates' desc 'NodeTemplate plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.add(:node_affinity_labels, field: :node_affinity_labels) filter_table_config.add(:node_types, field: :node_type) filter_table_config.add(:node_type_flexibilities, field: :node_type_flexibility) filter_table_config.add(:server_bindings, field: :server_binding) filter_table_config.add(:cpu_overcommit_types, field: :cpu_overcommit_type) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'nodeAffinityLabels' => ->(obj) { [:node_affinity_labels, obj['nodeAffinityLabels']] }, 'nodeType' => ->(obj) { [:node_type, obj['nodeType']] }, 'nodeTypeFlexibility' => ->(obj) { [:node_type_flexibility, GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(obj['nodeTypeFlexibility'], to_s)] }, 'serverBinding' => ->(obj) { [:server_binding, GoogleInSpec::Compute::Property::NodeTemplateServerBinding.new(obj['serverBinding'], to_s)] }, 'cpuOvercommitType' => ->(obj) { [:cpu_overcommit_type, obj['cpuOvercommitType']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/nodeTemplates' end end ================================================ FILE: libraries/google_compute_node_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/nodetype_deprecated' # A provider to manage Compute Engine resources. class ComputeNodeType < GcpResourceBase name 'google_compute_node_type' desc 'NodeType' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :cpu_platform attr_reader :guest_cpus attr_reader :memory_mb attr_reader :local_ssd_gb attr_reader :deprecated attr_reader :zone attr_reader :self_link def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @cpu_platform = @fetched['cpuPlatform'] @guest_cpus = @fetched['guestCpus'] @memory_mb = @fetched['memoryMb'] @local_ssd_gb = @fetched['localSsdGb'] @deprecated = GoogleInSpec::Compute::Property::NodeTypeDeprecated.new(@fetched['deprecated'], to_s) @zone = @fetched['zone'] @self_link = @fetched['selfLink'] end def exists? !@fetched.nil? end def to_s "NodeType #{@params[:nodeType]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/nodeTypes/{{node_type}}' end end ================================================ FILE: libraries/google_compute_node_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeNodeTypes < GcpResourceBase name 'google_compute_node_types' desc 'NodeType plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:cpu_platforms, field: :cpu_platform) filter_table_config.add(:guest_cpus, field: :guest_cpus) filter_table_config.add(:memory_mbs, field: :memory_mb) filter_table_config.add(:local_ssd_gbs, field: :local_ssd_gb) filter_table_config.add(:deprecateds, field: :deprecated) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:self_links, field: :self_link) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'cpuPlatform' => ->(obj) { [:cpu_platform, obj['cpuPlatform']] }, 'guestCpus' => ->(obj) { [:guest_cpus, obj['guestCpus']] }, 'memoryMb' => ->(obj) { [:memory_mb, obj['memoryMb']] }, 'localSsdGb' => ->(obj) { [:local_ssd_gb, obj['localSsdGb']] }, 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::NodeTypeDeprecated.new(obj['deprecated'], to_s)] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/nodeTypes' end end ================================================ FILE: libraries/google_compute_packet_mirroring.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/packetmirroring_collector_ilb' require 'google/compute/property/packetmirroring_filter' require 'google/compute/property/packetmirroring_mirrored_resources' require 'google/compute/property/packetmirroring_mirrored_resources_instances' require 'google/compute/property/packetmirroring_mirrored_resources_subnetworks' require 'google/compute/property/packetmirroring_network' # A provider to manage Compute Engine resources. class ComputePacketMirroring < GcpResourceBase name 'google_compute_packet_mirroring' desc 'PacketMirroring' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :self_link attr_reader :self_link_with_id attr_reader :name attr_reader :description attr_reader :region attr_reader :network attr_reader :priority attr_reader :collector_ilb attr_reader :mirrored_resources attr_reader :filter attr_reader :enable def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @name = @fetched['name'] @description = @fetched['description'] @region = @fetched['region'] @network = GoogleInSpec::Compute::Property::PacketMirroringNetwork.new(@fetched['network'], to_s) @priority = @fetched['priority'] @collector_ilb = GoogleInSpec::Compute::Property::PacketMirroringCollectorIlb.new(@fetched['collectorIlb'], to_s) @mirrored_resources = GoogleInSpec::Compute::Property::PacketMirroringMirroredResources.new(@fetched['mirroredResources'], to_s) @filter = GoogleInSpec::Compute::Property::PacketMirroringFilter.new(@fetched['filter'], to_s) @enable = @fetched['enable'] end def exists? !@fetched.nil? end def to_s "PacketMirroring #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/packetMirrorings/{{name}}' end end ================================================ FILE: libraries/google_compute_packet_mirrorings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputePacketMirrorings < GcpResourceBase name 'google_compute_packet_mirrorings' desc 'PacketMirroring plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:regions, field: :region) filter_table_config.add(:networks, field: :network) filter_table_config.add(:priorities, field: :priority) filter_table_config.add(:collector_ilbs, field: :collector_ilb) filter_table_config.add(:mirrored_resources, field: :mirrored_resources) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:enables, field: :enable) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'network' => ->(obj) { [:network, GoogleInSpec::Compute::Property::PacketMirroringNetwork.new(obj['network'], to_s)] }, 'priority' => ->(obj) { [:priority, obj['priority']] }, 'collectorIlb' => ->(obj) { [:collector_ilb, GoogleInSpec::Compute::Property::PacketMirroringCollectorIlb.new(obj['collectorIlb'], to_s)] }, 'mirroredResources' => ->(obj) { [:mirrored_resources, GoogleInSpec::Compute::Property::PacketMirroringMirroredResources.new(obj['mirroredResources'], to_s)] }, 'filter' => ->(obj) { [:filter, GoogleInSpec::Compute::Property::PacketMirroringFilter.new(obj['filter'], to_s)] }, 'enable' => ->(obj) { [:enable, obj['enable']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/packetMirrorings' end end ================================================ FILE: libraries/google_compute_project_info.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/projectinfo_common_instance_metadata' require 'google/compute/property/projectinfo_common_instance_metadata_items' require 'google/compute/property/projectinfo_quotas' # A provider to manage Compute Engine resources. class ComputeProjectInfo < GcpResourceBase name 'google_compute_project_info' desc 'ProjectInfo' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :common_instance_metadata attr_reader :enabled_features attr_reader :default_service_account attr_reader :xpn_project_status attr_reader :default_network_tier attr_reader :quotas attr_reader :creation_timestamp def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @common_instance_metadata = GoogleInSpec::Compute::Property::ProjectInfoCommonInstanceMetadata.new(@fetched['commonInstanceMetadata'], to_s) @enabled_features = @fetched['enabledFeatures'] @default_service_account = @fetched['defaultServiceAccount'] @xpn_project_status = @fetched['xpnProjectStatus'] @default_network_tier = @fetched['defaultNetworkTier'] @quotas = GoogleInSpec::Compute::Property::ProjectInfoQuotasArray.parse(@fetched['quotas'], to_s) @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "ProjectInfo #{@params[:project]}" end def has_enabled_oslogin? @common_instance_metadata&.items&.each do |element| return true if element.key=='enable-oslogin' and element.value.casecmp('true').zero? end false end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}' end end ================================================ FILE: libraries/google_compute_public_delegated_prefix.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputePublicDelegatedPrefix < GcpResourceBase name 'google_compute_public_delegated_prefix' desc 'PublicDelegatedPrefix' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :ip_cidr_range attr_reader :parent_prefix attr_reader :is_live_migration attr_reader :fingerprint attr_reader :status def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @ip_cidr_range = @fetched['ipCidrRange'] @parent_prefix = @fetched['parentPrefix'] @is_live_migration = @fetched['isLiveMigration'] @fingerprint = @fetched['fingerprint'] @status = @fetched['status'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "PublicDelegatedPrefix #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}' end end ================================================ FILE: libraries/google_compute_public_delegated_prefixes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputePublicDelegatedPrefixs < GcpResourceBase name 'google_compute_public_delegated_prefixes' desc 'PublicDelegatedPrefix plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:ip_cidr_ranges, field: :ip_cidr_range) filter_table_config.add(:parent_prefixes, field: :parent_prefix) filter_table_config.add(:is_live_migrations, field: :is_live_migration) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:statuses, field: :status) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'ipCidrRange' => ->(obj) { [:ip_cidr_range, obj['ipCidrRange']] }, 'parentPrefix' => ->(obj) { [:parent_prefix, obj['parentPrefix']] }, 'isLiveMigration' => ->(obj) { [:is_live_migration, obj['isLiveMigration']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'status' => ->(obj) { [:status, obj['status']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes' end end ================================================ FILE: libraries/google_compute_region.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/region_deprecated' require 'google/compute/property/region_quotas' # A provider to manage Compute Engine resources. class ComputeRegion < GcpResourceBase name 'google_compute_region' desc 'Region' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :deprecated attr_reader :description attr_reader :id attr_reader :name attr_reader :quotas attr_reader :status attr_reader :zones def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @deprecated = GoogleInSpec::Compute::Property::RegionDeprecated.new(@fetched['deprecated'], to_s) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @quotas = GoogleInSpec::Compute::Property::RegionQuotasArray.parse(@fetched['quotas'], to_s) @status = @fetched['status'] @zones = @fetched['zones'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Region #{@params[:name]}" end # helper for returning a list of zone short names rather than fully qualified URLs e.g. # https://www.googleapis.com/compute/v1/projects/spaterson-project/zones/asia-east1-a def zone_names return [] if !exists? @zones.map { |zone| zone.split('/').last } end def up? return false if !exists? @status == 'UP' end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{name}}' end end ================================================ FILE: libraries/google_compute_region_autoscaler.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regionautoscaler_autoscaling_policy' require 'google/compute/property/regionautoscaler_autoscaling_policy_cpu_utilization' require 'google/compute/property/regionautoscaler_autoscaling_policy_custom_metric_utilizations' require 'google/compute/property/regionautoscaler_autoscaling_policy_load_balancing_utilization' require 'google/compute/property/regionautoscaler_autoscaling_policy_scale_down_control' require 'google/compute/property/regionautoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas' require 'google/compute/property/regionautoscaler_autoscaling_policy_scale_in_control' require 'google/compute/property/regionautoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas' require 'google/compute/property/regionautoscaler_autoscaling_policy_scaling_schedules' require 'google/compute/property/regionautoscaler_scaling_schedule_status' require 'google/compute/property/regionautoscaler_status_details' # A provider to manage Compute Engine resources. class ComputeRegionAutoscaler < GcpResourceBase name 'google_compute_region_autoscaler' desc 'RegionAutoscaler' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :target attr_reader :autoscaling_policy attr_reader :zone attr_reader :region attr_reader :self_link attr_reader :self_link_with_id attr_reader :status attr_reader :status_details attr_reader :recommended_size attr_reader :scaling_schedule_status def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @target = @fetched['target'] @autoscaling_policy = GoogleInSpec::Compute::Property::RegionAutoscalerAutoscalingPolicy.new(@fetched['autoscalingPolicy'], to_s) @zone = @fetched['zone'] @region = @fetched['region'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @status = @fetched['status'] @status_details = GoogleInSpec::Compute::Property::RegionAutoscalerStatusDetailsArray.parse(@fetched['statusDetails'], to_s) @recommended_size = @fetched['recommendedSize'] @scaling_schedule_status = GoogleInSpec::Compute::Property::RegionAutoscalerScalingScheduleStatus.new(@fetched['scalingScheduleStatus'], to_s) end def exists? !@fetched.nil? end def to_s "RegionAutoscaler #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/autoscalers/{{name}}' end end ================================================ FILE: libraries/google_compute_region_autoscalers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionAutoscalers < GcpResourceBase name 'google_compute_region_autoscalers' desc 'RegionAutoscaler plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:targets, field: :target) filter_table_config.add(:autoscaling_policies, field: :autoscaling_policy) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:regions, field: :region) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:status_details, field: :status_details) filter_table_config.add(:recommended_sizes, field: :recommended_size) filter_table_config.add(:scaling_schedule_statuses, field: :scaling_schedule_status) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'target' => ->(obj) { [:target, obj['target']] }, 'autoscalingPolicy' => ->(obj) { [:autoscaling_policy, GoogleInSpec::Compute::Property::RegionAutoscalerAutoscalingPolicy.new(obj['autoscalingPolicy'], to_s)] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'statusDetails' => ->(obj) { [:status_details, GoogleInSpec::Compute::Property::RegionAutoscalerStatusDetailsArray.parse(obj['statusDetails'], to_s)] }, 'recommendedSize' => ->(obj) { [:recommended_size, obj['recommendedSize']] }, 'scalingScheduleStatus' => ->(obj) { [:scaling_schedule_status, GoogleInSpec::Compute::Property::RegionAutoscalerScalingScheduleStatus.new(obj['scalingScheduleStatus'], to_s)] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/autoscalers' end end ================================================ FILE: libraries/google_compute_region_backend_service.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regionbackendservice_backends' require 'google/compute/property/regionbackendservice_cdn_policy' require 'google/compute/property/regionbackendservice_cdn_policy_cache_key_policy' require 'google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy' require 'google/compute/property/regionbackendservice_circuit_breakers' require 'google/compute/property/regionbackendservice_circuit_breakers_connect_timeout' require 'google/compute/property/regionbackendservice_connection_draining' require 'google/compute/property/regionbackendservice_consistent_hash' require 'google/compute/property/regionbackendservice_consistent_hash_http_cookie' require 'google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl' require 'google/compute/property/regionbackendservice_failover_policy' require 'google/compute/property/regionbackendservice_log_config' require 'google/compute/property/regionbackendservice_outlier_detection' require 'google/compute/property/regionbackendservice_outlier_detection_base_ejection_time' require 'google/compute/property/regionbackendservice_outlier_detection_interval' # A provider to manage Compute Engine resources. class ComputeRegionBackendService < GcpResourceBase name 'google_compute_region_backend_service' desc 'RegionBackendService' supports platform: 'gcp' attr_reader :params attr_reader :affinity_cookie_ttl_sec attr_reader :backends attr_reader :circuit_breakers attr_reader :consistent_hash attr_reader :cdn_policy attr_reader :connection_draining attr_reader :creation_timestamp attr_reader :description attr_reader :failover_policy attr_reader :enable_cdn attr_reader :fingerprint attr_reader :health_checks attr_reader :id attr_reader :load_balancing_scheme attr_reader :locality_lb_policy attr_reader :name attr_reader :outlier_detection attr_reader :port_name attr_reader :protocol attr_reader :session_affinity attr_reader :timeout_sec attr_reader :log_config attr_reader :network attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @affinity_cookie_ttl_sec = @fetched['affinityCookieTtlSec'] @backends = GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(@fetched['backends'], to_s) @circuit_breakers = GoogleInSpec::Compute::Property::RegionBackendServiceCircuitBreakers.new(@fetched['circuitBreakers'], to_s) @consistent_hash = GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHash.new(@fetched['consistentHash'], to_s) @cdn_policy = GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicy.new(@fetched['cdnPolicy'], to_s) @connection_draining = GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(@fetched['connectionDraining'], to_s) @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @failover_policy = GoogleInSpec::Compute::Property::RegionBackendServiceFailoverPolicy.new(@fetched['failoverPolicy'], to_s) @enable_cdn = @fetched['enableCDN'] @fingerprint = @fetched['fingerprint'] @health_checks = @fetched['healthChecks'] @id = @fetched['id'] @load_balancing_scheme = @fetched['loadBalancingScheme'] @locality_lb_policy = @fetched['localityLbPolicy'] @name = @fetched['name'] @outlier_detection = GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetection.new(@fetched['outlierDetection'], to_s) @port_name = @fetched['portName'] @protocol = @fetched['protocol'] @session_affinity = @fetched['sessionAffinity'] @timeout_sec = @fetched['timeoutSec'] @log_config = GoogleInSpec::Compute::Property::RegionBackendServiceLogConfig.new(@fetched['logConfig'], to_s) @network = @fetched['network'] @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "RegionBackendService #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/backendServices/{{name}}' end end ================================================ FILE: libraries/google_compute_region_backend_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionBackendServices < GcpResourceBase name 'google_compute_region_backend_services' desc 'RegionBackendService plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:affinity_cookie_ttl_secs, field: :affinity_cookie_ttl_sec) filter_table_config.add(:backends, field: :backends) filter_table_config.add(:circuit_breakers, field: :circuit_breakers) filter_table_config.add(:consistent_hashes, field: :consistent_hash) filter_table_config.add(:cdn_policies, field: :cdn_policy) filter_table_config.add(:connection_drainings, field: :connection_draining) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:failover_policies, field: :failover_policy) filter_table_config.add(:enable_cdns, field: :enable_cdn) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:health_checks, field: :health_checks) filter_table_config.add(:ids, field: :id) filter_table_config.add(:load_balancing_schemes, field: :load_balancing_scheme) filter_table_config.add(:locality_lb_policies, field: :locality_lb_policy) filter_table_config.add(:names, field: :name) filter_table_config.add(:outlier_detections, field: :outlier_detection) filter_table_config.add(:port_names, field: :port_name) filter_table_config.add(:protocols, field: :protocol) filter_table_config.add(:session_affinities, field: :session_affinity) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.add(:log_configs, field: :log_config) filter_table_config.add(:networks, field: :network) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'affinityCookieTtlSec' => ->(obj) { [:affinity_cookie_ttl_sec, obj['affinityCookieTtlSec']] }, 'backends' => ->(obj) { [:backends, GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(obj['backends'], to_s)] }, 'circuitBreakers' => ->(obj) { [:circuit_breakers, GoogleInSpec::Compute::Property::RegionBackendServiceCircuitBreakers.new(obj['circuitBreakers'], to_s)] }, 'consistentHash' => ->(obj) { [:consistent_hash, GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHash.new(obj['consistentHash'], to_s)] }, 'cdnPolicy' => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicy.new(obj['cdnPolicy'], to_s)] }, 'connectionDraining' => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(obj['connectionDraining'], to_s)] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'failoverPolicy' => ->(obj) { [:failover_policy, GoogleInSpec::Compute::Property::RegionBackendServiceFailoverPolicy.new(obj['failoverPolicy'], to_s)] }, 'enableCDN' => ->(obj) { [:enable_cdn, obj['enableCDN']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'healthChecks' => ->(obj) { [:health_checks, obj['healthChecks']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, 'localityLbPolicy' => ->(obj) { [:locality_lb_policy, obj['localityLbPolicy']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'outlierDetection' => ->(obj) { [:outlier_detection, GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetection.new(obj['outlierDetection'], to_s)] }, 'portName' => ->(obj) { [:port_name, obj['portName']] }, 'protocol' => ->(obj) { [:protocol, obj['protocol']] }, 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::RegionBackendServiceLogConfig.new(obj['logConfig'], to_s)] }, 'network' => ->(obj) { [:network, obj['network']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/backendServices' end end ================================================ FILE: libraries/google_compute_region_commitment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regioncommitment_license_resource' require 'google/compute/property/regioncommitment_reservations' require 'google/compute/property/regioncommitment_resource_status' require 'google/compute/property/regioncommitment_resource_status_cancellation_information' require 'google/compute/property/regioncommitment_resource_status_cancellation_information_canceled_commitment' require 'google/compute/property/regioncommitment_resource_status_cancellation_information_cancellation_cap' require 'google/compute/property/regioncommitment_resource_status_cancellation_information_cancellation_fee' require 'google/compute/property/regioncommitment_resources' # A provider to manage Compute Engine resources. class ComputeRegionCommitment < GcpResourceBase name 'google_compute_region_commitment' desc 'RegionCommitment' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :region attr_reader :self_link attr_reader :self_link_with_id attr_reader :status attr_reader :status_message attr_reader :plan attr_reader :start_timestamp attr_reader :end_timestamp attr_reader :resources attr_reader :type attr_reader :reservations attr_reader :category attr_reader :license_resource attr_reader :auto_renew attr_reader :merge_source_commitments attr_reader :split_source_commitment attr_reader :resource_status attr_reader :existing_reservations def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @region = @fetched['region'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @status = @fetched['status'] @status_message = @fetched['statusMessage'] @plan = @fetched['plan'] @start_timestamp = @fetched['startTimestamp'] @end_timestamp = @fetched['endTimestamp'] @resources = GoogleInSpec::Compute::Property::RegionCommitmentResourcesArray.parse(@fetched['resources'], to_s) @type = @fetched['type'] @reservations = GoogleInSpec::Compute::Property::RegionCommitmentReservationsArray.parse(@fetched['reservations'], to_s) @category = @fetched['category'] @license_resource = GoogleInSpec::Compute::Property::RegionCommitmentLicenseResource.new(@fetched['licenseResource'], to_s) @auto_renew = @fetched['autoRenew'] @merge_source_commitments = @fetched['mergeSourceCommitments'] @split_source_commitment = @fetched['splitSourceCommitment'] @resource_status = GoogleInSpec::Compute::Property::RegionCommitmentResourceStatus.new(@fetched['resourceStatus'], to_s) @existing_reservations = @fetched['existingReservations'] end def exists? !@fetched.nil? end def to_s "RegionCommitment #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/commitments/{{name}}' end end ================================================ FILE: libraries/google_compute_region_commitments.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionCommitments < GcpResourceBase name 'google_compute_region_commitments' desc 'RegionCommitment plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:regions, field: :region) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:status_messages, field: :status_message) filter_table_config.add(:plans, field: :plan) filter_table_config.add(:start_timestamps, field: :start_timestamp) filter_table_config.add(:end_timestamps, field: :end_timestamp) filter_table_config.add(:resources, field: :resources) filter_table_config.add(:types, field: :type) filter_table_config.add(:reservations, field: :reservations) filter_table_config.add(:categories, field: :category) filter_table_config.add(:license_resources, field: :license_resource) filter_table_config.add(:auto_renews, field: :auto_renew) filter_table_config.add(:merge_source_commitments, field: :merge_source_commitments) filter_table_config.add(:split_source_commitments, field: :split_source_commitment) filter_table_config.add(:resource_statuses, field: :resource_status) filter_table_config.add(:existing_reservations, field: :existing_reservations) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, 'plan' => ->(obj) { [:plan, obj['plan']] }, 'startTimestamp' => ->(obj) { [:start_timestamp, obj['startTimestamp']] }, 'endTimestamp' => ->(obj) { [:end_timestamp, obj['endTimestamp']] }, 'resources' => ->(obj) { [:resources, GoogleInSpec::Compute::Property::RegionCommitmentResourcesArray.parse(obj['resources'], to_s)] }, 'type' => ->(obj) { [:type, obj['type']] }, 'reservations' => ->(obj) { [:reservations, GoogleInSpec::Compute::Property::RegionCommitmentReservationsArray.parse(obj['reservations'], to_s)] }, 'category' => ->(obj) { [:category, obj['category']] }, 'licenseResource' => ->(obj) { [:license_resource, GoogleInSpec::Compute::Property::RegionCommitmentLicenseResource.new(obj['licenseResource'], to_s)] }, 'autoRenew' => ->(obj) { [:auto_renew, obj['autoRenew']] }, 'mergeSourceCommitments' => ->(obj) { [:merge_source_commitments, obj['mergeSourceCommitments']] }, 'splitSourceCommitment' => ->(obj) { [:split_source_commitment, obj['splitSourceCommitment']] }, 'resourceStatus' => ->(obj) { [:resource_status, GoogleInSpec::Compute::Property::RegionCommitmentResourceStatus.new(obj['resourceStatus'], to_s)] }, 'existingReservations' => ->(obj) { [:existing_reservations, obj['existingReservations']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/commitments' end end ================================================ FILE: libraries/google_compute_region_disk_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regiondisktype_deprecated' # A provider to manage Compute Engine resources. class ComputeRegionDiskType < GcpResourceBase name 'google_compute_region_disk_type' desc 'RegionDiskType' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :valid_disk_size attr_reader :deprecated attr_reader :zone attr_reader :self_link attr_reader :default_disk_size_gb attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @valid_disk_size = @fetched['validDiskSize'] @deprecated = GoogleInSpec::Compute::Property::RegionDiskTypeDeprecated.new(@fetched['deprecated'], to_s) @zone = @fetched['zone'] @self_link = @fetched['selfLink'] @default_disk_size_gb = @fetched['defaultDiskSizeGb'] @region = @fetched['region'] end def exists? !@fetched.nil? end def to_s "RegionDiskType #{@params[:disk_type]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/diskTypes/{{disk_type}}' end end ================================================ FILE: libraries/google_compute_region_disk_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionDiskTypes < GcpResourceBase name 'google_compute_region_disk_types' desc 'RegionDiskType plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:valid_disk_sizes, field: :valid_disk_size) filter_table_config.add(:deprecateds, field: :deprecated) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:default_disk_size_gbs, field: :default_disk_size_gb) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'validDiskSize' => ->(obj) { [:valid_disk_size, obj['validDiskSize']] }, 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::RegionDiskTypeDeprecated.new(obj['deprecated'], to_s)] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'defaultDiskSizeGb' => ->(obj) { [:default_disk_size_gb, obj['defaultDiskSizeGb']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/diskTypes' end end ================================================ FILE: libraries/google_compute_region_health_check.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regionhealthcheck_grpc_health_check' require 'google/compute/property/regionhealthcheck_http2_health_check' require 'google/compute/property/regionhealthcheck_http_health_check' require 'google/compute/property/regionhealthcheck_https_health_check' require 'google/compute/property/regionhealthcheck_log_config' require 'google/compute/property/regionhealthcheck_ssl_health_check' require 'google/compute/property/regionhealthcheck_tcp_health_check' # A provider to manage Compute Engine resources. class ComputeRegionHealthCheck < GcpResourceBase name 'google_compute_region_health_check' desc 'RegionHealthCheck' supports platform: 'gcp' attr_reader :params attr_reader :check_interval_sec attr_reader :creation_timestamp attr_reader :description attr_reader :healthy_threshold attr_reader :id attr_reader :name attr_reader :unhealthy_threshold attr_reader :timeout_sec attr_reader :type attr_reader :http_health_check attr_reader :https_health_check attr_reader :tcp_health_check attr_reader :ssl_health_check attr_reader :http2_health_check attr_reader :grpc_health_check attr_reader :log_config attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @check_interval_sec = @fetched['checkIntervalSec'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @healthy_threshold = @fetched['healthyThreshold'] @id = @fetched['id'] @name = @fetched['name'] @unhealthy_threshold = @fetched['unhealthyThreshold'] @timeout_sec = @fetched['timeoutSec'] @type = @fetched['type'] @http_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckHttpHealthCheck.new(@fetched['httpHealthCheck'], to_s) @https_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckHttpsHealthCheck.new(@fetched['httpsHealthCheck'], to_s) @tcp_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckTcpHealthCheck.new(@fetched['tcpHealthCheck'], to_s) @ssl_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckSslHealthCheck.new(@fetched['sslHealthCheck'], to_s) @http2_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckHttp2HealthCheck.new(@fetched['http2HealthCheck'], to_s) @grpc_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckGrpcHealthCheck.new(@fetched['grpcHealthCheck'], to_s) @log_config = GoogleInSpec::Compute::Property::RegionHealthCheckLogConfig.new(@fetched['logConfig'], to_s) @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "RegionHealthCheck #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/healthChecks/{{name}}' end end ================================================ FILE: libraries/google_compute_region_health_checks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionHealthChecks < GcpResourceBase name 'google_compute_region_health_checks' desc 'RegionHealthCheck plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:check_interval_secs, field: :check_interval_sec) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:healthy_thresholds, field: :healthy_threshold) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:unhealthy_thresholds, field: :unhealthy_threshold) filter_table_config.add(:timeout_secs, field: :timeout_sec) filter_table_config.add(:types, field: :type) filter_table_config.add(:http_health_checks, field: :http_health_check) filter_table_config.add(:https_health_checks, field: :https_health_check) filter_table_config.add(:tcp_health_checks, field: :tcp_health_check) filter_table_config.add(:ssl_health_checks, field: :ssl_health_check) filter_table_config.add(:http2_health_checks, field: :http2_health_check) filter_table_config.add(:grpc_health_checks, field: :grpc_health_check) filter_table_config.add(:log_configs, field: :log_config) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'httpHealthCheck' => ->(obj) { [:http_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttpHealthCheck.new(obj['httpHealthCheck'], to_s)] }, 'httpsHealthCheck' => ->(obj) { [:https_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttpsHealthCheck.new(obj['httpsHealthCheck'], to_s)] }, 'tcpHealthCheck' => ->(obj) { [:tcp_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckTcpHealthCheck.new(obj['tcpHealthCheck'], to_s)] }, 'sslHealthCheck' => ->(obj) { [:ssl_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckSslHealthCheck.new(obj['sslHealthCheck'], to_s)] }, 'http2HealthCheck' => ->(obj) { [:http2_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttp2HealthCheck.new(obj['http2HealthCheck'], to_s)] }, 'grpcHealthCheck' => ->(obj) { [:grpc_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckGrpcHealthCheck.new(obj['grpcHealthCheck'], to_s)] }, 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::RegionHealthCheckLogConfig.new(obj['logConfig'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/healthChecks' end end ================================================ FILE: libraries/google_compute_region_instance_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regioninstancegroup_named_ports' # A provider to manage Compute Engine resources. class ComputeRegionInstanceGroup < GcpResourceBase name 'google_compute_region_instance_group' desc 'RegionInstanceGroup' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :fingerprint attr_reader :network attr_reader :zone attr_reader :size attr_reader :region attr_reader :named_ports def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @fingerprint = @fetched['fingerprint'] @network = @fetched['network'] @zone = @fetched['zone'] @size = @fetched['size'] @region = @fetched['region'] @named_ports = GoogleInSpec::Compute::Property::RegionInstanceGroupNamedPortsArray.parse(@fetched['namedPorts'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "RegionInstanceGroup #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/instanceGroups/{{name}}' end end ================================================ FILE: libraries/google_compute_region_instance_group_manager.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regioninstancegroupmanager_auto_healing_policies' require 'google/compute/property/regioninstancegroupmanager_current_actions' require 'google/compute/property/regioninstancegroupmanager_named_ports' # A provider to manage Compute Engine resources. class ComputeRegionInstanceGroupManager < GcpResourceBase name 'google_compute_region_instance_group_manager' desc 'RegionInstanceGroupManager' supports platform: 'gcp' attr_reader :params attr_reader :base_instance_name attr_reader :creation_timestamp attr_reader :current_actions attr_reader :description attr_reader :id attr_reader :instance_group attr_reader :instance_template attr_reader :name attr_reader :named_ports attr_reader :target_pools attr_reader :target_size attr_reader :auto_healing_policies attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @base_instance_name = @fetched['baseInstanceName'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @current_actions = GoogleInSpec::Compute::Property::RegionInstanceGroupManagerCurrentActions.new(@fetched['currentActions'], to_s) @description = @fetched['description'] @id = @fetched['id'] @instance_group = @fetched['instanceGroup'] @instance_template = @fetched['instanceTemplate'] @name = @fetched['name'] @named_ports = GoogleInSpec::Compute::Property::RegionInstanceGroupManagerNamedPortsArray.parse(@fetched['namedPorts'], to_s) @target_pools = @fetched['targetPools'] @target_size = @fetched['targetSize'] @auto_healing_policies = GoogleInSpec::Compute::Property::RegionInstanceGroupManagerAutoHealingPoliciesArray.parse(@fetched['autoHealingPolicies'], to_s) @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "RegionInstanceGroupManager #{@params[:name]}" end def port_name find_named_ports(:name) end RSpec::Matchers.alias_matcher :has_port_name, :be_allow_port_name def port_value find_named_ports(:port) end RSpec::Matchers.alias_matcher :has_port_value, :be_allow_port_value def find_named_ports(key = :name) # check all name/port values for a match return false if !defined?(@named_ports) || @named_ports.nil? @named_ports.each do |named_port| next if !defined?(named_port.item[key]) || named_port.item[key].nil? return named_port.item[key] end false end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/instanceGroupManagers/{{name}}' end end ================================================ FILE: libraries/google_compute_region_instance_group_managers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionInstanceGroupManagers < GcpResourceBase name 'google_compute_region_instance_group_managers' desc 'RegionInstanceGroupManager plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:base_instance_names, field: :base_instance_name) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:current_actions, field: :current_actions) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:instance_group_manager_ids, field: :instance_group_manager_id) filter_table_config.add(:instance_groups, field: :instance_group) filter_table_config.add(:instance_templates, field: :instance_template) filter_table_config.add(:instance_group_manager_names, field: :instance_group_manager_name) filter_table_config.add(:named_ports, field: :named_ports) filter_table_config.add(:target_pools, field: :target_pools) filter_table_config.add(:target_sizes, field: :target_size) filter_table_config.add(:auto_healing_policies, field: :auto_healing_policies) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'baseInstanceName' => ->(obj) { [:base_instance_name, obj['baseInstanceName']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'currentActions' => ->(obj) { [:current_actions, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerCurrentActions.new(obj['currentActions'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:instance_group_manager_id, obj['id']] }, 'instanceGroup' => ->(obj) { [:instance_group, obj['instanceGroup']] }, 'instanceTemplate' => ->(obj) { [:instance_template, obj['instanceTemplate']] }, 'name' => ->(obj) { [:instance_group_manager_name, obj['name']] }, 'namedPorts' => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerNamedPortsArray.parse(obj['namedPorts'], to_s)] }, 'targetPools' => ->(obj) { [:target_pools, obj['targetPools']] }, 'targetSize' => ->(obj) { [:target_size, obj['targetSize']] }, 'autoHealingPolicies' => ->(obj) { [:auto_healing_policies, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerAutoHealingPoliciesArray.parse(obj['autoHealingPolicies'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/instanceGroupManagers' end end ================================================ FILE: libraries/google_compute_region_instance_groups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionInstanceGroups < GcpResourceBase name 'google_compute_region_instance_groups' desc 'RegionInstanceGroup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:networks, field: :network) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:sizes, field: :size) filter_table_config.add(:regions, field: :region) filter_table_config.add(:named_ports, field: :named_ports) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'size' => ->(obj) { [:size, obj['size']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'namedPorts' => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::RegionInstanceGroupNamedPortsArray.parse(obj['namedPorts'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/instanceGroups' end end ================================================ FILE: libraries/google_compute_region_network_endpoint_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regionnetworkendpointgroup_annotations' require 'google/compute/property/regionnetworkendpointgroup_app_engine' require 'google/compute/property/regionnetworkendpointgroup_cloud_function' require 'google/compute/property/regionnetworkendpointgroup_cloud_run' require 'google/compute/property/regionnetworkendpointgroup_psc_data' # A provider to manage Compute Engine resources. class ComputeRegionNetworkEndpointGroup < GcpResourceBase name 'google_compute_region_network_endpoint_group' desc 'RegionNetworkEndpointGroup' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :self_link attr_reader :name attr_reader :description attr_reader :network_endpoint_type attr_reader :size attr_reader :region attr_reader :zone attr_reader :network attr_reader :subnetwork attr_reader :default_port attr_reader :annotations attr_reader :cloud_run attr_reader :app_engine attr_reader :cloud_function attr_reader :psc_target_service attr_reader :psc_data def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @self_link = @fetched['selfLink'] @name = @fetched['name'] @description = @fetched['description'] @network_endpoint_type = @fetched['networkEndpointType'] @size = @fetched['size'] @region = @fetched['region'] @zone = @fetched['zone'] @network = @fetched['network'] @subnetwork = @fetched['subnetwork'] @default_port = @fetched['defaultPort'] @annotations = GoogleInSpec::Compute::Property::RegionNetworkEndpointGroupAnnotations.new(@fetched['annotations'], to_s) @cloud_run = GoogleInSpec::Compute::Property::RegionNetworkEndpointGroupCloudRun.new(@fetched['cloudRun'], to_s) @app_engine = GoogleInSpec::Compute::Property::RegionNetworkEndpointGroupAppEngine.new(@fetched['appEngine'], to_s) @cloud_function = GoogleInSpec::Compute::Property::RegionNetworkEndpointGroupCloudFunction.new(@fetched['cloudFunction'], to_s) @psc_target_service = @fetched['pscTargetService'] @psc_data = GoogleInSpec::Compute::Property::RegionNetworkEndpointGroupPscData.new(@fetched['pscData'], to_s) end def exists? !@fetched.nil? end def to_s "RegionNetworkEndpointGroup #{@params[:networkEndpointGroup]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/networkEndpointGroups/{{network_endpoint_group}}' end end ================================================ FILE: libraries/google_compute_region_network_endpoint_groups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionNetworkEndpointGroups < GcpResourceBase name 'google_compute_region_network_endpoint_groups' desc 'RegionNetworkEndpointGroup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:network_endpoint_types, field: :network_endpoint_type) filter_table_config.add(:sizes, field: :size) filter_table_config.add(:regions, field: :region) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:networks, field: :network) filter_table_config.add(:subnetworks, field: :subnetwork) filter_table_config.add(:default_ports, field: :default_port) filter_table_config.add(:annotations, field: :annotations) filter_table_config.add(:cloud_runs, field: :cloud_run) filter_table_config.add(:app_engines, field: :app_engine) filter_table_config.add(:cloud_functions, field: :cloud_function) filter_table_config.add(:psc_target_services, field: :psc_target_service) filter_table_config.add(:psc_data, field: :psc_data) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'networkEndpointType' => ->(obj) { [:network_endpoint_type, obj['networkEndpointType']] }, 'size' => ->(obj) { [:size, obj['size']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, 'defaultPort' => ->(obj) { [:default_port, obj['defaultPort']] }, 'annotations' => ->(obj) { [:annotations, GoogleInSpec::Compute::Property::RegionNetworkEndpointGroupAnnotations.new(obj['annotations'], to_s)] }, 'cloudRun' => ->(obj) { [:cloud_run, GoogleInSpec::Compute::Property::RegionNetworkEndpointGroupCloudRun.new(obj['cloudRun'], to_s)] }, 'appEngine' => ->(obj) { [:app_engine, GoogleInSpec::Compute::Property::RegionNetworkEndpointGroupAppEngine.new(obj['appEngine'], to_s)] }, 'cloudFunction' => ->(obj) { [:cloud_function, GoogleInSpec::Compute::Property::RegionNetworkEndpointGroupCloudFunction.new(obj['cloudFunction'], to_s)] }, 'pscTargetService' => ->(obj) { [:psc_target_service, obj['pscTargetService']] }, 'pscData' => ->(obj) { [:psc_data, GoogleInSpec::Compute::Property::RegionNetworkEndpointGroupPscData.new(obj['pscData'], to_s)] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/networkEndpointGroups' end end ================================================ FILE: libraries/google_compute_region_operation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeRegionOperation < GcpResourceBase name 'google_compute_region_operation' desc 'RegionOperation' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :target_id attr_reader :status attr_reader :user attr_reader :insert_time attr_reader :start_time attr_reader :end_time attr_reader :progress attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @target_id = @fetched['targetId'] @status = @fetched['status'] @user = @fetched['user'] @insert_time = @fetched['insertTime'] @start_time = @fetched['startTime'] @end_time = @fetched['endTime'] @progress = @fetched['progress'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "RegionOperation #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/operations/{{name}}' end end ================================================ FILE: libraries/google_compute_region_operations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionOperations < GcpResourceBase name 'google_compute_region_operations' desc 'RegionOperation plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:target_ids, field: :target_id) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:users, field: :user) filter_table_config.add(:insert_times, field: :insert_time) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:progresses, field: :progress) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'targetId' => ->(obj) { [:target_id, obj['targetId']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'user' => ->(obj) { [:user, obj['user']] }, 'insertTime' => ->(obj) { [:insert_time, obj['insertTime']] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'progress' => ->(obj) { [:progress, obj['progress']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/operations' end end ================================================ FILE: libraries/google_compute_region_security_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionSecurityPolicys < GcpResourceBase name 'google_compute_region_security_policies' desc 'RegionSecurityPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:user_defined_fields, field: :user_defined_fields) filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:rules, field: :rules) filter_table_config.add(:cloud_armor_configs, field: :cloud_armor_config) filter_table_config.add(:adaptive_protection_configs, field: :adaptive_protection_config) filter_table_config.add(:ddos_protection_configs, field: :ddos_protection_config) filter_table_config.add(:advanced_options_configs, field: :advanced_options_config) filter_table_config.add(:recaptcha_options_configs, field: :recaptcha_options_config) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:types, field: :type) filter_table_config.add(:associations, field: :associations) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:rule_tuple_counts, field: :rule_tuple_count) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:parents, field: :parent) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'userDefinedFields' => ->(obj) { [:user_defined_fields, GoogleInSpec::Compute::Property::RegionSecurityPolicyUserDefinedFieldsArray.parse(obj['userDefinedFields'], to_s)] }, 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'rules' => ->(obj) { [:rules, GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesArray.parse(obj['rules'], to_s)] }, 'cloudArmorConfig' => ->(obj) { [:cloud_armor_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyCloudArmorConfig.new(obj['cloudArmorConfig'], to_s)] }, 'adaptiveProtectionConfig' => ->(obj) { [:adaptive_protection_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfig.new(obj['adaptiveProtectionConfig'], to_s)] }, 'ddosProtectionConfig' => ->(obj) { [:ddos_protection_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyDdosProtectionConfig.new(obj['ddosProtectionConfig'], to_s)] }, 'advancedOptionsConfig' => ->(obj) { [:advanced_options_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyAdvancedOptionsConfig.new(obj['advancedOptionsConfig'], to_s)] }, 'recaptchaOptionsConfig' => ->(obj) { [:recaptcha_options_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyRecaptchaOptionsConfig.new(obj['recaptchaOptionsConfig'], to_s)] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'associations' => ->(obj) { [:associations, GoogleInSpec::Compute::Property::RegionSecurityPolicyAssociationsArray.parse(obj['associations'], to_s)] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Compute::Property::RegionSecurityPolicyLabels.new(obj['labels'], to_s)] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'ruleTupleCount' => ->(obj) { [:rule_tuple_count, obj['ruleTupleCount']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/securityPolicies' end end ================================================ FILE: libraries/google_compute_region_security_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config' require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_auto_deploy_config' require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config' require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs' require 'google/compute/property/regionsecuritypolicy_advanced_options_config' require 'google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config' require 'google/compute/property/regionsecuritypolicy_associations' require 'google/compute/property/regionsecuritypolicy_cloud_armor_config' require 'google/compute/property/regionsecuritypolicy_ddos_protection_config' require 'google/compute/property/regionsecuritypolicy_labels' require 'google/compute/property/regionsecuritypolicy_recaptcha_options_config' require 'google/compute/property/regionsecuritypolicy_rules' require 'google/compute/property/regionsecuritypolicy_user_defined_fields' # A provider to manage Compute Engine resources. class ComputeRegionSecurityPolicy < GcpResourceBase name 'google_compute_region_security_policy' desc 'RegionSecurityPolicy' supports platform: 'gcp' attr_reader :params attr_reader :user_defined_fields attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :rules attr_reader :cloud_armor_config attr_reader :adaptive_protection_config attr_reader :ddos_protection_config attr_reader :advanced_options_config attr_reader :recaptcha_options_config attr_reader :fingerprint attr_reader :self_link attr_reader :self_link_with_id attr_reader :type attr_reader :associations attr_reader :labels attr_reader :label_fingerprint attr_reader :rule_tuple_count attr_reader :display_name attr_reader :parent attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @user_defined_fields = GoogleInSpec::Compute::Property::RegionSecurityPolicyUserDefinedFieldsArray.parse(@fetched['userDefinedFields'], to_s) @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @rules = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesArray.parse(@fetched['rules'], to_s) @cloud_armor_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyCloudArmorConfig.new(@fetched['cloudArmorConfig'], to_s) @adaptive_protection_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfig.new(@fetched['adaptiveProtectionConfig'], to_s) @ddos_protection_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyDdosProtectionConfig.new(@fetched['ddosProtectionConfig'], to_s) @advanced_options_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdvancedOptionsConfig.new(@fetched['advancedOptionsConfig'], to_s) @recaptcha_options_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyRecaptchaOptionsConfig.new(@fetched['recaptchaOptionsConfig'], to_s) @fingerprint = @fetched['fingerprint'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @type = @fetched['type'] @associations = GoogleInSpec::Compute::Property::RegionSecurityPolicyAssociationsArray.parse(@fetched['associations'], to_s) @labels = GoogleInSpec::Compute::Property::RegionSecurityPolicyLabels.new(@fetched['labels'], to_s) @label_fingerprint = @fetched['labelFingerprint'] @rule_tuple_count = @fetched['ruleTupleCount'] @display_name = @fetched['displayName'] @parent = @fetched['parent'] @region = @fetched['region'] end def exists? !@fetched.nil? end def to_s "RegionSecurityPolicy #{@params[:securityPolicy]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/securityPolicies/{{security_policy}}' end end ================================================ FILE: libraries/google_compute_region_ssl_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionSslPolicys < GcpResourceBase name 'google_compute_region_ssl_policies' desc 'RegionSslPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:profiles, field: :profile) filter_table_config.add(:min_tls_versions, field: :min_tls_version) filter_table_config.add(:enabled_features, field: :enabled_features) filter_table_config.add(:custom_features, field: :custom_features) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:warnings, field: :warnings) filter_table_config.add(:tls_settings, field: :tls_settings) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'profile' => ->(obj) { [:profile, obj['profile']] }, 'minTlsVersion' => ->(obj) { [:min_tls_version, obj['minTlsVersion']] }, 'enabledFeatures' => ->(obj) { [:enabled_features, obj['enabledFeatures']] }, 'customFeatures' => ->(obj) { [:custom_features, obj['customFeatures']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'warnings' => ->(obj) { [:warnings, GoogleInSpec::Compute::Property::RegionSslPolicyWarningsArray.parse(obj['warnings'], to_s)] }, 'tlsSettings' => ->(obj) { [:tls_settings, GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettings.new(obj['tlsSettings'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/sslPolicies' end end ================================================ FILE: libraries/google_compute_region_ssl_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regionsslpolicy_tls_settings' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_certificate_paths' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_certificate_context_sds_config_grpc_service_config' require 'google/compute/property/regionsslpolicy_tsptcccscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcccscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcccscgsccc_certificates' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config' require 'google/compute/property/regionsslpolicy_tls_settings_proxy_tls_context_validation_context_sds_config_grpc_service_config' require 'google/compute/property/regionsslpolicy_tsptcvcscgscc_credentials' require 'google/compute/property/regionsslpolicy_tsptcvcscgscccf_plugin' require 'google/compute/property/regionsslpolicy_tsptcvcscgsccc_certificates' require 'google/compute/property/regionsslpolicy_warnings' # A provider to manage Compute Engine resources. class ComputeRegionSslPolicy < GcpResourceBase name 'google_compute_region_ssl_policy' desc 'RegionSslPolicy' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :self_link attr_reader :self_link_with_id attr_reader :name attr_reader :description attr_reader :profile attr_reader :min_tls_version attr_reader :enabled_features attr_reader :custom_features attr_reader :fingerprint attr_reader :warnings attr_reader :tls_settings attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @name = @fetched['name'] @description = @fetched['description'] @profile = @fetched['profile'] @min_tls_version = @fetched['minTlsVersion'] @enabled_features = @fetched['enabledFeatures'] @custom_features = @fetched['customFeatures'] @fingerprint = @fetched['fingerprint'] @warnings = GoogleInSpec::Compute::Property::RegionSslPolicyWarningsArray.parse(@fetched['warnings'], to_s) @tls_settings = GoogleInSpec::Compute::Property::RegionSslPolicyTlsSettings.new(@fetched['tlsSettings'], to_s) @region = @fetched['region'] end def exists? !@fetched.nil? end def to_s "RegionSslPolicy #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/sslPolicies/{{name}}' end end ================================================ FILE: libraries/google_compute_region_target_http_proxies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionTargetHttpProxys < GcpResourceBase name 'google_compute_region_target_http_proxies' desc 'RegionTargetHttpProxy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:url_maps, field: :url_map) filter_table_config.add(:regions, field: :region) filter_table_config.add(:proxy_binds, field: :proxy_bind) filter_table_config.add(:http_filters, field: :http_filters) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:http_keep_alive_timeout_secs, field: :http_keep_alive_timeout_sec) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('regionTargetHttpProxies') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'proxyBind' => ->(obj) { [:proxy_bind, obj['proxyBind']] }, 'httpFilters' => ->(obj) { [:http_filters, obj['httpFilters']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'httpKeepAliveTimeoutSec' => ->(obj) { [:http_keep_alive_timeout_sec, obj['httpKeepAliveTimeoutSec']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/targetHttpProxies' end end ================================================ FILE: libraries/google_compute_region_target_http_proxy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeRegionTargetHttpProxy < GcpResourceBase name 'google_compute_region_target_http_proxy' desc 'RegionTargetHttpProxy' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :self_link attr_reader :self_link_with_id attr_reader :url_map attr_reader :region attr_reader :proxy_bind attr_reader :http_filters attr_reader :fingerprint attr_reader :http_keep_alive_timeout_sec def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @url_map = @fetched['urlMap'] @region = @fetched['region'] @proxy_bind = @fetched['proxyBind'] @http_filters = @fetched['httpFilters'] @fingerprint = @fetched['fingerprint'] @http_keep_alive_timeout_sec = @fetched['httpKeepAliveTimeoutSec'] end def exists? !@fetched.nil? end def to_s "RegionTargetHttpProxy #{@params[:targetHttpProxy]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/targetHttpProxies/{{target_http_proxy}}' end end ================================================ FILE: libraries/google_compute_region_target_https_proxies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionTargetHttpsProxys < GcpResourceBase name 'google_compute_region_target_https_proxies' desc 'RegionTargetHttpsProxy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:url_maps, field: :url_map) filter_table_config.add(:ssl_certificates, field: :ssl_certificates) filter_table_config.add(:certificate_maps, field: :certificate_map) filter_table_config.add(:quic_overrides, field: :quic_override) filter_table_config.add(:ssl_policies, field: :ssl_policy) filter_table_config.add(:regions, field: :region) filter_table_config.add(:proxy_binds, field: :proxy_bind) filter_table_config.add(:http_filters, field: :http_filters) filter_table_config.add(:server_tls_policies, field: :server_tls_policy) filter_table_config.add(:authentications, field: :authentication) filter_table_config.add(:authorization_policies, field: :authorization_policy) filter_table_config.add(:authorizations, field: :authorization) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:http_keep_alive_timeout_secs, field: :http_keep_alive_timeout_sec) filter_table_config.add(:tls_early_data, field: :tls_early_data) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('regionTargetHttpsProxies') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, 'sslCertificates' => ->(obj) { [:ssl_certificates, obj['sslCertificates']] }, 'certificateMap' => ->(obj) { [:certificate_map, obj['certificateMap']] }, 'quicOverride' => ->(obj) { [:quic_override, obj['quicOverride']] }, 'sslPolicy' => ->(obj) { [:ssl_policy, obj['sslPolicy']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'proxyBind' => ->(obj) { [:proxy_bind, obj['proxyBind']] }, 'httpFilters' => ->(obj) { [:http_filters, obj['httpFilters']] }, 'serverTlsPolicy' => ->(obj) { [:server_tls_policy, obj['serverTlsPolicy']] }, 'authentication' => ->(obj) { [:authentication, obj['authentication']] }, 'authorizationPolicy' => ->(obj) { [:authorization_policy, obj['authorizationPolicy']] }, 'authorization' => ->(obj) { [:authorization, obj['authorization']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'httpKeepAliveTimeoutSec' => ->(obj) { [:http_keep_alive_timeout_sec, obj['httpKeepAliveTimeoutSec']] }, 'tlsEarlyData' => ->(obj) { [:tls_early_data, obj['tlsEarlyData']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/targetHttpsProxies' end end ================================================ FILE: libraries/google_compute_region_target_https_proxy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeRegionTargetHttpsProxy < GcpResourceBase name 'google_compute_region_target_https_proxy' desc 'RegionTargetHttpsProxy' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :self_link attr_reader :self_link_with_id attr_reader :url_map attr_reader :ssl_certificates attr_reader :certificate_map attr_reader :quic_override attr_reader :ssl_policy attr_reader :region attr_reader :proxy_bind attr_reader :http_filters attr_reader :server_tls_policy attr_reader :authentication attr_reader :authorization_policy attr_reader :authorization attr_reader :fingerprint attr_reader :http_keep_alive_timeout_sec attr_reader :tls_early_data def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @url_map = @fetched['urlMap'] @ssl_certificates = @fetched['sslCertificates'] @certificate_map = @fetched['certificateMap'] @quic_override = @fetched['quicOverride'] @ssl_policy = @fetched['sslPolicy'] @region = @fetched['region'] @proxy_bind = @fetched['proxyBind'] @http_filters = @fetched['httpFilters'] @server_tls_policy = @fetched['serverTlsPolicy'] @authentication = @fetched['authentication'] @authorization_policy = @fetched['authorizationPolicy'] @authorization = @fetched['authorization'] @fingerprint = @fetched['fingerprint'] @http_keep_alive_timeout_sec = @fetched['httpKeepAliveTimeoutSec'] @tls_early_data = @fetched['tlsEarlyData'] end def exists? !@fetched.nil? end def to_s "RegionTargetHttpsProxy #{@params[:targetHttpsProxy]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/targetHttpsProxies/{{target_https_proxy}}' end end ================================================ FILE: libraries/google_compute_region_url_map.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/regionurlmap_default_custom_error_response_policy' require 'google/compute/property/regionurlmap_default_custom_error_response_policy_error_response_rules' require 'google/compute/property/regionurlmap_default_route_action' require 'google/compute/property/regionurlmap_default_route_action_cors_policy' require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy' require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy_abort' require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy_delay' require 'google/compute/property/regionurlmap_default_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/regionurlmap_default_route_action_max_stream_duration' require 'google/compute/property/regionurlmap_default_route_action_request_mirror_policy' require 'google/compute/property/regionurlmap_default_route_action_retry_policy' require 'google/compute/property/regionurlmap_default_route_action_retry_policy_per_try_timeout' require 'google/compute/property/regionurlmap_default_route_action_timeout' require 'google/compute/property/regionurlmap_default_route_action_url_rewrite' require 'google/compute/property/regionurlmap_default_route_action_weighted_backend_services' require 'google/compute/property/regionurlmap_default_url_redirect' require 'google/compute/property/regionurlmap_header_action' require 'google/compute/property/regionurlmap_header_action_request_headers_to_add' require 'google/compute/property/regionurlmap_header_action_response_headers_to_add' require 'google/compute/property/regionurlmap_host_rules' require 'google/compute/property/regionurlmap_path_matchers' require 'google/compute/property/regionurlmap_tests' # A provider to manage Compute Engine resources. class ComputeRegionUrlMap < GcpResourceBase name 'google_compute_region_url_map' desc 'RegionUrlMap' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :self_link attr_reader :host_rules attr_reader :path_matchers attr_reader :tests attr_reader :default_service attr_reader :default_route_action attr_reader :default_url_redirect attr_reader :header_action attr_reader :default_custom_error_response_policy attr_reader :fingerprint attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @self_link = @fetched['selfLink'] @host_rules = GoogleInSpec::Compute::Property::RegionUrlMapHostRulesArray.parse(@fetched['hostRules'], to_s) @path_matchers = GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersArray.parse(@fetched['pathMatchers'], to_s) @tests = GoogleInSpec::Compute::Property::RegionUrlMapTestsArray.parse(@fetched['tests'], to_s) @default_service = @fetched['defaultService'] @default_route_action = GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteAction.new(@fetched['defaultRouteAction'], to_s) @default_url_redirect = GoogleInSpec::Compute::Property::RegionUrlMapDefaultUrlRedirect.new(@fetched['defaultUrlRedirect'], to_s) @header_action = GoogleInSpec::Compute::Property::RegionUrlMapHeaderAction.new(@fetched['headerAction'], to_s) @default_custom_error_response_policy = GoogleInSpec::Compute::Property::RegionUrlMapDefaultCustomErrorResponsePolicy.new(@fetched['defaultCustomErrorResponsePolicy'], to_s) @fingerprint = @fetched['fingerprint'] @region = @fetched['region'] end def exists? !@fetched.nil? end def to_s "RegionUrlMap #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/urlMaps/{{name}}' end end ================================================ FILE: libraries/google_compute_region_url_maps.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegionUrlMaps < GcpResourceBase name 'google_compute_region_url_maps' desc 'RegionUrlMap plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:host_rules, field: :host_rules) filter_table_config.add(:path_matchers, field: :path_matchers) filter_table_config.add(:tests, field: :tests) filter_table_config.add(:default_services, field: :default_service) filter_table_config.add(:default_route_actions, field: :default_route_action) filter_table_config.add(:default_url_redirects, field: :default_url_redirect) filter_table_config.add(:header_actions, field: :header_action) filter_table_config.add(:default_custom_error_response_policies, field: :default_custom_error_response_policy) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'hostRules' => ->(obj) { [:host_rules, GoogleInSpec::Compute::Property::RegionUrlMapHostRulesArray.parse(obj['hostRules'], to_s)] }, 'pathMatchers' => ->(obj) { [:path_matchers, GoogleInSpec::Compute::Property::RegionUrlMapPathMatchersArray.parse(obj['pathMatchers'], to_s)] }, 'tests' => ->(obj) { [:tests, GoogleInSpec::Compute::Property::RegionUrlMapTestsArray.parse(obj['tests'], to_s)] }, 'defaultService' => ->(obj) { [:default_service, obj['defaultService']] }, 'defaultRouteAction' => ->(obj) { [:default_route_action, GoogleInSpec::Compute::Property::RegionUrlMapDefaultRouteAction.new(obj['defaultRouteAction'], to_s)] }, 'defaultUrlRedirect' => ->(obj) { [:default_url_redirect, GoogleInSpec::Compute::Property::RegionUrlMapDefaultUrlRedirect.new(obj['defaultUrlRedirect'], to_s)] }, 'headerAction' => ->(obj) { [:header_action, GoogleInSpec::Compute::Property::RegionUrlMapHeaderAction.new(obj['headerAction'], to_s)] }, 'defaultCustomErrorResponsePolicy' => ->(obj) { [:default_custom_error_response_policy, GoogleInSpec::Compute::Property::RegionUrlMapDefaultCustomErrorResponsePolicy.new(obj['defaultCustomErrorResponsePolicy'], to_s)] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/urlMaps' end end ================================================ FILE: libraries/google_compute_regional_disk.rb ================================================ # frozen_string_literal: false require 'gcp_backend' require 'google/compute/property/disk_disk_encryption_key' require 'google/compute/property/disk_source_image_encryption_key' require 'google/compute/property/disk_source_snapshot_encryption_key' # A provider to manage Compute Engine resources. class RegionalDisk < GcpResourceBase name 'google_compute_regional_disk' desc 'RegionalDisk' supports platform: 'gcp' attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :params attr_reader :description attr_reader :size_gb attr_reader :zone attr_reader :source_snapshot attr_reader :source_snapshot_id attr_reader :source_snapshot_encryption_key attr_reader :source_image attr_reader :source_image_id attr_reader :source_image_encryption_key attr_reader :type attr_reader :licenses attr_reader :last_attach_timestamp attr_reader :last_detach_timestamp attr_reader :users attr_reader :disk_encryption_key attr_reader :labels attr_reader :label_fingerprint attr_reader :physical_block_size_bytes attr_reader :region attr_reader :replica_zones attr_reader :status def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params) parse unless @fetched.nil? end def parse @id = @fetched['id'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @name = @fetched['name'] @size_gb = @fetched['sizeGb'] @type = @fetched['type'] @label_fingerprint = @fetched['labelFingerprint'] @region = @fetched['region'] @replica_zones = @fetched['replicaZones'] @physical_block_size_bytes = @fetched['physicalBlockSizeBytes'] @description = @fetched['description'] @last_attach_timestamp = parse_time_string(@fetched['lastAttachTimestamp']) @last_detach_timestamp = parse_time_string(@fetched['lastDetachTimestamp']) @labels = @fetched['labels'] @licenses = @fetched['licenses'] @users = @fetched['users'] @source_image = @fetched['sourceImage'] @zone = @fetched['zone'] @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched['sourceImageEncryptionKey'], to_s) @source_image_id = @fetched['sourceImageId'] @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched['diskEncryptionKey'], to_s) @source_snapshot = @fetched['sourceSnapshot'] @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched['sourceSnapshotEncryptionKey'], to_s) @source_snapshot_id = @fetched['sourceSnapshotId'] @stat = @fetched['status'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "RegionalDisk #{@params[:name]}" end private def product_url 'https://www.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/disks/{{name}}' end end ================================================ FILE: libraries/google_compute_regional_disks.rb ================================================ # frozen_string_literal: false require 'gcp_backend' class RegionalDisks < GcpResourceBase name 'google_compute_regional_disks' desc 'RegionalDisk plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:size_gbs, field: :size_gb) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:source_snapshots, field: :source_snapshot) filter_table_config.add(:source_snapshot_ids, field: :source_snapshot_id) filter_table_config.add(:source_snapshot_encryption_keys, field: :source_snapshot_encryption_key) filter_table_config.add(:source_images, field: :source_image) filter_table_config.add(:source_image_ids, field: :source_image_id) filter_table_config.add(:source_image_encryption_keys, field: :source_image_encryption_key) filter_table_config.add(:types, field: :type) filter_table_config.add(:licenses, field: :licenses) filter_table_config.add(:last_attach_timestamps, field: :last_attach_timestamp) filter_table_config.add(:last_detach_timestamps, field: :last_detach_timestamp) filter_table_config.add(:users, field: :users) filter_table_config.add(:disk_encryption_keys, field: :disk_encryption_key) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:physical_block_size_bytes, field: :physical_block_size_bytes) filter_table_config.add(:regions, field: :region) filter_table_config.add(:replica_zones, field: :replica_zone) filter_table_config.add(:statuses, field: :status) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'sizeGb' => ->(obj) { [:size_gb, obj['sizeGb']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'sourceSnapshot' => ->(obj) { [:source_snapshot, obj['sourceSnapshot']] }, 'sourceSnapshotId' => ->(obj) { [:source_snapshot_id, obj['sourceSnapshotId']] }, 'sourceSnapshotEncryptionKey' => ->(obj) { [:source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj['sourceSnapshotEncryptionKey'], to_s)] }, 'sourceImage' => ->(obj) { [:source_image, obj['sourceImage']] }, 'sourceImageId' => ->(obj) { [:source_image_id, obj['sourceImageId']] }, 'sourceImageEncryptionKey' => ->(obj) { [:source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj['sourceImageEncryptionKey'], to_s)] }, 'type' => ->(obj) { [:type, obj['type']] }, 'licenses' => ->(obj) { [:licenses, obj['licenses']] }, 'lastAttachTimestamp' => ->(obj) { [:last_attach_timestamp, parse_time_string(obj['lastAttachTimestamp'])] }, 'lastDetachTimestamp' => ->(obj) { [:last_detach_timestamp, parse_time_string(obj['lastDetachTimestamp'])] }, 'users' => ->(obj) { [:users, obj['users']] }, 'diskEncryptionKey' => ->(obj) { [:disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj['diskEncryptionKey'], to_s)] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'physicalBlockSizeBytes' => ->(obj) { [:physical_block_size_bytes, obj['physicalBlockSizeBytes']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'replica_zones' => ->(obj) { [:replica_zones, obj['replica_zones']] }, 'status' => ->(obj) { [:status, obj['status']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/disks' end end ================================================ FILE: libraries/google_compute_regions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRegions < GcpResourceBase name 'google_compute_regions' desc 'Region plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:deprecateds, field: :deprecated) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:region_ids, field: :region_id) filter_table_config.add(:region_names, field: :region_name) filter_table_config.add(:quotas, field: :quotas) filter_table_config.add(:region_statuses, field: :region_status) filter_table_config.add(:zones, field: :zones) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::RegionDeprecated.new(obj['deprecated'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:region_id, obj['id']] }, 'name' => ->(obj) { [:region_name, obj['name']] }, 'quotas' => ->(obj) { [:quotas, GoogleInSpec::Compute::Property::RegionQuotasArray.parse(obj['quotas'], to_s)] }, 'status' => ->(obj) { [:region_status, obj['status']] }, 'zones' => ->(obj) { [:zones, obj['zones']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions' end end ================================================ FILE: libraries/google_compute_reservation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/reservation_aggregate_reservation' require 'google/compute/property/reservation_aggregate_reservation_in_use_resources' require 'google/compute/property/reservation_aggregate_reservation_reserved_resources' require 'google/compute/property/reservation_delete_after_duration' require 'google/compute/property/reservation_resource_policies' require 'google/compute/property/reservation_resource_status' require 'google/compute/property/reservation_resource_status_specific_sku_allocation' require 'google/compute/property/reservation_share_settings' require 'google/compute/property/reservation_share_settings_folder_map' require 'google/compute/property/reservation_share_settings_project_map' require 'google/compute/property/reservation_specific_reservation' require 'google/compute/property/reservation_specific_reservation_instance_properties' require 'google/compute/property/reservation_specific_reservation_instance_properties_guest_accelerators' require 'google/compute/property/reservation_specific_reservation_instance_properties_local_ssds' # A provider to manage Compute Engine resources. class ComputeReservation < GcpResourceBase name 'google_compute_reservation' desc 'Reservation' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :self_link attr_reader :self_link_with_id attr_reader :zone attr_reader :description attr_reader :name attr_reader :specific_reservation attr_reader :aggregate_reservation attr_reader :commitment attr_reader :specific_reservation_required attr_reader :status attr_reader :share_settings attr_reader :satisfies_pzs attr_reader :resource_policies attr_reader :resource_status attr_reader :delete_at_time attr_reader :delete_after_duration def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @zone = @fetched['zone'] @description = @fetched['description'] @name = @fetched['name'] @specific_reservation = GoogleInSpec::Compute::Property::ReservationSpecificReservation.new(@fetched['specificReservation'], to_s) @aggregate_reservation = GoogleInSpec::Compute::Property::ReservationAggregateReservation.new(@fetched['aggregateReservation'], to_s) @commitment = @fetched['commitment'] @specific_reservation_required = @fetched['specificReservationRequired'] @status = @fetched['status'] @share_settings = GoogleInSpec::Compute::Property::ReservationShareSettings.new(@fetched['shareSettings'], to_s) @satisfies_pzs = @fetched['satisfiesPzs'] @resource_policies = GoogleInSpec::Compute::Property::ReservationResourcePolicies.new(@fetched['resourcePolicies'], to_s) @resource_status = GoogleInSpec::Compute::Property::ReservationResourceStatus.new(@fetched['resourceStatus'], to_s) @delete_at_time = @fetched['deleteAtTime'] @delete_after_duration = GoogleInSpec::Compute::Property::ReservationDeleteAfterDuration.new(@fetched['deleteAfterDuration'], to_s) end def exists? !@fetched.nil? end def to_s "Reservation #{@params[:reservation]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/reservations/{{name}}' end end ================================================ FILE: libraries/google_compute_reservations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeReservations < GcpResourceBase name 'google_compute_reservations' desc 'Reservation plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.add(:specific_reservations, field: :specific_reservation) filter_table_config.add(:aggregate_reservations, field: :aggregate_reservation) filter_table_config.add(:commitments, field: :commitment) filter_table_config.add(:specific_reservation_requireds, field: :specific_reservation_required) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:share_settings, field: :share_settings) filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) filter_table_config.add(:resource_policies, field: :resource_policies) filter_table_config.add(:resource_statuses, field: :resource_status) filter_table_config.add(:delete_at_times, field: :delete_at_time) filter_table_config.add(:delete_after_durations, field: :delete_after_duration) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'specificReservation' => ->(obj) { [:specific_reservation, GoogleInSpec::Compute::Property::ReservationSpecificReservation.new(obj['specificReservation'], to_s)] }, 'aggregateReservation' => ->(obj) { [:aggregate_reservation, GoogleInSpec::Compute::Property::ReservationAggregateReservation.new(obj['aggregateReservation'], to_s)] }, 'commitment' => ->(obj) { [:commitment, obj['commitment']] }, 'specificReservationRequired' => ->(obj) { [:specific_reservation_required, obj['specificReservationRequired']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'shareSettings' => ->(obj) { [:share_settings, GoogleInSpec::Compute::Property::ReservationShareSettings.new(obj['shareSettings'], to_s)] }, 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, 'resourcePolicies' => ->(obj) { [:resource_policies, GoogleInSpec::Compute::Property::ReservationResourcePolicies.new(obj['resourcePolicies'], to_s)] }, 'resourceStatus' => ->(obj) { [:resource_status, GoogleInSpec::Compute::Property::ReservationResourceStatus.new(obj['resourceStatus'], to_s)] }, 'deleteAtTime' => ->(obj) { [:delete_at_time, obj['deleteAtTime']] }, 'deleteAfterDuration' => ->(obj) { [:delete_after_duration, GoogleInSpec::Compute::Property::ReservationDeleteAfterDuration.new(obj['deleteAfterDuration'], to_s)] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/reservations' end end ================================================ FILE: libraries/google_compute_resource_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeResourcePolicys < GcpResourceBase name 'google_compute_resource_policies' desc 'ResourcePolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:regions, field: :region) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.add(:vm_maintenance_policies, field: :vm_maintenance_policy) filter_table_config.add(:snapshot_schedule_policies, field: :snapshot_schedule_policy) filter_table_config.add(:group_placement_policies, field: :group_placement_policy) filter_table_config.add(:instance_schedule_policies, field: :instance_schedule_policy) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:resource_statuses, field: :resource_status) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'vmMaintenancePolicy' => ->(obj) { [:vm_maintenance_policy, GoogleInSpec::Compute::Property::ResourcePolicyVmMaintenancePolicy.new(obj['vmMaintenancePolicy'], to_s)] }, 'snapshotSchedulePolicy' => ->(obj) { [:snapshot_schedule_policy, GoogleInSpec::Compute::Property::ResourcePolicySnapshotSchedulePolicy.new(obj['snapshotSchedulePolicy'], to_s)] }, 'groupPlacementPolicy' => ->(obj) { [:group_placement_policy, GoogleInSpec::Compute::Property::ResourcePolicyGroupPlacementPolicy.new(obj['groupPlacementPolicy'], to_s)] }, 'instanceSchedulePolicy' => ->(obj) { [:instance_schedule_policy, GoogleInSpec::Compute::Property::ResourcePolicyInstanceSchedulePolicy.new(obj['instanceSchedulePolicy'], to_s)] }, 'status' => ->(obj) { [:status, obj['status']] }, 'resourceStatus' => ->(obj) { [:resource_status, GoogleInSpec::Compute::Property::ResourcePolicyResourceStatus.new(obj['resourceStatus'], to_s)] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/resourcePolicies' end end ================================================ FILE: libraries/google_compute_resource_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/resourcepolicy_group_placement_policy' require 'google/compute/property/resourcepolicy_instance_schedule_policy' require 'google/compute/property/resourcepolicy_instance_schedule_policy_vm_start_schedule' require 'google/compute/property/resourcepolicy_instance_schedule_policy_vm_stop_schedule' require 'google/compute/property/resourcepolicy_resource_status' require 'google/compute/property/resourcepolicy_resource_status_instance_schedule_policy' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_retention_policy' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_daily_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_hourly_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_schedule_weekly_schedule_day_of_weeks' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_snapshot_properties' require 'google/compute/property/resourcepolicy_snapshot_schedule_policy_snapshot_properties_labels' require 'google/compute/property/resourcepolicy_vm_maintenance_policy' require 'google/compute/property/resourcepolicy_vm_maintenance_policy_concurrency_control_group' require 'google/compute/property/resourcepolicy_vm_maintenance_policy_maintenance_window' require 'google/compute/property/resourcepolicy_vm_maintenance_policy_maintenance_window_daily_maintenance_window' # A provider to manage Compute Engine resources. class ComputeResourcePolicy < GcpResourceBase name 'google_compute_resource_policy' desc 'ResourcePolicy' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :self_link attr_reader :self_link_with_id attr_reader :region attr_reader :description attr_reader :name attr_reader :vm_maintenance_policy attr_reader :snapshot_schedule_policy attr_reader :group_placement_policy attr_reader :instance_schedule_policy attr_reader :status attr_reader :resource_status def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @region = @fetched['region'] @description = @fetched['description'] @name = @fetched['name'] @vm_maintenance_policy = GoogleInSpec::Compute::Property::ResourcePolicyVmMaintenancePolicy.new(@fetched['vmMaintenancePolicy'], to_s) @snapshot_schedule_policy = GoogleInSpec::Compute::Property::ResourcePolicySnapshotSchedulePolicy.new(@fetched['snapshotSchedulePolicy'], to_s) @group_placement_policy = GoogleInSpec::Compute::Property::ResourcePolicyGroupPlacementPolicy.new(@fetched['groupPlacementPolicy'], to_s) @instance_schedule_policy = GoogleInSpec::Compute::Property::ResourcePolicyInstanceSchedulePolicy.new(@fetched['instanceSchedulePolicy'], to_s) @status = @fetched['status'] @resource_status = GoogleInSpec::Compute::Property::ResourcePolicyResourceStatus.new(@fetched['resourceStatus'], to_s) end def exists? !@fetched.nil? end def to_s "ResourcePolicy #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/resourcePolicies/{{name}}' end end ================================================ FILE: libraries/google_compute_route.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeRoute < GcpResourceBase name 'google_compute_route' desc 'Route' supports platform: 'gcp' attr_reader :params attr_reader :dest_range attr_reader :description attr_reader :name attr_reader :network attr_reader :priority attr_reader :tags attr_reader :next_hop_gateway attr_reader :next_hop_instance attr_reader :next_hop_ip attr_reader :next_hop_vpn_tunnel attr_reader :next_hop_network attr_reader :next_hop_ilb def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @dest_range = @fetched['destRange'] @description = @fetched['description'] @name = @fetched['name'] @network = @fetched['network'] @priority = @fetched['priority'] @tags = @fetched['tags'] @next_hop_gateway = @fetched['nextHopGateway'] @next_hop_instance = @fetched['nextHopInstance'] @next_hop_ip = @fetched['nextHopIp'] @next_hop_vpn_tunnel = @fetched['nextHopVpnTunnel'] @next_hop_network = @fetched['nextHopNetwork'] @next_hop_ilb = @fetched['nextHopIlb'] end def exists? !@fetched.nil? end def to_s "Route #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/routes/{{name}}' end end ================================================ FILE: libraries/google_compute_router.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/router_bgp' require 'google/compute/property/router_bgp_advertised_ip_ranges' # A provider to manage Compute Engine resources. class ComputeRouter < GcpResourceBase name 'google_compute_router' desc 'Router' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :network attr_reader :bgp attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @id = @fetched['id'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @name = @fetched['name'] @description = @fetched['description'] @network = @fetched['network'] @bgp = GoogleInSpec::Compute::Property::RouterBgp.new(@fetched['bgp'], to_s) @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Router #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/routers/{{name}}' end end ================================================ FILE: libraries/google_compute_router_nat.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/routernat_log_config' require 'google/compute/property/routernat_subnetwork' # A provider to manage Compute Engine resources. class ComputeRouterNat < GcpResourceBase name 'google_compute_router_nat' desc 'RouterNat' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :nat_ip_allocate_option attr_reader :nat_ips attr_reader :drain_nat_ips attr_reader :source_subnetwork_ip_ranges_to_nat attr_reader :subnetwork attr_reader :min_ports_per_vm attr_reader :udp_idle_timeout_sec attr_reader :icmp_idle_timeout_sec attr_reader :tcp_established_idle_timeout_sec attr_reader :tcp_transitory_idle_timeout_sec attr_reader :log_config attr_reader :enable_endpoint_independent_mapping attr_reader :router attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') @fetched = unwrap(fetched, params) parse unless @fetched.nil? end def identity %w{name} end def collection_item 'nats' end def unwrap(fetched, params) fetched[collection_item].find { |result| identity.all? { |id| result[id] == params[id.to_sym] } } end def parse @name = @fetched['name'] @nat_ip_allocate_option = @fetched['natIpAllocateOption'] @nat_ips = @fetched['natIps'] @drain_nat_ips = @fetched['drainNatIps'] @source_subnetwork_ip_ranges_to_nat = @fetched['sourceSubnetworkIpRangesToNat'] @subnetwork = GoogleInSpec::Compute::Property::RouterNatSubnetworkArray.parse(@fetched['subnetworks'], to_s) @min_ports_per_vm = @fetched['minPortsPerVm'] @udp_idle_timeout_sec = @fetched['udpIdleTimeoutSec'] @icmp_idle_timeout_sec = @fetched['icmpIdleTimeoutSec'] @tcp_established_idle_timeout_sec = @fetched['tcpEstablishedIdleTimeoutSec'] @tcp_transitory_idle_timeout_sec = @fetched['tcpTransitoryIdleTimeoutSec'] @log_config = GoogleInSpec::Compute::Property::RouterNatLogConfig.new(@fetched['logConfig'], to_s) @enable_endpoint_independent_mapping = @fetched['enableEndpointIndependentMapping'] @router = @fetched['router'] @region = @fetched['region'] end def exists? !@fetched.nil? end def to_s "RouterNat #{@params[:router]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/routers/{{router}}' end end ================================================ FILE: libraries/google_compute_router_nats.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRouterNats < GcpResourceBase name 'google_compute_router_nats' desc 'RouterNat plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:nat_ip_allocate_options, field: :nat_ip_allocate_option) filter_table_config.add(:nat_ips, field: :nat_ips) filter_table_config.add(:drain_nat_ips, field: :drain_nat_ips) filter_table_config.add(:source_subnetwork_ip_ranges_to_nats, field: :source_subnetwork_ip_ranges_to_nat) filter_table_config.add(:subnetworks, field: :subnetwork) filter_table_config.add(:min_ports_per_vms, field: :min_ports_per_vm) filter_table_config.add(:udp_idle_timeout_secs, field: :udp_idle_timeout_sec) filter_table_config.add(:icmp_idle_timeout_secs, field: :icmp_idle_timeout_sec) filter_table_config.add(:tcp_established_idle_timeout_secs, field: :tcp_established_idle_timeout_sec) filter_table_config.add(:tcp_transitory_idle_timeout_secs, field: :tcp_transitory_idle_timeout_sec) filter_table_config.add(:log_configs, field: :log_config) filter_table_config.add(:enable_endpoint_independent_mappings, field: :enable_endpoint_independent_mapping) filter_table_config.add(:routers, field: :router) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('nats') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'natIpAllocateOption' => ->(obj) { [:nat_ip_allocate_option, obj['natIpAllocateOption']] }, 'natIps' => ->(obj) { [:nat_ips, obj['natIps']] }, 'drainNatIps' => ->(obj) { [:drain_nat_ips, obj['drainNatIps']] }, 'sourceSubnetworkIpRangesToNat' => ->(obj) { [:source_subnetwork_ip_ranges_to_nat, obj['sourceSubnetworkIpRangesToNat']] }, 'subnetworks' => ->(obj) { [:subnetwork, GoogleInSpec::Compute::Property::RouterNatSubnetworkArray.parse(obj['subnetworks'], to_s)] }, 'minPortsPerVm' => ->(obj) { [:min_ports_per_vm, obj['minPortsPerVm']] }, 'udpIdleTimeoutSec' => ->(obj) { [:udp_idle_timeout_sec, obj['udpIdleTimeoutSec']] }, 'icmpIdleTimeoutSec' => ->(obj) { [:icmp_idle_timeout_sec, obj['icmpIdleTimeoutSec']] }, 'tcpEstablishedIdleTimeoutSec' => ->(obj) { [:tcp_established_idle_timeout_sec, obj['tcpEstablishedIdleTimeoutSec']] }, 'tcpTransitoryIdleTimeoutSec' => ->(obj) { [:tcp_transitory_idle_timeout_sec, obj['tcpTransitoryIdleTimeoutSec']] }, 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::RouterNatLogConfig.new(obj['logConfig'], to_s)] }, 'enableEndpointIndependentMapping' => ->(obj) { [:enable_endpoint_independent_mapping, obj['enableEndpointIndependentMapping']] }, 'router' => ->(obj) { [:router, obj['router']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/routers/{{router}}' end end ================================================ FILE: libraries/google_compute_routers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRouters < GcpResourceBase name 'google_compute_routers' desc 'Router plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:networks, field: :network) filter_table_config.add(:bgps, field: :bgp) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'bgp' => ->(obj) { [:bgp, GoogleInSpec::Compute::Property::RouterBgp.new(obj['bgp'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/routers' end end ================================================ FILE: libraries/google_compute_routes.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeRoutes < GcpResourceBase name 'google_compute_routes' desc 'Route plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:dest_ranges, field: :dest_range) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.add(:networks, field: :network) filter_table_config.add(:priorities, field: :priority) filter_table_config.add(:tags, field: :tags) filter_table_config.add(:next_hop_gateways, field: :next_hop_gateway) filter_table_config.add(:next_hop_instances, field: :next_hop_instance) filter_table_config.add(:next_hop_ips, field: :next_hop_ip) filter_table_config.add(:next_hop_vpn_tunnels, field: :next_hop_vpn_tunnel) filter_table_config.add(:next_hop_networks, field: :next_hop_network) filter_table_config.add(:next_hop_ilbs, field: :next_hop_ilb) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'destRange' => ->(obj) { [:dest_range, obj['destRange']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'priority' => ->(obj) { [:priority, obj['priority']] }, 'tags' => ->(obj) { [:tags, obj['tags']] }, 'nextHopGateway' => ->(obj) { [:next_hop_gateway, obj['nextHopGateway']] }, 'nextHopInstance' => ->(obj) { [:next_hop_instance, obj['nextHopInstance']] }, 'nextHopIp' => ->(obj) { [:next_hop_ip, obj['nextHopIp']] }, 'nextHopVpnTunnel' => ->(obj) { [:next_hop_vpn_tunnel, obj['nextHopVpnTunnel']] }, 'nextHopNetwork' => ->(obj) { [:next_hop_network, obj['nextHopNetwork']] }, 'nextHopIlb' => ->(obj) { [:next_hop_ilb, obj['nextHopIlb']] }, } end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/routes' end end ================================================ FILE: libraries/google_compute_security_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeSecurityPolicys < GcpResourceBase name 'google_compute_security_policies' desc 'SecurityPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:ids, field: :id) filter_table_config.add(:rules, field: :rules) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'rules' => ->(obj) { [:rules, GoogleInSpec::Compute::Property::SecurityPolicyRulesArray.parse(obj['rules'], to_s)] }, } end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/securityPolicies' end end ================================================ FILE: libraries/google_compute_security_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/securitypolicy_rules' # A provider to manage Compute Engine resources. class ComputeSecurityPolicy < GcpResourceBase name 'google_compute_security_policy' desc 'SecurityPolicy' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :id attr_reader :rules def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @id = @fetched['id'] @rules = GoogleInSpec::Compute::Property::SecurityPolicyRulesArray.parse(@fetched['rules'], to_s) end def exists? !@fetched.nil? end def to_s "SecurityPolicy #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/securityPolicies/{{name}}' end end ================================================ FILE: libraries/google_compute_service_attachment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/serviceattachment_connected_endpoints' require 'google/compute/property/serviceattachment_consumer_accept_lists' require 'google/compute/property/serviceattachment_psc_service_attachment_id' # A provider to manage Compute Engine resources. class ComputeServiceAttachment < GcpResourceBase name 'google_compute_service_attachment' desc 'ServiceAttachment' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :self_link attr_reader :region attr_reader :producer_forwarding_rule attr_reader :target_service attr_reader :connection_preference attr_reader :connected_endpoints attr_reader :nat_subnets attr_reader :enable_proxy_protocol attr_reader :consumer_reject_lists attr_reader :consumer_accept_lists attr_reader :psc_service_attachment_id attr_reader :fingerprint attr_reader :domain_names attr_reader :reconcile_connections def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @self_link = @fetched['selfLink'] @region = @fetched['region'] @producer_forwarding_rule = @fetched['producerForwardingRule'] @target_service = @fetched['targetService'] @connection_preference = @fetched['connectionPreference'] @connected_endpoints = GoogleInSpec::Compute::Property::ServiceAttachmentConnectedEndpointsArray.parse(@fetched['connectedEndpoints'], to_s) @nat_subnets = @fetched['natSubnets'] @enable_proxy_protocol = @fetched['enableProxyProtocol'] @consumer_reject_lists = @fetched['consumerRejectLists'] @consumer_accept_lists = GoogleInSpec::Compute::Property::ServiceAttachmentConsumerAcceptListsArray.parse(@fetched['consumerAcceptLists'], to_s) @psc_service_attachment_id = GoogleInSpec::Compute::Property::ServiceAttachmentPscServiceAttachmentId.new(@fetched['pscServiceAttachmentId'], to_s) @fingerprint = @fetched['fingerprint'] @domain_names = @fetched['domainNames'] @reconcile_connections = @fetched['reconcileConnections'] end def exists? !@fetched.nil? end def to_s "ServiceAttachment #{@params[:service_attachment]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/serviceAttachments/{{service_attachment}}' end end ================================================ FILE: libraries/google_compute_service_attachments.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeServiceAttachments < GcpResourceBase name 'google_compute_service_attachments' desc 'ServiceAttachment plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:regions, field: :region) filter_table_config.add(:producer_forwarding_rules, field: :producer_forwarding_rule) filter_table_config.add(:target_services, field: :target_service) filter_table_config.add(:connection_preferences, field: :connection_preference) filter_table_config.add(:connected_endpoints, field: :connected_endpoints) filter_table_config.add(:nat_subnets, field: :nat_subnets) filter_table_config.add(:enable_proxy_protocols, field: :enable_proxy_protocol) filter_table_config.add(:consumer_reject_lists, field: :consumer_reject_lists) filter_table_config.add(:consumer_accept_lists, field: :consumer_accept_lists) filter_table_config.add(:psc_service_attachment_ids, field: :psc_service_attachment_id) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:domain_names, field: :domain_names) filter_table_config.add(:reconcile_connections, field: :reconcile_connections) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'producerForwardingRule' => ->(obj) { [:producer_forwarding_rule, obj['producerForwardingRule']] }, 'targetService' => ->(obj) { [:target_service, obj['targetService']] }, 'connectionPreference' => ->(obj) { [:connection_preference, obj['connectionPreference']] }, 'connectedEndpoints' => ->(obj) { [:connected_endpoints, GoogleInSpec::Compute::Property::ServiceAttachmentConnectedEndpointsArray.parse(obj['connectedEndpoints'], to_s)] }, 'natSubnets' => ->(obj) { [:nat_subnets, obj['natSubnets']] }, 'enableProxyProtocol' => ->(obj) { [:enable_proxy_protocol, obj['enableProxyProtocol']] }, 'consumerRejectLists' => ->(obj) { [:consumer_reject_lists, obj['consumerRejectLists']] }, 'consumerAcceptLists' => ->(obj) { [:consumer_accept_lists, GoogleInSpec::Compute::Property::ServiceAttachmentConsumerAcceptListsArray.parse(obj['consumerAcceptLists'], to_s)] }, 'pscServiceAttachmentId' => ->(obj) { [:psc_service_attachment_id, GoogleInSpec::Compute::Property::ServiceAttachmentPscServiceAttachmentId.new(obj['pscServiceAttachmentId'], to_s)] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'domainNames' => ->(obj) { [:domain_names, obj['domainNames']] }, 'reconcileConnections' => ->(obj) { [:reconcile_connections, obj['reconcileConnections']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/serviceAttachments' end end ================================================ FILE: libraries/google_compute_snapshot.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/snapshot_snapshot_encryption_key' require 'google/compute/property/snapshot_source_disk_encryption_key' # A provider to manage Compute Engine resources. class ComputeSnapshot < GcpResourceBase name 'google_compute_snapshot' desc 'Snapshot' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :id attr_reader :disk_size_gb attr_reader :name attr_reader :description attr_reader :storage_bytes attr_reader :storage_locations attr_reader :licenses attr_reader :labels attr_reader :label_fingerprint attr_reader :source_disk attr_reader :zone attr_reader :snapshot_encryption_key attr_reader :source_disk_encryption_key def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @id = @fetched['id'] @disk_size_gb = @fetched['diskSizeGb'] @name = @fetched['name'] @description = @fetched['description'] @storage_bytes = @fetched['storageBytes'] @storage_locations = @fetched['storageLocations'] @licenses = @fetched['licenses'] @labels = @fetched['labels'] @label_fingerprint = @fetched['labelFingerprint'] @source_disk = @fetched['sourceDisk'] @zone = @fetched['zone'] @snapshot_encryption_key = GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(@fetched['snapshotEncryptionKey'], to_s) @source_disk_encryption_key = GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(@fetched['sourceDiskEncryptionKey'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Snapshot #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/snapshots/{{name}}' end end ================================================ FILE: libraries/google_compute_snapshots.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeSnapshots < GcpResourceBase name 'google_compute_snapshots' desc 'Snapshot plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:ids, field: :id) filter_table_config.add(:disk_size_gbs, field: :disk_size_gb) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:storage_bytes, field: :storage_bytes) filter_table_config.add(:storage_locations, field: :storage_locations) filter_table_config.add(:licenses, field: :licenses) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:source_disks, field: :source_disk) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:snapshot_encryption_keys, field: :snapshot_encryption_key) filter_table_config.add(:source_disk_encryption_keys, field: :source_disk_encryption_key) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'id' => ->(obj) { [:id, obj['id']] }, 'diskSizeGb' => ->(obj) { [:disk_size_gb, obj['diskSizeGb']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'storageBytes' => ->(obj) { [:storage_bytes, obj['storageBytes']] }, 'storageLocations' => ->(obj) { [:storage_locations, obj['storageLocations']] }, 'licenses' => ->(obj) { [:licenses, obj['licenses']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'sourceDisk' => ->(obj) { [:source_disk, obj['sourceDisk']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'snapshotEncryptionKey' => ->(obj) { [:snapshot_encryption_key, GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(obj['snapshotEncryptionKey'], to_s)] }, 'sourceDiskEncryptionKey' => ->(obj) { [:source_disk_encryption_key, GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(obj['sourceDiskEncryptionKey'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/snapshots' end end ================================================ FILE: libraries/google_compute_ssl_certificate.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeSslCertificate < GcpResourceBase name 'google_compute_ssl_certificate' desc 'SslCertificate' supports platform: 'gcp' attr_reader :params attr_reader :certificate attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :private_key def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @certificate = @fetched['certificate'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @private_key = @fetched['privateKey'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "SslCertificate #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/sslCertificates/{{name}}' end end ================================================ FILE: libraries/google_compute_ssl_certificates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeSslCertificates < GcpResourceBase name 'google_compute_ssl_certificates' desc 'SslCertificate plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:certificates, field: :certificate) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:private_keys, field: :private_key) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'certificate' => ->(obj) { [:certificate, obj['certificate']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'privateKey' => ->(obj) { [:private_key, obj['privateKey']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/sslCertificates' end end ================================================ FILE: libraries/google_compute_ssl_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeSslPolicys < GcpResourceBase name 'google_compute_ssl_policies' desc 'SslPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:profiles, field: :profile) filter_table_config.add(:min_tls_versions, field: :min_tls_version) filter_table_config.add(:enabled_features, field: :enabled_features) filter_table_config.add(:custom_features, field: :custom_features) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:warnings, field: :warnings) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'profile' => ->(obj) { [:profile, obj['profile']] }, 'minTlsVersion' => ->(obj) { [:min_tls_version, obj['minTlsVersion']] }, 'enabledFeatures' => ->(obj) { [:enabled_features, obj['enabledFeatures']] }, 'customFeatures' => ->(obj) { [:custom_features, obj['customFeatures']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'warnings' => ->(obj) { [:warnings, GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(obj['warnings'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/sslPolicies' end end ================================================ FILE: libraries/google_compute_ssl_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/sslpolicy_warnings' # A provider to manage Compute Engine resources. class ComputeSslPolicy < GcpResourceBase name 'google_compute_ssl_policy' desc 'SslPolicy' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :profile attr_reader :min_tls_version attr_reader :enabled_features attr_reader :custom_features attr_reader :fingerprint attr_reader :warnings def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @profile = @fetched['profile'] @min_tls_version = @fetched['minTlsVersion'] @enabled_features = @fetched['enabledFeatures'] @custom_features = @fetched['customFeatures'] @fingerprint = @fetched['fingerprint'] @warnings = GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(@fetched['warnings'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "SslPolicy #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/sslPolicies/{{name}}' end end ================================================ FILE: libraries/google_compute_subnetwork.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/subnetwork_log_config' require 'google/compute/property/subnetwork_secondary_ip_ranges' # A provider to manage Compute Engine resources. class ComputeSubnetwork < GcpResourceBase name 'google_compute_subnetwork' desc 'Subnetwork' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :gateway_address attr_reader :id attr_reader :ip_cidr_range attr_reader :name attr_reader :network attr_reader :purpose attr_reader :role attr_reader :secondary_ip_ranges attr_reader :private_ip_google_access attr_reader :private_ipv6_google_access attr_reader :region attr_reader :log_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @gateway_address = @fetched['gatewayAddress'] @id = @fetched['id'] @ip_cidr_range = @fetched['ipCidrRange'] @name = @fetched['name'] @network = @fetched['network'] @purpose = @fetched['purpose'] @role = @fetched['role'] @secondary_ip_ranges = GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(@fetched['secondaryIpRanges'], to_s) @private_ip_google_access = @fetched['privateIpGoogleAccess'] @private_ipv6_google_access = @fetched['privateIpv6GoogleAccess'] @region = @fetched['region'] @log_config = GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(@fetched['logConfig'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Subnetwork #{@params[:name]}" end def creation_timestamp_date @creation_timestamp end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/subnetworks/{{name}}' end end ================================================ FILE: libraries/google_compute_subnetwork_iam_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_bindings' # A provider to manage Compute Engine IAM Binding resources. class SubnetworkIamBinding < GcpResourceBase name 'google_compute_subnetwork_iam_binding' desc 'Subnetwork Iam Binding' supports platform: 'gcp' attr_reader :params attr_reader :condition def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] # Control defines a condition, match via this condition condition = params[:condition] if condition[:title] && condition[:title] != binding&.condition&.title next end if condition[:description] && condition[:description] != binding&.condition&.description next end if condition[:expression] && condition[:expression] != binding&.condition&.expression next end else # No condition defined in controls, skip any binding with a condition next unless binding.condition.title.nil? && binding.condition.description.nil? && binding.condition.expression.nil? end @members_list = binding.members @condition = binding.condition @iam_binding_exists = true end end def exists? @iam_binding_exists end def members @members_list end def to_s "Subnetwork IamBinding #{@params[:name]} Role: #{@params[:role]}" end private def product_url 'https://compute.googleapis.com/compute/beta/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/subnetworks/{{name}}/getIamPolicy' end end ================================================ FILE: libraries/google_compute_subnetwork_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Compute Engine IAM Policy resources. class SubnetworkIamPolicy < GcpResourceBase name 'google_compute_subnetwork_iam_policy' desc 'Subnetwork Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Subnetwork IamPolicy #{@params[:name]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://compute.googleapis.com/compute/beta/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/subnetworks/{{name}}/getIamPolicy' end end ================================================ FILE: libraries/google_compute_subnetworks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeSubnetworks < GcpResourceBase name 'google_compute_subnetworks' desc 'Subnetwork plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:gateway_addresses, field: :gateway_address) filter_table_config.add(:subnetwork_ids, field: :subnetwork_id) filter_table_config.add(:ip_cidr_ranges, field: :ip_cidr_range) filter_table_config.add(:subnetwork_names, field: :subnetwork_name) filter_table_config.add(:networks, field: :network) filter_table_config.add(:purposes, field: :purpose) filter_table_config.add(:roles, field: :role) filter_table_config.add(:secondary_ip_ranges, field: :secondary_ip_ranges) filter_table_config.add(:private_ip_google_accesses, field: :private_ip_google_access) filter_table_config.add(:private_ipv6_google_accesses, field: :private_ipv6_google_access) filter_table_config.add(:regions, field: :region) filter_table_config.add(:log_configs, field: :log_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'gatewayAddress' => ->(obj) { [:gateway_address, obj['gatewayAddress']] }, 'id' => ->(obj) { [:subnetwork_id, obj['id']] }, 'ipCidrRange' => ->(obj) { [:ip_cidr_range, obj['ipCidrRange']] }, 'name' => ->(obj) { [:subnetwork_name, obj['name']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'purpose' => ->(obj) { [:purpose, obj['purpose']] }, 'role' => ->(obj) { [:role, obj['role']] }, 'secondaryIpRanges' => ->(obj) { [:secondary_ip_ranges, GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(obj['secondaryIpRanges'], to_s)] }, 'privateIpGoogleAccess' => ->(obj) { [:private_ip_google_access, obj['privateIpGoogleAccess']] }, 'privateIpv6GoogleAccess' => ->(obj) { [:private_ipv6_google_access, obj['privateIpv6GoogleAccess']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(obj['logConfig'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/subnetworks' end end ================================================ FILE: libraries/google_compute_target_grpc_proxies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetGrpcProxys < GcpResourceBase name 'google_compute_target_grpc_proxies' desc 'TargetGrpcProxy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:url_maps, field: :url_map) filter_table_config.add(:validate_for_proxylesses, field: :validate_for_proxyless) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, 'validateForProxyless' => ->(obj) { [:validate_for_proxyless, obj['validateForProxyless']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/targetGrpcProxies' end end ================================================ FILE: libraries/google_compute_target_grpc_proxy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetGrpcProxy < GcpResourceBase name 'google_compute_target_grpc_proxy' desc 'TargetGrpcProxy' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :self_link attr_reader :self_link_with_id attr_reader :url_map attr_reader :validate_for_proxyless attr_reader :fingerprint def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @url_map = @fetched['urlMap'] @validate_for_proxyless = @fetched['validateForProxyless'] @fingerprint = @fetched['fingerprint'] end def exists? !@fetched.nil? end def to_s "TargetGrpcProxy #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/targetGrpcProxies/{{name}}' end end ================================================ FILE: libraries/google_compute_target_http_proxies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetHttpProxys < GcpResourceBase name 'google_compute_target_http_proxies' desc 'TargetHttpProxy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:url_maps, field: :url_map) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/targetHttpProxies' end end ================================================ FILE: libraries/google_compute_target_http_proxy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetHttpProxy < GcpResourceBase name 'google_compute_target_http_proxy' desc 'TargetHttpProxy' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :url_map def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @url_map = @fetched['urlMap'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "TargetHttpProxy #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/targetHttpProxies/{{name}}' end end ================================================ FILE: libraries/google_compute_target_https_proxies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetHttpsProxys < GcpResourceBase name 'google_compute_target_https_proxies' desc 'TargetHttpsProxy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:quic_overrides, field: :quic_override) filter_table_config.add(:ssl_certificates, field: :ssl_certificates) filter_table_config.add(:ssl_policies, field: :ssl_policy) filter_table_config.add(:url_maps, field: :url_map) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'quicOverride' => ->(obj) { [:quic_override, obj['quicOverride']] }, 'sslCertificates' => ->(obj) { [:ssl_certificates, obj['sslCertificates']] }, 'sslPolicy' => ->(obj) { [:ssl_policy, obj['sslPolicy']] }, 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/targetHttpsProxies' end end ================================================ FILE: libraries/google_compute_target_https_proxy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetHttpsProxy < GcpResourceBase name 'google_compute_target_https_proxy' desc 'TargetHttpsProxy' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :quic_override attr_reader :ssl_certificates attr_reader :ssl_policy attr_reader :url_map def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @quic_override = @fetched['quicOverride'] @ssl_certificates = @fetched['sslCertificates'] @ssl_policy = @fetched['sslPolicy'] @url_map = @fetched['urlMap'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "TargetHttpsProxy #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/targetHttpsProxies/{{name}}' end end ================================================ FILE: libraries/google_compute_target_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetInstance < GcpResourceBase name 'google_compute_target_instance' desc 'TargetInstance' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :zone attr_reader :nat_policy attr_reader :instance attr_reader :self_link attr_reader :self_link_with_id attr_reader :network attr_reader :security_policy def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @zone = @fetched['zone'] @nat_policy = @fetched['natPolicy'] @instance = @fetched['instance'] @self_link = @fetched['selfLink'] @self_link_with_id = @fetched['selfLinkWithId'] @network = @fetched['network'] @security_policy = @fetched['securityPolicy'] end def exists? !@fetched.nil? end def to_s "TargetInstance #{@params[:targetInstance]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/targetInstances/{{name}}' end end ================================================ FILE: libraries/google_compute_target_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetInstances < GcpResourceBase name 'google_compute_target_instances' desc 'TargetInstance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:nat_policies, field: :nat_policy) filter_table_config.add(:instances, field: :instance) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:self_link_with_ids, field: :self_link_with_id) filter_table_config.add(:networks, field: :network) filter_table_config.add(:security_policies, field: :security_policy) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'natPolicy' => ->(obj) { [:nat_policy, obj['natPolicy']] }, 'instance' => ->(obj) { [:instance, obj['instance']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'selfLinkWithId' => ->(obj) { [:self_link_with_id, obj['selfLinkWithId']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'securityPolicy' => ->(obj) { [:security_policy, obj['securityPolicy']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/targetInstances' end end ================================================ FILE: libraries/google_compute_target_pool.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetPool < GcpResourceBase name 'google_compute_target_pool' desc 'TargetPool' supports platform: 'gcp' attr_reader :params attr_reader :backup_pool attr_reader :creation_timestamp attr_reader :description attr_reader :failover_ratio attr_reader :health_check attr_reader :id attr_reader :instances attr_reader :name attr_reader :session_affinity attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @backup_pool = @fetched['backupPool'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @failover_ratio = @fetched['failoverRatio'] @health_check = @fetched['healthCheck'] @id = @fetched['id'] @instances = @fetched['instances'] @name = @fetched['name'] @session_affinity = @fetched['sessionAffinity'] @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "TargetPool #{@params[:name]}" end RSpec::Matchers.alias_matcher :has_target_instance, :be_has_target_instance def has_target_instance?(name, zone) instances.any? { |instance_self_link| instance_self_link.end_with?("zones/#{zone}/instances/#{name}") } end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/targetPools/{{name}}' end end ================================================ FILE: libraries/google_compute_target_pools.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetPools < GcpResourceBase name 'google_compute_target_pools' desc 'TargetPool plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:backup_pools, field: :backup_pool) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:failover_ratios, field: :failover_ratio) filter_table_config.add(:health_checks, field: :health_check) filter_table_config.add(:ids, field: :id) filter_table_config.add(:instances, field: :instances) filter_table_config.add(:names, field: :name) filter_table_config.add(:session_affinities, field: :session_affinity) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'backupPool' => ->(obj) { [:backup_pool, obj['backupPool']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'failoverRatio' => ->(obj) { [:failover_ratio, obj['failoverRatio']] }, 'healthCheck' => ->(obj) { [:health_check, obj['healthCheck']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'instances' => ->(obj) { [:instances, obj['instances']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/targetPools' end end ================================================ FILE: libraries/google_compute_target_ssl_proxies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetSslProxys < GcpResourceBase name 'google_compute_target_ssl_proxies' desc 'TargetSslProxy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:services, field: :service) filter_table_config.add(:ssl_certificates, field: :ssl_certificates) filter_table_config.add(:certificate_maps, field: :certificate_map) filter_table_config.add(:proxy_headers, field: :proxy_header) filter_table_config.add(:ssl_policies, field: :ssl_policy) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'service' => ->(obj) { [:service, obj['service']] }, 'sslCertificates' => ->(obj) { [:ssl_certificates, obj['sslCertificates']] }, 'certificateMap' => ->(obj) { [:certificate_map, obj['certificateMap']] }, 'proxyHeader' => ->(obj) { [:proxy_header, obj['proxyHeader']] }, 'sslPolicy' => ->(obj) { [:ssl_policy, obj['sslPolicy']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/targetSslProxies' end end ================================================ FILE: libraries/google_compute_target_ssl_proxy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetSslProxy < GcpResourceBase name 'google_compute_target_ssl_proxy' desc 'TargetSslProxy' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :self_link attr_reader :service attr_reader :ssl_certificates attr_reader :certificate_map attr_reader :proxy_header attr_reader :ssl_policy def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @self_link = @fetched['selfLink'] @service = @fetched['service'] @ssl_certificates = @fetched['sslCertificates'] @certificate_map = @fetched['certificateMap'] @proxy_header = @fetched['proxyHeader'] @ssl_policy = @fetched['sslPolicy'] end def exists? !@fetched.nil? end def to_s "TargetSslProxy #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/global/targetSslProxies/{{name}}' end end ================================================ FILE: libraries/google_compute_target_tcp_proxies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetTcpProxys < GcpResourceBase name 'google_compute_target_tcp_proxies' desc 'TargetTcpProxy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:proxy_headers, field: :proxy_header) filter_table_config.add(:services, field: :service) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'proxyHeader' => ->(obj) { [:proxy_header, obj['proxyHeader']] }, 'service' => ->(obj) { [:service, obj['service']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/targetTcpProxies' end end ================================================ FILE: libraries/google_compute_target_tcp_proxy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeTargetTcpProxy < GcpResourceBase name 'google_compute_target_tcp_proxy' desc 'TargetTcpProxy' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :proxy_header attr_reader :service def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @proxy_header = @fetched['proxyHeader'] @service = @fetched['service'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "TargetTcpProxy #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/targetTcpProxies/{{name}}' end end ================================================ FILE: libraries/google_compute_target_vpn_gateway.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/targetvpngateway_labels' # A provider to manage Compute Engine resources. class ComputeTargetVpnGateway < GcpResourceBase name 'google_compute_target_vpn_gateway' desc 'TargetVpnGateway' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :region attr_reader :network attr_reader :tunnels attr_reader :status attr_reader :self_link attr_reader :forwarding_rules attr_reader :labels attr_reader :label_fingerprint def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @region = @fetched['region'] @network = @fetched['network'] @tunnels = @fetched['tunnels'] @status = @fetched['status'] @self_link = @fetched['selfLink'] @forwarding_rules = @fetched['forwardingRules'] @labels = GoogleInSpec::Compute::Property::TargetVpnGatewayLabels.new(@fetched['labels'], to_s) @label_fingerprint = @fetched['labelFingerprint'] end def exists? !@fetched.nil? end def to_s "TargetVpnGateway #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/targetVpnGateways/{{name}}' end end ================================================ FILE: libraries/google_compute_target_vpn_gateways.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeTargetVpnGateways < GcpResourceBase name 'google_compute_target_vpn_gateways' desc 'TargetVpnGateway plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:regions, field: :region) filter_table_config.add(:networks, field: :network) filter_table_config.add(:tunnels, field: :tunnels) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:forwarding_rules, field: :forwarding_rules) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'tunnels' => ->(obj) { [:tunnels, obj['tunnels']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'forwardingRules' => ->(obj) { [:forwarding_rules, obj['forwardingRules']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Compute::Property::TargetVpnGatewayLabels.new(obj['labels'], to_s)] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/targetVpnGateways' end end ================================================ FILE: libraries/google_compute_url_map.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/urlmap_default_route_action' require 'google/compute/property/urlmap_default_route_action_cors_policy' require 'google/compute/property/urlmap_default_route_action_fault_injection_policy' require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_abort' require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay' require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay' require 'google/compute/property/urlmap_default_route_action_request_mirror_policy' require 'google/compute/property/urlmap_default_route_action_retry_policy' require 'google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout' require 'google/compute/property/urlmap_default_route_action_timeout' require 'google/compute/property/urlmap_default_route_action_url_rewrite' require 'google/compute/property/urlmap_default_route_action_weighted_backend_services' require 'google/compute/property/urlmap_default_url_redirect' require 'google/compute/property/urlmap_header_action' require 'google/compute/property/urlmap_header_action_request_headers_to_add' require 'google/compute/property/urlmap_header_action_response_headers_to_add' require 'google/compute/property/urlmap_host_rules' require 'google/compute/property/urlmap_path_matchers' require 'google/compute/property/urlmap_tests' # A provider to manage Compute Engine resources. class ComputeUrlMap < GcpResourceBase name 'google_compute_url_map' desc 'UrlMap' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :default_service attr_reader :description attr_reader :id attr_reader :fingerprint attr_reader :header_action attr_reader :host_rules attr_reader :name attr_reader :path_matchers attr_reader :tests attr_reader :default_url_redirect attr_reader :default_route_action def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @default_service = @fetched['defaultService'] @description = @fetched['description'] @id = @fetched['id'] @fingerprint = @fetched['fingerprint'] @header_action = GoogleInSpec::Compute::Property::UrlMapHeaderAction.new(@fetched['headerAction'], to_s) @host_rules = GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(@fetched['hostRules'], to_s) @name = @fetched['name'] @path_matchers = GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(@fetched['pathMatchers'], to_s) @tests = GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(@fetched['tests'], to_s) @default_url_redirect = GoogleInSpec::Compute::Property::UrlMapDefaultUrlRedirect.new(@fetched['defaultUrlRedirect'], to_s) @default_route_action = GoogleInSpec::Compute::Property::UrlMapDefaultRouteAction.new(@fetched['defaultRouteAction'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "UrlMap #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/urlMaps/{{name}}' end end ================================================ FILE: libraries/google_compute_url_maps.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeUrlMaps < GcpResourceBase name 'google_compute_url_maps' desc 'UrlMap plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:default_services, field: :default_service) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:fingerprints, field: :fingerprint) filter_table_config.add(:header_actions, field: :header_action) filter_table_config.add(:host_rules, field: :host_rules) filter_table_config.add(:names, field: :name) filter_table_config.add(:path_matchers, field: :path_matchers) filter_table_config.add(:tests, field: :tests) filter_table_config.add(:default_url_redirects, field: :default_url_redirect) filter_table_config.add(:default_route_actions, field: :default_route_action) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'defaultService' => ->(obj) { [:default_service, obj['defaultService']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, 'headerAction' => ->(obj) { [:header_action, GoogleInSpec::Compute::Property::UrlMapHeaderAction.new(obj['headerAction'], to_s)] }, 'hostRules' => ->(obj) { [:host_rules, GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(obj['hostRules'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'pathMatchers' => ->(obj) { [:path_matchers, GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(obj['pathMatchers'], to_s)] }, 'tests' => ->(obj) { [:tests, GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(obj['tests'], to_s)] }, 'defaultUrlRedirect' => ->(obj) { [:default_url_redirect, GoogleInSpec::Compute::Property::UrlMapDefaultUrlRedirect.new(obj['defaultUrlRedirect'], to_s)] }, 'defaultRouteAction' => ->(obj) { [:default_route_action, GoogleInSpec::Compute::Property::UrlMapDefaultRouteAction.new(obj['defaultRouteAction'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/global/urlMaps' end end ================================================ FILE: libraries/google_compute_vpn_gateway.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/vpngateway_labels' require 'google/compute/property/vpngateway_vpn_interfaces' # A provider to manage Compute Engine resources. class ComputeVpnGateway < GcpResourceBase name 'google_compute_vpn_gateway' desc 'VpnGateway' supports platform: 'gcp' attr_reader :params attr_reader :kind attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :region attr_reader :network attr_reader :self_link attr_reader :labels attr_reader :label_fingerprint attr_reader :vpn_interfaces attr_reader :stack_type def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @kind = @fetched['kind'] @id = @fetched['id'] @creation_timestamp = @fetched['creationTimestamp'] @name = @fetched['name'] @description = @fetched['description'] @region = @fetched['region'] @network = @fetched['network'] @self_link = @fetched['selfLink'] @labels = GoogleInSpec::Compute::Property::VpnGatewayLabels.new(@fetched['labels'], to_s) @label_fingerprint = @fetched['labelFingerprint'] @vpn_interfaces = GoogleInSpec::Compute::Property::VpnGatewayVpnInterfacesArray.parse(@fetched['vpnInterfaces'], to_s) @stack_type = @fetched['stackType'] end def exists? !@fetched.nil? end def to_s "VpnGateway #{@params[:vpnGateway]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/vpnGateways/{{vpn_gateway}}' end end ================================================ FILE: libraries/google_compute_vpn_gateways.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeVpnGateways < GcpResourceBase name 'google_compute_vpn_gateways' desc 'VpnGateway plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:regions, field: :region) filter_table_config.add(:networks, field: :network) filter_table_config.add(:self_links, field: :self_link) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:vpn_interfaces, field: :vpn_interfaces) filter_table_config.add(:stack_types, field: :stack_type) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'kind' => ->(obj) { [:kind, obj['kind']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Compute::Property::VpnGatewayLabels.new(obj['labels'], to_s)] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'vpnInterfaces' => ->(obj) { [:vpn_interfaces, GoogleInSpec::Compute::Property::VpnGatewayVpnInterfacesArray.parse(obj['vpnInterfaces'], to_s)] }, 'stackType' => ->(obj) { [:stack_type, obj['stackType']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/regions/{{region}}/vpnGateways' end end ================================================ FILE: libraries/google_compute_vpn_tunnel.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeVpnTunnel < GcpResourceBase name 'google_compute_vpn_tunnel' desc 'VpnTunnel' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :creation_timestamp attr_reader :name attr_reader :description attr_reader :target_vpn_gateway attr_reader :vpn_gateway attr_reader :vpn_gateway_interface attr_reader :peer_external_gateway attr_reader :peer_external_gateway_interface attr_reader :peer_gcp_gateway attr_reader :router attr_reader :peer_ip attr_reader :shared_secret attr_reader :shared_secret_hash attr_reader :ike_version attr_reader :local_traffic_selector attr_reader :remote_traffic_selector attr_reader :labels attr_reader :label_fingerprint attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @id = @fetched['id'] @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @name = @fetched['name'] @description = @fetched['description'] @target_vpn_gateway = @fetched['targetVpnGateway'] @vpn_gateway = @fetched['vpnGateway'] @vpn_gateway_interface = @fetched['vpnGatewayInterface'] @peer_external_gateway = @fetched['peerExternalGateway'] @peer_external_gateway_interface = @fetched['peerExternalGatewayInterface'] @peer_gcp_gateway = @fetched['peerGcpGateway'] @router = @fetched['router'] @peer_ip = @fetched['peerIp'] @shared_secret = @fetched['sharedSecret'] @shared_secret_hash = @fetched['sharedSecretHash'] @ike_version = @fetched['ikeVersion'] @local_traffic_selector = @fetched['localTrafficSelector'] @remote_traffic_selector = @fetched['remoteTrafficSelector'] @labels = @fetched['labels'] @label_fingerprint = @fetched['labelFingerprint'] @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "VpnTunnel #{@params[:name]}" end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/vpnTunnels/{{name}}' end end ================================================ FILE: libraries/google_compute_vpn_tunnels.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeVpnTunnels < GcpResourceBase name 'google_compute_vpn_tunnels' desc 'VpnTunnel plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:vpn_tunnel_names, field: :vpn_tunnel_name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:target_vpn_gateways, field: :target_vpn_gateway) filter_table_config.add(:vpn_gateways, field: :vpn_gateway) filter_table_config.add(:vpn_gateway_interfaces, field: :vpn_gateway_interface) filter_table_config.add(:peer_external_gateways, field: :peer_external_gateway) filter_table_config.add(:peer_external_gateway_interfaces, field: :peer_external_gateway_interface) filter_table_config.add(:peer_gcp_gateways, field: :peer_gcp_gateway) filter_table_config.add(:routers, field: :router) filter_table_config.add(:peer_ips, field: :peer_ip) filter_table_config.add(:shared_secrets, field: :shared_secret) filter_table_config.add(:shared_secret_hashes, field: :shared_secret_hash) filter_table_config.add(:ike_versions, field: :ike_version) filter_table_config.add(:local_traffic_selectors, field: :local_traffic_selector) filter_table_config.add(:remote_traffic_selectors, field: :remote_traffic_selector) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'name' => ->(obj) { [:vpn_tunnel_name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'targetVpnGateway' => ->(obj) { [:target_vpn_gateway, obj['targetVpnGateway']] }, 'vpnGateway' => ->(obj) { [:vpn_gateway, obj['vpnGateway']] }, 'vpnGatewayInterface' => ->(obj) { [:vpn_gateway_interface, obj['vpnGatewayInterface']] }, 'peerExternalGateway' => ->(obj) { [:peer_external_gateway, obj['peerExternalGateway']] }, 'peerExternalGatewayInterface' => ->(obj) { [:peer_external_gateway_interface, obj['peerExternalGatewayInterface']] }, 'peerGcpGateway' => ->(obj) { [:peer_gcp_gateway, obj['peerGcpGateway']] }, 'router' => ->(obj) { [:router, obj['router']] }, 'peerIp' => ->(obj) { [:peer_ip, obj['peerIp']] }, 'sharedSecret' => ->(obj) { [:shared_secret, obj['sharedSecret']] }, 'sharedSecretHash' => ->(obj) { [:shared_secret_hash, obj['sharedSecretHash']] }, 'ikeVersion' => ->(obj) { [:ike_version, obj['ikeVersion']] }, 'localTrafficSelector' => ->(obj) { [:local_traffic_selector, obj['localTrafficSelector']] }, 'remoteTrafficSelector' => ->(obj) { [:remote_traffic_selector, obj['remoteTrafficSelector']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/vpnTunnels' end end ================================================ FILE: libraries/google_compute_xpn_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeProjectXpnResources < GcpResourceBase name 'google_compute_xpn_resources' desc 'Project plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:types, field: :type) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('resources') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'type' => ->(obj) { [:type, obj['type']] }, } end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/getXpnResources' end end ================================================ FILE: libraries/google_compute_zone.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/compute/property/zone_deprecated' # A provider to manage Compute Engine resources. class ComputeZone < GcpResourceBase name 'google_compute_zone' desc 'Zone' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :deprecated attr_reader :description attr_reader :id attr_reader :name attr_reader :region attr_reader :status attr_reader :available_cpu_platforms def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @deprecated = GoogleInSpec::Compute::Property::ZoneDeprecated.new(@fetched['deprecated'], to_s) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @region = @fetched['region'] @status = @fetched['status'] @available_cpu_platforms = @fetched['availableCpuPlatforms'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Zone #{@params[:name]}" end # helper method for retrieving a region name def region_name @region&.split('/')&.last end def up? @status == 'UP' end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones/{{name}}' end end ================================================ FILE: libraries/google_compute_zone_operation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Compute Engine resources. class ComputeZoneOperation < GcpResourceBase name 'google_compute_zone_operation' desc 'ZoneOperation' supports platform: 'gcp' attr_reader :params attr_reader :creation_timestamp attr_reader :description attr_reader :id attr_reader :name attr_reader :status_message attr_reader :target_id attr_reader :status attr_reader :user attr_reader :insert_time attr_reader :start_time attr_reader :end_time attr_reader :progress attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @description = @fetched['description'] @id = @fetched['id'] @name = @fetched['name'] @status_message = @fetched['statusMessage'] @target_id = @fetched['targetId'] @status = @fetched['status'] @user = @fetched['user'] @insert_time = @fetched['insertTime'] @start_time = @fetched['startTime'] @end_time = @fetched['endTime'] @progress = @fetched['progress'] @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "ZoneOperation #{@params[:name]}" end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/operations/{{name}}' end end ================================================ FILE: libraries/google_compute_zone_operations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeZoneOperations < GcpResourceBase name 'google_compute_zone_operations' desc 'ZoneOperation plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:status_messages, field: :status_message) filter_table_config.add(:target_ids, field: :target_id) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:users, field: :user) filter_table_config.add(:insert_times, field: :insert_time) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:progresses, field: :progress) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, 'targetId' => ->(obj) { [:target_id, obj['targetId']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'user' => ->(obj) { [:user, obj['user']] }, 'insertTime' => ->(obj) { [:insert_time, obj['insertTime']] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'progress' => ->(obj) { [:progress, obj['progress']] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://compute.googleapis.com/compute/v1/' end def resource_base_url 'projects/{{project}}/zones/{{zone}}/operations' end end ================================================ FILE: libraries/google_compute_zones.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ComputeZones < GcpResourceBase name 'google_compute_zones' desc 'Zone plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:deprecateds, field: :deprecated) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:zone_ids, field: :zone_id) filter_table_config.add(:zone_names, field: :zone_name) filter_table_config.add(:regions, field: :region) filter_table_config.add(:zone_statuses, field: :zone_status) filter_table_config.add(:available_cpu_platforms, field: :available_cpu_platforms) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::ZoneDeprecated.new(obj['deprecated'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'id' => ->(obj) { [:zone_id, obj['id']] }, 'name' => ->(obj) { [:zone_name, obj['name']] }, 'region' => ->(obj) { [:region, obj['region']] }, 'status' => ->(obj) { [:zone_status, obj['status']] }, 'availableCpuPlatforms' => ->(obj) { [:available_cpu_platforms, obj['availableCpuPlatforms']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://compute.googleapis.com/compute/beta/' else 'https://compute.googleapis.com/compute/v1/' end end def resource_base_url 'projects/{{project}}/zones' end end ================================================ FILE: libraries/google_container_cluster.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/container/property/cluster_addons_config' require 'google/container/property/cluster_fleet' require 'google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config' require 'google/container/property/cluster_addons_config_horizontal_pod_autoscaling' require 'google/container/property/cluster_addons_config_http_load_balancing' require 'google/container/property/cluster_addons_config_kubernetes_dashboard' require 'google/container/property/cluster_addons_config_network_policy_config' require 'google/container/property/cluster_binary_authorization' require 'google/container/property/cluster_conditions' require 'google/container/property/cluster_database_encryption' require 'google/container/property/cluster_default_max_pods_constraint' require 'google/container/property/cluster_ip_allocation_policy' require 'google/container/property/cluster_legacy_abac' require 'google/container/property/cluster_master_auth' require 'google/container/property/cluster_master_auth_client_certificate_config' require 'google/container/property/cluster_master_authorized_networks_config' require 'google/container/property/cluster_master_authorized_networks_config_cidr_blocks' require 'google/container/property/cluster_network_config' require 'google/container/property/cluster_network_policy' require 'google/container/property/cluster_node_config' require 'google/container/property/cluster_node_config_accelerators' require 'google/container/property/cluster_node_config_shielded_instance_config' require 'google/container/property/cluster_node_config_taints' require 'google/container/property/cluster_node_pools' require 'google/container/property/cluster_private_cluster_config' require 'google/container/property/cluster_release_channel' require 'google/container/property/cluster_shielded_nodes' # A provider to manage Google Kubernetes Engine resources. class ContainerCluster < GcpResourceBase name 'google_container_cluster' desc 'Cluster' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :initial_node_count attr_reader :node_config attr_reader :master_auth attr_reader :logging_service attr_reader :monitoring_service attr_reader :network attr_reader :database_encryption attr_reader :private_cluster_config attr_reader :cluster_ipv4_cidr attr_reader :enable_tpu attr_reader :tpu_ipv4_cidr_block attr_reader :addons_config attr_reader :subnetwork attr_reader :locations attr_reader :resource_labels attr_reader :label_fingerprint attr_reader :legacy_abac attr_reader :network_policy attr_reader :default_max_pods_constraint attr_reader :ip_allocation_policy attr_reader :endpoint attr_reader :initial_cluster_version attr_reader :current_master_version attr_reader :current_node_version attr_reader :create_time attr_reader :status attr_reader :status_message attr_reader :node_ipv4_cidr_size attr_reader :services_ipv4_cidr attr_reader :current_node_count attr_reader :expire_time attr_reader :conditions attr_reader :master_authorized_networks_config attr_reader :node_pools attr_reader :binary_authorization attr_reader :release_channel attr_reader :shielded_nodes attr_reader :network_config attr_reader :enable_kubernetes_alpha attr_reader :location attr_reader :fleet def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @initial_node_count = @fetched['initialNodeCount'] @node_config = GoogleInSpec::Container::Property::ClusterNodeConfig.new(@fetched['nodeConfig'], to_s) @master_auth = GoogleInSpec::Container::Property::ClusterMasterAuth.new(@fetched['masterAuth'], to_s) @logging_service = @fetched['loggingService'] @monitoring_service = @fetched['monitoringService'] @network = @fetched['network'] @database_encryption = GoogleInSpec::Container::Property::ClusterDatabaseEncryption.new(@fetched['databaseEncryption'], to_s) @private_cluster_config = GoogleInSpec::Container::Property::ClusterPrivateClusterConfig.new(@fetched['privateClusterConfig'], to_s) @cluster_ipv4_cidr = @fetched['clusterIpv4Cidr'] @enable_tpu = @fetched['enableTpu'] @tpu_ipv4_cidr_block = @fetched['tpuIpv4CidrBlock'] @addons_config = GoogleInSpec::Container::Property::ClusterAddonsConfig.new(@fetched['addonsConfig'], to_s) @subnetwork = @fetched['subnetwork'] @locations = @fetched['locations'] @resource_labels = @fetched['resourceLabels'] @label_fingerprint = @fetched['labelFingerprint'] @legacy_abac = GoogleInSpec::Container::Property::ClusterLegacyAbac.new(@fetched['legacyAbac'], to_s) @network_policy = GoogleInSpec::Container::Property::ClusterNetworkPolicy.new(@fetched['networkPolicy'], to_s) @default_max_pods_constraint = GoogleInSpec::Container::Property::ClusterDefaultMaxPodsConstraint.new(@fetched['defaultMaxPodsConstraint'], to_s) @ip_allocation_policy = GoogleInSpec::Container::Property::ClusterIpAllocationPolicy.new(@fetched['ipAllocationPolicy'], to_s) @endpoint = @fetched['endpoint'] @initial_cluster_version = @fetched['initialClusterVersion'] @current_master_version = @fetched['currentMasterVersion'] @current_node_version = @fetched['currentNodeVersion'] @create_time = parse_time_string(@fetched['createTime']) @status = @fetched['status'] @status_message = @fetched['statusMessage'] @node_ipv4_cidr_size = @fetched['nodeIpv4CidrSize'] @services_ipv4_cidr = @fetched['servicesIpv4Cidr'] @current_node_count = @fetched['currentNodeCount'] @expire_time = parse_time_string(@fetched['expireTime']) @conditions = GoogleInSpec::Container::Property::ClusterConditionsArray.parse(@fetched['conditions'], to_s) @master_authorized_networks_config = GoogleInSpec::Container::Property::ClusterMasterAuthorizedNetworksConfig.new(@fetched['masterAuthorizedNetworksConfig'], to_s) @node_pools = GoogleInSpec::Container::Property::ClusterNodePoolsArray.parse(@fetched['nodePools'], to_s) @binary_authorization = GoogleInSpec::Container::Property::ClusterBinaryAuthorization.new(@fetched['binaryAuthorization'], to_s) @release_channel = GoogleInSpec::Container::Property::ClusterReleaseChannel.new(@fetched['releaseChannel'], to_s) @shielded_nodes = GoogleInSpec::Container::Property::ClusterShieldedNodes.new(@fetched['shieldedNodes'], to_s) @network_config = GoogleInSpec::Container::Property::ClusterNetworkConfig.new(@fetched['networkConfig'], to_s) @fleet = GoogleInSpec::Container::Property::ClusterFleet.new(@fetched['clusterFleet'], to_s) @enable_kubernetes_alpha = @fetched['enableKubernetesAlpha'] @location = @fetched['location'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Cluster #{@params[:name]}" end def has_logging_enabled? return false if !defined?(@logging_service) return false if @logging_service.nil? return true if /logging\.googleapis\.com/ =~ @logging_service false end def has_monitoring_enabled? return false if !defined?(@monitoring_service) return false if @monitoring_service.nil? return true if /monitoring\.googleapis\.com/ =~ @monitoring_service false end def has_legacy_abac_disabled? return nil if !defined?(@legacy_abac) return true if @legacy_abac.to_h.empty? false end def has_master_authorized_networks_enabled? return false if !defined?(@master_authorized_networks_config) return false if @master_authorized_networks_config.to_h.empty? return false if !defined?(@master_authorized_networks_config.enabled) return true if @master_authorized_networks_config.enabled == true false end def has_resource_labels? return false if !defined?(@resource_labels) return false if @resource_labels.to_h.empty? true end def has_basic_authorization? return false if @master_auth.username.nil? and @master_auth.password.nil? true end def has_network_policy_enabled? return false if !defined?(@network_policy.enabled) return true if @network_policy.enabled==true false end def has_master_auth_client_key? return false if !defined?(@master_auth.client_key) return false if @master_auth.client_key.nil? return false if @master_auth.client_key=='' true end def has_ip_alias_enabled? return false if !defined?(@ip_allocation_policy.use_ip_aliases) return true if @ip_allocation_policy.use_ip_aliases==true false end def has_pod_security_policy_config? return false if !defined?(@pod_security_policy_config.enabled) return true if @pod_security_policy_config.enabled==true false end def private_cluster? return false if !defined?(@private_cluster) return true if @private_cluster==true false end private def product_url(_ = nil) 'https://container.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/clusters/{{name}}' end end ================================================ FILE: libraries/google_container_clusters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ContainerClusters < GcpResourceBase name 'google_container_clusters' desc 'Cluster plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:cluster_names, field: :cluster_name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:initial_node_counts, field: :initial_node_count) filter_table_config.add(:node_configs, field: :node_config) filter_table_config.add(:master_auths, field: :master_auth) filter_table_config.add(:logging_services, field: :logging_service) filter_table_config.add(:monitoring_services, field: :monitoring_service) filter_table_config.add(:cluster_networks, field: :cluster_network) filter_table_config.add(:database_encryptions, field: :database_encryption) filter_table_config.add(:private_cluster_configs, field: :private_cluster_config) filter_table_config.add(:cluster_ipv4_cidrs, field: :cluster_ipv4_cidr) filter_table_config.add(:enable_tpus, field: :enable_tpu) filter_table_config.add(:tpu_ipv4_cidr_blocks, field: :tpu_ipv4_cidr_block) filter_table_config.add(:addons_configs, field: :addons_config) filter_table_config.add(:subnetworks, field: :subnetwork) filter_table_config.add(:locations, field: :locations) filter_table_config.add(:resource_labels, field: :resource_labels) filter_table_config.add(:label_fingerprints, field: :label_fingerprint) filter_table_config.add(:legacy_abacs, field: :legacy_abac) filter_table_config.add(:network_policies, field: :network_policy) filter_table_config.add(:default_max_pods_constraints, field: :default_max_pods_constraint) filter_table_config.add(:ip_allocation_policies, field: :ip_allocation_policy) filter_table_config.add(:endpoints, field: :endpoint) filter_table_config.add(:initial_cluster_versions, field: :initial_cluster_version) filter_table_config.add(:current_master_versions, field: :current_master_version) filter_table_config.add(:current_node_versions, field: :current_node_version) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:cluster_statuses, field: :cluster_status) filter_table_config.add(:status_messages, field: :status_message) filter_table_config.add(:node_ipv4_cidr_sizes, field: :node_ipv4_cidr_size) filter_table_config.add(:services_ipv4_cidrs, field: :services_ipv4_cidr) filter_table_config.add(:current_node_counts, field: :current_node_count) filter_table_config.add(:expire_times, field: :expire_time) filter_table_config.add(:conditions, field: :conditions) filter_table_config.add(:master_authorized_networks_configs, field: :master_authorized_networks_config) filter_table_config.add(:node_pools, field: :node_pools) filter_table_config.add(:binary_authorizations, field: :binary_authorization) filter_table_config.add(:release_channels, field: :release_channel) filter_table_config.add(:shielded_nodes, field: :shielded_nodes) filter_table_config.add(:network_configs, field: :network_config) filter_table_config.add(:enable_kubernetes_alphas, field: :enable_kubernetes_alpha) filter_table_config.add(:locations, field: :location) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('clusters') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:cluster_name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'initialNodeCount' => ->(obj) { [:initial_node_count, obj['initialNodeCount']] }, 'nodeConfig' => ->(obj) { [:node_config, GoogleInSpec::Container::Property::ClusterNodeConfig.new(obj['nodeConfig'], to_s)] }, 'masterAuth' => ->(obj) { [:master_auth, GoogleInSpec::Container::Property::ClusterMasterAuth.new(obj['masterAuth'], to_s)] }, 'loggingService' => ->(obj) { [:logging_service, obj['loggingService']] }, 'monitoringService' => ->(obj) { [:monitoring_service, obj['monitoringService']] }, 'network' => ->(obj) { [:cluster_network, obj['network']] }, 'databaseEncryption' => ->(obj) { [:database_encryption, GoogleInSpec::Container::Property::ClusterDatabaseEncryption.new(obj['databaseEncryption'], to_s)] }, 'privateClusterConfig' => ->(obj) { [:private_cluster_config, GoogleInSpec::Container::Property::ClusterPrivateClusterConfig.new(obj['privateClusterConfig'], to_s)] }, 'clusterIpv4Cidr' => ->(obj) { [:cluster_ipv4_cidr, obj['clusterIpv4Cidr']] }, 'enableTpu' => ->(obj) { [:enable_tpu, obj['enableTpu']] }, 'tpuIpv4CidrBlock' => ->(obj) { [:tpu_ipv4_cidr_block, obj['tpuIpv4CidrBlock']] }, 'addonsConfig' => ->(obj) { [:addons_config, GoogleInSpec::Container::Property::ClusterAddonsConfig.new(obj['addonsConfig'], to_s)] }, 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, 'locations' => ->(obj) { [:locations, obj['locations']] }, 'resourceLabels' => ->(obj) { [:resource_labels, obj['resourceLabels']] }, 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, 'legacyAbac' => ->(obj) { [:legacy_abac, GoogleInSpec::Container::Property::ClusterLegacyAbac.new(obj['legacyAbac'], to_s)] }, 'networkPolicy' => ->(obj) { [:network_policy, GoogleInSpec::Container::Property::ClusterNetworkPolicy.new(obj['networkPolicy'], to_s)] }, 'defaultMaxPodsConstraint' => ->(obj) { [:default_max_pods_constraint, GoogleInSpec::Container::Property::ClusterDefaultMaxPodsConstraint.new(obj['defaultMaxPodsConstraint'], to_s)] }, 'ipAllocationPolicy' => ->(obj) { [:ip_allocation_policy, GoogleInSpec::Container::Property::ClusterIpAllocationPolicy.new(obj['ipAllocationPolicy'], to_s)] }, 'endpoint' => ->(obj) { [:endpoint, obj['endpoint']] }, 'initialClusterVersion' => ->(obj) { [:initial_cluster_version, obj['initialClusterVersion']] }, 'currentMasterVersion' => ->(obj) { [:current_master_version, obj['currentMasterVersion']] }, 'currentNodeVersion' => ->(obj) { [:current_node_version, obj['currentNodeVersion']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'status' => ->(obj) { [:cluster_status, obj['status']] }, 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, 'nodeIpv4CidrSize' => ->(obj) { [:node_ipv4_cidr_size, obj['nodeIpv4CidrSize']] }, 'servicesIpv4Cidr' => ->(obj) { [:services_ipv4_cidr, obj['servicesIpv4Cidr']] }, 'currentNodeCount' => ->(obj) { [:current_node_count, obj['currentNodeCount']] }, 'expireTime' => ->(obj) { [:expire_time, parse_time_string(obj['expireTime'])] }, 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Container::Property::ClusterConditionsArray.parse(obj['conditions'], to_s)] }, 'masterAuthorizedNetworksConfig' => ->(obj) { [:master_authorized_networks_config, GoogleInSpec::Container::Property::ClusterMasterAuthorizedNetworksConfig.new(obj['masterAuthorizedNetworksConfig'], to_s)] }, 'nodePools' => ->(obj) { [:node_pools, GoogleInSpec::Container::Property::ClusterNodePoolsArray.parse(obj['nodePools'], to_s)] }, 'binaryAuthorization' => ->(obj) { [:binary_authorization, GoogleInSpec::Container::Property::ClusterBinaryAuthorization.new(obj['binaryAuthorization'], to_s)] }, 'releaseChannel' => ->(obj) { [:release_channel, GoogleInSpec::Container::Property::ClusterReleaseChannel.new(obj['releaseChannel'], to_s)] }, 'shieldedNodes' => ->(obj) { [:shielded_nodes, GoogleInSpec::Container::Property::ClusterShieldedNodes.new(obj['shieldedNodes'], to_s)] }, 'networkConfig' => ->(obj) { [:network_config, GoogleInSpec::Container::Property::ClusterNetworkConfig.new(obj['networkConfig'], to_s)] }, 'enableKubernetesAlpha' => ->(obj) { [:enable_kubernetes_alpha, obj['enableKubernetesAlpha']] }, 'location' => ->(obj) { [:location, obj['location']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://container.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/clusters' end end ================================================ FILE: libraries/google_container_node_pool.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/container/property/nodepool_autoscaling' require 'google/container/property/nodepool_conditions' require 'google/container/property/nodepool_config' require 'google/container/property/nodepool_config_accelerators' require 'google/container/property/nodepool_config_shielded_instance_config' require 'google/container/property/nodepool_config_taints' require 'google/container/property/nodepool_config_workload_meta_config' require 'google/container/property/nodepool_management' require 'google/container/property/nodepool_management_upgrade_options' require 'google/container/property/nodepool_max_pods_constraint' # A provider to manage Google Kubernetes Engine resources. class ContainerNodePool < GcpResourceBase name 'google_container_node_pool' desc 'NodePool' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :config attr_reader :initial_node_count attr_reader :status attr_reader :status_message attr_reader :version attr_reader :autoscaling attr_reader :management attr_reader :max_pods_constraint attr_reader :conditions attr_reader :pod_ipv4_cidr_size attr_reader :cluster attr_reader :location def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @config = GoogleInSpec::Container::Property::NodePoolConfig.new(@fetched['config'], to_s) @initial_node_count = @fetched['initialNodeCount'] @status = @fetched['status'] @status_message = @fetched['statusMessage'] @version = @fetched['version'] @autoscaling = GoogleInSpec::Container::Property::NodePoolAutoscaling.new(@fetched['autoscaling'], to_s) @management = GoogleInSpec::Container::Property::NodePoolManagement.new(@fetched['management'], to_s) @max_pods_constraint = GoogleInSpec::Container::Property::NodePoolMaxPodsConstraint.new(@fetched['maxPodsConstraint'], to_s) @conditions = GoogleInSpec::Container::Property::NodePoolConditionsArray.parse(@fetched['conditions'], to_s) @pod_ipv4_cidr_size = @fetched['podIpv4CidrSize'] @cluster = @fetched['cluster'] @location = @fetched['location'] end def exists? !@fetched.nil? end def to_s "NodePool #{@params[:nodepool_name]}" end private def product_url(beta = false) if beta 'https://container.googleapis.com/v1beta1/' else 'https://container.googleapis.com/v1/' end end def resource_base_url 'projects/{{project}}/locations/{{location}}/clusters/{{cluster_name}}/nodePools/{{nodepool_name}}' end end ================================================ FILE: libraries/google_container_node_pools.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ContainerNodePools < GcpResourceBase name 'google_container_node_pools' desc 'NodePool plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:node_pool_names, field: :node_pool_name) filter_table_config.add(:configs, field: :config) filter_table_config.add(:initial_node_counts, field: :initial_node_count) filter_table_config.add(:node_pool_statuses, field: :node_pool_status) filter_table_config.add(:status_messages, field: :status_message) filter_table_config.add(:versions, field: :version) filter_table_config.add(:autoscalings, field: :autoscaling) filter_table_config.add(:managements, field: :management) filter_table_config.add(:max_pods_constraints, field: :max_pods_constraint) filter_table_config.add(:conditions, field: :conditions) filter_table_config.add(:pod_ipv4_cidr_sizes, field: :pod_ipv4_cidr_size) filter_table_config.add(:clusters, field: :cluster) filter_table_config.add(:locations, field: :location) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('nodePools') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:node_pool_name, obj['name']] }, 'config' => ->(obj) { [:config, GoogleInSpec::Container::Property::NodePoolConfig.new(obj['config'], to_s)] }, 'initialNodeCount' => ->(obj) { [:initial_node_count, obj['initialNodeCount']] }, 'status' => ->(obj) { [:node_pool_status, obj['status']] }, 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, 'version' => ->(obj) { [:version, obj['version']] }, 'autoscaling' => ->(obj) { [:autoscaling, GoogleInSpec::Container::Property::NodePoolAutoscaling.new(obj['autoscaling'], to_s)] }, 'management' => ->(obj) { [:management, GoogleInSpec::Container::Property::NodePoolManagement.new(obj['management'], to_s)] }, 'maxPodsConstraint' => ->(obj) { [:max_pods_constraint, GoogleInSpec::Container::Property::NodePoolMaxPodsConstraint.new(obj['maxPodsConstraint'], to_s)] }, 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Container::Property::NodePoolConditionsArray.parse(obj['conditions'], to_s)] }, 'podIpv4CidrSize' => ->(obj) { [:pod_ipv4_cidr_size, obj['podIpv4CidrSize']] }, 'cluster' => ->(obj) { [:cluster, obj['cluster']] }, 'location' => ->(obj) { [:location, obj['location']] }, } end private def product_url(beta = false) if beta 'https://container.googleapis.com/v1beta1/' else 'https://container.googleapis.com/v1/' end end def resource_base_url 'projects/{{project}}/locations/{{location}}/clusters/{{cluster_name}}/nodePools' end end ================================================ FILE: libraries/google_container_server_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/container/property/serverconfig_channels' # A provider to manage Google Kubernetes Engine resources. class ContainerServerConfig < GcpResourceBase name 'google_container_server_config' desc 'ServerConfig' supports platform: 'gcp' attr_reader :params attr_reader :default_cluster_version attr_reader :default_image_type attr_reader :valid_image_types attr_reader :valid_node_versions attr_reader :valid_master_versions attr_reader :channels attr_reader :location def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @default_cluster_version = @fetched['defaultClusterVersion'] @default_image_type = @fetched['defaultImageType'] @valid_image_types = @fetched['validImageTypes'] @valid_node_versions = @fetched['validNodeVersions'] @valid_master_versions = @fetched['validMasterVersions'] @channels = GoogleInSpec::Container::Property::ServerConfigChannelsArray.parse(@fetched['channels'], to_s) @location = @fetched['location'] end def exists? !@fetched.nil? end def to_s "ServerConfig #{@params[:name]}" end private def product_url(_ = nil) 'https://container.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/serverConfig/' end end ================================================ FILE: libraries/google_data_fusion_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/datafusion/property/instance_accelerators' require 'google/datafusion/property/instance_available_version' require 'google/datafusion/property/instance_crypto_key_config' require 'google/datafusion/property/instance_event_publish_config' require 'google/datafusion/property/instance_labels' require 'google/datafusion/property/instance_maintenance_policy' require 'google/datafusion/property/instance_maintenance_policy_maintenance_exclusion_window' require 'google/datafusion/property/instance_maintenance_policy_maintenance_window' require 'google/datafusion/property/instance_maintenance_policy_maintenance_window_recurring_time_window' require 'google/datafusion/property/instance_maintenance_policy_maintenance_window_recurring_time_window_window' require 'google/datafusion/property/instance_network_config' require 'google/datafusion/property/instance_network_config_private_service_connect_config' require 'google/datafusion/property/instance_options' # A provider to manage Cloud Data Fusion resources. class DataFusionInstance < GcpResourceBase name 'google_data_fusion_instance' desc 'Instance' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :type attr_reader :enable_stackdriver_logging attr_reader :enable_stackdriver_monitoring attr_reader :private_instance attr_reader :network_config attr_reader :labels attr_reader :options attr_reader :create_time attr_reader :update_time attr_reader :state attr_reader :state_message attr_reader :service_endpoint attr_reader :zone attr_reader :version attr_reader :service_account attr_reader :display_name attr_reader :available_version attr_reader :api_endpoint attr_reader :gcs_bucket attr_reader :accelerators attr_reader :p4_service_account attr_reader :tenant_project_id attr_reader :dataproc_service_account attr_reader :enable_rbac attr_reader :crypto_key_config attr_reader :disabled_reason attr_reader :event_publish_config attr_reader :enable_zone_separation attr_reader :satisfies_pzs attr_reader :workforce_identity_service_endpoint attr_reader :patch_revision attr_reader :dataplex_data_lineage_integration_enabled attr_reader :maintenance_policy def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @type = @fetched['type'] @enable_stackdriver_logging = @fetched['enableStackdriverLogging'] @enable_stackdriver_monitoring = @fetched['enableStackdriverMonitoring'] @private_instance = @fetched['privateInstance'] @network_config = GoogleInSpec::DataFusion::Property::InstanceNetworkConfig.new(@fetched['networkConfig'], to_s) @labels = GoogleInSpec::DataFusion::Property::InstanceLabels.new(@fetched['labels'], to_s) @options = GoogleInSpec::DataFusion::Property::InstanceOptions.new(@fetched['options'], to_s) @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @state = @fetched['state'] @state_message = @fetched['stateMessage'] @service_endpoint = @fetched['serviceEndpoint'] @zone = @fetched['zone'] @version = @fetched['version'] @service_account = @fetched['serviceAccount'] @display_name = @fetched['displayName'] @available_version = GoogleInSpec::DataFusion::Property::InstanceAvailableVersionArray.parse(@fetched['availableVersion'], to_s) @api_endpoint = @fetched['apiEndpoint'] @gcs_bucket = @fetched['gcsBucket'] @accelerators = GoogleInSpec::DataFusion::Property::InstanceAcceleratorsArray.parse(@fetched['accelerators'], to_s) @p4_service_account = @fetched['p4ServiceAccount'] @tenant_project_id = @fetched['tenantProjectId'] @dataproc_service_account = @fetched['dataprocServiceAccount'] @enable_rbac = @fetched['enableRbac'] @crypto_key_config = GoogleInSpec::DataFusion::Property::InstanceCryptoKeyConfig.new(@fetched['cryptoKeyConfig'], to_s) @disabled_reason = @fetched['disabledReason'] @event_publish_config = GoogleInSpec::DataFusion::Property::InstanceEventPublishConfig.new(@fetched['eventPublishConfig'], to_s) @enable_zone_separation = @fetched['enableZoneSeparation'] @satisfies_pzs = @fetched['satisfiesPzs'] @workforce_identity_service_endpoint = @fetched['workforceIdentityServiceEndpoint'] @patch_revision = @fetched['patchRevision'] @dataplex_data_lineage_integration_enabled = @fetched['dataplexDataLineageIntegrationEnabled'] @maintenance_policy = GoogleInSpec::DataFusion::Property::InstanceMaintenancePolicy.new(@fetched['maintenancePolicy'], to_s) end def exists? !@fetched.nil? end def to_s "Instance #{@params[:name]}" end private def product_url(_ = nil) 'https://datafusion.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_data_fusion_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataFusionInstances < GcpResourceBase name 'google_data_fusion_instances' desc 'Instance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:types, field: :type) filter_table_config.add(:enable_stackdriver_loggings, field: :enable_stackdriver_logging) filter_table_config.add(:enable_stackdriver_monitorings, field: :enable_stackdriver_monitoring) filter_table_config.add(:private_instances, field: :private_instance) filter_table_config.add(:network_configs, field: :network_config) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:options, field: :options) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:states, field: :state) filter_table_config.add(:state_messages, field: :state_message) filter_table_config.add(:service_endpoints, field: :service_endpoint) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:versions, field: :version) filter_table_config.add(:service_accounts, field: :service_account) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:available_versions, field: :available_version) filter_table_config.add(:api_endpoints, field: :api_endpoint) filter_table_config.add(:gcs_buckets, field: :gcs_bucket) filter_table_config.add(:accelerators, field: :accelerators) filter_table_config.add(:p4_service_accounts, field: :p4_service_account) filter_table_config.add(:tenant_project_ids, field: :tenant_project_id) filter_table_config.add(:dataproc_service_accounts, field: :dataproc_service_account) filter_table_config.add(:enable_rbacs, field: :enable_rbac) filter_table_config.add(:crypto_key_configs, field: :crypto_key_config) filter_table_config.add(:disabled_reasons, field: :disabled_reason) filter_table_config.add(:event_publish_configs, field: :event_publish_config) filter_table_config.add(:enable_zone_separations, field: :enable_zone_separation) filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) filter_table_config.add(:workforce_identity_service_endpoints, field: :workforce_identity_service_endpoint) filter_table_config.add(:patch_revisions, field: :patch_revision) filter_table_config.add(:dataplex_data_lineage_integration_enableds, field: :dataplex_data_lineage_integration_enabled) filter_table_config.add(:maintenance_policies, field: :maintenance_policy) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('instances') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'enableStackdriverLogging' => ->(obj) { [:enable_stackdriver_logging, obj['enableStackdriverLogging']] }, 'enableStackdriverMonitoring' => ->(obj) { [:enable_stackdriver_monitoring, obj['enableStackdriverMonitoring']] }, 'privateInstance' => ->(obj) { [:private_instance, obj['privateInstance']] }, 'networkConfig' => ->(obj) { [:network_config, GoogleInSpec::DataFusion::Property::InstanceNetworkConfig.new(obj['networkConfig'], to_s)] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::DataFusion::Property::InstanceLabels.new(obj['labels'], to_s)] }, 'options' => ->(obj) { [:options, GoogleInSpec::DataFusion::Property::InstanceOptions.new(obj['options'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'stateMessage' => ->(obj) { [:state_message, obj['stateMessage']] }, 'serviceEndpoint' => ->(obj) { [:service_endpoint, obj['serviceEndpoint']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, 'version' => ->(obj) { [:version, obj['version']] }, 'serviceAccount' => ->(obj) { [:service_account, obj['serviceAccount']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'availableVersion' => ->(obj) { [:available_version, GoogleInSpec::DataFusion::Property::InstanceAvailableVersionArray.parse(obj['availableVersion'], to_s)] }, 'apiEndpoint' => ->(obj) { [:api_endpoint, obj['apiEndpoint']] }, 'gcsBucket' => ->(obj) { [:gcs_bucket, obj['gcsBucket']] }, 'accelerators' => ->(obj) { [:accelerators, GoogleInSpec::DataFusion::Property::InstanceAcceleratorsArray.parse(obj['accelerators'], to_s)] }, 'p4ServiceAccount' => ->(obj) { [:p4_service_account, obj['p4ServiceAccount']] }, 'tenantProjectId' => ->(obj) { [:tenant_project_id, obj['tenantProjectId']] }, 'dataprocServiceAccount' => ->(obj) { [:dataproc_service_account, obj['dataprocServiceAccount']] }, 'enableRbac' => ->(obj) { [:enable_rbac, obj['enableRbac']] }, 'cryptoKeyConfig' => ->(obj) { [:crypto_key_config, GoogleInSpec::DataFusion::Property::InstanceCryptoKeyConfig.new(obj['cryptoKeyConfig'], to_s)] }, 'disabledReason' => ->(obj) { [:disabled_reason, obj['disabledReason']] }, 'eventPublishConfig' => ->(obj) { [:event_publish_config, GoogleInSpec::DataFusion::Property::InstanceEventPublishConfig.new(obj['eventPublishConfig'], to_s)] }, 'enableZoneSeparation' => ->(obj) { [:enable_zone_separation, obj['enableZoneSeparation']] }, 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, 'workforceIdentityServiceEndpoint' => ->(obj) { [:workforce_identity_service_endpoint, obj['workforceIdentityServiceEndpoint']] }, 'patchRevision' => ->(obj) { [:patch_revision, obj['patchRevision']] }, 'dataplexDataLineageIntegrationEnabled' => ->(obj) { [:dataplex_data_lineage_integration_enabled, obj['dataplexDataLineageIntegrationEnabled']] }, 'maintenancePolicy' => ->(obj) { [:maintenance_policy, GoogleInSpec::DataFusion::Property::InstanceMaintenancePolicy.new(obj['maintenancePolicy'], to_s)] }, } end private def product_url(_ = nil) 'https://datafusion.googleapis.com/v1/' end def resource_base_url '{{parent}}/instances' end end ================================================ FILE: libraries/google_dataflow_project_location_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataflow/property/projectlocationjob_environment' require 'google/dataflow/property/projectlocationjob_environment_debug_options' require 'google/dataflow/property/projectlocationjob_environment_debug_options_data_sampling' require 'google/dataflow/property/projectlocationjob_environment_internal_experiments' require 'google/dataflow/property/projectlocationjob_environment_sdk_pipeline_options' require 'google/dataflow/property/projectlocationjob_environment_user_agent' require 'google/dataflow/property/projectlocationjob_environment_version' require 'google/dataflow/property/projectlocationjob_environment_worker_pools' require 'google/dataflow/property/projectlocationjob_execution_info' require 'google/dataflow/property/projectlocationjob_execution_info_stages' require 'google/dataflow/property/projectlocationjob_job_metadata' require 'google/dataflow/property/projectlocationjob_job_metadata_big_table_details' require 'google/dataflow/property/projectlocationjob_job_metadata_bigquery_details' require 'google/dataflow/property/projectlocationjob_job_metadata_datastore_details' require 'google/dataflow/property/projectlocationjob_job_metadata_file_details' require 'google/dataflow/property/projectlocationjob_job_metadata_pubsub_details' require 'google/dataflow/property/projectlocationjob_job_metadata_sdk_version' require 'google/dataflow/property/projectlocationjob_job_metadata_sdk_version_bugs' require 'google/dataflow/property/projectlocationjob_job_metadata_spanner_details' require 'google/dataflow/property/projectlocationjob_job_metadata_user_display_properties' require 'google/dataflow/property/projectlocationjob_labels' require 'google/dataflow/property/projectlocationjob_pipeline_description' require 'google/dataflow/property/projectlocationjob_pipeline_description_display_data' require 'google/dataflow/property/projectlocationjob_pipeline_description_execution_pipeline_stage' require 'google/dataflow/property/projectlocationjob_pipeline_description_original_pipeline_transform' require 'google/dataflow/property/projectlocationjob_runtime_updatable_params' require 'google/dataflow/property/projectlocationjob_stage_states' require 'google/dataflow/property/projectlocationjob_steps' require 'google/dataflow/property/projectlocationjob_transform_name_mapping' # A provider to manage dataflow resources. class DataflowProjectLocationJob < GcpResourceBase name 'google_dataflow_project_location_job' desc 'ProjectLocationJob' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :project_id attr_reader :name attr_reader :type attr_reader :environment attr_reader :steps attr_reader :steps_location attr_reader :current_state attr_reader :current_state_time attr_reader :requested_state attr_reader :execution_info attr_reader :create_time attr_reader :replace_job_id attr_reader :transform_name_mapping attr_reader :client_request_id attr_reader :replaced_by_job_id attr_reader :temp_files attr_reader :labels attr_reader :location attr_reader :pipeline_description attr_reader :stage_states attr_reader :job_metadata attr_reader :start_time attr_reader :created_from_snapshot_id attr_reader :satisfies_pzs attr_reader :runtime_updatable_params attr_reader :satisfies_pzi def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @id = @fetched['id'] @project_id = @fetched['projectId'] @name = @fetched['name'] @type = @fetched['type'] @environment = GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironment.new(@fetched['environment'], to_s) @steps = GoogleInSpec::Dataflow::Property::ProjectLocationJobStepsArray.parse(@fetched['steps'], to_s) @steps_location = @fetched['stepsLocation'] @current_state = @fetched['currentState'] @current_state_time = @fetched['currentStateTime'] @requested_state = @fetched['requestedState'] @execution_info = GoogleInSpec::Dataflow::Property::ProjectLocationJobExecutionInfo.new(@fetched['executionInfo'], to_s) @create_time = @fetched['createTime'] @replace_job_id = @fetched['replaceJobId'] @transform_name_mapping = GoogleInSpec::Dataflow::Property::ProjectLocationJobTransformNameMapping.new(@fetched['transformNameMapping'], to_s) @client_request_id = @fetched['clientRequestId'] @replaced_by_job_id = @fetched['replacedByJobId'] @temp_files = @fetched['tempFiles'] @labels = GoogleInSpec::Dataflow::Property::ProjectLocationJobLabels.new(@fetched['labels'], to_s) @location = @fetched['location'] @pipeline_description = GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescription.new(@fetched['pipelineDescription'], to_s) @stage_states = GoogleInSpec::Dataflow::Property::ProjectLocationJobStageStatesArray.parse(@fetched['stageStates'], to_s) @job_metadata = GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadata.new(@fetched['jobMetadata'], to_s) @start_time = @fetched['startTime'] @created_from_snapshot_id = @fetched['createdFromSnapshotId'] @satisfies_pzs = @fetched['satisfiesPzs'] @runtime_updatable_params = GoogleInSpec::Dataflow::Property::ProjectLocationJobRuntimeUpdatableParams.new(@fetched['runtimeUpdatableParams'], to_s) @satisfies_pzi = @fetched['satisfiesPzi'] end def exists? !@fetched.nil? end def to_s "ProjectLocationJob #{@params[:jobId]}" end private def product_url(_ = nil) 'https://dataflow.googleapis.com/v1b3/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/jobs/{{job}}' end end ================================================ FILE: libraries/google_dataflow_project_location_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataflowProjectLocationJobs < GcpResourceBase name 'google_dataflow_project_location_jobs' desc 'ProjectLocationJob plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:project_ids, field: :project_id) filter_table_config.add(:names, field: :name) filter_table_config.add(:types, field: :type) filter_table_config.add(:environments, field: :environment) filter_table_config.add(:steps, field: :steps) filter_table_config.add(:steps_locations, field: :steps_location) filter_table_config.add(:current_states, field: :current_state) filter_table_config.add(:current_state_times, field: :current_state_time) filter_table_config.add(:requested_states, field: :requested_state) filter_table_config.add(:execution_infos, field: :execution_info) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:replace_job_ids, field: :replace_job_id) filter_table_config.add(:transform_name_mappings, field: :transform_name_mapping) filter_table_config.add(:client_request_ids, field: :client_request_id) filter_table_config.add(:replaced_by_job_ids, field: :replaced_by_job_id) filter_table_config.add(:temp_files, field: :temp_files) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:locations, field: :location) filter_table_config.add(:pipeline_descriptions, field: :pipeline_description) filter_table_config.add(:stage_states, field: :stage_states) filter_table_config.add(:job_metadata, field: :job_metadata) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:created_from_snapshot_ids, field: :created_from_snapshot_id) filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) filter_table_config.add(:runtime_updatable_params, field: :runtime_updatable_params) filter_table_config.add(:satisfies_pzis, field: :satisfies_pzi) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('jobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'projectId' => ->(obj) { [:project_id, obj['projectId']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'environment' => ->(obj) { [:environment, GoogleInSpec::Dataflow::Property::ProjectLocationJobEnvironment.new(obj['environment'], to_s)] }, 'steps' => ->(obj) { [:steps, GoogleInSpec::Dataflow::Property::ProjectLocationJobStepsArray.parse(obj['steps'], to_s)] }, 'stepsLocation' => ->(obj) { [:steps_location, obj['stepsLocation']] }, 'currentState' => ->(obj) { [:current_state, obj['currentState']] }, 'currentStateTime' => ->(obj) { [:current_state_time, obj['currentStateTime']] }, 'requestedState' => ->(obj) { [:requested_state, obj['requestedState']] }, 'executionInfo' => ->(obj) { [:execution_info, GoogleInSpec::Dataflow::Property::ProjectLocationJobExecutionInfo.new(obj['executionInfo'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'replaceJobId' => ->(obj) { [:replace_job_id, obj['replaceJobId']] }, 'transformNameMapping' => ->(obj) { [:transform_name_mapping, GoogleInSpec::Dataflow::Property::ProjectLocationJobTransformNameMapping.new(obj['transformNameMapping'], to_s)] }, 'clientRequestId' => ->(obj) { [:client_request_id, obj['clientRequestId']] }, 'replacedByJobId' => ->(obj) { [:replaced_by_job_id, obj['replacedByJobId']] }, 'tempFiles' => ->(obj) { [:temp_files, obj['tempFiles']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Dataflow::Property::ProjectLocationJobLabels.new(obj['labels'], to_s)] }, 'location' => ->(obj) { [:location, obj['location']] }, 'pipelineDescription' => ->(obj) { [:pipeline_description, GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescription.new(obj['pipelineDescription'], to_s)] }, 'stageStates' => ->(obj) { [:stage_states, GoogleInSpec::Dataflow::Property::ProjectLocationJobStageStatesArray.parse(obj['stageStates'], to_s)] }, 'jobMetadata' => ->(obj) { [:job_metadata, GoogleInSpec::Dataflow::Property::ProjectLocationJobJobMetadata.new(obj['jobMetadata'], to_s)] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'createdFromSnapshotId' => ->(obj) { [:created_from_snapshot_id, obj['createdFromSnapshotId']] }, 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, 'runtimeUpdatableParams' => ->(obj) { [:runtime_updatable_params, GoogleInSpec::Dataflow::Property::ProjectLocationJobRuntimeUpdatableParams.new(obj['runtimeUpdatableParams'], to_s)] }, 'satisfiesPzi' => ->(obj) { [:satisfies_pzi, obj['satisfiesPzi']] }, } end private def product_url(_ = nil) 'https://dataflow.googleapis.com/v1b3/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/jobs' end end ================================================ FILE: libraries/google_dataproc_autoscaling_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataprocAutoscalingPolicys < GcpResourceBase name 'google_dataproc_autoscaling_policies' desc 'AutoscalingPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:basic_algorithms, field: :basic_algorithm) filter_table_config.add(:worker_configs, field: :worker_config) filter_table_config.add(:secondary_worker_configs, field: :secondary_worker_config) filter_table_config.add(:labels, field: :labels) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('policies') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'basicAlgorithm' => ->(obj) { [:basic_algorithm, GoogleInSpec::Dataproc::Property::AutoscalingPolicyBasicAlgorithm.new(obj['basicAlgorithm'], to_s)] }, 'workerConfig' => ->(obj) { [:worker_config, GoogleInSpec::Dataproc::Property::AutoscalingPolicyWorkerConfig.new(obj['workerConfig'], to_s)] }, 'secondaryWorkerConfig' => ->(obj) { [:secondary_worker_config, GoogleInSpec::Dataproc::Property::AutoscalingPolicySecondaryWorkerConfig.new(obj['secondaryWorkerConfig'], to_s)] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Dataproc::Property::AutoscalingPolicyLabels.new(obj['labels'], to_s)] }, } end private def product_url(_ = nil) 'https://dataproc.googleapis.com/v1/' end def resource_base_url '{{parent}}/autoscalingPolicies' end end ================================================ FILE: libraries/google_dataproc_autoscaling_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataproc/property/autoscalingpolicy_basic_algorithm' require 'google/dataproc/property/autoscalingpolicy_basic_algorithm_spark_standalone_config' require 'google/dataproc/property/autoscalingpolicy_basic_algorithm_yarn_config' require 'google/dataproc/property/autoscalingpolicy_labels' require 'google/dataproc/property/autoscalingpolicy_secondary_worker_config' require 'google/dataproc/property/autoscalingpolicy_worker_config' # A provider to manage Dataproc resources. class DataprocAutoscalingPolicy < GcpResourceBase name 'google_dataproc_autoscaling_policy' desc 'AutoscalingPolicy' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :name attr_reader :basic_algorithm attr_reader :worker_config attr_reader :secondary_worker_config attr_reader :labels def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @id = @fetched['id'] @name = @fetched['name'] @basic_algorithm = GoogleInSpec::Dataproc::Property::AutoscalingPolicyBasicAlgorithm.new(@fetched['basicAlgorithm'], to_s) @worker_config = GoogleInSpec::Dataproc::Property::AutoscalingPolicyWorkerConfig.new(@fetched['workerConfig'], to_s) @secondary_worker_config = GoogleInSpec::Dataproc::Property::AutoscalingPolicySecondaryWorkerConfig.new(@fetched['secondaryWorkerConfig'], to_s) @labels = GoogleInSpec::Dataproc::Property::AutoscalingPolicyLabels.new(@fetched['labels'], to_s) end def exists? !@fetched.nil? end def to_s "AutoscalingPolicy #{@params[:name]}" end private def product_url(_ = nil) 'https://dataproc.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_dataproc_batch.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataproc/property/batch_environment_config' require 'google/dataproc/property/batch_environment_config_execution_config' require 'google/dataproc/property/batch_environment_config_peripherals_config' require 'google/dataproc/property/batch_environment_config_peripherals_config_spark_history_server_config' require 'google/dataproc/property/batch_labels' require 'google/dataproc/property/batch_pyspark_batch' require 'google/dataproc/property/batch_runtime_config' require 'google/dataproc/property/batch_runtime_config_properties' require 'google/dataproc/property/batch_runtime_config_repository_config' require 'google/dataproc/property/batch_runtime_config_repository_config_pypi_repository_config' require 'google/dataproc/property/batch_runtime_info' require 'google/dataproc/property/batch_runtime_info_approximate_usage' require 'google/dataproc/property/batch_runtime_info_current_usage' require 'google/dataproc/property/batch_runtime_info_endpoints' require 'google/dataproc/property/batch_spark_batch' require 'google/dataproc/property/batch_spark_r_batch' require 'google/dataproc/property/batch_spark_sql_batch' require 'google/dataproc/property/batch_spark_sql_batch_query_variables' require 'google/dataproc/property/batch_state_history' # A provider to manage Dataproc resources. class DataprocBatch < GcpResourceBase name 'google_dataproc_batch' desc 'Batch' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :uuid attr_reader :create_time attr_reader :pyspark_batch attr_reader :spark_batch attr_reader :spark_r_batch attr_reader :spark_sql_batch attr_reader :runtime_info attr_reader :state attr_reader :state_message attr_reader :state_time attr_reader :creator attr_reader :labels attr_reader :runtime_config attr_reader :environment_config attr_reader :operation attr_reader :state_history def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @uuid = @fetched['uuid'] @create_time = @fetched['createTime'] @pyspark_batch = GoogleInSpec::Dataproc::Property::BatchPysparkBatch.new(@fetched['pysparkBatch'], to_s) @spark_batch = GoogleInSpec::Dataproc::Property::BatchSparkBatch.new(@fetched['sparkBatch'], to_s) @spark_r_batch = GoogleInSpec::Dataproc::Property::BatchSparkRBatch.new(@fetched['sparkRBatch'], to_s) @spark_sql_batch = GoogleInSpec::Dataproc::Property::BatchSparkSqlBatch.new(@fetched['sparkSqlBatch'], to_s) @runtime_info = GoogleInSpec::Dataproc::Property::BatchRuntimeInfo.new(@fetched['runtimeInfo'], to_s) @state = @fetched['state'] @state_message = @fetched['stateMessage'] @state_time = @fetched['stateTime'] @creator = @fetched['creator'] @labels = GoogleInSpec::Dataproc::Property::BatchLabels.new(@fetched['labels'], to_s) @runtime_config = GoogleInSpec::Dataproc::Property::BatchRuntimeConfig.new(@fetched['runtimeConfig'], to_s) @environment_config = GoogleInSpec::Dataproc::Property::BatchEnvironmentConfig.new(@fetched['environmentConfig'], to_s) @operation = @fetched['operation'] @state_history = GoogleInSpec::Dataproc::Property::BatchStateHistoryArray.parse(@fetched['stateHistory'], to_s) end def exists? !@fetched.nil? end def to_s "Batch #{@params[:name]}" end private def product_url(_ = nil) 'https://dataproc.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_dataproc_batches.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataprocBatchs < GcpResourceBase name 'google_dataproc_batches' desc 'Batch plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:uuids, field: :uuid) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:pyspark_batches, field: :pyspark_batch) filter_table_config.add(:spark_batches, field: :spark_batch) filter_table_config.add(:spark_r_batches, field: :spark_r_batch) filter_table_config.add(:spark_sql_batches, field: :spark_sql_batch) filter_table_config.add(:runtime_infos, field: :runtime_info) filter_table_config.add(:states, field: :state) filter_table_config.add(:state_messages, field: :state_message) filter_table_config.add(:state_times, field: :state_time) filter_table_config.add(:creators, field: :creator) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:runtime_configs, field: :runtime_config) filter_table_config.add(:environment_configs, field: :environment_config) filter_table_config.add(:operations, field: :operation) filter_table_config.add(:state_histories, field: :state_history) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('batches') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'uuid' => ->(obj) { [:uuid, obj['uuid']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'pysparkBatch' => ->(obj) { [:pyspark_batch, GoogleInSpec::Dataproc::Property::BatchPysparkBatch.new(obj['pysparkBatch'], to_s)] }, 'sparkBatch' => ->(obj) { [:spark_batch, GoogleInSpec::Dataproc::Property::BatchSparkBatch.new(obj['sparkBatch'], to_s)] }, 'sparkRBatch' => ->(obj) { [:spark_r_batch, GoogleInSpec::Dataproc::Property::BatchSparkRBatch.new(obj['sparkRBatch'], to_s)] }, 'sparkSqlBatch' => ->(obj) { [:spark_sql_batch, GoogleInSpec::Dataproc::Property::BatchSparkSqlBatch.new(obj['sparkSqlBatch'], to_s)] }, 'runtimeInfo' => ->(obj) { [:runtime_info, GoogleInSpec::Dataproc::Property::BatchRuntimeInfo.new(obj['runtimeInfo'], to_s)] }, 'state' => ->(obj) { [:state, obj['state']] }, 'stateMessage' => ->(obj) { [:state_message, obj['stateMessage']] }, 'stateTime' => ->(obj) { [:state_time, obj['stateTime']] }, 'creator' => ->(obj) { [:creator, obj['creator']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Dataproc::Property::BatchLabels.new(obj['labels'], to_s)] }, 'runtimeConfig' => ->(obj) { [:runtime_config, GoogleInSpec::Dataproc::Property::BatchRuntimeConfig.new(obj['runtimeConfig'], to_s)] }, 'environmentConfig' => ->(obj) { [:environment_config, GoogleInSpec::Dataproc::Property::BatchEnvironmentConfig.new(obj['environmentConfig'], to_s)] }, 'operation' => ->(obj) { [:operation, obj['operation']] }, 'stateHistory' => ->(obj) { [:state_history, GoogleInSpec::Dataproc::Property::BatchStateHistoryArray.parse(obj['stateHistory'], to_s)] }, } end private def product_url(_ = nil) 'https://dataproc.googleapis.com/v1/' end def resource_base_url '{{parent}}/batches' end end ================================================ FILE: libraries/google_dataproc_cluster.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataproc/property/cluster_config' require 'google/dataproc/property/cluster_config_encryption_config' require 'google/dataproc/property/cluster_config_gce_cluster_config' require 'google/dataproc/property/cluster_config_initialization_actions' require 'google/dataproc/property/cluster_config_master_config' require 'google/dataproc/property/cluster_config_master_config_disk_config' require 'google/dataproc/property/cluster_config_master_config_managed_group_config' require 'google/dataproc/property/cluster_config_secondary_worker_config' require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' require 'google/dataproc/property/cluster_config_security_config' require 'google/dataproc/property/cluster_config_security_config_kerberos_config' require 'google/dataproc/property/cluster_config_software_config' require 'google/dataproc/property/cluster_config_worker_config' require 'google/dataproc/property/cluster_config_worker_config_disk_config' require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' # A provider to manage Dataproc resources. class DataprocCluster < GcpResourceBase name 'google_dataproc_cluster' desc 'Cluster' supports platform: 'gcp' attr_reader :params attr_reader :cluster_name attr_reader :labels attr_reader :config attr_reader :region attr_reader :project_id attr_reader :virtual_cluster_config attr_reader :status attr_reader :status_history attr_reader :cluster_uuid attr_reader :metrics def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @cluster_name = @fetched['clusterName'] @labels = @fetched['labels'] @config = GoogleInSpec::Dataproc::Property::ClusterConfig.new(@fetched['config'], to_s) @region = @fetched['region'] @project_id = @fetched['projectId'] @virtual_cluster_config = @fetched['virtualClusterConfig'] @status = @fetched['status'] @status_history = @fetched['statusHistory'] @cluster_uuid = @fetched['clusterUuid'] @metrics = @fetched['metrics'] end def exists? !@fetched.nil? end def to_s "Cluster #{@params[:clusterName]}" end private def product_url(beta = false) if beta 'https://dataproc.googleapis.com/v1beta2/' else 'https://dataproc.googleapis.com/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/clusters/{{cluster_name}}' end end ================================================ FILE: libraries/google_dataproc_clusters.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataprocClusters < GcpResourceBase name 'google_dataproc_clusters' desc 'Cluster plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:cluster_names, field: :cluster_name) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:configs, field: :config) filter_table_config.add(:regions, field: :region) filter_table_config.add(:project_ids, field: :project_id) filter_table_config.add(:virtual_cluster_configs, field: :virtual_cluster_config) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:status_histories, field: :status_history) filter_table_config.add(:cluster_uuids, field: :cluster_uuid) filter_table_config.add(:metrics, field: :metrics) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('clusters') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'clusterName' => ->(obj) { [:cluster_name, obj['clusterName']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'config' => ->(obj) { [:config, GoogleInSpec::Dataproc::Property::ClusterConfig.new(obj['config'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, 'projectId' => ->(obj) { [:project_id, obj['projectId']] }, 'virtualClusterConfig' => ->(obj) { [:virtual_cluster_config, obj['virtualClusterConfig']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'statusHistory' => ->(obj) { [:status_history, obj['statusHistory']] }, 'clusterUuid' => ->(obj) { [:cluster_uuid, obj['clusterUuid']] }, 'metrics' => ->(obj) { [:metrics, obj['metrics']] }, } end private def product_url(beta = false) if beta 'https://dataproc.googleapis.com/v1beta2/' else 'https://dataproc.googleapis.com/v1/' end end def resource_base_url 'projects/{{project}}/regions/{{region}}/clusters' end end ================================================ FILE: libraries/google_dataproc_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataproc/property/job_driver_scheduling_config' require 'google/dataproc/property/job_flink_job' require 'google/dataproc/property/job_flink_job_logging_config' require 'google/dataproc/property/job_flink_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_flink_job_properties' require 'google/dataproc/property/job_hadoop_job' require 'google/dataproc/property/job_hadoop_job_logging_config' require 'google/dataproc/property/job_hadoop_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_hadoop_job_properties' require 'google/dataproc/property/job_hive_job' require 'google/dataproc/property/job_hive_job_properties' require 'google/dataproc/property/job_hive_job_query_list' require 'google/dataproc/property/job_hive_job_script_variables' require 'google/dataproc/property/job_labels' require 'google/dataproc/property/job_pig_job' require 'google/dataproc/property/job_pig_job_logging_config' require 'google/dataproc/property/job_pig_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_pig_job_properties' require 'google/dataproc/property/job_pig_job_query_list' require 'google/dataproc/property/job_pig_job_script_variables' require 'google/dataproc/property/job_placement' require 'google/dataproc/property/job_placement_cluster_labels' require 'google/dataproc/property/job_presto_job' require 'google/dataproc/property/job_presto_job_logging_config' require 'google/dataproc/property/job_presto_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_presto_job_properties' require 'google/dataproc/property/job_presto_job_query_list' require 'google/dataproc/property/job_pyspark_job' require 'google/dataproc/property/job_pyspark_job_logging_config' require 'google/dataproc/property/job_pyspark_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_pyspark_job_properties' require 'google/dataproc/property/job_reference' require 'google/dataproc/property/job_scheduling' require 'google/dataproc/property/job_spark_job' require 'google/dataproc/property/job_spark_job_logging_config' require 'google/dataproc/property/job_spark_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_spark_job_properties' require 'google/dataproc/property/job_spark_r_job' require 'google/dataproc/property/job_spark_r_job_logging_config' require 'google/dataproc/property/job_spark_r_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_spark_r_job_properties' require 'google/dataproc/property/job_spark_sql_job' require 'google/dataproc/property/job_spark_sql_job_logging_config' require 'google/dataproc/property/job_spark_sql_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_spark_sql_job_properties' require 'google/dataproc/property/job_spark_sql_job_query_list' require 'google/dataproc/property/job_spark_sql_job_script_variables' require 'google/dataproc/property/job_status' require 'google/dataproc/property/job_status_history' require 'google/dataproc/property/job_trino_job' require 'google/dataproc/property/job_trino_job_logging_config' require 'google/dataproc/property/job_trino_job_logging_config_driver_log_levels' require 'google/dataproc/property/job_trino_job_properties' require 'google/dataproc/property/job_trino_job_query_list' require 'google/dataproc/property/job_yarn_applications' # A provider to manage Dataproc resources. class DataprocJob < GcpResourceBase name 'google_dataproc_job' desc 'Job' supports platform: 'gcp' attr_reader :params attr_reader :reference attr_reader :placement attr_reader :hadoop_job attr_reader :spark_job attr_reader :pyspark_job attr_reader :hive_job attr_reader :pig_job attr_reader :spark_r_job attr_reader :spark_sql_job attr_reader :presto_job attr_reader :trino_job attr_reader :flink_job attr_reader :status attr_reader :status_history attr_reader :yarn_applications attr_reader :driver_output_resource_uri attr_reader :driver_control_files_uri attr_reader :labels attr_reader :scheduling attr_reader :job_uuid attr_reader :done attr_reader :driver_scheduling_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @reference = GoogleInSpec::Dataproc::Property::JobReference.new(@fetched['reference'], to_s) @placement = GoogleInSpec::Dataproc::Property::JobPlacement.new(@fetched['placement'], to_s) @hadoop_job = GoogleInSpec::Dataproc::Property::JobHadoopJob.new(@fetched['hadoopJob'], to_s) @spark_job = GoogleInSpec::Dataproc::Property::JobSparkJob.new(@fetched['sparkJob'], to_s) @pyspark_job = GoogleInSpec::Dataproc::Property::JobPysparkJob.new(@fetched['pysparkJob'], to_s) @hive_job = GoogleInSpec::Dataproc::Property::JobHiveJob.new(@fetched['hiveJob'], to_s) @pig_job = GoogleInSpec::Dataproc::Property::JobPigJob.new(@fetched['pigJob'], to_s) @spark_r_job = GoogleInSpec::Dataproc::Property::JobSparkRJob.new(@fetched['sparkRJob'], to_s) @spark_sql_job = GoogleInSpec::Dataproc::Property::JobSparkSqlJob.new(@fetched['sparkSqlJob'], to_s) @presto_job = GoogleInSpec::Dataproc::Property::JobPrestoJob.new(@fetched['prestoJob'], to_s) @trino_job = GoogleInSpec::Dataproc::Property::JobTrinoJob.new(@fetched['trinoJob'], to_s) @flink_job = GoogleInSpec::Dataproc::Property::JobFlinkJob.new(@fetched['flinkJob'], to_s) @status = GoogleInSpec::Dataproc::Property::JobStatus.new(@fetched['status'], to_s) @status_history = GoogleInSpec::Dataproc::Property::JobStatusHistoryArray.parse(@fetched['statusHistory'], to_s) @yarn_applications = GoogleInSpec::Dataproc::Property::JobYarnApplicationsArray.parse(@fetched['yarnApplications'], to_s) @driver_output_resource_uri = @fetched['driverOutputResourceUri'] @driver_control_files_uri = @fetched['driverControlFilesUri'] @labels = GoogleInSpec::Dataproc::Property::JobLabels.new(@fetched['labels'], to_s) @scheduling = GoogleInSpec::Dataproc::Property::JobScheduling.new(@fetched['scheduling'], to_s) @job_uuid = @fetched['jobUuid'] @done = @fetched['done'] @driver_scheduling_config = GoogleInSpec::Dataproc::Property::JobDriverSchedulingConfig.new(@fetched['driverSchedulingConfig'], to_s) end def exists? !@fetched.nil? end def to_s "Job #{@params[:jobId]}" end private def product_url(_ = nil) 'https://dataproc.googleapis.com/v1/' end def resource_base_url 'projects/{{project_id}}/regions/{{region}}/jobs/{{job_id}}' end end ================================================ FILE: libraries/google_dataproc_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataprocJobs < GcpResourceBase name 'google_dataproc_jobs' desc 'Job plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:references, field: :reference) filter_table_config.add(:placements, field: :placement) filter_table_config.add(:hadoop_jobs, field: :hadoop_job) filter_table_config.add(:spark_jobs, field: :spark_job) filter_table_config.add(:pyspark_jobs, field: :pyspark_job) filter_table_config.add(:hive_jobs, field: :hive_job) filter_table_config.add(:pig_jobs, field: :pig_job) filter_table_config.add(:spark_r_jobs, field: :spark_r_job) filter_table_config.add(:spark_sql_jobs, field: :spark_sql_job) filter_table_config.add(:presto_jobs, field: :presto_job) filter_table_config.add(:trino_jobs, field: :trino_job) filter_table_config.add(:flink_jobs, field: :flink_job) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:status_histories, field: :status_history) filter_table_config.add(:yarn_applications, field: :yarn_applications) filter_table_config.add(:driver_output_resource_uris, field: :driver_output_resource_uri) filter_table_config.add(:driver_control_files_uris, field: :driver_control_files_uri) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:schedulings, field: :scheduling) filter_table_config.add(:job_uuids, field: :job_uuid) filter_table_config.add(:dones, field: :done) filter_table_config.add(:driver_scheduling_configs, field: :driver_scheduling_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('jobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'reference' => ->(obj) { [:reference, GoogleInSpec::Dataproc::Property::JobReference.new(obj['reference'], to_s)] }, 'placement' => ->(obj) { [:placement, GoogleInSpec::Dataproc::Property::JobPlacement.new(obj['placement'], to_s)] }, 'hadoopJob' => ->(obj) { [:hadoop_job, GoogleInSpec::Dataproc::Property::JobHadoopJob.new(obj['hadoopJob'], to_s)] }, 'sparkJob' => ->(obj) { [:spark_job, GoogleInSpec::Dataproc::Property::JobSparkJob.new(obj['sparkJob'], to_s)] }, 'pysparkJob' => ->(obj) { [:pyspark_job, GoogleInSpec::Dataproc::Property::JobPysparkJob.new(obj['pysparkJob'], to_s)] }, 'hiveJob' => ->(obj) { [:hive_job, GoogleInSpec::Dataproc::Property::JobHiveJob.new(obj['hiveJob'], to_s)] }, 'pigJob' => ->(obj) { [:pig_job, GoogleInSpec::Dataproc::Property::JobPigJob.new(obj['pigJob'], to_s)] }, 'sparkRJob' => ->(obj) { [:spark_r_job, GoogleInSpec::Dataproc::Property::JobSparkRJob.new(obj['sparkRJob'], to_s)] }, 'sparkSqlJob' => ->(obj) { [:spark_sql_job, GoogleInSpec::Dataproc::Property::JobSparkSqlJob.new(obj['sparkSqlJob'], to_s)] }, 'prestoJob' => ->(obj) { [:presto_job, GoogleInSpec::Dataproc::Property::JobPrestoJob.new(obj['prestoJob'], to_s)] }, 'trinoJob' => ->(obj) { [:trino_job, GoogleInSpec::Dataproc::Property::JobTrinoJob.new(obj['trinoJob'], to_s)] }, 'flinkJob' => ->(obj) { [:flink_job, GoogleInSpec::Dataproc::Property::JobFlinkJob.new(obj['flinkJob'], to_s)] }, 'status' => ->(obj) { [:status, GoogleInSpec::Dataproc::Property::JobStatus.new(obj['status'], to_s)] }, 'statusHistory' => ->(obj) { [:status_history, GoogleInSpec::Dataproc::Property::JobStatusHistoryArray.parse(obj['statusHistory'], to_s)] }, 'yarnApplications' => ->(obj) { [:yarn_applications, GoogleInSpec::Dataproc::Property::JobYarnApplicationsArray.parse(obj['yarnApplications'], to_s)] }, 'driverOutputResourceUri' => ->(obj) { [:driver_output_resource_uri, obj['driverOutputResourceUri']] }, 'driverControlFilesUri' => ->(obj) { [:driver_control_files_uri, obj['driverControlFilesUri']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Dataproc::Property::JobLabels.new(obj['labels'], to_s)] }, 'scheduling' => ->(obj) { [:scheduling, GoogleInSpec::Dataproc::Property::JobScheduling.new(obj['scheduling'], to_s)] }, 'jobUuid' => ->(obj) { [:job_uuid, obj['jobUuid']] }, 'done' => ->(obj) { [:done, obj['done']] }, 'driverSchedulingConfig' => ->(obj) { [:driver_scheduling_config, GoogleInSpec::Dataproc::Property::JobDriverSchedulingConfig.new(obj['driverSchedulingConfig'], to_s)] }, } end private def product_url(_ = nil) 'https://dataproc.googleapis.com/v1/' end def resource_base_url 'projects/{{project_id}}/regions/{{region}}/jobs' end end ================================================ FILE: libraries/google_dataproc_metastore_federation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataprocmetastore/property/federation_backend_metastores' require 'google/dataprocmetastore/property/federation_labels' # A provider to manage Dataproc metastore resources. class DataprocMetastoreFederation < GcpResourceBase name 'google_dataproc_metastore_federation' desc 'Federation' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :create_time attr_reader :update_time attr_reader :labels attr_reader :version attr_reader :backend_metastores attr_reader :endpoint_uri attr_reader :state attr_reader :state_message attr_reader :uid def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @labels = GoogleInSpec::DataprocMetastore::Property::FederationLabels.new(@fetched['labels'], to_s) @version = @fetched['version'] @backend_metastores = GoogleInSpec::DataprocMetastore::Property::FederationBackendMetastores.new(@fetched['backendMetastores'], to_s) @endpoint_uri = @fetched['endpointUri'] @state = @fetched['state'] @state_message = @fetched['stateMessage'] @uid = @fetched['uid'] end def exists? !@fetched.nil? end def to_s "Federation #{@params[:name]}" end private def product_url(_ = nil) 'https://metastore.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_dataproc_metastore_federations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataprocMetastoreFederations < GcpResourceBase name 'google_dataproc_metastore_federations' desc 'Federation plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:versions, field: :version) filter_table_config.add(:backend_metastores, field: :backend_metastores) filter_table_config.add(:endpoint_uris, field: :endpoint_uri) filter_table_config.add(:states, field: :state) filter_table_config.add(:state_messages, field: :state_message) filter_table_config.add(:uids, field: :uid) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('federations') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::DataprocMetastore::Property::FederationLabels.new(obj['labels'], to_s)] }, 'version' => ->(obj) { [:version, obj['version']] }, 'backendMetastores' => ->(obj) { [:backend_metastores, GoogleInSpec::DataprocMetastore::Property::FederationBackendMetastores.new(obj['backendMetastores'], to_s)] }, 'endpointUri' => ->(obj) { [:endpoint_uri, obj['endpointUri']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'stateMessage' => ->(obj) { [:state_message, obj['stateMessage']] }, 'uid' => ->(obj) { [:uid, obj['uid']] }, } end private def product_url(_ = nil) 'https://metastore.googleapis.com/v1/' end def resource_base_url '{{parent}}/federations' end end ================================================ FILE: libraries/google_dataproc_metastore_service.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataprocmetastore/property/service_encryption_config' require 'google/dataprocmetastore/property/service_hive_metastore_config' require 'google/dataprocmetastore/property/service_hive_metastore_config_auxiliary_versions' require 'google/dataprocmetastore/property/service_hive_metastore_config_config_overrides' require 'google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config' require 'google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config_keytab' require 'google/dataprocmetastore/property/service_labels' require 'google/dataprocmetastore/property/service_maintenance_window' require 'google/dataprocmetastore/property/service_metadata_integration' require 'google/dataprocmetastore/property/service_metadata_integration_data_catalog_config' require 'google/dataprocmetastore/property/service_metadata_integration_dataplex_config' require 'google/dataprocmetastore/property/service_metadata_integration_dataplex_config_lake_resources' require 'google/dataprocmetastore/property/service_metadata_management_activity' require 'google/dataprocmetastore/property/service_metadata_management_activity_metadata_exports' require 'google/dataprocmetastore/property/service_metadata_management_activity_restores' require 'google/dataprocmetastore/property/service_network_config' require 'google/dataprocmetastore/property/service_network_config_consumers' require 'google/dataprocmetastore/property/service_scaling_config' require 'google/dataprocmetastore/property/service_scaling_config_autoscaling_config' require 'google/dataprocmetastore/property/service_scaling_config_autoscaling_config_limit_config' require 'google/dataprocmetastore/property/service_scheduled_backup' require 'google/dataprocmetastore/property/service_scheduled_backup_latest_backup' require 'google/dataprocmetastore/property/service_telemetry_config' # A provider to manage Dataproc metastore resources. class DataprocMetastoreService < GcpResourceBase name 'google_dataproc_metastore_service' desc 'Service' supports platform: 'gcp' attr_reader :params attr_reader :hive_metastore_config attr_reader :name attr_reader :create_time attr_reader :update_time attr_reader :labels attr_reader :network attr_reader :endpoint_uri attr_reader :port attr_reader :state attr_reader :state_message attr_reader :artifact_gcs_uri attr_reader :tier attr_reader :metadata_integration attr_reader :maintenance_window attr_reader :uid attr_reader :metadata_management_activity attr_reader :release_channel attr_reader :encryption_config attr_reader :network_config attr_reader :database_type attr_reader :telemetry_config attr_reader :scaling_config attr_reader :scheduled_backup attr_reader :deletion_protection def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @hive_metastore_config = GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfig.new(@fetched['hiveMetastoreConfig'], to_s) @name = @fetched['name'] @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @labels = GoogleInSpec::DataprocMetastore::Property::ServiceLabels.new(@fetched['labels'], to_s) @network = @fetched['network'] @endpoint_uri = @fetched['endpointUri'] @port = @fetched['port'] @state = @fetched['state'] @state_message = @fetched['stateMessage'] @artifact_gcs_uri = @fetched['artifactGcsUri'] @tier = @fetched['tier'] @metadata_integration = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataIntegration.new(@fetched['metadataIntegration'], to_s) @maintenance_window = GoogleInSpec::DataprocMetastore::Property::ServiceMaintenanceWindow.new(@fetched['maintenanceWindow'], to_s) @uid = @fetched['uid'] @metadata_management_activity = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataManagementActivity.new(@fetched['metadataManagementActivity'], to_s) @release_channel = @fetched['releaseChannel'] @encryption_config = GoogleInSpec::DataprocMetastore::Property::ServiceEncryptionConfig.new(@fetched['encryptionConfig'], to_s) @network_config = GoogleInSpec::DataprocMetastore::Property::ServiceNetworkConfig.new(@fetched['networkConfig'], to_s) @database_type = @fetched['databaseType'] @telemetry_config = GoogleInSpec::DataprocMetastore::Property::ServiceTelemetryConfig.new(@fetched['telemetryConfig'], to_s) @scaling_config = GoogleInSpec::DataprocMetastore::Property::ServiceScalingConfig.new(@fetched['scalingConfig'], to_s) @scheduled_backup = GoogleInSpec::DataprocMetastore::Property::ServiceScheduledBackup.new(@fetched['scheduledBackup'], to_s) @deletion_protection = @fetched['deletionProtection'] end def exists? !@fetched.nil? end def to_s "Service #{@params[:name]}" end private def product_url(_ = nil) 'https://metastore.googleapis.com/v1beta/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_dataproc_metastore_service_backup.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataprocmetastore/property/servicebackup_service_revision' require 'google/dataprocmetastore/property/servicebackup_service_revision_encryption_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_auxiliary_versions' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_config_overrides' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_kerberos_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_hive_metastore_config_kerberos_config_keytab' require 'google/dataprocmetastore/property/servicebackup_service_revision_labels' require 'google/dataprocmetastore/property/servicebackup_service_revision_maintenance_window' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_data_catalog_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_dataplex_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_integration_dataplex_config_lake_resources' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity_metadata_exports' require 'google/dataprocmetastore/property/servicebackup_service_revision_metadata_management_activity_restores' require 'google/dataprocmetastore/property/servicebackup_service_revision_network_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_network_config_consumers' require 'google/dataprocmetastore/property/servicebackup_service_revision_scaling_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_scaling_config_autoscaling_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_scaling_config_autoscaling_config_limit_config' require 'google/dataprocmetastore/property/servicebackup_service_revision_scheduled_backup' require 'google/dataprocmetastore/property/servicebackup_service_revision_scheduled_backup_latest_backup' require 'google/dataprocmetastore/property/servicebackup_service_revision_telemetry_config' # A provider to manage Dataproc metastore resources. class DataprocMetastoreServiceBackup < GcpResourceBase name 'google_dataproc_metastore_service_backup' desc 'ServiceBackup' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :create_time attr_reader :end_time attr_reader :state attr_reader :service_revision attr_reader :description attr_reader :restoring_services def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @create_time = @fetched['createTime'] @end_time = @fetched['endTime'] @state = @fetched['state'] @service_revision = GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevision.new(@fetched['serviceRevision'], to_s) @description = @fetched['description'] @restoring_services = @fetched['restoringServices'] end def exists? !@fetched.nil? end def to_s "ServiceBackup #{@params[:name]}" end private def product_url(_ = nil) 'https://metastore.googleapis.com/v1beta/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_dataproc_metastore_service_backups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataprocMetastoreServiceBackups < GcpResourceBase name 'google_dataproc_metastore_service_backups' desc 'ServiceBackup plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:states, field: :state) filter_table_config.add(:service_revisions, field: :service_revision) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:restoring_services, field: :restoring_services) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('backups') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'serviceRevision' => ->(obj) { [:service_revision, GoogleInSpec::DataprocMetastore::Property::ServiceBackupServiceRevision.new(obj['serviceRevision'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'restoringServices' => ->(obj) { [:restoring_services, obj['restoringServices']] }, } end private def product_url(_ = nil) 'https://metastore.googleapis.com/v1beta/' end def resource_base_url '{{parent}}/backups' end end ================================================ FILE: libraries/google_dataproc_metastore_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataprocMetastoreServices < GcpResourceBase name 'google_dataproc_metastore_services' desc 'Service plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:hive_metastore_configs, field: :hive_metastore_config) filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:networks, field: :network) filter_table_config.add(:endpoint_uris, field: :endpoint_uri) filter_table_config.add(:ports, field: :port) filter_table_config.add(:states, field: :state) filter_table_config.add(:state_messages, field: :state_message) filter_table_config.add(:artifact_gcs_uris, field: :artifact_gcs_uri) filter_table_config.add(:tiers, field: :tier) filter_table_config.add(:metadata_integrations, field: :metadata_integration) filter_table_config.add(:maintenance_windows, field: :maintenance_window) filter_table_config.add(:uids, field: :uid) filter_table_config.add(:metadata_management_activities, field: :metadata_management_activity) filter_table_config.add(:release_channels, field: :release_channel) filter_table_config.add(:encryption_configs, field: :encryption_config) filter_table_config.add(:network_configs, field: :network_config) filter_table_config.add(:database_types, field: :database_type) filter_table_config.add(:telemetry_configs, field: :telemetry_config) filter_table_config.add(:scaling_configs, field: :scaling_config) filter_table_config.add(:scheduled_backups, field: :scheduled_backup) filter_table_config.add(:deletion_protections, field: :deletion_protection) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('services') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'hiveMetastoreConfig' => ->(obj) { [:hive_metastore_config, GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfig.new(obj['hiveMetastoreConfig'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::DataprocMetastore::Property::ServiceLabels.new(obj['labels'], to_s)] }, 'network' => ->(obj) { [:network, obj['network']] }, 'endpointUri' => ->(obj) { [:endpoint_uri, obj['endpointUri']] }, 'port' => ->(obj) { [:port, obj['port']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'stateMessage' => ->(obj) { [:state_message, obj['stateMessage']] }, 'artifactGcsUri' => ->(obj) { [:artifact_gcs_uri, obj['artifactGcsUri']] }, 'tier' => ->(obj) { [:tier, obj['tier']] }, 'metadataIntegration' => ->(obj) { [:metadata_integration, GoogleInSpec::DataprocMetastore::Property::ServiceMetadataIntegration.new(obj['metadataIntegration'], to_s)] }, 'maintenanceWindow' => ->(obj) { [:maintenance_window, GoogleInSpec::DataprocMetastore::Property::ServiceMaintenanceWindow.new(obj['maintenanceWindow'], to_s)] }, 'uid' => ->(obj) { [:uid, obj['uid']] }, 'metadataManagementActivity' => ->(obj) { [:metadata_management_activity, GoogleInSpec::DataprocMetastore::Property::ServiceMetadataManagementActivity.new(obj['metadataManagementActivity'], to_s)] }, 'releaseChannel' => ->(obj) { [:release_channel, obj['releaseChannel']] }, 'encryptionConfig' => ->(obj) { [:encryption_config, GoogleInSpec::DataprocMetastore::Property::ServiceEncryptionConfig.new(obj['encryptionConfig'], to_s)] }, 'networkConfig' => ->(obj) { [:network_config, GoogleInSpec::DataprocMetastore::Property::ServiceNetworkConfig.new(obj['networkConfig'], to_s)] }, 'databaseType' => ->(obj) { [:database_type, obj['databaseType']] }, 'telemetryConfig' => ->(obj) { [:telemetry_config, GoogleInSpec::DataprocMetastore::Property::ServiceTelemetryConfig.new(obj['telemetryConfig'], to_s)] }, 'scalingConfig' => ->(obj) { [:scaling_config, GoogleInSpec::DataprocMetastore::Property::ServiceScalingConfig.new(obj['scalingConfig'], to_s)] }, 'scheduledBackup' => ->(obj) { [:scheduled_backup, GoogleInSpec::DataprocMetastore::Property::ServiceScheduledBackup.new(obj['scheduledBackup'], to_s)] }, 'deletionProtection' => ->(obj) { [:deletion_protection, obj['deletionProtection']] }, } end private def product_url(_ = nil) 'https://metastore.googleapis.com/v1beta/' end def resource_base_url '{{parent}}/services' end end ================================================ FILE: libraries/google_dataproc_session.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataproc/property/session_environment_config' require 'google/dataproc/property/session_environment_config_execution_config' require 'google/dataproc/property/session_environment_config_peripherals_config' require 'google/dataproc/property/session_environment_config_peripherals_config_spark_history_server_config' require 'google/dataproc/property/session_jupyter_session' require 'google/dataproc/property/session_labels' require 'google/dataproc/property/session_runtime_config' require 'google/dataproc/property/session_runtime_config_properties' require 'google/dataproc/property/session_runtime_config_repository_config' require 'google/dataproc/property/session_runtime_config_repository_config_pypi_repository_config' require 'google/dataproc/property/session_runtime_info' require 'google/dataproc/property/session_runtime_info_approximate_usage' require 'google/dataproc/property/session_runtime_info_current_usage' require 'google/dataproc/property/session_runtime_info_endpoints' require 'google/dataproc/property/session_state_history' # A provider to manage Dataproc resources. class DataprocSession < GcpResourceBase name 'google_dataproc_session' desc 'Session' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :uuid attr_reader :create_time attr_reader :jupyter_session attr_reader :runtime_info attr_reader :state attr_reader :state_message attr_reader :state_time attr_reader :creator attr_reader :labels attr_reader :runtime_config attr_reader :environment_config attr_reader :user attr_reader :state_history attr_reader :session_template def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @uuid = @fetched['uuid'] @create_time = @fetched['createTime'] @jupyter_session = GoogleInSpec::Dataproc::Property::SessionJupyterSession.new(@fetched['jupyterSession'], to_s) @runtime_info = GoogleInSpec::Dataproc::Property::SessionRuntimeInfo.new(@fetched['runtimeInfo'], to_s) @state = @fetched['state'] @state_message = @fetched['stateMessage'] @state_time = @fetched['stateTime'] @creator = @fetched['creator'] @labels = GoogleInSpec::Dataproc::Property::SessionLabels.new(@fetched['labels'], to_s) @runtime_config = GoogleInSpec::Dataproc::Property::SessionRuntimeConfig.new(@fetched['runtimeConfig'], to_s) @environment_config = GoogleInSpec::Dataproc::Property::SessionEnvironmentConfig.new(@fetched['environmentConfig'], to_s) @user = @fetched['user'] @state_history = GoogleInSpec::Dataproc::Property::SessionStateHistoryArray.parse(@fetched['stateHistory'], to_s) @session_template = @fetched['sessionTemplate'] end def exists? !@fetched.nil? end def to_s "Session #{@params}" end private def product_url(_ = nil) 'https://dataproc.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_dataproc_sessions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataprocSessions < GcpResourceBase name 'google_dataproc_sessions' desc 'Session plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:uuids, field: :uuid) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:jupyter_sessions, field: :jupyter_session) filter_table_config.add(:runtime_infos, field: :runtime_info) filter_table_config.add(:states, field: :state) filter_table_config.add(:state_messages, field: :state_message) filter_table_config.add(:state_times, field: :state_time) filter_table_config.add(:creators, field: :creator) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:runtime_configs, field: :runtime_config) filter_table_config.add(:environment_configs, field: :environment_config) filter_table_config.add(:users, field: :user) filter_table_config.add(:state_histories, field: :state_history) filter_table_config.add(:session_templates, field: :session_template) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('sessions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'uuid' => ->(obj) { [:uuid, obj['uuid']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'jupyterSession' => ->(obj) { [:jupyter_session, GoogleInSpec::Dataproc::Property::SessionJupyterSession.new(obj['jupyterSession'], to_s)] }, 'runtimeInfo' => ->(obj) { [:runtime_info, GoogleInSpec::Dataproc::Property::SessionRuntimeInfo.new(obj['runtimeInfo'], to_s)] }, 'state' => ->(obj) { [:state, obj['state']] }, 'stateMessage' => ->(obj) { [:state_message, obj['stateMessage']] }, 'stateTime' => ->(obj) { [:state_time, obj['stateTime']] }, 'creator' => ->(obj) { [:creator, obj['creator']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Dataproc::Property::SessionLabels.new(obj['labels'], to_s)] }, 'runtimeConfig' => ->(obj) { [:runtime_config, GoogleInSpec::Dataproc::Property::SessionRuntimeConfig.new(obj['runtimeConfig'], to_s)] }, 'environmentConfig' => ->(obj) { [:environment_config, GoogleInSpec::Dataproc::Property::SessionEnvironmentConfig.new(obj['environmentConfig'], to_s)] }, 'user' => ->(obj) { [:user, obj['user']] }, 'stateHistory' => ->(obj) { [:state_history, GoogleInSpec::Dataproc::Property::SessionStateHistoryArray.parse(obj['stateHistory'], to_s)] }, 'sessionTemplate' => ->(obj) { [:session_template, obj['sessionTemplate']] }, } end private def product_url(_ = nil) 'https://dataproc.googleapis.com/v1/' end def resource_base_url '{{parent}}/sessions' end end ================================================ FILE: libraries/google_dataproc_workflow_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dataproc/property/workflowtemplate_encryption_config' require 'google/dataproc/property/workflowtemplate_jobs' require 'google/dataproc/property/workflowtemplate_labels' require 'google/dataproc/property/workflowtemplate_parameters' require 'google/dataproc/property/workflowtemplate_placement' require 'google/dataproc/property/workflowtemplate_placement_cluster_selector' require 'google/dataproc/property/workflowtemplate_placement_cluster_selector_cluster_labels' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_autoscaling_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_auxiliary_node_groups' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_dataproc_metric_config_metrics' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_encryption_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_endpoint_config_http_ports' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_confidential_instance_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_metadata' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_node_group_affinity' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_reservation_affinity' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_gce_cluster_config_shielded_instance_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_namespaced_gke_deployment_target' require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_initialization_actions' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_lifecycle_config' require 'google/dataproc/property/workflowtemplate_master_config' require 'google/dataproc/property/workflowtemplate_master_config_accelerators' require 'google/dataproc/property/workflowtemplate_master_config_disk_config' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_master_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_master_config_instance_references' require 'google/dataproc/property/workflowtemplate_master_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_master_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_metastore_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_accelerators' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_disk_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_instance_references' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_secondary_worker_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config' require 'google/dataproc/property/workflowtemplate_security_config_identity_config' require 'google/dataproc/property/workflowtemplate_security_config_identity_config_user_service_account_mapping' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_security_config_kerberos_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_config_software_config_properties' require 'google/dataproc/property/workflowtemplate_worker_config' require 'google/dataproc/property/workflowtemplate_worker_config_accelerators' require 'google/dataproc/property/workflowtemplate_worker_config_disk_config' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_list' require 'google/dataproc/property/workflowtemplate_worker_config_instance_flexibility_policy_instance_selection_results' require 'google/dataproc/property/workflowtemplate_worker_config_instance_references' require 'google/dataproc/property/workflowtemplate_worker_config_managed_group_config' require 'google/dataproc/property/workflowtemplate_worker_config_startup_config' require 'google/dataproc/property/workflowtemplate_placement_managed_cluster_labels' # A provider to manage Dataproc resources. class DataprocWorkflowTemplate < GcpResourceBase name 'google_dataproc_workflow_template' desc 'WorkflowTemplate' supports platform: 'gcp' attr_reader :params attr_reader :id attr_reader :name attr_reader :version attr_reader :create_time attr_reader :update_time attr_reader :labels attr_reader :placement attr_reader :jobs attr_reader :parameters attr_reader :dag_timeout attr_reader :encryption_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @id = @fetched['id'] @name = @fetched['name'] @version = @fetched['version'] @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @labels = GoogleInSpec::Dataproc::Property::WorkflowTemplateLabels.new(@fetched['labels'], to_s) @placement = GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacement.new(@fetched['placement'], to_s) @jobs = GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsArray.parse(@fetched['jobs'], to_s) @parameters = GoogleInSpec::Dataproc::Property::WorkflowTemplateParametersArray.parse(@fetched['parameters'], to_s) @dag_timeout = @fetched['dagTimeout'] @encryption_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateEncryptionConfig.new(@fetched['encryptionConfig'], to_s) end def exists? !@fetched.nil? end def to_s "WorkflowTemplate #{@params[:name]}" end private def product_url(_ = nil) 'https://dataproc.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_dataproc_workflow_templates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DataprocWorkflowTemplates < GcpResourceBase name 'google_dataproc_workflow_templates' desc 'WorkflowTemplate plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:versions, field: :version) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:placements, field: :placement) filter_table_config.add(:jobs, field: :jobs) filter_table_config.add(:parameters, field: :parameters) filter_table_config.add(:dag_timeouts, field: :dag_timeout) filter_table_config.add(:encryption_configs, field: :encryption_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('templates') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'id' => ->(obj) { [:id, obj['id']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'version' => ->(obj) { [:version, obj['version']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Dataproc::Property::WorkflowTemplateLabels.new(obj['labels'], to_s)] }, 'placement' => ->(obj) { [:placement, GoogleInSpec::Dataproc::Property::WorkflowTemplatePlacement.new(obj['placement'], to_s)] }, 'jobs' => ->(obj) { [:jobs, GoogleInSpec::Dataproc::Property::WorkflowTemplateJobsArray.parse(obj['jobs'], to_s)] }, 'parameters' => ->(obj) { [:parameters, GoogleInSpec::Dataproc::Property::WorkflowTemplateParametersArray.parse(obj['parameters'], to_s)] }, 'dagTimeout' => ->(obj) { [:dag_timeout, obj['dagTimeout']] }, 'encryptionConfig' => ->(obj) { [:encryption_config, GoogleInSpec::Dataproc::Property::WorkflowTemplateEncryptionConfig.new(obj['encryptionConfig'], to_s)] }, } end private def product_url(_ = nil) 'https://dataproc.googleapis.com/v1/' end def resource_base_url '{{parent}}/workflowTemplates' end end ================================================ FILE: libraries/google_dlp_dt.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dlp/property/dt_config' require 'google/dlp/property/dt_config_info_type_tf' require 'google/dlp/property/dt_config_info_type_tf_tf' # A provider to manage Dlp resources. class DLPDT < GcpResourceBase name 'google_dlp_dt' desc 'DT' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :display_name attr_reader :config attr_reader :parent def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @display_name = @fetched['displayName'] @config = GoogleInSpec::DLP::Property::DTConfig.new(@fetched['config'], to_s) @parent = @fetched['parent'] end def exists? !@fetched.nil? end def to_s "DT #{@params[:name]}" end private def product_url(_ = nil) 'https://dlp.googleapis.com/v2/' end def resource_base_url '{{parent}}/deidentifyTemplates/{{name}}' end end ================================================ FILE: libraries/google_dlp_dts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DLPDTs < GcpResourceBase name 'google_dlp_dts' desc 'DT plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:configs, field: :config) filter_table_config.add(:parents, field: :parent) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('dTs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'config' => ->(obj) { [:config, GoogleInSpec::DLP::Property::DTConfig.new(obj['config'], to_s)] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, } end private def product_url(_ = nil) 'https://dlp.googleapis.com/v2/' end def resource_base_url '{{parent}}/deidentifyTemplates' end end ================================================ FILE: libraries/google_dlp_inspect_template.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dlp/property/inspecttemplate_inspect_config' require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types' require 'google/dlp/property/inspecttemplate_inspect_config_info_types' require 'google/dlp/property/inspecttemplate_inspect_config_limits' require 'google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type' require 'google/dlp/property/inspecttemplate_inspect_config_rule_set' # A provider to manage Dlp resources. class DLPInspectTemplate < GcpResourceBase name 'google_dlp_inspect_template' desc 'InspectTemplate' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :display_name attr_reader :inspect_config attr_reader :parent def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @display_name = @fetched['displayName'] @inspect_config = GoogleInSpec::DLP::Property::InspectTemplateInspectConfig.new(@fetched['inspectConfig'], to_s) @parent = @fetched['parent'] end def exists? !@fetched.nil? end def to_s "InspectTemplate #{@params[:name]}" end private def product_url(_ = nil) 'https://dlp.googleapis.com/v2/' end def resource_base_url '{{parent}}/inspectTemplates/{{name}}' end end ================================================ FILE: libraries/google_dlp_inspect_templates.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DLPInspectTemplates < GcpResourceBase name 'google_dlp_inspect_templates' desc 'InspectTemplate plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:inspect_configs, field: :inspect_config) filter_table_config.add(:parents, field: :parent) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('inspectTemplates') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'inspectConfig' => ->(obj) { [:inspect_config, GoogleInSpec::DLP::Property::InspectTemplateInspectConfig.new(obj['inspectConfig'], to_s)] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, } end private def product_url(_ = nil) 'https://dlp.googleapis.com/v2/' end def resource_base_url '{{parent}}/inspectTemplates' end end ================================================ FILE: libraries/google_dlp_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dlp/property/job_act_det' require 'google/dlp/property/job_errors' # A provider to manage Dlp resources. class DLPJob < GcpResourceBase name 'google_dlp_job' desc 'Job' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :type attr_reader :state attr_reader :create_time attr_reader :start_time attr_reader :end_time attr_reader :job_trigger_name attr_reader :errors attr_reader :act_det attr_reader :risk_details attr_reader :inspect_details attr_reader :parent def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @type = @fetched['type'] @state = @fetched['state'] @create_time = @fetched['createTime'] @start_time = @fetched['startTime'] @end_time = @fetched['endTime'] @job_trigger_name = @fetched['jobTriggerName'] @errors = GoogleInSpec::DLP::Property::JobErrorsArray.parse(@fetched['errors'], to_s) @act_det = GoogleInSpec::DLP::Property::JobActDetArray.parse(@fetched['actDet'], to_s) @risk_details = @fetched['riskDetails'] @inspect_details = @fetched['inspectDetails'] @parent = @fetched['parent'] end def exists? !@fetched.nil? end def to_s "Job #{@params[:name]}" end private def product_url(_ = nil) 'https://dlp.googleapis.com/v2/' end def resource_base_url '{{parent}}/dlpJobs/{{name}}' end end ================================================ FILE: libraries/google_dlp_job_trigger.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dlp/property/jobtrigger_inspect_job' require 'google/dlp/property/jobtrigger_inspect_job_actions' require 'google/dlp/property/jobtrigger_inspect_job_storage_config' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config' require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field' require 'google/dlp/property/jobtrigger_triggers' # A provider to manage Dlp resources. class DLPJobTrigger < GcpResourceBase name 'google_dlp_job_trigger' desc 'JobTrigger' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :display_name attr_reader :last_run_time attr_reader :status attr_reader :triggers attr_reader :inspect_job attr_reader :parent def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @display_name = @fetched['displayName'] @last_run_time = parse_time_string(@fetched['lastRunTime']) @status = @fetched['status'] @triggers = GoogleInSpec::DLP::Property::JobTriggerTriggersArray.parse(@fetched['triggers'], to_s) @inspect_job = GoogleInSpec::DLP::Property::JobTriggerInspectJob.new(@fetched['inspectJob'], to_s) @parent = @fetched['parent'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "JobTrigger #{@params[:name]}" end private def product_url(_ = nil) 'https://dlp.googleapis.com/v2/' end def resource_base_url '{{parent}}/jobTriggers/{{name}}' end end ================================================ FILE: libraries/google_dlp_job_triggers.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DLPJobTriggers < GcpResourceBase name 'google_dlp_job_triggers' desc 'JobTrigger plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:last_run_times, field: :last_run_time) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:triggers, field: :triggers) filter_table_config.add(:inspect_jobs, field: :inspect_job) filter_table_config.add(:parents, field: :parent) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('jobTriggers') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'lastRunTime' => ->(obj) { [:last_run_time, parse_time_string(obj['lastRunTime'])] }, 'status' => ->(obj) { [:status, obj['status']] }, 'triggers' => ->(obj) { [:triggers, GoogleInSpec::DLP::Property::JobTriggerTriggersArray.parse(obj['triggers'], to_s)] }, 'inspectJob' => ->(obj) { [:inspect_job, GoogleInSpec::DLP::Property::JobTriggerInspectJob.new(obj['inspectJob'], to_s)] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://dlp.googleapis.com/v2/' end def resource_base_url '{{parent}}/jobTriggers' end end ================================================ FILE: libraries/google_dlp_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DLPJobs < GcpResourceBase name 'google_dlp_jobs' desc 'Job plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:types, field: :type) filter_table_config.add(:states, field: :state) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:job_trigger_names, field: :job_trigger_name) filter_table_config.add(:errors, field: :errors) filter_table_config.add(:act_dets, field: :act_det) filter_table_config.add(:risk_details, field: :risk_details) filter_table_config.add(:inspect_details, field: :inspect_details) filter_table_config.add(:parents, field: :parent) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('jobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'jobTriggerName' => ->(obj) { [:job_trigger_name, obj['jobTriggerName']] }, 'errors' => ->(obj) { [:errors, GoogleInSpec::DLP::Property::JobErrorsArray.parse(obj['errors'], to_s)] }, 'actDet' => ->(obj) { [:act_det, GoogleInSpec::DLP::Property::JobActDetArray.parse(obj['actDet'], to_s)] }, 'riskDetails' => ->(obj) { [:risk_details, obj['riskDetails']] }, 'inspectDetails' => ->(obj) { [:inspect_details, obj['inspectDetails']] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, } end private def product_url(_ = nil) 'https://dlp.googleapis.com/v2/' end def resource_base_url '{{parent}}/dlpJobs' end end ================================================ FILE: libraries/google_dlp_stored_info_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dlp/property/storedinfotype_dictionary' require 'google/dlp/property/storedinfotype_dictionary_cloud_storage_path' require 'google/dlp/property/storedinfotype_dictionary_word_list' require 'google/dlp/property/storedinfotype_large_custom_dictionary' require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field' require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field' require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table' require 'google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set' require 'google/dlp/property/storedinfotype_large_custom_dictionary_output_path' require 'google/dlp/property/storedinfotype_regex' # A provider to manage Dlp resources. class DLPStoredInfoType < GcpResourceBase name 'google_dlp_stored_info_type' desc 'StoredInfoType' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :display_name attr_reader :regex attr_reader :dictionary attr_reader :large_custom_dictionary attr_reader :parent def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @display_name = @fetched['displayName'] @regex = GoogleInSpec::DLP::Property::StoredInfoTypeRegex.new(@fetched['regex'], to_s) @dictionary = GoogleInSpec::DLP::Property::StoredInfoTypeDictionary.new(@fetched['dictionary'], to_s) @large_custom_dictionary = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionary.new(@fetched['largeCustomDictionary'], to_s) @parent = @fetched['parent'] end def exists? !@fetched.nil? end def to_s "StoredInfoType #{@params[:name]}" end private def product_url(_ = nil) 'https://dlp.googleapis.com/v2/' end def resource_base_url '{{parent}}/storedInfoTypes/{{name}}' end end ================================================ FILE: libraries/google_dlp_stored_info_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DLPStoredInfoTypes < GcpResourceBase name 'google_dlp_stored_info_types' desc 'StoredInfoType plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:regexes, field: :regex) filter_table_config.add(:dictionaries, field: :dictionary) filter_table_config.add(:large_custom_dictionaries, field: :large_custom_dictionary) filter_table_config.add(:parents, field: :parent) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('storedInfoTypes') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'regex' => ->(obj) { [:regex, GoogleInSpec::DLP::Property::StoredInfoTypeRegex.new(obj['regex'], to_s)] }, 'dictionary' => ->(obj) { [:dictionary, GoogleInSpec::DLP::Property::StoredInfoTypeDictionary.new(obj['dictionary'], to_s)] }, 'largeCustomDictionary' => ->(obj) { [:large_custom_dictionary, GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionary.new(obj['largeCustomDictionary'], to_s)] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, } end private def product_url(_ = nil) 'https://dlp.googleapis.com/v2/' end def resource_base_url '{{parent}}/storedInfoTypes' end end ================================================ FILE: libraries/google_dns_managed_zone.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/dns/property/managedzone_dnssec_config' require 'google/dns/property/managedzone_dnssec_config_default_key_specs' require 'google/dns/property/managedzone_forwarding_config' require 'google/dns/property/managedzone_forwarding_config_target_name_servers' require 'google/dns/property/managedzone_peering_config' require 'google/dns/property/managedzone_peering_config_target_network' require 'google/dns/property/managedzone_private_visibility_config' require 'google/dns/property/managedzone_private_visibility_config_networks' require 'google/dns/property/managedzone_service_directory_config' require 'google/dns/property/managedzone_service_directory_config_namespace' # A provider to manage Cloud DNS resources. class DNSManagedZone < GcpResourceBase name 'google_dns_managed_zone' desc 'ManagedZone' supports platform: 'gcp' attr_reader :params attr_reader :description attr_reader :dns_name attr_reader :dnssec_config attr_reader :id attr_reader :name attr_reader :name_servers attr_reader :name_server_set attr_reader :creation_time attr_reader :labels attr_reader :visibility attr_reader :private_visibility_config attr_reader :forwarding_config attr_reader :peering_config attr_reader :reverse_lookup attr_reader :service_directory_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @description = @fetched['description'] @dns_name = @fetched['dnsName'] @dnssec_config = GoogleInSpec::DNS::Property::ManagedZoneDnssecConfig.new(@fetched['dnssecConfig'], to_s) @id = @fetched['id'] @name = @fetched['name'] @name_servers = @fetched['nameServers'] @name_server_set = @fetched['nameServerSet'] @creation_time = parse_time_string(@fetched['creationTime']) @labels = @fetched['labels'] @visibility = @fetched['visibility'] @private_visibility_config = GoogleInSpec::DNS::Property::ManagedZonePrivateVisibilityConfig.new(@fetched['privateVisibilityConfig'], to_s) @forwarding_config = GoogleInSpec::DNS::Property::ManagedZoneForwardingConfig.new(@fetched['forwardingConfig'], to_s) @peering_config = GoogleInSpec::DNS::Property::ManagedZonePeeringConfig.new(@fetched['peeringConfig'], to_s) @reverse_lookup = @fetched['reverseLookupConfig'] @service_directory_config = GoogleInSpec::DNS::Property::ManagedZoneServiceDirectoryConfig.new(@fetched['serviceDirectoryConfig'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "ManagedZone #{@params[:zone]}" end def key_signing_key_algorithm specs = @dnssec_config&.default_key_specs specs.each do |spec| return spec.algorithm if spec.key_type == 'keySigning' end end def zone_signing_key_algorithm specs = @dnssec_config&.default_key_specs specs.each do |spec| return spec.algorithm if spec.key_type == 'zoneSigning' end end private def product_url(beta = false) if beta 'https://dns.googleapis.com/dns/v1beta2/' else 'https://dns.googleapis.com/dns/v1/' end end def resource_base_url 'projects/{{project}}/managedZones/{{zone}}' end end ================================================ FILE: libraries/google_dns_managed_zones.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DNSManagedZones < GcpResourceBase name 'google_dns_managed_zones' desc 'ManagedZone plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:zone_dns_names, field: :zone_dns_name) filter_table_config.add(:dnssec_configs, field: :dnssec_config) filter_table_config.add(:zone_ids, field: :zone_id) filter_table_config.add(:zone_names, field: :zone_name) filter_table_config.add(:name_servers, field: :name_servers) filter_table_config.add(:name_server_sets, field: :name_server_set) filter_table_config.add(:creation_times, field: :creation_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:visibilities, field: :visibility) filter_table_config.add(:private_visibility_configs, field: :private_visibility_config) filter_table_config.add(:forwarding_configs, field: :forwarding_config) filter_table_config.add(:peering_configs, field: :peering_config) filter_table_config.add(:reverse_lookups, field: :reverse_lookup) filter_table_config.add(:service_directory_configs, field: :service_directory_config) filter_table_config.add(:dnssec_config_states, field: :dnssec_config_state) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('managedZones') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end hash_with_symbols[:dnssec_config_state] = hash.dig('dnssecConfig', 'state')&.downcase == 'on' converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'description' => ->(obj) { [:description, obj['description']] }, 'dnsName' => ->(obj) { [:zone_dns_name, obj['dnsName']] }, 'dnssecConfig' => ->(obj) { [:dnssec_config, GoogleInSpec::DNS::Property::ManagedZoneDnssecConfig.new(obj['dnssecConfig'], to_s)] }, 'id' => ->(obj) { [:zone_id, obj['id']] }, 'name' => ->(obj) { [:zone_name, obj['name']] }, 'nameServers' => ->(obj) { [:name_servers, obj['nameServers']] }, 'nameServerSet' => ->(obj) { [:name_server_set, obj['nameServerSet']] }, 'creationTime' => ->(obj) { [:creation_time, parse_time_string(obj['creationTime'])] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'visibility' => ->(obj) { [:visibility, obj['visibility']] }, 'privateVisibilityConfig' => ->(obj) { [:private_visibility_config, GoogleInSpec::DNS::Property::ManagedZonePrivateVisibilityConfig.new(obj['privateVisibilityConfig'], to_s)] }, 'forwardingConfig' => ->(obj) { [:forwarding_config, GoogleInSpec::DNS::Property::ManagedZoneForwardingConfig.new(obj['forwardingConfig'], to_s)] }, 'peeringConfig' => ->(obj) { [:peering_config, GoogleInSpec::DNS::Property::ManagedZonePeeringConfig.new(obj['peeringConfig'], to_s)] }, 'reverseLookupConfig' => ->(obj) { [:reverse_lookup, obj['reverseLookupConfig']] }, 'serviceDirectoryConfig' => ->(obj) { [:service_directory_config, GoogleInSpec::DNS::Property::ManagedZoneServiceDirectoryConfig.new(obj['serviceDirectoryConfig'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://dns.googleapis.com/dns/v1beta2/' else 'https://dns.googleapis.com/dns/v1/' end end def resource_base_url 'projects/{{project}}/managedZones' end end ================================================ FILE: libraries/google_dns_resource_record_set.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud DNS resources. class DNSResourceRecordSet < GcpResourceBase name 'google_dns_resource_record_set' desc 'ResourceRecordSet' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :type attr_reader :ttl attr_reader :target attr_reader :managed_zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') @fetched = unwrap(fetched, params) parse unless @fetched.nil? end def identity %w{name type} end def collection_item 'rrsets' end def unwrap(fetched, params) fetched[collection_item].find { |result| identity.all? { |id| result[id] == params[id.to_sym] } } end def parse @name = @fetched['name'] @type = @fetched['type'] @ttl = @fetched['ttl'] @target = @fetched['rrdatas'] @managed_zone = @fetched['managed_zone'] end def exists? !@fetched.nil? end def to_s "ResourceRecordSet #{@params[:type]}" end private def product_url(beta = false) if beta 'https://dns.googleapis.com/dns/v1beta2/' else 'https://dns.googleapis.com/dns/v1/' end end def resource_base_url 'projects/{{project}}/managedZones/{{managed_zone}}/rrsets?name={{name}}&type={{type}}' end end ================================================ FILE: libraries/google_dns_resource_record_sets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class DNSResourceRecordSets < GcpResourceBase name 'google_dns_resource_record_sets' desc 'ResourceRecordSet plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:types, field: :type) filter_table_config.add(:ttls, field: :ttl) filter_table_config.add(:targets, field: :target) filter_table_config.add(:managed_zones, field: :managed_zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('rrsets') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'type' => ->(obj) { [:type, obj['type']] }, 'ttl' => ->(obj) { [:ttl, obj['ttl']] }, 'rrdatas' => ->(obj) { [:target, obj['rrdatas']] }, 'managed_zone' => ->(obj) { [:managed_zone, obj['managed_zone']] }, } end private def product_url(beta = false) if beta 'https://dns.googleapis.com/dns/v1beta2/' else 'https://dns.googleapis.com/dns/v1/' end end def resource_base_url 'projects/{{project}}/managedZones/{{managed_zone}}/rrsets' end end ================================================ FILE: libraries/google_filestore_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/filestore/property/instance_file_shares' require 'google/filestore/property/instance_networks' # A provider to manage Filestore resources. class FilestoreInstance < GcpResourceBase name 'google_filestore_instance' desc 'Instance' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :create_time attr_reader :tier attr_reader :labels attr_reader :file_shares attr_reader :networks attr_reader :etag attr_reader :zone def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @create_time = parse_time_string(@fetched['createTime']) @tier = @fetched['tier'] @labels = @fetched['labels'] @file_shares = GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(@fetched['fileShares'], to_s) @networks = GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(@fetched['networks'], to_s) @etag = @fetched['etag'] @zone = @fetched['zone'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Instance #{@params[:name]}" end private def product_url(beta = false) if beta 'https://file.googleapis.com/v1beta1/' else 'https://file.googleapis.com/v1/' end end def resource_base_url 'projects/{{project}}/locations/{{zone}}/instances/{{name}}' end end ================================================ FILE: libraries/google_filestore_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class FilestoreInstances < GcpResourceBase name 'google_filestore_instances' desc 'Instance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:tiers, field: :tier) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:file_shares, field: :file_shares) filter_table_config.add(:networks, field: :networks) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:zones, field: :zone) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('instances') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'tier' => ->(obj) { [:tier, obj['tier']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'fileShares' => ->(obj) { [:file_shares, GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(obj['fileShares'], to_s)] }, 'networks' => ->(obj) { [:networks, GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(obj['networks'], to_s)] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'zone' => ->(obj) { [:zone, obj['zone']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://file.googleapis.com/v1beta1/' else 'https://file.googleapis.com/v1/' end end def resource_base_url 'projects/{{project}}/locations/{{zone}}/instances' end end ================================================ FILE: libraries/google_iam_organization_custom_role.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud IAM resources. class IAMOrganizationCustomRole < GcpResourceBase name 'google_iam_organization_custom_role' desc 'OrganizationCustomRole' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :title attr_reader :description attr_reader :included_permissions attr_reader :stage attr_reader :deleted def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @title = @fetched['title'] @description = @fetched['description'] @included_permissions = @fetched['includedPermissions'] @stage = @fetched['stage'] @deleted = @fetched['deleted'] end def exists? !@fetched.nil? end def to_s "OrganizationCustomRole #{@params[:name]}" end private def product_url(_ = nil) 'https://iam.googleapis.com/v1/' end def resource_base_url 'organizations/{{org_id}}/roles/{{name}}' end end ================================================ FILE: libraries/google_iam_organization_custom_roles.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class IAMOrganizationCustomRoles < GcpResourceBase name 'google_iam_organization_custom_roles' desc 'OrganizationCustomRole plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:titles, field: :title) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:included_permissions, field: :included_permissions) filter_table_config.add(:stages, field: :stage) filter_table_config.add(:deleteds, field: :deleted) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('roles') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'title' => ->(obj) { [:title, obj['title']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'includedPermissions' => ->(obj) { [:included_permissions, obj['includedPermissions']] }, 'stage' => ->(obj) { [:stage, obj['stage']] }, 'deleted' => ->(obj) { [:deleted, obj['deleted']] }, } end private def product_url(_ = nil) 'https://iam.googleapis.com/v1/' end def resource_base_url 'organizations/{{org_id}}/roles?view=FULL' end end ================================================ FILE: libraries/google_kms_crypto_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/kms/property/cryptokey_version_template' # A provider to manage Cloud Key Management Service resources. class KMSCryptoKey < GcpResourceBase name 'google_kms_crypto_key' desc 'CryptoKey' supports platform: 'gcp' attr_reader :params attr_reader :crypto_key_name attr_reader :create_time attr_reader :labels attr_reader :purpose attr_reader :rotation_period attr_reader :version_template attr_reader :next_rotation_time attr_reader :key_ring attr_reader :skip_initial_version_creation def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @crypto_key_name = name_from_self_link(@fetched['name']) @create_time = parse_time_string(@fetched['createTime']) @labels = @fetched['labels'] @purpose = @fetched['purpose'] @rotation_period = @fetched['rotationPeriod'] @version_template = GoogleInSpec::KMS::Property::CryptoKeyVersionTemplate.new(@fetched['versionTemplate'], to_s) @next_rotation_time = parse_time_string(@fetched['nextRotationTime']) @key_ring = @fetched['keyRing'] @skip_initial_version_creation = @fetched['skipInitialVersionCreation'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "CryptoKey #{@params[:name]}" end def primary_state return if @fetched.nil? || @fetched.empty? @fetched.dig('primary', 'state') end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys/{{name}}' end end ================================================ FILE: libraries/google_kms_crypto_key_iam_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Key Management Service IAM Binding resources. class CryptoKeyIamBinding < GcpResourceBase name 'google_kms_crypto_key_iam_binding' desc 'CryptoKey Iam Binding' supports platform: 'gcp' attr_reader :params attr_reader :condition def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] # Control defines a condition, match via this condition condition = params[:condition] if condition[:title] && condition[:title] != binding&.condition&.title next end if condition[:description] && condition[:description] != binding&.condition&.description next end if condition[:expression] && condition[:expression] != binding&.condition&.expression next end else # No condition defined in controls, skip any binding with a condition next unless binding.condition.title.nil? && binding.condition.description.nil? && binding.condition.expression.nil? end @members_list = binding.members @condition = binding.condition @iam_binding_exists = true end end def exists? @iam_binding_exists end def members @members_list end def to_s "CryptoKey IamBinding #{@params[:crypto_key_name]} Role: #{@params[:role]}" end private def product_url 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys/{{crypto_key_name}}:getIamPolicy' end end ================================================ FILE: libraries/google_kms_crypto_key_iam_bindings.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleKMSCryptoKeyIAMBindings < GcpResourceBase name 'google_kms_crypto_key_iam_bindings' desc 'Verifies settings for GCP KMS Crypto Key IAM Bindings in bulk' example " describe google_kms_key_ring_iam_bindings(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @crypto_key_url = opts[:crypto_key_url] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:iam_binding_roles, field: :iam_binding_role) filter_table_config.connect(self, :fetch_data) def fetch_data iam_binding_rows = [] catch_gcp_errors do @iam_bindings = @gcp.gcp_client(Google::Apis::CloudkmsV1::CloudKMSService).get_project_location_key_ring_crypto_key_iam_policy(@crypto_key_url) end return [] if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.map do |iam_binding| iam_binding_rows+=[{ iam_binding_role: iam_binding.role }] end @table = iam_binding_rows end end end ================================================ FILE: libraries/google_kms_crypto_key_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Key Management Service IAM Policy resources. class CryptoKeyIamPolicy < GcpResourceBase name 'google_kms_crypto_key_iam_policy' desc 'CryptoKey Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "CryptoKey IamPolicy #{@params[:crypto_key_name]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys/{{crypto_key_name}}:getIamPolicy' end end ================================================ FILE: libraries/google_kms_crypto_key_version.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/kms/property/cryptokeyversion_attestation' require 'google/kms/property/cryptokeyversion_external_protection_level_options' # A provider to manage Cloud Key Management Service resources. class KMSCryptoKeyVersion < GcpResourceBase name 'google_kms_crypto_key_version' desc 'CryptoKeyVersion' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :create_time attr_reader :generate_time attr_reader :destroy_time attr_reader :destroy_event_time attr_reader :state attr_reader :protection_level attr_reader :algorithm attr_reader :attestation attr_reader :import_job attr_reader :import_time attr_reader :import_failure_reason attr_reader :external_protection_level_options attr_reader :reimport_eligible attr_reader :key_ring attr_reader :crypto_key def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @create_time = parse_time_string(@fetched['createTime']) @generate_time = parse_time_string(@fetched['generateTime']) @destroy_time = parse_time_string(@fetched['destroyTime']) @destroy_event_time = parse_time_string(@fetched['destroyEventTime']) @state = @fetched['state'] @protection_level = @fetched['protectionLevel'] @algorithm = @fetched['algorithm'] @attestation = GoogleInSpec::KMS::Property::CryptoKeyVersionAttestation.new(@fetched['attestation'], to_s) @import_job = @fetched['importJob'] @import_time = parse_time_string(@fetched['importTime']) @import_failure_reason = @fetched['importFailureReason'] @external_protection_level_options = GoogleInSpec::KMS::Property::CryptoKeyVersionExternalProtectionLevelOptions.new(@fetched['externalProtectionLevelOptions'], to_s) @reimport_eligible = @fetched['reimportEligible'] @key_ring = @fetched['keyRing'] @crypto_key = @fetched['cryptoKey'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "CryptoKeyVersion #{@params[:name]}" end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring}}/cryptoKeys/{{crypto_key}}/cryptoKeyVersions/{{name}}' end end ================================================ FILE: libraries/google_kms_crypto_key_versions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class KMSCryptoKeyVersions < GcpResourceBase name 'google_kms_crypto_key_versions' desc 'CryptoKeyVersion plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:generate_times, field: :generate_time) filter_table_config.add(:destroy_times, field: :destroy_time) filter_table_config.add(:destroy_event_times, field: :destroy_event_time) filter_table_config.add(:states, field: :state) filter_table_config.add(:protection_levels, field: :protection_level) filter_table_config.add(:algorithms, field: :algorithm) filter_table_config.add(:attestations, field: :attestation) filter_table_config.add(:import_jobs, field: :import_job) filter_table_config.add(:import_times, field: :import_time) filter_table_config.add(:import_failure_reasons, field: :import_failure_reason) filter_table_config.add(:external_protection_level_options, field: :external_protection_level_options) filter_table_config.add(:reimport_eligibles, field: :reimport_eligible) filter_table_config.add(:key_rings, field: :key_ring) filter_table_config.add(:crypto_keys, field: :crypto_key) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('cryptoKeyVersions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'generateTime' => ->(obj) { [:generate_time, parse_time_string(obj['generateTime'])] }, 'destroyTime' => ->(obj) { [:destroy_time, parse_time_string(obj['destroyTime'])] }, 'destroyEventTime' => ->(obj) { [:destroy_event_time, parse_time_string(obj['destroyEventTime'])] }, 'state' => ->(obj) { [:state, obj['state']] }, 'protectionLevel' => ->(obj) { [:protection_level, obj['protectionLevel']] }, 'algorithm' => ->(obj) { [:algorithm, obj['algorithm']] }, 'attestation' => ->(obj) { [:attestation, GoogleInSpec::KMS::Property::CryptoKeyVersionAttestation.new(obj['attestation'], to_s)] }, 'importJob' => ->(obj) { [:import_job, obj['importJob']] }, 'importTime' => ->(obj) { [:import_time, parse_time_string(obj['importTime'])] }, 'importFailureReason' => ->(obj) { [:import_failure_reason, obj['importFailureReason']] }, 'externalProtectionLevelOptions' => ->(obj) { [:external_protection_level_options, GoogleInSpec::KMS::Property::CryptoKeyVersionExternalProtectionLevelOptions.new(obj['externalProtectionLevelOptions'], to_s)] }, 'reimportEligible' => ->(obj) { [:reimport_eligible, obj['reimportEligible']] }, 'keyRing' => ->(obj) { [:key_ring, obj['keyRing']] }, 'cryptoKey' => ->(obj) { [:crypto_key, obj['cryptoKey']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring}}/cryptoKeys/{{crypto_key}}/cryptoKeyVersions' end end ================================================ FILE: libraries/google_kms_crypto_keys.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class KMSCryptoKeys < GcpResourceBase name 'google_kms_crypto_keys' desc 'CryptoKey plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:crypto_key_names, field: :crypto_key_name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:purposes, field: :purpose) filter_table_config.add(:rotation_periods, field: :rotation_period) filter_table_config.add(:version_templates, field: :version_template) filter_table_config.add(:next_rotation_times, field: :next_rotation_time) filter_table_config.add(:key_rings, field: :key_ring) filter_table_config.add(:skip_initial_version_creations, field: :skip_initial_version_creation) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('cryptoKeys') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:crypto_key_name, name_from_self_link(obj['name'])] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'purpose' => ->(obj) { [:purpose, obj['purpose']] }, 'rotationPeriod' => ->(obj) { [:rotation_period, obj['rotationPeriod']] }, 'versionTemplate' => ->(obj) { [:version_template, GoogleInSpec::KMS::Property::CryptoKeyVersionTemplate.new(obj['versionTemplate'], to_s)] }, 'nextRotationTime' => ->(obj) { [:next_rotation_time, parse_time_string(obj['nextRotationTime'])] }, 'keyRing' => ->(obj) { [:key_ring, obj['keyRing']] }, 'skipInitialVersionCreation' => ->(obj) { [:skip_initial_version_creation, obj['skipInitialVersionCreation']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys' end end ================================================ FILE: libraries/google_kms_ekm_connection.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/kms/property/ekmconnection_service_resolvers' require 'google/kms/property/ekmconnection_service_resolvers_server_certificates' # A provider to manage Cloud Key Management Service resources. class KMSEkmConnection < GcpResourceBase name 'google_kms_ekm_connection' desc 'EkmConnection' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :create_time attr_reader :service_resolvers attr_reader :location def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @create_time = parse_time_string(@fetched['createTime']) @service_resolvers = GoogleInSpec::KMS::Property::EkmConnectionServiceResolvers.new(@fetched['serviceResolvers'], to_s) @location = @fetched['location'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "EkmConnection #{@params[:name]}" end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/ekmConnections/{{name}}' end end ================================================ FILE: libraries/google_kms_ekm_connections.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class KMSEkmConnections < GcpResourceBase name 'google_kms_ekm_connections' desc 'EkmConnection plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:service_resolvers, field: :service_resolvers) filter_table_config.add(:locations, field: :location) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('ekmConnections') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'serviceResolvers' => ->(obj) { [:service_resolvers, GoogleInSpec::KMS::Property::EkmConnectionServiceResolvers.new(obj['serviceResolvers'], to_s)] }, 'location' => ->(obj) { [:location, obj['location']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/ekmConnections' end end ================================================ FILE: libraries/google_kms_key_ring.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud Key Management Service resources. class KMSKeyRing < GcpResourceBase name 'google_kms_key_ring' desc 'KeyRing' supports platform: 'gcp' attr_reader :params attr_reader :create_time attr_reader :key_ring_url attr_reader :location def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @create_time = parse_time_string(@fetched['createTime']) @key_ring_url = @fetched['name'] @location = @fetched['location'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "KeyRing #{@params[:name]}" end def key_ring_name name_from_self_link(@key_ring_url) end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/keyRings/{{name}}' end end ================================================ FILE: libraries/google_kms_key_ring_iam_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Key Management Service IAM Binding resources. class KeyRingIamBinding < GcpResourceBase name 'google_kms_key_ring_iam_binding' desc 'KeyRing Iam Binding' supports platform: 'gcp' attr_reader :params attr_reader :condition def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] # Control defines a condition, match via this condition condition = params[:condition] if condition[:title] && condition[:title] != binding&.condition&.title next end if condition[:description] && condition[:description] != binding&.condition&.description next end if condition[:expression] && condition[:expression] != binding&.condition&.expression next end else # No condition defined in controls, skip any binding with a condition next unless binding.condition.title.nil? && binding.condition.description.nil? && binding.condition.expression.nil? end @members_list = binding.members @condition = binding.condition @iam_binding_exists = true end end def exists? @iam_binding_exists end def members @members_list end def to_s "KeyRing IamBinding #{@params[:key_ring_name]} Role: #{@params[:role]}" end private def product_url 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}:getIamPolicy' end end ================================================ FILE: libraries/google_kms_key_ring_iam_bindings.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'time' require 'google/apis/cloudkms_v1' module Inspec::Resources class GoogleKMSKeyRingIAMBindings < GcpResourceBase name 'google_kms_key_ring_iam_bindings' desc 'Verifies settings for GCP KMS key ring IAM bindings in bulk' example " describe google_kms_key_ring_iam_bindings(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @key_ring_url = opts[:key_ring_url] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:iam_binding_roles, field: :iam_binding_role) filter_table_config.connect(self, :fetch_data) def fetch_data iam_binding_rows = [] catch_gcp_errors do @iam_bindings = @gcp.gcp_client(Google::Apis::CloudkmsV1::CloudKMSService).get_project_location_key_ring_iam_policy(@key_ring_url) end return [] if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.map do |iam_binding| iam_binding_rows+=[{ iam_binding_role: iam_binding.role }] end @table = iam_binding_rows end end end ================================================ FILE: libraries/google_kms_key_ring_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Key Management Service IAM Policy resources. class KeyRingIamPolicy < GcpResourceBase name 'google_kms_key_ring_iam_policy' desc 'KeyRing Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "KeyRing IamPolicy #{@params[:key_ring_name]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}:getIamPolicy' end end ================================================ FILE: libraries/google_kms_key_ring_import_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/kms/property/keyringimportjob_attestation' require 'google/kms/property/keyringimportjob_public_key' # A provider to manage Cloud Key Management Service resources. class KMSKeyRingImportJob < GcpResourceBase name 'google_kms_key_ring_import_job' desc 'KeyRingImportJob' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :import_method attr_reader :protection_level attr_reader :create_time attr_reader :generate_time attr_reader :expire_time attr_reader :expire_event_time attr_reader :state attr_reader :public_key attr_reader :attestation attr_reader :key_ring attr_reader :import_job_id def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @import_method = @fetched['importMethod'] @protection_level = @fetched['protectionLevel'] @create_time = parse_time_string(@fetched['createTime']) @generate_time = parse_time_string(@fetched['generateTime']) @expire_time = parse_time_string(@fetched['expireTime']) @expire_event_time = parse_time_string(@fetched['expireEventTime']) @state = @fetched['state'] @public_key = GoogleInSpec::KMS::Property::KeyRingImportJobPublicKey.new(@fetched['publicKey'], to_s) @attestation = GoogleInSpec::KMS::Property::KeyRingImportJobAttestation.new(@fetched['attestation'], to_s) @key_ring = @fetched['keyRing'] @import_job_id = @fetched['importJobId'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "KeyRingImportJob #{@params[:name]}" end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_kms_key_ring_import_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class KMSKeyRingImportJobs < GcpResourceBase name 'google_kms_key_ring_import_jobs' desc 'KeyRingImportJob plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:import_methods, field: :import_method) filter_table_config.add(:protection_levels, field: :protection_level) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:generate_times, field: :generate_time) filter_table_config.add(:expire_times, field: :expire_time) filter_table_config.add(:expire_event_times, field: :expire_event_time) filter_table_config.add(:states, field: :state) filter_table_config.add(:public_keys, field: :public_key) filter_table_config.add(:attestations, field: :attestation) filter_table_config.add(:key_rings, field: :key_ring) filter_table_config.add(:import_job_ids, field: :import_job_id) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('keyRingImportJobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'importMethod' => ->(obj) { [:import_method, obj['importMethod']] }, 'protectionLevel' => ->(obj) { [:protection_level, obj['protectionLevel']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'generateTime' => ->(obj) { [:generate_time, parse_time_string(obj['generateTime'])] }, 'expireTime' => ->(obj) { [:expire_time, parse_time_string(obj['expireTime'])] }, 'expireEventTime' => ->(obj) { [:expire_event_time, parse_time_string(obj['expireEventTime'])] }, 'state' => ->(obj) { [:state, obj['state']] }, 'publicKey' => ->(obj) { [:public_key, GoogleInSpec::KMS::Property::KeyRingImportJobPublicKey.new(obj['publicKey'], to_s)] }, 'attestation' => ->(obj) { [:attestation, GoogleInSpec::KMS::Property::KeyRingImportJobAttestation.new(obj['attestation'], to_s)] }, 'keyRing' => ->(obj) { [:key_ring, obj['keyRing']] }, 'importJobId' => ->(obj) { [:import_job_id, obj['importJobId']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url '{{key_ring}}/importJobs' end end ================================================ FILE: libraries/google_kms_key_rings.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class KMSKeyRings < GcpResourceBase name 'google_kms_key_rings' desc 'KeyRing plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:key_ring_urls, field: :key_ring_url) filter_table_config.add(:locations, field: :location) filter_table_config.add(:key_ring_names, field: :key_ring_name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('keyRings') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end hash_with_symbols[:key_ring_name] = name_from_self_link(hash['name']) converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'name' => ->(obj) { [:key_ring_url, obj['name']] }, 'location' => ->(obj) { [:location, obj['location']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{location}}/keyRings' end end ================================================ FILE: libraries/google_kms_location.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud Key Management Service resources. class KMSLocation < GcpResourceBase name 'google_kms_location' desc 'Location' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :location_id attr_reader :display_name attr_reader :location def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @location_id = @fetched['locationId'] @display_name = @fetched['displayName'] @location = @fetched['location'] end def exists? !@fetched.nil? end def to_s "Location #{@params[:name]}" end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations/{{name}}' end end ================================================ FILE: libraries/google_kms_locations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class KMSLocations < GcpResourceBase name 'google_kms_locations' desc 'Location plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:location_ids, field: :location_id) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:locations, field: :location) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('locations') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'locationId' => ->(obj) { [:location_id, obj['locationId']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'location' => ->(obj) { [:location, obj['location']] }, } end private def product_url(_ = nil) 'https://cloudkms.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/locations' end end ================================================ FILE: libraries/google_logging_folder_exclusion.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingFolderExclusion < GcpResourceBase name 'google_logging_folder_exclusion' desc 'FolderExclusion' supports platform: 'gcp' attr_reader :params attr_reader :folder attr_reader :name attr_reader :description attr_reader :filter attr_reader :disabled def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @folder = @fetched['folder'] @name = @fetched['name'] @description = @fetched['description'] @filter = @fetched['filter'] @disabled = @fetched['disabled'] end def exists? !@fetched.nil? end def to_s "FolderExclusion #{@params[:name]}" end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'folders/{{folder}}/exclusions/{{name}}' end end ================================================ FILE: libraries/google_logging_folder_exclusions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class LoggingFolderExclusions < GcpResourceBase name 'google_logging_folder_exclusions' desc 'FolderExclusion plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:folders, field: :folder) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:disableds, field: :disabled) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('exclusions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'folder' => ->(obj) { [:folder, obj['folder']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'filter' => ->(obj) { [:filter, obj['filter']] }, 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, } end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'folders/{{folder}}/exclusions' end end ================================================ FILE: libraries/google_logging_folder_log_sink.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingFolderLogSink < GcpResourceBase name 'google_logging_folder_log_sink' desc 'FolderLogSink' supports platform: 'gcp' attr_reader :params attr_reader :folder attr_reader :name attr_reader :filter attr_reader :destination attr_reader :writer_identity attr_reader :include_children def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @folder = @fetched['folder'] @name = @fetched['name'] @filter = @fetched['filter'] @destination = @fetched['destination'] @writer_identity = @fetched['writerIdentity'] @include_children = @fetched['includeChildren'] end def exists? !@fetched.nil? end def to_s "FolderLogSink #{@params[:name]}" end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'folders/{{folder}}/sinks/{{name}}' end end ================================================ FILE: libraries/google_logging_folder_log_sinks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class LoggingFolderLogSinks < GcpResourceBase name 'google_logging_folder_log_sinks' desc 'FolderLogSink plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:folders, field: :folder) filter_table_config.add(:names, field: :name) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:destinations, field: :destination) filter_table_config.add(:writer_identities, field: :writer_identity) filter_table_config.add(:include_children, field: :include_children) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('sinks') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'folder' => ->(obj) { [:folder, obj['folder']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'filter' => ->(obj) { [:filter, obj['filter']] }, 'destination' => ->(obj) { [:destination, obj['destination']] }, 'writerIdentity' => ->(obj) { [:writer_identity, obj['writerIdentity']] }, 'includeChildren' => ->(obj) { [:include_children, obj['includeChildren']] }, } end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'folders/{{folder}}/sinks' end end ================================================ FILE: libraries/google_logging_organization_log_sink.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingOrganizationLogSink < GcpResourceBase name 'google_logging_organization_log_sink' desc 'OrganizationLogSink' supports platform: 'gcp' attr_reader :params attr_reader :organization attr_reader :name attr_reader :filter attr_reader :destination attr_reader :writer_identity attr_reader :include_children def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @organization = @fetched['organization'] @name = @fetched['name'] @filter = @fetched['filter'] @destination = @fetched['destination'] @writer_identity = @fetched['writerIdentity'] @include_children = @fetched['includeChildren'] end def exists? !@fetched.nil? end def to_s "OrganizationLogSink #{@params[:name]}" end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'organizations/{{organization}}/sinks/{{name}}' end end ================================================ FILE: libraries/google_logging_organization_log_sinks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class LoggingOrganizationLogSinks < GcpResourceBase name 'google_logging_organization_log_sinks' desc 'OrganizationLogSink plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:organizations, field: :organization) filter_table_config.add(:names, field: :name) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:destinations, field: :destination) filter_table_config.add(:writer_identities, field: :writer_identity) filter_table_config.add(:include_children, field: :include_children) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('sinks') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'organization' => ->(obj) { [:organization, obj['organization']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'filter' => ->(obj) { [:filter, obj['filter']] }, 'destination' => ->(obj) { [:destination, obj['destination']] }, 'writerIdentity' => ->(obj) { [:writer_identity, obj['writerIdentity']] }, 'includeChildren' => ->(obj) { [:include_children, obj['includeChildren']] }, } end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'organizations/{{organization}}/sinks' end end ================================================ FILE: libraries/google_logging_project_exclusion.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingProjectExclusion < GcpResourceBase name 'google_logging_project_exclusion' desc 'ProjectExclusion' supports platform: 'gcp' attr_reader :params attr_reader :project attr_reader :name attr_reader :description attr_reader :filter attr_reader :disabled def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @project = @fetched['project'] @name = @fetched['name'] @description = @fetched['description'] @filter = @fetched['filter'] @disabled = @fetched['disabled'] end def exists? !@fetched.nil? end def to_s "ProjectExclusion #{@params[:name]}" end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'projects/{{project}}/exclusions/{{name}}' end end ================================================ FILE: libraries/google_logging_project_exclusions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class LoggingProjectExclusions < GcpResourceBase name 'google_logging_project_exclusions' desc 'ProjectExclusion plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:projects, field: :project) filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:disableds, field: :disabled) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('exclusions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'project' => ->(obj) { [:project, obj['project']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'filter' => ->(obj) { [:filter, obj['filter']] }, 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, } end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'projects/{{project}}/exclusions' end end ================================================ FILE: libraries/google_logging_project_sink.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingProjectSink < GcpResourceBase name 'google_logging_project_sink' desc 'ProjectSink' supports platform: 'gcp' attr_reader :params attr_reader :project attr_reader :name attr_reader :filter attr_reader :destination attr_reader :writer_identity attr_reader :include_children def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @project = @fetched['project'] @name = @fetched['name'] @filter = @fetched['filter'] @destination = @fetched['destination'] @writer_identity = @fetched['writerIdentity'] @include_children = @fetched['includeChildren'] end def exists? !@fetched.nil? end def to_s "ProjectSink #{@params[:name]}" end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'projects/{{project}}/sinks/{{name}}' end end ================================================ FILE: libraries/google_logging_project_sinks.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class LoggingProjectSinks < GcpResourceBase name 'google_logging_project_sinks' desc 'ProjectSink plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:projects, field: :project) filter_table_config.add(:names, field: :name) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:destinations, field: :destination) filter_table_config.add(:writer_identities, field: :writer_identity) filter_table_config.add(:include_children, field: :include_children) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('sinks') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'project' => ->(obj) { [:project, obj['project']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'filter' => ->(obj) { [:filter, obj['filter']] }, 'destination' => ->(obj) { [:destination, obj['destination']] }, 'writerIdentity' => ->(obj) { [:writer_identity, obj['writerIdentity']] }, 'includeChildren' => ->(obj) { [:include_children, obj['includeChildren']] }, } end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'projects/{{project}}/sinks' end end ================================================ FILE: libraries/google_memcache_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/memcache/property/instance_memcache_nodes' require 'google/memcache/property/instance_node_config' require 'google/memcache/property/instance_parameters' # A provider to manage Memcache resources. class MemcacheInstance < GcpResourceBase name 'google_memcache_instance' desc 'Instance' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :display_name attr_reader :memcache_nodes attr_reader :create_time attr_reader :discovery_endpoint attr_reader :labels attr_reader :memcache_full_version attr_reader :zones attr_reader :authorized_network attr_reader :node_count attr_reader :memcache_version attr_reader :node_config attr_reader :parameters attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @display_name = @fetched['displayName'] @memcache_nodes = GoogleInSpec::Memcache::Property::InstanceMemcacheNodesArray.parse(@fetched['memcacheNodes'], to_s) @create_time = parse_time_string(@fetched['createTime']) @discovery_endpoint = @fetched['discoveryEndpoint'] @labels = @fetched['labels'] @memcache_full_version = @fetched['memcacheFullVersion'] @zones = @fetched['zones'] @authorized_network = @fetched['authorizedNetwork'] @node_count = @fetched['nodeCount'] @memcache_version = @fetched['memcacheVersion'] @node_config = GoogleInSpec::Memcache::Property::InstanceNodeConfig.new(@fetched['nodeConfig'], to_s) @parameters = GoogleInSpec::Memcache::Property::InstanceParameters.new(@fetched['parameters'], to_s) @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Instance #{@params[:name]}" end private def product_url(_ = nil) 'https://memcache.googleapis.com/v1beta2/' end def resource_base_url 'projects/{{project}}/locations/{{region}}/instances/{{name}}' end end ================================================ FILE: libraries/google_memcache_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class MemcacheInstances < GcpResourceBase name 'google_memcache_instances' desc 'Instance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:memcache_nodes, field: :memcache_nodes) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:discovery_endpoints, field: :discovery_endpoint) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:memcache_full_versions, field: :memcache_full_version) filter_table_config.add(:zones, field: :zones) filter_table_config.add(:authorized_networks, field: :authorized_network) filter_table_config.add(:node_counts, field: :node_count) filter_table_config.add(:memcache_versions, field: :memcache_version) filter_table_config.add(:node_configs, field: :node_config) filter_table_config.add(:parameters, field: :parameters) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('resources') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'memcacheNodes' => ->(obj) { [:memcache_nodes, GoogleInSpec::Memcache::Property::InstanceMemcacheNodesArray.parse(obj['memcacheNodes'], to_s)] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'discoveryEndpoint' => ->(obj) { [:discovery_endpoint, obj['discoveryEndpoint']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'memcacheFullVersion' => ->(obj) { [:memcache_full_version, obj['memcacheFullVersion']] }, 'zones' => ->(obj) { [:zones, obj['zones']] }, 'authorizedNetwork' => ->(obj) { [:authorized_network, obj['authorizedNetwork']] }, 'nodeCount' => ->(obj) { [:node_count, obj['nodeCount']] }, 'memcacheVersion' => ->(obj) { [:memcache_version, obj['memcacheVersion']] }, 'nodeConfig' => ->(obj) { [:node_config, GoogleInSpec::Memcache::Property::InstanceNodeConfig.new(obj['nodeConfig'], to_s)] }, 'parameters' => ->(obj) { [:parameters, GoogleInSpec::Memcache::Property::InstanceParameters.new(obj['parameters'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://memcache.googleapis.com/v1beta2/' end def resource_base_url 'projects/{{project}}/locations/{{region}}/instances' end end ================================================ FILE: libraries/google_ml_engine_model.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/mlengine/property/model_default_version' # A provider to manage ML Engine resources. class MLEngineModel < GcpResourceBase name 'google_ml_engine_model' desc 'Model' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :default_version attr_reader :regions attr_reader :online_prediction_logging attr_reader :online_prediction_console_logging attr_reader :labels def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @default_version = GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(@fetched['defaultVersion'], to_s) @regions = @fetched['regions'] @online_prediction_logging = @fetched['onlinePredictionLogging'] @online_prediction_console_logging = @fetched['onlinePredictionConsoleLogging'] @labels = @fetched['labels'] end def exists? !@fetched.nil? end def to_s "Model #{@params[:name]}" end private def product_url(_ = nil) 'https://ml.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/models/{{name}}' end end ================================================ FILE: libraries/google_ml_engine_models.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class MLEngineModels < GcpResourceBase name 'google_ml_engine_models' desc 'Model plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:default_versions, field: :default_version) filter_table_config.add(:regions, field: :regions) filter_table_config.add(:online_prediction_loggings, field: :online_prediction_logging) filter_table_config.add(:online_prediction_console_loggings, field: :online_prediction_console_logging) filter_table_config.add(:labels, field: :labels) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('models') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'defaultVersion' => ->(obj) { [:default_version, GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(obj['defaultVersion'], to_s)] }, 'regions' => ->(obj) { [:regions, obj['regions']] }, 'onlinePredictionLogging' => ->(obj) { [:online_prediction_logging, obj['onlinePredictionLogging']] }, 'onlinePredictionConsoleLogging' => ->(obj) { [:online_prediction_console_logging, obj['onlinePredictionConsoleLogging']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, } end private def product_url(_ = nil) 'https://ml.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/models' end end ================================================ FILE: libraries/google_monitoring_group.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud (Stackdriver) Monitoring resources. class MonitoringGroup < GcpResourceBase name 'google_monitoring_group' desc 'Group' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :display_name attr_reader :parent_name attr_reader :filter attr_reader :is_cluster def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @display_name = @fetched['displayName'] @parent_name = @fetched['parentName'] @filter = @fetched['filter'] @is_cluster = @fetched['isCluster'] end def exists? !@fetched.nil? end def to_s "Group #{@params[:name]}" end private def product_url(_ = nil) 'https://monitoring.googleapis.com/v3/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_monitoring_groups.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class MonitoringGroups < GcpResourceBase name 'google_monitoring_groups' desc 'Group plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:parent_names, field: :parent_name) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:is_clusters, field: :is_cluster) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('group') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'parentName' => ->(obj) { [:parent_name, obj['parentName']] }, 'filter' => ->(obj) { [:filter, obj['filter']] }, 'isCluster' => ->(obj) { [:is_cluster, obj['isCluster']] }, } end private def product_url(_ = nil) 'https://monitoring.googleapis.com/v3/' end def resource_base_url '{{name}}/groups' end end ================================================ FILE: libraries/google_organization.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/resourcemanager/property/organization_owner' # A provider to manage Resource Manager resources. class ResourceManagerOrganization < GcpResourceBase name 'google_organization' desc 'Organization' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :display_name attr_reader :lifecycle_state attr_reader :creation_time attr_reader :owner def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @display_name = @fetched['displayName'] @lifecycle_state = @fetched['lifecycleState'] @creation_time = parse_time_string(@fetched['creationTime']) @owner = GoogleInSpec::ResourceManager::Property::OrganizationOwner.new(@fetched['owner'], to_s) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Organization #{@params[:name]}" end private def product_url(_ = nil) 'https://cloudresourcemanager.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_organization_iam_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_bindings' # A provider to manage Resource Manager IAM Binding resources. class OrganizationIamBinding < GcpResourceBase name 'google_organization_iam_binding' desc 'Organization Iam Binding' supports platform: 'gcp' attr_reader :params attr_reader :condition def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] # Control defines a condition, match via this condition condition = params[:condition] if condition[:title] && condition[:title] != binding&.condition&.title next end if condition[:description] && condition[:description] != binding&.condition&.description next end if condition[:expression] && condition[:expression] != binding&.condition&.expression next end else # No condition defined in controls, skip any binding with a condition next unless binding.condition.title.nil? && binding.condition.description.nil? && binding.condition.expression.nil? end @members_list = binding.members @condition = binding.condition @iam_binding_exists = true end end def exists? @iam_binding_exists end def members @members_list end def to_s "Organization IamBinding #{@params[:name]} Role: #{@params[:role]}" end private def product_url 'https://cloudresourcemanager.googleapis.com/v1/' end def resource_base_url '{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_organization_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Resource Manager IAM Policy resources. class OrganizationIamPolicy < GcpResourceBase name 'google_organization_iam_policy' desc 'Organization Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Organization IamPolicy #{@params[:name]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://cloudresourcemanager.googleapis.com/v1/' end def resource_base_url '{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_organization_policy.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleOrganizationPolicy < GcpResourceBase name 'google_organization_policy' desc 'Verifies configuration of an organization policy' example " describe google_organization_policy(name: 'organizations/123456', constraint: 'constraints/compute.disableGuestAttributesAccess') do it { should exist } its('boolean_policy.enforced') { should be true } end " def initialize(opts = {}) super(opts) @display_name = opts[:name] @constraint = opts[:constraint] catch_gcp_errors do org_policy_request = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest.new org_policy_request.constraint = opts[:constraint] @organization_policy = @gcp.gcp_project_client.get_organization_org_policy(opts[:name], org_policy_request) create_resource_methods(@organization_policy) end end def exists? !@organization_policy.nil? end def to_s "Organization #{@display_name} policy for constraint #{@constraint}" end end end ================================================ FILE: libraries/google_organizations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ResourceManagerOrganizations < GcpResourceBase name 'google_organizations' desc 'Organization plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:lifecycle_states, field: :lifecycle_state) filter_table_config.add(:creation_times, field: :creation_time) filter_table_config.add(:owners, field: :owner) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('organizations') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Post') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'lifecycleState' => ->(obj) { [:lifecycle_state, obj['lifecycleState']] }, 'creationTime' => ->(obj) { [:creation_time, parse_time_string(obj['creationTime'])] }, 'owner' => ->(obj) { [:owner, GoogleInSpec::ResourceManager::Property::OrganizationOwner.new(obj['owner'], to_s)] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://cloudresourcemanager.googleapis.com/v1/' end def resource_base_url 'organizations:search' end end ================================================ FILE: libraries/google_orgpolicy_folder_constraints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/orgpolicy/property/list_constraint' class OrgpolicyFolderConstraints < GcpResourceBase name 'google_orgpolicy_folder_constraints' desc 'FolderConstraint plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:display_names, field: :displayName) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:constraint_defaults, field: :constraintDefault) filter_table_config.add(:list_constraints, field: :listConstraint) filter_table_config.add(:supports_dry_runs, field: :supportsDryRun) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('constraints') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'displayName' => ->(obj) { [:displayName, obj['displayName']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'constraintDefault' => ->(obj) { [:constraintDefault, obj['constraintDefault']] }, 'supportsDryRun' => ->(obj) { [:supportsDryRun, obj['supportsDryRun']] }, 'listConstraint' => ->(obj) { [:listConstraint, GoogleInSpec::Orgpolicy::Property::ListConstraint.new(obj['listConstraint'], to_s)] }, } end private def product_url(_ = nil) 'https://orgpolicy.googleapis.com/v2/' end def resource_base_url '{{parent}}/constraints' end end ================================================ FILE: libraries/google_orgpolicy_folder_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class OrgpolicyFolderPolicys < GcpResourceBase name 'google_orgpolicy_folder_policies' desc 'FolderPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:dry_run_specs, field: :dry_run_spec) filter_table_config.add(:specs, field: :spec) filter_table_config.add(:names, field: :name) filter_table_config.add(:alternates, field: :alternate) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('policies') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'dryRunSpec' => ->(obj) { [:dry_run_spec, GoogleInSpec::Orgpolicy::Property::PolicyDryRunSpec.new(obj['dryRunSpec'], to_s)] }, 'spec' => ->(obj) { [:spec, GoogleInSpec::Orgpolicy::Property::PolicySpec.new(obj['spec'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'alternate' => ->(obj) { [:alternate, GoogleInSpec::Orgpolicy::Property::PolicyAlternate.new(obj['alternate'], to_s)] }, } end private def product_url(_ = nil) 'https://orgpolicy.googleapis.com/v2/' end def resource_base_url '{{parent}}/policies' end end ================================================ FILE: libraries/google_orgpolicy_folder_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/orgpolicy/property/policy_alternate' require 'google/orgpolicy/property/policy_alternate_spec' require 'google/orgpolicy/property/policy_alternate_spec_rules' require 'google/orgpolicy/property/policy_dry_run_spec' require 'google/orgpolicy/property/policy_dry_run_spec_rules' require 'google/orgpolicy/property/policy_spec' require 'google/orgpolicy/property/policy_spec_rules' # A provider to manage orgpolicy resources. class OrgpolicyFolderPolicy < GcpResourceBase name 'google_orgpolicy_folder_policy' desc 'FolderPolicy' supports platform: 'gcp' attr_reader :params attr_reader :dry_run_spec attr_reader :spec attr_reader :name attr_reader :alternate def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @dry_run_spec = GoogleInSpec::Orgpolicy::Property::PolicyDryRunSpec.new(@fetched['dryRunSpec'], to_s) @spec = GoogleInSpec::Orgpolicy::Property::PolicySpec.new(@fetched['spec'], to_s) @name = @fetched['name'] @alternate = GoogleInSpec::Orgpolicy::Property::PolicyAlternate.new(@fetched['alternate'], to_s) end def exists? !@fetched.nil? end def to_s "FolderPolicy #{@params[:name]}" end private def product_url(_ = nil) 'https://orgpolicy.googleapis.com/v2/' end def resource_base_url '{{parent}}/policies/{{name}}' end end ================================================ FILE: libraries/google_orgpolicy_organization_constraints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/orgpolicy/property/list_constraint' class OrgpolicyOrganizationConstraints < GcpResourceBase name 'google_orgpolicy_organization_constraints' desc 'OrganizationConstraint plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:display_names, field: :displayName) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:constraint_defaults, field: :constraintDefault) filter_table_config.add(:list_constraints, field: :listConstraint) filter_table_config.add(:supports_dry_runs, field: :supportsDryRun) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('constraints') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'displayName' => ->(obj) { [:displayName, obj['displayName']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'constraintDefault' => ->(obj) { [:constraintDefault, obj['constraintDefault']] }, 'supportsDryRun' => ->(obj) { [:supportsDryRun, obj['supportsDryRun']] }, 'listConstraint' => ->(obj) { [:listConstraint, GoogleInSpec::Orgpolicy::Property::ListConstraint.new(obj['listConstraint'], to_s)] }, } end private def product_url(_ = nil) 'https://orgpolicy.googleapis.com/v2/' end def resource_base_url '{{parent}}/constraints' end end ================================================ FILE: libraries/google_orgpolicy_organization_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class OrgpolicyOrganizationPolicys < GcpResourceBase name 'google_orgpolicy_organization_policies' desc 'OrganizationPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:dry_run_specs, field: :dry_run_spec) filter_table_config.add(:specs, field: :spec) filter_table_config.add(:names, field: :name) filter_table_config.add(:alternates, field: :alternate) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('policies') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'dryRunSpec' => ->(obj) { [:dry_run_spec, GoogleInSpec::Orgpolicy::Property::PolicyDryRunSpec.new(obj['dryRunSpec'], to_s)] }, 'spec' => ->(obj) { [:spec, GoogleInSpec::Orgpolicy::Property::PolicySpec.new(obj['spec'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'alternate' => ->(obj) { [:alternate, GoogleInSpec::Orgpolicy::Property::PolicyAlternate.new(obj['alternate'], to_s)] }, } end private def product_url(_ = nil) 'https://orgpolicy.googleapis.com/v2/' end def resource_base_url '{{parent}}/policies' end end ================================================ FILE: libraries/google_orgpolicy_organization_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/orgpolicy/property/policy_alternate' require 'google/orgpolicy/property/policy_alternate_spec' require 'google/orgpolicy/property/policy_alternate_spec_rules' require 'google/orgpolicy/property/policy_dry_run_spec' require 'google/orgpolicy/property/policy_dry_run_spec_rules' require 'google/orgpolicy/property/policy_spec' require 'google/orgpolicy/property/policy_spec_rules' # A provider to manage orgpolicy resources. class OrgpolicyOrganizationPolicy < GcpResourceBase name 'google_orgpolicy_organization_policy' desc 'OrganizationPolicy' supports platform: 'gcp' attr_reader :params attr_reader :dry_run_spec attr_reader :spec attr_reader :name attr_reader :alternate def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @dry_run_spec = GoogleInSpec::Orgpolicy::Property::PolicyDryRunSpec.new(@fetched['dryRunSpec'], to_s) @spec = GoogleInSpec::Orgpolicy::Property::PolicySpec.new(@fetched['spec'], to_s) @name = @fetched['name'] @alternate = GoogleInSpec::Orgpolicy::Property::PolicyAlternate.new(@fetched['alternate'], to_s) end def exists? !@fetched.nil? end def to_s "OrganizationPolicy #{@params[:name]}" end private def product_url(_ = nil) 'https://orgpolicy.googleapis.com/v2/' end def resource_base_url '{{parent}}/policies/{{name}}' end end ================================================ FILE: libraries/google_orgpolicy_project_constraints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/orgpolicy/property/list_constraint' class OrgpolicyProjectConstraints < GcpResourceBase name 'google_orgpolicy_project_constraints' desc 'ProjectConstraint plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:display_names, field: :displayName) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:constraint_defaults, field: :constraintDefault) filter_table_config.add(:list_constraints, field: :listConstraint) filter_table_config.add(:supports_dry_runs, field: :supportsDryRun) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('constraints') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'displayName' => ->(obj) { [:displayName, obj['displayName']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'constraintDefault' => ->(obj) { [:constraintDefault, obj['constraintDefault']] }, 'supportsDryRun' => ->(obj) { [:supportsDryRun, obj['supportsDryRun']] }, 'listConstraint' => ->(obj) { [:listConstraint, GoogleInSpec::Orgpolicy::Property::ListConstraint.new(obj['listConstraint'], to_s)] }, } end private def product_url(_ = nil) 'https://orgpolicy.googleapis.com/v2/' end def resource_base_url '{{parent}}/constraints' end end ================================================ FILE: libraries/google_orgpolicy_project_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class OrgpolicyProjectPolicys < GcpResourceBase name 'google_orgpolicy_project_policies' desc 'ProjectPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:dry_run_specs, field: :dry_run_spec) filter_table_config.add(:specs, field: :spec) filter_table_config.add(:names, field: :name) filter_table_config.add(:alternates, field: :alternate) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('policies') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'dryRunSpec' => ->(obj) { [:dry_run_spec, GoogleInSpec::Orgpolicy::Property::PolicyDryRunSpec.new(obj['dryRunSpec'], to_s)] }, 'spec' => ->(obj) { [:spec, GoogleInSpec::Orgpolicy::Property::PolicySpec.new(obj['spec'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'alternate' => ->(obj) { [:alternate, GoogleInSpec::Orgpolicy::Property::PolicyAlternate.new(obj['alternate'], to_s)] }, } end private def product_url(_ = nil) 'https://orgpolicy.googleapis.com/v2/' end def resource_base_url '{{parent}}/policies' end end ================================================ FILE: libraries/google_orgpolicy_project_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/orgpolicy/property/policy_alternate' require 'google/orgpolicy/property/policy_alternate_spec' require 'google/orgpolicy/property/policy_alternate_spec_rules' require 'google/orgpolicy/property/policy_dry_run_spec' require 'google/orgpolicy/property/policy_dry_run_spec_rules' require 'google/orgpolicy/property/policy_spec' require 'google/orgpolicy/property/policy_spec_rules' # A provider to manage orgpolicy resources. class OrgpolicyProjectPolicy < GcpResourceBase name 'google_orgpolicy_project_policy' desc 'ProjectPolicy' supports platform: 'gcp' attr_reader :params attr_reader :dry_run_spec attr_reader :spec attr_reader :name attr_reader :alternate def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @dry_run_spec = GoogleInSpec::Orgpolicy::Property::PolicyDryRunSpec.new(@fetched['dryRunSpec'], to_s) @spec = GoogleInSpec::Orgpolicy::Property::PolicySpec.new(@fetched['spec'], to_s) @name = @fetched['name'] @alternate = GoogleInSpec::Orgpolicy::Property::PolicyAlternate.new(@fetched['alternate'], to_s) end def exists? !@fetched.nil? end def to_s "ProjectPolicy #{@params[:name]}" end private def product_url(_ = nil) 'https://orgpolicy.googleapis.com/v2/' end def resource_base_url '{{parent}}/policies/{{name}}' end end ================================================ FILE: libraries/google_project.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/resourcemanager/property/project_parent' # A provider to manage Resource Manager resources. class ResourceManagerProject < GcpResourceBase name 'google_project' desc 'Project' supports platform: 'gcp' attr_reader :params attr_reader :number attr_reader :lifecycle_state attr_reader :name attr_reader :create_time attr_reader :labels attr_reader :parent attr_reader :project_id def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @number = @fetched['projectNumber'] @lifecycle_state = @fetched['lifecycleState'] @name = @fetched['name'] @create_time = parse_time_string(@fetched['createTime']) @labels = @fetched['labels'] @parent = GoogleInSpec::ResourceManager::Property::ProjectParent.new(@fetched['parent'], to_s) @project_id = @fetched['projectId'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Project #{@params[:project]}" end def project_name @name end def project_number @number&.to_i end def label_value_by_key(label_key) return nil if @labels.nil? || !@labels.has_key(label_key) @labels[label_key] end private def product_url(_ = nil) 'https://cloudresourcemanager.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}' end end ================================================ FILE: libraries/google_project_alert_policies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class MonitoringAlertPolicys < GcpResourceBase name 'google_project_alert_policies' desc 'AlertPolicy plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:policy_names, field: :policy_names) filter_table_config.add(:policy_display_names, field: :policy_display_names) filter_table_config.add(:combiners, field: :combiner) filter_table_config.add(:creation_records, field: :creation_record) filter_table_config.add(:policy_enabled_states, field: :policy_enabled_state) filter_table_config.add(:conditions, field: :conditions) filter_table_config.add(:notification_channels, field: :notification_channels) filter_table_config.add(:user_labels, field: :user_labels) filter_table_config.add(:documentations, field: :documentation) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('alertPolicies') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:policy_names, obj['name']] }, 'displayName' => ->(obj) { [:policy_display_names, obj['displayName']] }, 'combiner' => ->(obj) { [:combiner, obj['combiner']] }, 'creationRecord' => ->(obj) { [:creation_record, GoogleInSpec::Monitoring::Property::AlertPolicyCreationRecord.new(obj['creationRecord'], to_s)] }, 'enabled' => ->(obj) { [:policy_enabled_state, obj['enabled']] }, 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Monitoring::Property::AlertPolicyConditionsArray.parse(obj['conditions'], to_s)] }, 'notificationChannels' => ->(obj) { [:notification_channels, obj['notificationChannels']] }, 'userLabels' => ->(obj) { [:user_labels, obj['userLabels']] }, 'documentation' => ->(obj) { [:documentation, GoogleInSpec::Monitoring::Property::AlertPolicyDocumentation.new(obj['documentation'], to_s)] }, } end private def product_url(_ = nil) 'https://monitoring.googleapis.com/' end def resource_base_url 'v3/projects/{{project}}/alertPolicies' end end ================================================ FILE: libraries/google_project_alert_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/monitoring/property/alertpolicy_conditions' require 'google/monitoring/property/alertpolicy_creation_record' require 'google/monitoring/property/alertpolicy_documentation' # A provider to manage Cloud (Stackdriver) Monitoring resources. class MonitoringAlertPolicy < GcpResourceBase name 'google_project_alert_policy' desc 'AlertPolicy' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :display_name attr_reader :combiner attr_reader :creation_record attr_reader :enabled attr_reader :conditions attr_reader :notification_channels attr_reader :user_labels attr_reader :documentation def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @display_name = @fetched['displayName'] @combiner = @fetched['combiner'] @creation_record = GoogleInSpec::Monitoring::Property::AlertPolicyCreationRecord.new(@fetched['creationRecord'], to_s) @enabled = @fetched['enabled'] @conditions = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsArray.parse(@fetched['conditions'], to_s) @notification_channels = @fetched['notificationChannels'] @user_labels = @fetched['userLabels'] @documentation = GoogleInSpec::Monitoring::Property::AlertPolicyDocumentation.new(@fetched['documentation'], to_s) end def exists? !@fetched.nil? end def to_s "AlertPolicy #{@params[:name]}" end def enabled? @enabled end private def product_url(_ = nil) 'https://monitoring.googleapis.com/' end def resource_base_url 'v3/projects/{{project}}/alertPolicies/{{name}}' end end ================================================ FILE: libraries/google_project_alert_policy_condition.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/monitoring_v3' module Inspec::Resources class GoogleProjectAlertPolicyCondition < GcpResourceBase name 'google_project_alert_policy_condition' desc 'Verifies settings for a single GCP project alert policy condition by policy name and filter name' example " describe google_project_alert_policy_condition(policy: 'projects/my-project/alertPolicies/9271751234503117449', filter 'project=\"my-project\"') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @filter = opts[:filter] @policy = opts[:policy] catch_gcp_errors do @policy_result = @gcp.gcp_client(Google::Apis::MonitoringV3::MonitoringService).get_project_alert_policy(@policy) @condition = condition_for_filter(@filter) end end def exists? !@condition.nil? end def condition_for_filter(filter) return nil if !defined?(@policy_result.conditions) || @policy_result.conditions.nil? @policy_result.conditions.each do |condition| next if !defined?(condition.condition_threshold.filter) || condition.condition_threshold.filter.nil? return condition if condition.condition_threshold.filter == filter end nil end def condition_threshold_value return false if !defined?(@condition.condition_threshold.threshold_value) || @condition.condition_threshold.threshold_value.nil? @condition.condition_threshold.threshold_value end def aggregation_alignment_period return false if !defined?(@condition.condition_threshold.aggregations[0].alignment_period) || @condition.condition_threshold.aggregations[0].alignment_period.nil? @condition.condition_threshold.aggregations[0].alignment_period end def aggregation_per_series_aligner return false if !defined?(@condition.condition_threshold.aggregations[0].per_series_aligner) || @condition.condition_threshold.aggregations[0].per_series_aligner.nil? @condition.condition_threshold.aggregations[0].per_series_aligner end def aggregation_cross_series_reducer return false if !defined?(@condition.condition_threshold.aggregations[0].cross_series_reducer) || @condition.condition_threshold.aggregations[0].cross_series_reducer.nil? @condition.condition_threshold.aggregations[0].cross_series_reducer end def to_s "Alert Policy Condition #{@policy} \"#{@filter}\"" end end end ================================================ FILE: libraries/google_project_iam_binding.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleProjectIAMBinding < GcpResourceBase name 'google_project_iam_binding' desc 'Verifies settings for a single GCP KMS key ring IAM bindings' example " describe google_kms_key_ring_iam_binding(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring', role: 'roles/compute.admin') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] @role = opts[:role] @iam_binding_exists = false @members_list=[] catch_gcp_errors do # NOTE: this is the same call as for the plural iam_bindings resource because there isn't an easy way to pull out a singular binding @iam_bindings = @gcp.gcp_project_client.get_project_iam_policy(@project) raise Inspec::Exceptions::ResourceFailed, "google_project_iam_binding is missing expected IAM policy 'bindings' property" if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.each do |binding| next if binding.role != @role @iam_binding_exists=true @members_list=binding.members end end end # return the list of users corresponding to the role def members @members_list end def exists? @iam_binding_exists end def to_s "Project IAM Binding #{@role}" end end end ================================================ FILE: libraries/google_project_iam_bindings.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleProjectIAMBindings < GcpResourceBase name 'google_project_iam_bindings' desc 'Verifies settings for GCP project iam_bindings in bulk' example " describe google_project_iam_bindings(project: 'chef-inspec-gcp') do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:iam_binding_roles, field: :iam_binding_role) filter_table_config.connect(self, :fetch_data) def fetch_data iam_binding_rows = [] catch_gcp_errors do @iam_bindings = @gcp.gcp_project_client.get_project_iam_policy(@project) end return [] if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.map do |iam_binding| iam_binding_rows+=[{ iam_binding_role: iam_binding.role }] end @table = iam_binding_rows end end end ================================================ FILE: libraries/google_project_iam_custom_role.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud IAM resources. class IAMCustomRole < GcpResourceBase name 'google_project_iam_custom_role' desc 'CustomRole' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :title attr_reader :description attr_reader :included_permissions attr_reader :stage attr_reader :deleted def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @title = @fetched['title'] @description = @fetched['description'] @included_permissions = @fetched['includedPermissions'] @stage = @fetched['stage'] @deleted = @fetched['deleted'] end def exists? !@fetched.nil? end def to_s "CustomRole #{@params[:name]}" end private def product_url(_ = nil) 'https://iam.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/roles/{{name}}' end end ================================================ FILE: libraries/google_project_iam_custom_roles.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class IAMCustomRoles < GcpResourceBase name 'google_project_iam_custom_roles' desc 'CustomRole plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:titles, field: :title) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:included_permissions, field: :included_permissions) filter_table_config.add(:stages, field: :stage) filter_table_config.add(:deleteds, field: :deleted) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('roles') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'title' => ->(obj) { [:title, obj['title']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'includedPermissions' => ->(obj) { [:included_permissions, obj['includedPermissions']] }, 'stage' => ->(obj) { [:stage, obj['stage']] }, 'deleted' => ->(obj) { [:deleted, obj['deleted']] }, } end private def product_url(_ = nil) 'https://iam.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/roles?view=FULL' end end ================================================ FILE: libraries/google_project_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Resource Manager IAM Policy resources. class ProjectIamPolicy < GcpResourceBase name 'google_project_iam_policy' desc 'Project Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post', { 'options' => { 'requestedPolicyVersion' => 3 } }.to_json) parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Project IamPolicy #{@params[:project]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://cloudresourcemanager.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}:getIamPolicy' end end ================================================ FILE: libraries/google_project_logging_audit_config.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleProjectLoggingAuditConfig < GcpResourceBase name 'google_project_logging_audit_config' desc 'Verifies settings for a GCP project logging audit configuration' example " describe google_project_logging_audit_config(project: 'chef-inspec-gcp') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @project = opts[:project] catch_gcp_errors do @audit_logging_configs = @gcp.gcp_project_client.get_project_iam_policy(@project) @default_types = [] @default_exempted_members = {} if defined?(@audit_logging_configs.audit_configs) && @audit_logging_configs.audit_configs.instance_of?(::Array) @audit_logging_configs.audit_configs.each do |service_config| next if service_config.service != 'allServices' service_config.audit_log_configs.each do |config| @default_types+=[config.log_type] @default_exempted_members[config.log_type]=config.exempted_members if defined?(config.exempted_members) && !config.exempted_members.nil? end end end end end def exists? defined?(@audit_logging_configs.audit_configs) && !@audit_logging_configs.audit_configs.nil? end attr_reader :default_types attr_reader :default_exempted_members def has_default_exempted_members? @default_exempted_members.values.any? end def to_s "Logging Audit Config For #{@project}" end end end ================================================ FILE: libraries/google_project_metric.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/logging/property/metric_bucket_options' require 'google/logging/property/metric_bucket_options_explicit_buckets' require 'google/logging/property/metric_bucket_options_exponential_buckets' require 'google/logging/property/metric_bucket_options_linear_buckets' require 'google/logging/property/metric_metric_descriptor' require 'google/logging/property/metric_metric_descriptor_labels' # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingMetric < GcpResourceBase name 'google_project_metric' desc 'Metric' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :filter attr_reader :metric_descriptor attr_reader :label_extractors attr_reader :value_extractor attr_reader :bucket_options def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @filter = @fetched['filter'] @metric_descriptor = GoogleInSpec::Logging::Property::MetricMetricDescriptor.new(@fetched['metricDescriptor'], to_s) @label_extractors = @fetched['labelExtractors'] @value_extractor = @fetched['valueExtractor'] @bucket_options = GoogleInSpec::Logging::Property::MetricBucketOptions.new(@fetched['bucketOptions'], to_s) end def exists? !@fetched.nil? end def to_s "Metric #{@params[:project]}" end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'projects/{{project}}/metrics/{{%name}}' end end ================================================ FILE: libraries/google_project_metrics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class LoggingMetrics < GcpResourceBase name 'google_project_metrics' desc 'Metric plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:metric_names, field: :metric_name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:metric_filters, field: :metric_filter) filter_table_config.add(:metric_descriptors, field: :metric_descriptor) filter_table_config.add(:label_extractors, field: :label_extractors) filter_table_config.add(:value_extractors, field: :value_extractor) filter_table_config.add(:bucket_options, field: :bucket_options) filter_table_config.add(:metric_types, field: :metric_type) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('metrics') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end hash_with_symbols[:metric_type] = hash.dig('metricDescriptor', 'type') converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:metric_name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'filter' => ->(obj) { [:metric_filter, obj['filter']] }, 'metricDescriptor' => ->(obj) { [:metric_descriptor, GoogleInSpec::Logging::Property::MetricMetricDescriptor.new(obj['metricDescriptor'], to_s)] }, 'labelExtractors' => ->(obj) { [:label_extractors, obj['labelExtractors']] }, 'valueExtractor' => ->(obj) { [:value_extractor, obj['valueExtractor']] }, 'bucketOptions' => ->(obj) { [:bucket_options, GoogleInSpec::Logging::Property::MetricBucketOptions.new(obj['bucketOptions'], to_s)] }, } end private def product_url(_ = nil) 'https://logging.googleapis.com/v2/' end def resource_base_url 'projects/{{project}}/metrics' end end ================================================ FILE: libraries/google_project_service.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/serviceusage/property/service_config' require 'google/serviceusage/property/service_config_apis' # A provider to manage Service Usage resources. class ServiceUsageService < GcpResourceBase name 'google_project_service' desc 'Service' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :parent attr_reader :state attr_reader :disable_dependent_services attr_reader :config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @parent = @fetched['parent'] @state = @fetched['state'] @disable_dependent_services = @fetched['disableDependentServices'] @config = GoogleInSpec::ServiceUsage::Property::ServiceConfig.new(@fetched['config'], to_s) end def exists? !@fetched.nil? end def to_s "Service #{@params[:name]}" end private def product_url(beta = false) if beta 'https://serviceusage.googleapis.com/v1beta1/' else 'https://serviceusage.googleapis.com/v1/' end end def resource_base_url 'projects/{{project}}/services/{{name}}' end end ================================================ FILE: libraries/google_project_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ServiceUsageServices < GcpResourceBase name 'google_project_services' desc 'Service plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:parents, field: :parent) filter_table_config.add(:states, field: :state) filter_table_config.add(:disable_dependent_services, field: :disable_dependent_services) filter_table_config.add(:configs, field: :config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('services') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'disableDependentServices' => ->(obj) { [:disable_dependent_services, obj['disableDependentServices']] }, 'config' => ->(obj) { [:config, GoogleInSpec::ServiceUsage::Property::ServiceConfig.new(obj['config'], to_s)] }, } end private def product_url(beta = false) if beta 'https://serviceusage.googleapis.com/v1beta1/' else 'https://serviceusage.googleapis.com/v1/' end end def resource_base_url 'projects/{{project}}/services' end end ================================================ FILE: libraries/google_projects.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ResourceManagerProjects < GcpResourceBase name 'google_projects' desc 'Project plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:project_numbers, field: :project_number) filter_table_config.add(:lifecycle_states, field: :lifecycle_state) filter_table_config.add(:project_names, field: :project_name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:parents, field: :parent) filter_table_config.add(:project_ids, field: :project_id) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('projects') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'projectNumber' => ->(obj) { [:project_number, obj['projectNumber']] }, 'lifecycleState' => ->(obj) { [:lifecycle_state, obj['lifecycleState']] }, 'name' => ->(obj) { [:project_name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'parent' => ->(obj) { [:parent, GoogleInSpec::ResourceManager::Property::ProjectParent.new(obj['parent'], to_s)] }, 'projectId' => ->(obj) { [:project_id, obj['projectId']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://cloudresourcemanager.googleapis.com/v1/' end def resource_base_url 'projects' end end ================================================ FILE: libraries/google_pubsub_subscription.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/pubsub/property/subscription_dead_letter_policy' require 'google/pubsub/property/subscription_expiration_policy' require 'google/pubsub/property/subscription_push_config' require 'google/pubsub/property/subscription_push_config_oidc_token' require 'google/pubsub/property/subscription_retry_policy' # A provider to manage Cloud Pub/Sub resources. class PubsubSubscription < GcpResourceBase name 'google_pubsub_subscription' desc 'Subscription' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :topic attr_reader :labels attr_reader :push_config attr_reader :ack_deadline_seconds attr_reader :message_retention_duration attr_reader :retain_acked_messages attr_reader :expiration_policy attr_reader :filter attr_reader :dead_letter_policy attr_reader :retry_policy attr_reader :enable_message_ordering def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = name_from_self_link(@fetched['name']) @topic = @fetched['topic'] @labels = @fetched['labels'] @push_config = GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(@fetched['pushConfig'], to_s) @ack_deadline_seconds = @fetched['ackDeadlineSeconds'] @message_retention_duration = @fetched['messageRetentionDuration'] @retain_acked_messages = @fetched['retainAckedMessages'] @expiration_policy = GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(@fetched['expirationPolicy'], to_s) @filter = @fetched['filter'] @dead_letter_policy = GoogleInSpec::Pubsub::Property::SubscriptionDeadLetterPolicy.new(@fetched['deadLetterPolicy'], to_s) @retry_policy = GoogleInSpec::Pubsub::Property::SubscriptionRetryPolicy.new(@fetched['retryPolicy'], to_s) @enable_message_ordering = @fetched['enableMessageOrdering'] end def exists? !@fetched.nil? end def to_s "Subscription #{@params[:name]}" end private def product_url(_ = nil) 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/subscriptions/{{name}}' end end ================================================ FILE: libraries/google_pubsub_subscription_iam_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Pub/Sub IAM Binding resources. class SubscriptionIamBinding < GcpResourceBase name 'google_pubsub_subscription_iam_binding' desc 'Subscription Iam Binding' supports platform: 'gcp' attr_reader :params attr_reader :condition def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] # Control defines a condition, match via this condition condition = params[:condition] if condition[:title] && condition[:title] != binding&.condition&.title next end if condition[:description] && condition[:description] != binding&.condition&.description next end if condition[:expression] && condition[:expression] != binding&.condition&.expression next end else # No condition defined in controls, skip any binding with a condition next unless binding.condition.title.nil? && binding.condition.description.nil? && binding.condition.expression.nil? end @members_list = binding.members @condition = binding.condition @iam_binding_exists = true end end def exists? @iam_binding_exists end def members @members_list end def to_s "Subscription IamBinding #{@params[:name]} Role: #{@params[:role]}" end private def product_url 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/subscriptions/{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_pubsub_subscription_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Pub/Sub IAM Policy resources. class SubscriptionIamPolicy < GcpResourceBase name 'google_pubsub_subscription_iam_policy' desc 'Subscription Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Subscription IamPolicy #{@params[:name]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/subscriptions/{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_pubsub_subscriptions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class PubsubSubscriptions < GcpResourceBase name 'google_pubsub_subscriptions' desc 'Subscription plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:topics, field: :topic) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:push_configs, field: :push_config) filter_table_config.add(:ack_deadline_seconds, field: :ack_deadline_seconds) filter_table_config.add(:message_retention_durations, field: :message_retention_duration) filter_table_config.add(:retain_acked_messages, field: :retain_acked_messages) filter_table_config.add(:expiration_policies, field: :expiration_policy) filter_table_config.add(:filters, field: :filter) filter_table_config.add(:dead_letter_policies, field: :dead_letter_policy) filter_table_config.add(:retry_policies, field: :retry_policy) filter_table_config.add(:enable_message_orderings, field: :enable_message_ordering) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('subscriptions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, 'topic' => ->(obj) { [:topic, obj['topic']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'pushConfig' => ->(obj) { [:push_config, GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(obj['pushConfig'], to_s)] }, 'ackDeadlineSeconds' => ->(obj) { [:ack_deadline_seconds, obj['ackDeadlineSeconds']] }, 'messageRetentionDuration' => ->(obj) { [:message_retention_duration, obj['messageRetentionDuration']] }, 'retainAckedMessages' => ->(obj) { [:retain_acked_messages, obj['retainAckedMessages']] }, 'expirationPolicy' => ->(obj) { [:expiration_policy, GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(obj['expirationPolicy'], to_s)] }, 'filter' => ->(obj) { [:filter, obj['filter']] }, 'deadLetterPolicy' => ->(obj) { [:dead_letter_policy, GoogleInSpec::Pubsub::Property::SubscriptionDeadLetterPolicy.new(obj['deadLetterPolicy'], to_s)] }, 'retryPolicy' => ->(obj) { [:retry_policy, GoogleInSpec::Pubsub::Property::SubscriptionRetryPolicy.new(obj['retryPolicy'], to_s)] }, 'enableMessageOrdering' => ->(obj) { [:enable_message_ordering, obj['enableMessageOrdering']] }, } end private def product_url(_ = nil) 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/subscriptions' end end ================================================ FILE: libraries/google_pubsub_topic.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/pubsub/property/topic_message_storage_policy' # A provider to manage Cloud Pub/Sub resources. class PubsubTopic < GcpResourceBase name 'google_pubsub_topic' desc 'Topic' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :kms_key_name attr_reader :labels attr_reader :message_storage_policy def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = name_from_self_link(@fetched['name']) @kms_key_name = @fetched['kmsKeyName'] @labels = @fetched['labels'] @message_storage_policy = GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(@fetched['messageStoragePolicy'], to_s) end def exists? !@fetched.nil? end def to_s "Topic #{@params[:name]}" end private def product_url(_ = nil) 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/topics/{{name}}' end end ================================================ FILE: libraries/google_pubsub_topic_iam_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Pub/Sub IAM Binding resources. class TopicIamBinding < GcpResourceBase name 'google_pubsub_topic_iam_binding' desc 'Topic Iam Binding' supports platform: 'gcp' attr_reader :params attr_reader :condition def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] # Control defines a condition, match via this condition condition = params[:condition] if condition[:title] && condition[:title] != binding&.condition&.title next end if condition[:description] && condition[:description] != binding&.condition&.description next end if condition[:expression] && condition[:expression] != binding&.condition&.expression next end else # No condition defined in controls, skip any binding with a condition next unless binding.condition.title.nil? && binding.condition.description.nil? && binding.condition.expression.nil? end @members_list = binding.members @condition = binding.condition @iam_binding_exists = true end end def exists? @iam_binding_exists end def members @members_list end def to_s "Topic IamBinding #{@params[:name]} Role: #{@params[:role]}" end private def product_url 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/topics/{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_pubsub_topic_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Pub/Sub IAM Policy resources. class TopicIamPolicy < GcpResourceBase name 'google_pubsub_topic_iam_policy' desc 'Topic Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Topic IamPolicy #{@params[:name]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/topics/{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_pubsub_topics.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class PubsubTopics < GcpResourceBase name 'google_pubsub_topics' desc 'Topic plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:kms_key_names, field: :kms_key_name) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:message_storage_policies, field: :message_storage_policy) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('topics') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, 'kmsKeyName' => ->(obj) { [:kms_key_name, obj['kmsKeyName']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'messageStoragePolicy' => ->(obj) { [:message_storage_policy, GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(obj['messageStoragePolicy'], to_s)] }, } end private def product_url(_ = nil) 'https://pubsub.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/topics' end end ================================================ FILE: libraries/google_redis_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/redis/property/instance_server_ca_certs' # A provider to manage Memorystore (Redis) resources. class RedisInstance < GcpResourceBase name 'google_redis_instance' desc 'Instance' supports platform: 'gcp' attr_reader :params attr_reader :alternative_location_id attr_reader :auth_enabled attr_reader :authorized_network attr_reader :connect_mode attr_reader :create_time attr_reader :current_location_id attr_reader :display_name attr_reader :host attr_reader :labels attr_reader :redis_configs attr_reader :location_id attr_reader :name attr_reader :memory_size_gb attr_reader :port attr_reader :persistence_iam_identity attr_reader :redis_version attr_reader :reserved_ip_range attr_reader :tier attr_reader :transit_encryption_mode attr_reader :server_ca_certs attr_reader :region def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @alternative_location_id = @fetched['alternativeLocationId'] @auth_enabled = @fetched['authEnabled'] @authorized_network = @fetched['authorizedNetwork'] @connect_mode = @fetched['connectMode'] @create_time = parse_time_string(@fetched['createTime']) @current_location_id = @fetched['currentLocationId'] @display_name = @fetched['displayName'] @host = @fetched['host'] @labels = @fetched['labels'] @redis_configs = @fetched['redisConfigs'] @location_id = @fetched['locationId'] @name = @fetched['name'] @memory_size_gb = @fetched['memorySizeGb'] @port = @fetched['port'] @persistence_iam_identity = @fetched['persistenceIamIdentity'] @redis_version = @fetched['redisVersion'] @reserved_ip_range = @fetched['reservedIpRange'] @tier = @fetched['tier'] @transit_encryption_mode = @fetched['transitEncryptionMode'] @server_ca_certs = GoogleInSpec::Redis::Property::InstanceServerCaCertsArray.parse(@fetched['serverCaCerts'], to_s) @region = @fetched['region'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Instance #{@params[:name]}" end private def product_url(beta = false) if beta 'https://redis.googleapis.com/v1beta1/' else 'https://redis.googleapis.com/v1/' end end def resource_base_url 'projects/{{project}}/locations/{{region}}/instances/{{name}}' end end ================================================ FILE: libraries/google_redis_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class RedisInstances < GcpResourceBase name 'google_redis_instances' desc 'Instance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:alternative_location_ids, field: :alternative_location_id) filter_table_config.add(:auth_enableds, field: :auth_enabled) filter_table_config.add(:authorized_networks, field: :authorized_network) filter_table_config.add(:connect_modes, field: :connect_mode) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:current_location_ids, field: :current_location_id) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:hosts, field: :host) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:redis_configs, field: :redis_configs) filter_table_config.add(:location_ids, field: :location_id) filter_table_config.add(:names, field: :name) filter_table_config.add(:memory_size_gbs, field: :memory_size_gb) filter_table_config.add(:ports, field: :port) filter_table_config.add(:persistence_iam_identities, field: :persistence_iam_identity) filter_table_config.add(:redis_versions, field: :redis_version) filter_table_config.add(:reserved_ip_ranges, field: :reserved_ip_range) filter_table_config.add(:tiers, field: :tier) filter_table_config.add(:transit_encryption_modes, field: :transit_encryption_mode) filter_table_config.add(:server_ca_certs, field: :server_ca_certs) filter_table_config.add(:regions, field: :region) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('instances') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'alternativeLocationId' => ->(obj) { [:alternative_location_id, obj['alternativeLocationId']] }, 'authEnabled' => ->(obj) { [:auth_enabled, obj['authEnabled']] }, 'authorizedNetwork' => ->(obj) { [:authorized_network, obj['authorizedNetwork']] }, 'connectMode' => ->(obj) { [:connect_mode, obj['connectMode']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'currentLocationId' => ->(obj) { [:current_location_id, obj['currentLocationId']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'host' => ->(obj) { [:host, obj['host']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'redisConfigs' => ->(obj) { [:redis_configs, obj['redisConfigs']] }, 'locationId' => ->(obj) { [:location_id, obj['locationId']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'memorySizeGb' => ->(obj) { [:memory_size_gb, obj['memorySizeGb']] }, 'port' => ->(obj) { [:port, obj['port']] }, 'persistenceIamIdentity' => ->(obj) { [:persistence_iam_identity, obj['persistenceIamIdentity']] }, 'redisVersion' => ->(obj) { [:redis_version, obj['redisVersion']] }, 'reservedIpRange' => ->(obj) { [:reserved_ip_range, obj['reservedIpRange']] }, 'tier' => ->(obj) { [:tier, obj['tier']] }, 'transitEncryptionMode' => ->(obj) { [:transit_encryption_mode, obj['transitEncryptionMode']] }, 'serverCaCerts' => ->(obj) { [:server_ca_certs, GoogleInSpec::Redis::Property::InstanceServerCaCertsArray.parse(obj['serverCaCerts'], to_s)] }, 'region' => ->(obj) { [:region, obj['region']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(beta = false) if beta 'https://redis.googleapis.com/v1beta1/' else 'https://redis.googleapis.com/v1/' end end def resource_base_url 'projects/{{project}}/locations/{{region}}/instances' end end ================================================ FILE: libraries/google_resourcemanager_folder.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Resource Manager resources. class ResourceManagerFolder < GcpResourceBase name 'google_resourcemanager_folder' desc 'Folder' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :lifecycle_state attr_reader :create_time attr_reader :parent attr_reader :display_name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @lifecycle_state = @fetched['lifecycleState'] @create_time = parse_time_string(@fetched['createTime']) @parent = @fetched['parent'] @display_name = @fetched['displayName'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Folder #{@params[:name]}" end private def product_url(_ = nil) 'https://cloudresourcemanager.googleapis.com/v2/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_resourcemanager_folder_iam_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_bindings' # A provider to manage Resource Manager IAM Binding resources. class FolderIamBinding < GcpResourceBase name 'google_resourcemanager_folder_iam_binding' desc 'Folder Iam Binding' supports platform: 'gcp' attr_reader :params attr_reader :condition def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] # Control defines a condition, match via this condition condition = params[:condition] if condition[:title] && condition[:title] != binding&.condition&.title next end if condition[:description] && condition[:description] != binding&.condition&.description next end if condition[:expression] && condition[:expression] != binding&.condition&.expression next end else # No condition defined in controls, skip any binding with a condition next unless binding.condition.title.nil? && binding.condition.description.nil? && binding.condition.expression.nil? end @members_list = binding.members @condition = binding.condition @iam_binding_exists = true end end def exists? @iam_binding_exists end def members @members_list end def to_s "Folder IamBinding #{@params[:name]} Role: #{@params[:role]}" end private def product_url 'https://cloudresourcemanager.googleapis.com/v2/' end def resource_base_url '{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_resourcemanager_folder_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Resource Manager IAM Policy resources. class FolderIamPolicy < GcpResourceBase name 'google_resourcemanager_folder_iam_policy' desc 'Folder Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Folder IamPolicy #{@params[:name]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://cloudresourcemanager.googleapis.com/v2/' end def resource_base_url '{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_resourcemanager_folders.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ResourceManagerFolders < GcpResourceBase name 'google_resourcemanager_folders' desc 'Folder plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:lifecycle_states, field: :lifecycle_state) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:parents, field: :parent) filter_table_config.add(:display_names, field: :display_name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('folders') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'lifecycleState' => ->(obj) { [:lifecycle_state, obj['lifecycleState']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'parent' => ->(obj) { [:parent, obj['parent']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://cloudresourcemanager.googleapis.com/v2/' end def resource_base_url 'folders?parent={{parent}}' end end ================================================ FILE: libraries/google_run_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/run/property/job_annotations' require 'google/run/property/job_binary_authorization' require 'google/run/property/job_conditions' require 'google/run/property/job_labels' require 'google/run/property/job_latest_created_execution' require 'google/run/property/job_template' require 'google/run/property/job_template_annotations' require 'google/run/property/job_template_labels' require 'google/run/property/job_template_template' require 'google/run/property/job_template_template_containers' require 'google/run/property/job_template_template_volumes' require 'google/run/property/job_template_template_vpc_access' require 'google/run/property/job_template_template_vpc_access_network_interfaces' require 'google/run/property/job_terminal_condition' # A provider to manage run resources. class RunJob < GcpResourceBase name 'google_run_job' desc 'Job' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :uid attr_reader :generation attr_reader :labels attr_reader :annotations attr_reader :create_time attr_reader :update_time attr_reader :delete_time attr_reader :expire_time attr_reader :creator attr_reader :last_modifier attr_reader :client attr_reader :client_version attr_reader :launch_stage attr_reader :binary_authorization attr_reader :template attr_reader :observed_generation attr_reader :terminal_condition attr_reader :conditions attr_reader :execution_count attr_reader :latest_created_execution attr_reader :reconciling attr_reader :satisfies_pzs attr_reader :start_execution_token attr_reader :run_execution_token attr_reader :etag def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @uid = @fetched['uid'] @generation = @fetched['generation'] @labels = GoogleInSpec::Run::Property::JobLabels.new(@fetched['labels'], to_s) @annotations = GoogleInSpec::Run::Property::JobAnnotations.new(@fetched['annotations'], to_s) @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @delete_time = @fetched['deleteTime'] @expire_time = @fetched['expireTime'] @creator = @fetched['creator'] @last_modifier = @fetched['lastModifier'] @client = @fetched['client'] @client_version = @fetched['clientVersion'] @launch_stage = @fetched['launchStage'] @binary_authorization = GoogleInSpec::Run::Property::JobBinaryAuthorization.new(@fetched['binaryAuthorization'], to_s) @template = GoogleInSpec::Run::Property::JobTemplate.new(@fetched['template'], to_s) @observed_generation = @fetched['observedGeneration'] @terminal_condition = GoogleInSpec::Run::Property::JobTerminalCondition.new(@fetched['terminalCondition'], to_s) @conditions = GoogleInSpec::Run::Property::JobConditionsArray.parse(@fetched['conditions'], to_s) @execution_count = @fetched['executionCount'] @latest_created_execution = GoogleInSpec::Run::Property::JobLatestCreatedExecution.new(@fetched['latestCreatedExecution'], to_s) @reconciling = @fetched['reconciling'] @satisfies_pzs = @fetched['satisfiesPzs'] @start_execution_token = @fetched['startExecutionToken'] @run_execution_token = @fetched['runExecutionToken'] @etag = @fetched['etag'] end def exists? !@fetched.nil? end def to_s "Job #{@params[:name]}" end private def product_url(_ = nil) 'https://run.googleapis.com/v2/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_run_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class RunJobs < GcpResourceBase name 'google_run_jobs' desc 'Job plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:uids, field: :uid) filter_table_config.add(:generations, field: :generation) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:annotations, field: :annotations) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:delete_times, field: :delete_time) filter_table_config.add(:expire_times, field: :expire_time) filter_table_config.add(:creators, field: :creator) filter_table_config.add(:last_modifiers, field: :last_modifier) filter_table_config.add(:clients, field: :client) filter_table_config.add(:client_versions, field: :client_version) filter_table_config.add(:launch_stages, field: :launch_stage) filter_table_config.add(:binary_authorizations, field: :binary_authorization) filter_table_config.add(:templates, field: :template) filter_table_config.add(:observed_generations, field: :observed_generation) filter_table_config.add(:terminal_conditions, field: :terminal_condition) filter_table_config.add(:conditions, field: :conditions) filter_table_config.add(:execution_counts, field: :execution_count) filter_table_config.add(:latest_created_executions, field: :latest_created_execution) filter_table_config.add(:reconcilings, field: :reconciling) filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) filter_table_config.add(:start_execution_tokens, field: :start_execution_token) filter_table_config.add(:run_execution_tokens, field: :run_execution_token) filter_table_config.add(:etags, field: :etag) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('jobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'uid' => ->(obj) { [:uid, obj['uid']] }, 'generation' => ->(obj) { [:generation, obj['generation']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Run::Property::JobLabels.new(obj['labels'], to_s)] }, 'annotations' => ->(obj) { [:annotations, GoogleInSpec::Run::Property::JobAnnotations.new(obj['annotations'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'deleteTime' => ->(obj) { [:delete_time, obj['deleteTime']] }, 'expireTime' => ->(obj) { [:expire_time, obj['expireTime']] }, 'creator' => ->(obj) { [:creator, obj['creator']] }, 'lastModifier' => ->(obj) { [:last_modifier, obj['lastModifier']] }, 'client' => ->(obj) { [:client, obj['client']] }, 'clientVersion' => ->(obj) { [:client_version, obj['clientVersion']] }, 'launchStage' => ->(obj) { [:launch_stage, obj['launchStage']] }, 'binaryAuthorization' => ->(obj) { [:binary_authorization, GoogleInSpec::Run::Property::JobBinaryAuthorization.new(obj['binaryAuthorization'], to_s)] }, 'template' => ->(obj) { [:template, GoogleInSpec::Run::Property::JobTemplate.new(obj['template'], to_s)] }, 'observedGeneration' => ->(obj) { [:observed_generation, obj['observedGeneration']] }, 'terminalCondition' => ->(obj) { [:terminal_condition, GoogleInSpec::Run::Property::JobTerminalCondition.new(obj['terminalCondition'], to_s)] }, 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Run::Property::JobConditionsArray.parse(obj['conditions'], to_s)] }, 'executionCount' => ->(obj) { [:execution_count, obj['executionCount']] }, 'latestCreatedExecution' => ->(obj) { [:latest_created_execution, GoogleInSpec::Run::Property::JobLatestCreatedExecution.new(obj['latestCreatedExecution'], to_s)] }, 'reconciling' => ->(obj) { [:reconciling, obj['reconciling']] }, 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, 'startExecutionToken' => ->(obj) { [:start_execution_token, obj['startExecutionToken']] }, 'runExecutionToken' => ->(obj) { [:run_execution_token, obj['runExecutionToken']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, } end private def product_url(_ = nil) 'https://run.googleapis.com/v2/' end def resource_base_url '{{parent}}/jobs' end end ================================================ FILE: libraries/google_run_service.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/run/property/service_annotations' require 'google/run/property/service_binary_authorization' require 'google/run/property/service_conditions' require 'google/run/property/service_labels' require 'google/run/property/service_scaling' require 'google/run/property/service_template' require 'google/run/property/service_template_annotations' require 'google/run/property/service_template_containers' require 'google/run/property/service_template_labels' require 'google/run/property/service_template_node_selector' require 'google/run/property/service_template_scaling' require 'google/run/property/service_template_volumes' require 'google/run/property/service_template_vpc_access' require 'google/run/property/service_template_vpc_access_network_interfaces' require 'google/run/property/service_terminal_condition' require 'google/run/property/service_traffic' require 'google/run/property/service_traffic_statuses' # A provider to manage run resources. class RunService < GcpResourceBase name 'google_run_service' desc 'Service' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :description attr_reader :uid attr_reader :generation attr_reader :labels attr_reader :annotations attr_reader :create_time attr_reader :update_time attr_reader :delete_time attr_reader :expire_time attr_reader :creator attr_reader :last_modifier attr_reader :client attr_reader :client_version attr_reader :ingress attr_reader :launch_stage attr_reader :binary_authorization attr_reader :template attr_reader :traffic attr_reader :scaling attr_reader :default_uri_disabled attr_reader :custom_audiences attr_reader :observed_generation attr_reader :terminal_condition attr_reader :conditions attr_reader :latest_ready_revision attr_reader :latest_created_revision attr_reader :traffic_statuses attr_reader :uri attr_reader :satisfies_pzs attr_reader :reconciling attr_reader :etag def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @description = @fetched['description'] @uid = @fetched['uid'] @generation = @fetched['generation'] @labels = GoogleInSpec::Run::Property::ServiceLabels.new(@fetched['labels'], to_s) @annotations = GoogleInSpec::Run::Property::ServiceAnnotations.new(@fetched['annotations'], to_s) @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @delete_time = @fetched['deleteTime'] @expire_time = @fetched['expireTime'] @creator = @fetched['creator'] @last_modifier = @fetched['lastModifier'] @client = @fetched['client'] @client_version = @fetched['clientVersion'] @ingress = @fetched['ingress'] @launch_stage = @fetched['launchStage'] @binary_authorization = GoogleInSpec::Run::Property::ServiceBinaryAuthorization.new(@fetched['binaryAuthorization'], to_s) @template = GoogleInSpec::Run::Property::ServiceTemplate.new(@fetched['template'], to_s) @traffic = GoogleInSpec::Run::Property::ServiceTrafficArray.parse(@fetched['traffic'], to_s) @scaling = GoogleInSpec::Run::Property::ServiceScaling.new(@fetched['scaling'], to_s) @default_uri_disabled = @fetched['defaultUriDisabled'] @custom_audiences = @fetched['customAudiences'] @observed_generation = @fetched['observedGeneration'] @terminal_condition = GoogleInSpec::Run::Property::ServiceTerminalCondition.new(@fetched['terminalCondition'], to_s) @conditions = GoogleInSpec::Run::Property::ServiceConditionsArray.parse(@fetched['conditions'], to_s) @latest_ready_revision = @fetched['latestReadyRevision'] @latest_created_revision = @fetched['latestCreatedRevision'] @traffic_statuses = GoogleInSpec::Run::Property::ServiceTrafficStatusesArray.parse(@fetched['trafficStatuses'], to_s) @uri = @fetched['uri'] @satisfies_pzs = @fetched['satisfiesPzs'] @reconciling = @fetched['reconciling'] @etag = @fetched['etag'] end def exists? !@fetched.nil? end def to_s "Service #{@params[:name]}" end private def product_url(_ = nil) 'https://run.googleapis.com/v2/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_run_services.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class RunServices < GcpResourceBase name 'google_run_services' desc 'Service plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:uids, field: :uid) filter_table_config.add(:generations, field: :generation) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:annotations, field: :annotations) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:delete_times, field: :delete_time) filter_table_config.add(:expire_times, field: :expire_time) filter_table_config.add(:creators, field: :creator) filter_table_config.add(:last_modifiers, field: :last_modifier) filter_table_config.add(:clients, field: :client) filter_table_config.add(:client_versions, field: :client_version) filter_table_config.add(:ingresses, field: :ingress) filter_table_config.add(:launch_stages, field: :launch_stage) filter_table_config.add(:binary_authorizations, field: :binary_authorization) filter_table_config.add(:templates, field: :template) filter_table_config.add(:traffics, field: :traffic) filter_table_config.add(:scalings, field: :scaling) filter_table_config.add(:default_uri_disableds, field: :default_uri_disabled) filter_table_config.add(:custom_audiences, field: :custom_audiences) filter_table_config.add(:observed_generations, field: :observed_generation) filter_table_config.add(:terminal_conditions, field: :terminal_condition) filter_table_config.add(:conditions, field: :conditions) filter_table_config.add(:latest_ready_revisions, field: :latest_ready_revision) filter_table_config.add(:latest_created_revisions, field: :latest_created_revision) filter_table_config.add(:traffic_statuses, field: :traffic_statuses) filter_table_config.add(:uris, field: :uri) filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) filter_table_config.add(:reconcilings, field: :reconciling) filter_table_config.add(:etags, field: :etag) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('services') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'uid' => ->(obj) { [:uid, obj['uid']] }, 'generation' => ->(obj) { [:generation, obj['generation']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::Run::Property::ServiceLabels.new(obj['labels'], to_s)] }, 'annotations' => ->(obj) { [:annotations, GoogleInSpec::Run::Property::ServiceAnnotations.new(obj['annotations'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'deleteTime' => ->(obj) { [:delete_time, obj['deleteTime']] }, 'expireTime' => ->(obj) { [:expire_time, obj['expireTime']] }, 'creator' => ->(obj) { [:creator, obj['creator']] }, 'lastModifier' => ->(obj) { [:last_modifier, obj['lastModifier']] }, 'client' => ->(obj) { [:client, obj['client']] }, 'clientVersion' => ->(obj) { [:client_version, obj['clientVersion']] }, 'ingress' => ->(obj) { [:ingress, obj['ingress']] }, 'launchStage' => ->(obj) { [:launch_stage, obj['launchStage']] }, 'binaryAuthorization' => ->(obj) { [:binary_authorization, GoogleInSpec::Run::Property::ServiceBinaryAuthorization.new(obj['binaryAuthorization'], to_s)] }, 'template' => ->(obj) { [:template, GoogleInSpec::Run::Property::ServiceTemplate.new(obj['template'], to_s)] }, 'traffic' => ->(obj) { [:traffic, GoogleInSpec::Run::Property::ServiceTrafficArray.parse(obj['traffic'], to_s)] }, 'scaling' => ->(obj) { [:scaling, GoogleInSpec::Run::Property::ServiceScaling.new(obj['scaling'], to_s)] }, 'defaultUriDisabled' => ->(obj) { [:default_uri_disabled, obj['defaultUriDisabled']] }, 'customAudiences' => ->(obj) { [:custom_audiences, obj['customAudiences']] }, 'observedGeneration' => ->(obj) { [:observed_generation, obj['observedGeneration']] }, 'terminalCondition' => ->(obj) { [:terminal_condition, GoogleInSpec::Run::Property::ServiceTerminalCondition.new(obj['terminalCondition'], to_s)] }, 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Run::Property::ServiceConditionsArray.parse(obj['conditions'], to_s)] }, 'latestReadyRevision' => ->(obj) { [:latest_ready_revision, obj['latestReadyRevision']] }, 'latestCreatedRevision' => ->(obj) { [:latest_created_revision, obj['latestCreatedRevision']] }, 'trafficStatuses' => ->(obj) { [:traffic_statuses, GoogleInSpec::Run::Property::ServiceTrafficStatusesArray.parse(obj['trafficStatuses'], to_s)] }, 'uri' => ->(obj) { [:uri, obj['uri']] }, 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, 'reconciling' => ->(obj) { [:reconciling, obj['reconciling']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, } end private def product_url(_ = nil) 'https://run.googleapis.com/v2/' end def resource_base_url '{{parent}}/services' end end ================================================ FILE: libraries/google_runtime_config_config.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Runtime Configurator resources. class RuntimeConfigConfig < GcpResourceBase name 'google_runtime_config_config' desc 'Config' supports platform: 'gcp' attr_reader :params attr_reader :description attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @description = @fetched['description'] @name = @fetched['name'] end def exists? !@fetched.nil? end def to_s "Config #{@params[:name]}" end private def product_url(_ = nil) 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs/{{name}}' end end ================================================ FILE: libraries/google_runtime_config_config_iam_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_bindings' # A provider to manage Runtime Configurator IAM Binding resources. class ConfigIamBinding < GcpResourceBase name 'google_runtime_config_config_iam_binding' desc 'Config Iam Binding' supports platform: 'gcp' attr_reader :params attr_reader :condition def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] # Control defines a condition, match via this condition condition = params[:condition] if condition[:title] && condition[:title] != binding&.condition&.title next end if condition[:description] && condition[:description] != binding&.condition&.description next end if condition[:expression] && condition[:expression] != binding&.condition&.expression next end else # No condition defined in controls, skip any binding with a condition next unless binding.condition.title.nil? && binding.condition.description.nil? && binding.condition.expression.nil? end @members_list = binding.members @condition = binding.condition @iam_binding_exists = true end end def exists? @iam_binding_exists end def members @members_list end def to_s "Config IamBinding #{@params[:name]} Role: #{@params[:role]}" end private def product_url 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs/{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_runtime_config_config_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Runtime Configurator IAM Policy resources. class ConfigIamPolicy < GcpResourceBase name 'google_runtime_config_config_iam_policy' desc 'Config Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Config IamPolicy #{@params[:name]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs/{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_runtime_config_configs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class RuntimeConfigConfigs < GcpResourceBase name 'google_runtime_config_configs' desc 'Config plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('configs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end private def product_url(_ = nil) 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs' end end ================================================ FILE: libraries/google_runtime_config_variable.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Runtime Configurator resources. class RuntimeConfigVariable < GcpResourceBase name 'google_runtime_config_variable' desc 'Variable' supports platform: 'gcp' attr_reader :params attr_reader :value attr_reader :text attr_reader :name attr_reader :config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @value = @fetched['value'] @text = @fetched['text'] @name = @fetched['name'] @config = @fetched['config'] end def exists? !@fetched.nil? end def to_s "Variable #{@params[:name]}" end private def product_url(_ = nil) 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs/{{config}}/variables/{{name}}' end end ================================================ FILE: libraries/google_runtime_config_variables.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class RuntimeConfigVariables < GcpResourceBase name 'google_runtime_config_variables' desc 'Variable plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:values, field: :value) filter_table_config.add(:texts, field: :text) filter_table_config.add(:names, field: :name) filter_table_config.add(:configs, field: :config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('variables') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'value' => ->(obj) { [:value, obj['value']] }, 'text' => ->(obj) { [:text, obj['text']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'config' => ->(obj) { [:config, obj['config']] }, } end private def product_url(_ = nil) 'https://runtimeconfig.googleapis.com/v1beta1/' end def resource_base_url 'projects/{{project}}/configs/{{config}}/variables?returnValues=true' end end ================================================ FILE: libraries/google_secret_manager_secret.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/secretmanager/property/secret_replication' require 'google/secretmanager/property/secret_replication_user_managed' require 'google/secretmanager/property/secret_replication_user_managed_replicas' require 'google/secretmanager/property/secret_rotation' require 'google/secretmanager/property/secret_topics' # A provider to manage Secret Manager resources. class SecretManagerSecret < GcpResourceBase name 'google_secret_manager_secret' desc 'Secret' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :create_time attr_reader :labels attr_reader :replication attr_reader :topics attr_reader :expire_time attr_reader :ttl attr_reader :rotation attr_reader :secret_id def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @create_time = @fetched['createTime'] @labels = @fetched['labels'] @replication = GoogleInSpec::SecretManager::Property::SecretReplication.new(@fetched['replication'], to_s) @topics = GoogleInSpec::SecretManager::Property::SecretTopicsArray.parse(@fetched['topics'], to_s) @expire_time = @fetched['expireTime'] @ttl = @fetched['ttl'] @rotation = GoogleInSpec::SecretManager::Property::SecretRotation.new(@fetched['rotation'], to_s) @secret_id = @fetched['secretId'] end def exists? !@fetched.nil? end def to_s "Secret #{@params[:secret_id]}" end private def product_url(_ = nil) 'https://secretmanager.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_secret_manager_secrets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SecretManagerSecrets < GcpResourceBase name 'google_secret_manager_secrets' desc 'Secret plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:replications, field: :replication) filter_table_config.add(:topics, field: :topics) filter_table_config.add(:expire_times, field: :expire_time) filter_table_config.add(:ttls, field: :ttl) filter_table_config.add(:rotations, field: :rotation) filter_table_config.add(:secret_ids, field: :secret_id) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('secrets') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'replication' => ->(obj) { [:replication, GoogleInSpec::SecretManager::Property::SecretReplication.new(obj['replication'], to_s)] }, 'topics' => ->(obj) { [:topics, GoogleInSpec::SecretManager::Property::SecretTopicsArray.parse(obj['topics'], to_s)] }, 'expireTime' => ->(obj) { [:expire_time, obj['expireTime']] }, 'ttl' => ->(obj) { [:ttl, obj['ttl']] }, 'rotation' => ->(obj) { [:rotation, GoogleInSpec::SecretManager::Property::SecretRotation.new(obj['rotation'], to_s)] }, 'secretId' => ->(obj) { [:secret_id, obj['secretId']] }, } end private def product_url(_ = nil) 'https://secretmanager.googleapis.com/v1/' end def resource_base_url '{{parent}}/secrets' end end ================================================ FILE: libraries/google_service_account.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud IAM resources. class IAMServiceAccount < GcpResourceBase name 'google_service_account' desc 'ServiceAccount' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :project_id attr_reader :unique_id attr_reader :email attr_reader :display_name attr_reader :oauth2_client_id def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @project_id = @fetched['projectId'] @unique_id = @fetched['uniqueId'] @email = @fetched['email'] @display_name = @fetched['displayName'] @oauth2_client_id = @fetched['oauth2ClientId'] end def exists? !@fetched.nil? end def to_s "ServiceAccount #{@params[:name]}" end private def product_url(_ = nil) 'https://iam.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/serviceAccounts/{{name}}' end end ================================================ FILE: libraries/google_service_account_key.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud IAM resources. class IAMServiceAccountKey < GcpResourceBase name 'google_service_account_key' desc 'ServiceAccountKey' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :private_key_type attr_reader :key_algorithm attr_reader :private_key_data attr_reader :public_key_data attr_reader :valid_after_time attr_reader :valid_before_time attr_reader :key_origin attr_reader :key_type attr_reader :service_account attr_reader :path attr_reader :disabled def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @private_key_type = @fetched['privateKeyType'] @key_algorithm = @fetched['keyAlgorithm'] @private_key_data = @fetched['privateKeyData'] @public_key_data = @fetched['publicKeyData'] @valid_after_time = parse_time_string(@fetched['validAfterTime']) @valid_before_time = parse_time_string(@fetched['validBeforeTime']) @key_origin = @fetched['keyOrigin'] @key_type = @fetched['keyType'] @service_account = @fetched['serviceAccount'] @path = @fetched['path'] @disabled = @fetched['disabled'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "ServiceAccountKey #{@params[:name]}" end private def product_url(_ = nil) 'https://iam.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/serviceAccounts/{{service_account}}/keys/{{name}}' end end ================================================ FILE: libraries/google_service_account_keys.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class IAMServiceAccountKeys < GcpResourceBase name 'google_service_account_keys' desc 'ServiceAccountKey plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:key_names, field: :key_name) filter_table_config.add(:private_key_types, field: :private_key_type) filter_table_config.add(:key_algorithms, field: :key_algorithm) filter_table_config.add(:private_key_data, field: :private_key_data) filter_table_config.add(:public_key_data, field: :public_key_data) filter_table_config.add(:valid_after_times, field: :valid_after_time) filter_table_config.add(:valid_before_times, field: :valid_before_time) filter_table_config.add(:key_types, field: :key_type) filter_table_config.add(:service_accounts, field: :service_account) filter_table_config.add(:paths, field: :path) filter_table_config.add(:key_origins, field: :key_origin) filter_table_config.add(:disableds, field: :disabled) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('keys') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:key_name, obj['name']] }, 'privateKeyType' => ->(obj) { [:private_key_type, obj['privateKeyType']] }, 'keyAlgorithm' => ->(obj) { [:key_algorithm, obj['keyAlgorithm']] }, 'privateKeyData' => ->(obj) { [:private_key_data, obj['privateKeyData']] }, 'publicKeyData' => ->(obj) { [:public_key_data, obj['publicKeyData']] }, 'validAfterTime' => ->(obj) { [:valid_after_time, parse_time_string(obj['validAfterTime'])] }, 'validBeforeTime' => ->(obj) { [:valid_before_time, parse_time_string(obj['validBeforeTime'])] }, 'keyType' => ->(obj) { [:key_type, obj['keyType']] }, 'serviceAccount' => ->(obj) { [:service_account, obj['serviceAccount']] }, 'path' => ->(obj) { [:path, obj['path']] }, 'keyOrigin' => ->(obj) { [:key_origin, obj['keyOrigin']] }, 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://iam.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/serviceAccounts/{{service_account}}/keys' end end ================================================ FILE: libraries/google_service_accounts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class IAMServiceAccounts < GcpResourceBase name 'google_service_accounts' desc 'ServiceAccount plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:service_account_names, field: :service_account_name) filter_table_config.add(:project_ids, field: :project_id) filter_table_config.add(:service_account_ids, field: :service_account_id) filter_table_config.add(:service_account_emails, field: :service_account_email) filter_table_config.add(:service_account_display_names, field: :service_account_display_name) filter_table_config.add(:oauth2_client_ids, field: :oauth2_client_id) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('accounts') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:service_account_name, obj['name']] }, 'projectId' => ->(obj) { [:project_id, obj['projectId']] }, 'uniqueId' => ->(obj) { [:service_account_id, obj['uniqueId']] }, 'email' => ->(obj) { [:service_account_email, obj['email']] }, 'displayName' => ->(obj) { [:service_account_display_name, obj['displayName']] }, 'oauth2ClientId' => ->(obj) { [:oauth2_client_id, obj['oauth2ClientId']] }, } end private def product_url(_ = nil) 'https://iam.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/serviceAccounts' end end ================================================ FILE: libraries/google_service_networking_service_connections.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class ServiceNetworkingServiceConnections < GcpResourceBase name 'google_service_networking_service_connections' desc 'service_connection plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:networks, field: :network) filter_table_config.add(:reserved_peering_ranges, field: :reserved_peering_ranges) filter_table_config.add(:peerings, field: :peering) filter_table_config.add(:services, field: :service) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('connections') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'network' => ->(obj) { [:network, obj['network']] }, 'reservedPeeringRanges' => ->(obj) { [:reserved_peering_ranges, obj['reservedPeeringRanges']] }, 'peering' => ->(obj) { [:peering, obj['peering']] }, 'service' => ->(obj) { [:service, obj['service']] }, } end private def product_url(_ = nil) 'https://servicenetworking.googleapis.com/v1/' end def resource_base_url '{{parent}}/connections?network={{network}}' end end ================================================ FILE: libraries/google_sourcerepo_repositories.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SourceRepoRepositorys < GcpResourceBase name 'google_sourcerepo_repositories' desc 'Repository plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:urls, field: :url) filter_table_config.add(:sizes, field: :size) filter_table_config.add(:pubsub_configs, field: :pubsub_configs) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('repos') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'url' => ->(obj) { [:url, obj['url']] }, 'size' => ->(obj) { [:size, obj['size']] }, 'pubsubConfigs' => ->(obj) { [:pubsub_configs, obj['pubsubConfigs']] }, } end private def product_url(_ = nil) 'https://sourcerepo.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/repos' end end ================================================ FILE: libraries/google_sourcerepo_repository.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/sourcerepo/property/repository_pubsub_configs' # A provider to manage Cloud Source Repositories resources. class SourceRepoRepository < GcpResourceBase name 'google_sourcerepo_repository' desc 'Repository' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :url attr_reader :size attr_reader :pubsub_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @url = @fetched['url'] @size = @fetched['size'] @pubsub_configs = @fetched['pubsubConfigs'] end def exists? !@fetched.nil? end def to_s "Repository #{@params[:name]}" end private def product_url(_ = nil) 'https://sourcerepo.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/repos/{{name}}' end end ================================================ FILE: libraries/google_spanner_database.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud Spanner resources. class SpannerDatabase < GcpResourceBase name 'google_spanner_database' desc 'Database' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :instance def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @instance = @fetched['instance'] end def exists? !@fetched.nil? end def to_s "Database #{@params[:name]}" end private def product_url(_ = nil) 'https://spanner.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/instances/{{instance}}/databases/{{name}}' end end ================================================ FILE: libraries/google_spanner_databases.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SpannerDatabases < GcpResourceBase name 'google_spanner_databases' desc 'Database plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:instances, field: :instance) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('databases') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'instance' => ->(obj) { [:instance, obj['instance']] }, } end private def product_url(_ = nil) 'https://spanner.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/instances/{{instance}}/databases' end end ================================================ FILE: libraries/google_spanner_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud Spanner resources. class SpannerInstance < GcpResourceBase name 'google_spanner_instance' desc 'Instance' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :config attr_reader :display_name attr_reader :node_count attr_reader :labels def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @config = @fetched['config'] @display_name = @fetched['displayName'] @node_count = @fetched['nodeCount'] @labels = @fetched['labels'] end def exists? !@fetched.nil? end def to_s "Instance #{@params[:name]}" end private def product_url(_ = nil) 'https://spanner.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/instances/{{name}}' end end ================================================ FILE: libraries/google_spanner_instance_iam_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Spanner IAM Binding resources. class InstanceIamBinding < GcpResourceBase name 'google_spanner_instance_iam_binding' desc 'Instance Iam Binding' supports platform: 'gcp' attr_reader :params attr_reader :condition def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] # Control defines a condition, match via this condition condition = params[:condition] if condition[:title] && condition[:title] != binding&.condition&.title next end if condition[:description] && condition[:description] != binding&.condition&.description next end if condition[:expression] && condition[:expression] != binding&.condition&.expression next end else # No condition defined in controls, skip any binding with a condition next unless binding.condition.title.nil? && binding.condition.description.nil? && binding.condition.expression.nil? end @members_list = binding.members @condition = binding.condition @iam_binding_exists = true end end def exists? @iam_binding_exists end def members @members_list end def to_s "Instance IamBinding #{@params[:name]} Role: #{@params[:role]}" end private def product_url 'https://spanner.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/instances/{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_spanner_instance_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Spanner IAM Policy resources. class InstanceIamPolicy < GcpResourceBase name 'google_spanner_instance_iam_policy' desc 'Instance Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Instance IamPolicy #{@params[:name]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://spanner.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/instances/{{name}}:getIamPolicy' end end ================================================ FILE: libraries/google_spanner_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SpannerInstances < GcpResourceBase name 'google_spanner_instances' desc 'Instance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:configs, field: :config) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:node_counts, field: :node_count) filter_table_config.add(:labels, field: :labels) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('instances') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'config' => ->(obj) { [:config, obj['config']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'nodeCount' => ->(obj) { [:node_count, obj['nodeCount']] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, } end private def product_url(_ = nil) 'https://spanner.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/instances' end end ================================================ FILE: libraries/google_sql_connect.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/sql/property/connect_ip_addresses' require 'google/sql/property/connect_server_ca_cert' # A provider to manage Cloud SQL resources. class SQLConnect < GcpResourceBase name 'google_sql_connect' desc 'Connect' supports platform: 'gcp' attr_reader :params attr_reader :region attr_reader :ip_addresses attr_reader :database_version attr_reader :backend_type attr_reader :server_ca_cert attr_reader :instance def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @region = @fetched['region'] @ip_addresses = GoogleInSpec::SQL::Property::ConnectIpAddressesArray.parse(@fetched['ipAddresses'], to_s) @database_version = @fetched['databaseVersion'] @backend_type = @fetched['backendType'] @server_ca_cert = GoogleInSpec::SQL::Property::ConnectServerCaCert.new(@fetched['serverCaCert'], to_s) @instance = @fetched['instance'] end def exists? !@fetched.nil? end def to_s "Connect #{@params[:name]}" end private def product_url(_ = nil) 'https://sqladmin.googleapis.com/sql/v1beta4/' end def resource_base_url 'projects/{{project}}/instances/{{instance}}/connectSettings' end end ================================================ FILE: libraries/google_sql_database.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud SQL resources. class SQLDatabase < GcpResourceBase name 'google_sql_database' desc 'Database' supports platform: 'gcp' attr_reader :params attr_reader :charset attr_reader :collation attr_reader :name attr_reader :instance def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @charset = @fetched['charset'] @collation = @fetched['collation'] @name = @fetched['name'] @instance = @fetched['instance'] end def exists? !@fetched.nil? end def to_s "Database #{@params[:name]}" end private def product_url(_ = nil) 'https://sqladmin.googleapis.com/sql/v1beta4/' end def resource_base_url 'projects/{{project}}/instances/{{instance}}/databases/{{name}}' end end ================================================ FILE: libraries/google_sql_database_instance.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/sql/property/databaseinstance_disk_encryption_configuration' require 'google/sql/property/databaseinstance_disk_encryption_status' require 'google/sql/property/databaseinstance_failover_replica' require 'google/sql/property/databaseinstance_ip_addresses' require 'google/sql/property/databaseinstance_replica_configuration' require 'google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration' require 'google/sql/property/databaseinstance_server_ca_cert' require 'google/sql/property/databaseinstance_settings' require 'google/sql/property/databaseinstance_settings_backup_configuration' require 'google/sql/property/databaseinstance_settings_database_flags' require 'google/sql/property/databaseinstance_settings_ip_configuration' require 'google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks' # A provider to manage Cloud SQL resources. class SQLDatabaseInstance < GcpResourceBase name 'google_sql_database_instance' desc 'DatabaseInstance' supports platform: 'gcp' attr_reader :params attr_reader :backend_type attr_reader :kind attr_reader :connection_name attr_reader :database_version attr_reader :failover_replica attr_reader :instance_type attr_reader :ip_addresses attr_reader :ipv6_address attr_reader :master_instance_name attr_reader :max_disk_size attr_reader :name attr_reader :region attr_reader :replica_configuration attr_reader :settings attr_reader :gce_zone attr_reader :state attr_reader :disk_encryption_configuration attr_reader :disk_encryption_status attr_reader :server_ca_cert def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @backend_type = @fetched['backendType'] @kind = @fetched['kind'] @connection_name = @fetched['connectionName'] @database_version = @fetched['databaseVersion'] @failover_replica = GoogleInSpec::SQL::Property::DatabaseInstanceFailoverReplica.new(@fetched['failoverReplica'], to_s) @instance_type = @fetched['instanceType'] @ip_addresses = GoogleInSpec::SQL::Property::DatabaseInstanceIpAddressesArray.parse(@fetched['ipAddresses'], to_s) @ipv6_address = @fetched['ipv6Address'] @master_instance_name = @fetched['masterInstanceName'] @max_disk_size = @fetched['maxDiskSize'] @name = @fetched['name'] @region = @fetched['region'] @replica_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceReplicaConfiguration.new(@fetched['replicaConfiguration'], to_s) @settings = GoogleInSpec::SQL::Property::DatabaseInstanceSettings.new(@fetched['settings'], to_s) @gce_zone = @fetched['gceZone'] @state = @fetched['state'] @disk_encryption_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionConfiguration.new(@fetched['diskEncryptionConfiguration'], to_s) @disk_encryption_status = GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionStatus.new(@fetched['diskEncryptionStatus'], to_s) @server_ca_cert = GoogleInSpec::SQL::Property::DatabaseInstanceServerCaCert.new(@fetched['serverCaCert'], to_s) end def exists? !@fetched.nil? end def to_s "DatabaseInstance #{@params[:instance]}" end def has_ip_configuration_require_ssl? return false if @settings&.ip_configuration&.require_ssl.nil? return true if @settings.ip_configuration.require_ssl.to_s.casecmp('true').zero? false end def authorized_networks return [] if @settings&.ip_configuration&.authorized_networks.nil? @database.settings.ip_configuration.authorized_networks.map(&:value) end def primary_ip_address return '' if !@ip_addresses.empty? || @ip_addresses[0].ip_address.nil? @ip_addresses[0].ip_address end private def product_url(_ = nil) 'https://sqladmin.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/instances/{{instance}}' end end ================================================ FILE: libraries/google_sql_database_instances.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SQLDatabaseInstances < GcpResourceBase name 'google_sql_database_instances' desc 'DatabaseInstance plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:backend_types, field: :backend_type) filter_table_config.add(:kinds, field: :kind) filter_table_config.add(:connection_names, field: :connection_name) filter_table_config.add(:instance_versions, field: :instance_version) filter_table_config.add(:failover_replicas, field: :failover_replica) filter_table_config.add(:instance_types, field: :instance_type) filter_table_config.add(:ip_addresses, field: :ip_addresses) filter_table_config.add(:ipv6_addresses, field: :ipv6_address) filter_table_config.add(:master_instance_names, field: :master_instance_name) filter_table_config.add(:max_disk_sizes, field: :max_disk_size) filter_table_config.add(:instance_names, field: :instance_name) filter_table_config.add(:instance_regions, field: :instance_region) filter_table_config.add(:replica_configurations, field: :replica_configuration) filter_table_config.add(:settings, field: :settings) filter_table_config.add(:instance_zones, field: :instance_zone) filter_table_config.add(:instance_states, field: :instance_state) filter_table_config.add(:disk_encryption_configurations, field: :disk_encryption_configuration) filter_table_config.add(:disk_encryption_statuses, field: :disk_encryption_status) filter_table_config.add(:server_ca_certs, field: :server_ca_cert) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'backendType' => ->(obj) { [:backend_type, obj['backendType']] }, 'kind' => ->(obj) { [:kind, obj['kind']] }, 'connectionName' => ->(obj) { [:connection_name, obj['connectionName']] }, 'databaseVersion' => ->(obj) { [:instance_version, obj['databaseVersion']] }, 'failoverReplica' => ->(obj) { [:failover_replica, GoogleInSpec::SQL::Property::DatabaseInstanceFailoverReplica.new(obj['failoverReplica'], to_s)] }, 'instanceType' => ->(obj) { [:instance_type, obj['instanceType']] }, 'ipAddresses' => ->(obj) { [:ip_addresses, GoogleInSpec::SQL::Property::DatabaseInstanceIpAddressesArray.parse(obj['ipAddresses'], to_s)] }, 'ipv6Address' => ->(obj) { [:ipv6_address, obj['ipv6Address']] }, 'masterInstanceName' => ->(obj) { [:master_instance_name, obj['masterInstanceName']] }, 'maxDiskSize' => ->(obj) { [:max_disk_size, obj['maxDiskSize']] }, 'name' => ->(obj) { [:instance_name, obj['name']] }, 'region' => ->(obj) { [:instance_region, obj['region']] }, 'replicaConfiguration' => ->(obj) { [:replica_configuration, GoogleInSpec::SQL::Property::DatabaseInstanceReplicaConfiguration.new(obj['replicaConfiguration'], to_s)] }, 'settings' => ->(obj) { [:settings, GoogleInSpec::SQL::Property::DatabaseInstanceSettings.new(obj['settings'], to_s)] }, 'gceZone' => ->(obj) { [:instance_zone, obj['gceZone']] }, 'state' => ->(obj) { [:instance_state, obj['state']] }, 'diskEncryptionConfiguration' => ->(obj) { [:disk_encryption_configuration, GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionConfiguration.new(obj['diskEncryptionConfiguration'], to_s)] }, 'diskEncryptionStatus' => ->(obj) { [:disk_encryption_status, GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionStatus.new(obj['diskEncryptionStatus'], to_s)] }, 'serverCaCert' => ->(obj) { [:server_ca_cert, GoogleInSpec::SQL::Property::DatabaseInstanceServerCaCert.new(obj['serverCaCert'], to_s)] }, } end private def product_url(_ = nil) 'https://sqladmin.googleapis.com/v1/' end def resource_base_url 'projects/{{project}}/instances' end end ================================================ FILE: libraries/google_sql_databases.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SQLDatabases < GcpResourceBase name 'google_sql_databases' desc 'Database plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:charsets, field: :charset) filter_table_config.add(:collations, field: :collation) filter_table_config.add(:names, field: :name) filter_table_config.add(:instances, field: :instance) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'charset' => ->(obj) { [:charset, obj['charset']] }, 'collation' => ->(obj) { [:collation, obj['collation']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'instance' => ->(obj) { [:instance, obj['instance']] }, } end private def product_url(_ = nil) 'https://sqladmin.googleapis.com/sql/v1beta4/' end def resource_base_url 'projects/{{project}}/instances/{{instance}}/databases' end end ================================================ FILE: libraries/google_sql_flags.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SQLFlags < GcpResourceBase name 'google_sql_flags' desc 'Flag plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:allowed_string_values, field: :allowed_string_values) filter_table_config.add(:applies_tos, field: :applies_to) filter_table_config.add(:max_values, field: :max_value) filter_table_config.add(:min_values, field: :min_value) filter_table_config.add(:names, field: :name) filter_table_config.add(:requires_restarts, field: :requires_restart) filter_table_config.add(:types, field: :type) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'allowedStringValues' => ->(obj) { [:allowed_string_values, obj['allowedStringValues']] }, 'appliesTo' => ->(obj) { [:applies_to, obj['appliesTo']] }, 'maxValue' => ->(obj) { [:max_value, obj['maxValue']] }, 'minValue' => ->(obj) { [:min_value, obj['minValue']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'requiresRestart' => ->(obj) { [:requires_restart, obj['requiresRestart']] }, 'type' => ->(obj) { [:type, obj['type']] }, } end private def product_url(_ = nil) 'https://sqladmin.googleapis.com/sql/v1beta4/' end def resource_base_url 'flags' end end ================================================ FILE: libraries/google_sql_operation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud SQL resources. class SQLOperation < GcpResourceBase name 'google_sql_operation' desc 'Operation' supports platform: 'gcp' attr_reader :params attr_reader :user attr_reader :name attr_reader :status attr_reader :operation_type attr_reader :instance def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @user = @fetched['user'] @name = @fetched['name'] @status = @fetched['status'] @operation_type = @fetched['operationType'] @instance = @fetched['instance'] end def exists? !@fetched.nil? end def to_s "Operation #{@params[:operation]}" end private def product_url(_ = nil) 'https://sqladmin.googleapis.com/sql/v1beta4/' end def resource_base_url 'projects/{{project}}/operations/{{operation}}' end end ================================================ FILE: libraries/google_sql_operations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SQLOperations < GcpResourceBase name 'google_sql_operations' desc 'Operation plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:users, field: :user) filter_table_config.add(:names, field: :name) filter_table_config.add(:statuses, field: :status) filter_table_config.add(:operation_types, field: :operation_type) filter_table_config.add(:instances, field: :instance) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'user' => ->(obj) { [:user, obj['user']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'status' => ->(obj) { [:status, obj['status']] }, 'operationType' => ->(obj) { [:operation_type, obj['operationType']] }, 'instance' => ->(obj) { [:instance, obj['instance']] }, } end private def product_url(_ = nil) 'https://sqladmin.googleapis.com/sql/v1beta4/' end def resource_base_url 'projects/{{project}}/operations?instance={{instance}}' end end ================================================ FILE: libraries/google_sql_ssl_cert.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud SQL resources. class SQLSslCert < GcpResourceBase name 'google_sql_ssl_cert' desc 'SslCert' supports platform: 'gcp' attr_reader :params attr_reader :cert attr_reader :cert_serial_number attr_reader :common_name attr_reader :create_time attr_reader :expiration_time attr_reader :instance attr_reader :sha1_fingerprint def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @cert = @fetched['cert'] @cert_serial_number = @fetched['certSerialNumber'] @common_name = @fetched['commonName'] @create_time = parse_time_string(@fetched['createTime']) @expiration_time = parse_time_string(@fetched['expirationTime']) @instance = @fetched['instance'] @sha1_fingerprint = @fetched['sha1Fingerprint'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "SslCert #{@params[:sha1_fingerprint]}" end private def product_url(_ = nil) 'https://sqladmin.googleapis.com/sql/v1beta4/' end def resource_base_url 'projects/{{project}}/instances/{{instance}}/sslCerts/{{sha1_fingerprint}}' end end ================================================ FILE: libraries/google_sql_ssl_certs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SQLSslCerts < GcpResourceBase name 'google_sql_ssl_certs' desc 'SslCert plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:certs, field: :cert) filter_table_config.add(:cert_serial_numbers, field: :cert_serial_number) filter_table_config.add(:common_names, field: :common_name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:expiration_times, field: :expiration_time) filter_table_config.add(:instances, field: :instance) filter_table_config.add(:sha1_fingerprints, field: :sha1_fingerprint) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'cert' => ->(obj) { [:cert, obj['cert']] }, 'certSerialNumber' => ->(obj) { [:cert_serial_number, obj['certSerialNumber']] }, 'commonName' => ->(obj) { [:common_name, obj['commonName']] }, 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, 'expirationTime' => ->(obj) { [:expiration_time, parse_time_string(obj['expirationTime'])] }, 'instance' => ->(obj) { [:instance, obj['instance']] }, 'sha1Fingerprint' => ->(obj) { [:sha1_fingerprint, obj['sha1Fingerprint']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://sqladmin.googleapis.com/sql/v1beta4/' end def resource_base_url 'projects/{{project}}/instances/{{instance}}/sslCerts' end end ================================================ FILE: libraries/google_sql_user.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud SQL resources. class SQLUser < GcpResourceBase name 'google_sql_user' desc 'User' supports platform: 'gcp' attr_reader :params attr_reader :host attr_reader :name attr_reader :instance attr_reader :password def initialize(params) super(params.merge({ use_http_transport: true })) @params = params fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') @fetched = unwrap(fetched, params) parse unless @fetched.nil? end def identity %w{name host} end def collection_item 'items' end def unwrap(fetched, params) fetched[collection_item].find { |result| identity.all? { |id| result[id] == params[id.to_sym] } } end def parse @host = @fetched['host'] @name = @fetched['name'] @instance = @fetched['instance'] @password = @fetched['password'] end def exists? !@fetched.nil? end def to_s "User #{@params[:database]}" end private def product_url(_ = nil) 'https://www.googleapis.com/sql/v1beta4/' end def resource_base_url 'projects/{{project}}/instances/{{database}}/users' end end ================================================ FILE: libraries/google_sql_users.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class SQLUsers < GcpResourceBase name 'google_sql_users' desc 'User plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:user_hosts, field: :user_host) filter_table_config.add(:user_names, field: :user_name) filter_table_config.add(:user_instances, field: :user_instance) filter_table_config.add(:passwords, field: :password) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'host' => ->(obj) { [:user_host, obj['host']] }, 'name' => ->(obj) { [:user_name, obj['name']] }, 'instance' => ->(obj) { [:user_instance, obj['instance']] }, 'password' => ->(obj) { [:password, obj['password']] }, } end private def product_url(_ = nil) 'https://www.googleapis.com/sql/v1beta4/' end def resource_base_url 'projects/{{project}}/instances/{{database}}/users' end end ================================================ FILE: libraries/google_storage_bucket.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/storage/property/bucket_acl' require 'google/storage/property/bucket_cors' require 'google/storage/property/bucket_default_object_acl' require 'google/storage/property/bucket_encryption' require 'google/storage/property/bucket_lifecycle' require 'google/storage/property/bucket_lifecycle_rule' require 'google/storage/property/bucket_logging' require 'google/storage/property/bucket_owner' require 'google/storage/property/bucket_retention_policy' require 'google/storage/property/bucket_versioning' require 'google/storage/property/bucket_website' # A provider to manage Cloud Storage resources. class StorageBucket < GcpResourceBase name 'google_storage_bucket' desc 'Bucket' supports platform: 'gcp' attr_reader :params attr_reader :acl attr_reader :cors attr_reader :default_event_based_hold attr_reader :default_object_acl attr_reader :id attr_reader :lifecycle attr_reader :location attr_reader :logging attr_reader :metageneration attr_reader :name attr_reader :owner attr_reader :project_number attr_reader :storage_class attr_reader :time_created attr_reader :updated attr_reader :versioning attr_reader :website attr_reader :labels attr_reader :encryption attr_reader :retention_policy attr_reader :project attr_reader :predefined_default_object_acl def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @acl = GoogleInSpec::Storage::Property::BucketAclArray.parse(@fetched['acl'], to_s) @cors = GoogleInSpec::Storage::Property::BucketCorsArray.parse(@fetched['cors'], to_s) @default_event_based_hold = @fetched['defaultEventBasedHold'] @default_object_acl = GoogleInSpec::Storage::Property::BucketDefaultObjectAclArray.parse(@fetched['defaultObjectAcl'], to_s) @id = @fetched['id'] @lifecycle = GoogleInSpec::Storage::Property::BucketLifecycle.new(@fetched['lifecycle'], to_s) @location = @fetched['location'] @logging = GoogleInSpec::Storage::Property::BucketLogging.new(@fetched['logging'], to_s) @metageneration = @fetched['metageneration'] @name = @fetched['name'] @owner = GoogleInSpec::Storage::Property::BucketOwner.new(@fetched['owner'], to_s) @project_number = @fetched['projectNumber'] @storage_class = @fetched['storageClass'] @time_created = parse_time_string(@fetched['timeCreated']) @updated = parse_time_string(@fetched['updated']) @versioning = GoogleInSpec::Storage::Property::BucketVersioning.new(@fetched['versioning'], to_s) @website = GoogleInSpec::Storage::Property::BucketWebsite.new(@fetched['website'], to_s) @labels = @fetched['labels'] @encryption = GoogleInSpec::Storage::Property::BucketEncryption.new(@fetched['encryption'], to_s) @retention_policy = GoogleInSpec::Storage::Property::BucketRetentionPolicy.new(@fetched['retentionPolicy'], to_s) @project = @fetched['project'] @predefined_default_object_acl = @fetched['predefinedDefaultObjectAcl'] end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "Bucket #{@params[:name]}" end private def product_url(_ = nil) 'https://storage.googleapis.com/storage/v1/' end def resource_base_url 'b/{{name}}?projection=full' end end ================================================ FILE: libraries/google_storage_bucket_acl.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/storage/property/bucketacl_project_team' # A provider to manage Cloud Storage resources. class StorageBucketACL < GcpResourceBase name 'google_storage_bucket_acl' desc 'BucketACL' supports platform: 'gcp' attr_reader :params attr_reader :domain attr_reader :email attr_reader :entity attr_reader :entity_id attr_reader :id attr_reader :project_team attr_reader :role def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @domain = @fetched['domain'] @email = @fetched['email'] @entity = @fetched['entity'] @entity_id = @fetched['entityId'] @id = @fetched['id'] @project_team = GoogleInSpec::Storage::Property::BucketACLProjectTeam.new(@fetched['projectTeam'], to_s) @role = @fetched['role'] end def exists? !@fetched.nil? end def to_s "BucketACL #{@params[:entity]}" end def bucket @params[:bucket] end private def product_url(_ = nil) 'https://storage.googleapis.com/storage/v1/' end def resource_base_url 'b/{{bucket}}/acl/{{entity}}' end end ================================================ FILE: libraries/google_storage_bucket_iam_binding.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Storage IAM Binding resources. class BucketIamBinding < GcpResourceBase name 'google_storage_bucket_iam_binding' desc 'Bucket Iam Binding' supports platform: 'gcp' attr_reader :params attr_reader :condition def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] # Control defines a condition, match via this condition condition = params[:condition] if condition[:title] && condition[:title] != binding&.condition&.title next end if condition[:description] && condition[:description] != binding&.condition&.description next end if condition[:expression] && condition[:expression] != binding&.condition&.expression next end else # No condition defined in controls, skip any binding with a condition next unless binding.condition.title.nil? && binding.condition.description.nil? && binding.condition.expression.nil? end @members_list = binding.members @condition = binding.condition @iam_binding_exists = true end end def exists? @iam_binding_exists end def members @members_list end def to_s "Bucket IamBinding #{@params[:bucket]} Role: #{@params[:role]}" end private def product_url 'https://storage.googleapis.com/storage/v1/' end def resource_base_url 'b/{{bucket}}/iam' end end ================================================ FILE: libraries/google_storage_bucket_iam_bindings.rb ================================================ # frozen_string_literal: true require 'gcp_backend' module Inspec::Resources class GoogleStorageBucketIamBindings < GcpResourceBase name 'google_storage_bucket_iam_bindings' desc 'Verifies settings for GCP storage bucket IAM bindings in bulk' example " describe google_storage_bucket_iam_bindings(bucket: 'bucket-buvsjjcndqz') do it { should exist } ... end " def initialize(opts = {}) # Call the parent class constructor super(opts) @bucket = opts[:bucket] end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:iam_binding_roles, field: :iam_binding_role) filter_table_config.connect(self, :fetch_data) def fetch_data iam_binding_rows = [] catch_gcp_errors do @iam_bindings = @gcp.gcp_storage_client.get_bucket_iam_policy(@bucket) end return [] if !@iam_bindings || !@iam_bindings.bindings @iam_bindings.bindings.map do |iam_binding| iam_binding_rows+=[{ iam_binding_role: iam_binding.role }] end @table = iam_binding_rows end end end ================================================ FILE: libraries/google_storage_bucket_iam_policy.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/iam/property/iam_policy_audit_configs' require 'google/iam/property/iam_policy_bindings' # A provider to manage Cloud Storage IAM Policy resources. class BucketIamPolicy < GcpResourceBase name 'google_storage_bucket_iam_policy' desc 'Bucket Iam Policy' supports platform: 'gcp' attr_reader :params attr_reader :bindings attr_reader :audit_configs def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) end def exists? !@fetched.nil? end def to_s "Bucket IamPolicy #{@params[:bucket]}" end def iam_binding_roles @bindings.map(&:role) end def count @bindings.size end private def product_url 'https://storage.googleapis.com/storage/v1/' end def resource_base_url 'b/{{bucket}}/iam' end end ================================================ FILE: libraries/google_storage_bucket_object.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Cloud Storage resources. class StorageBucketObject < GcpResourceBase name 'google_storage_bucket_object' desc 'BucketObject' supports platform: 'gcp' attr_reader :params attr_reader :bucket attr_reader :object attr_reader :content_type attr_reader :crc32c attr_reader :etag attr_reader :generation attr_reader :id attr_reader :md5_hash attr_reader :media_link attr_reader :metageneration attr_reader :name attr_reader :size attr_reader :storage_class attr_reader :time_created attr_reader :time_deleted attr_reader :time_storage_class_updated attr_reader :time_updated def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @bucket = @fetched['bucket'] @object = @fetched['object'] @content_type = @fetched['contentType'] @crc32c = @fetched['crc32c'] @etag = @fetched['etag'] @generation = @fetched['generation'] @id = @fetched['id'] @md5_hash = @fetched['md5Hash'] @media_link = @fetched['mediaLink'] @metageneration = @fetched['metageneration'] @name = @fetched['name'] @size = @fetched['size'] @storage_class = @fetched['storageClass'] @time_created = parse_time_string(@fetched['timeCreated']) @time_deleted = parse_time_string(@fetched['timeDeleted']) @time_storage_class_updated = parse_time_string(@fetched['timeStorageClassUpdated']) @time_updated = parse_time_string(@fetched['updated']) end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end def exists? !@fetched.nil? end def to_s "BucketObject #{@params[:object]}" end # rubocop:disable Lint/DuplicateMethods def size @size&.to_i end # rubocop:enable Lint/DuplicateMethods private def product_url(_ = nil) 'https://storage.googleapis.com/storage/v1/' end def resource_base_url 'b/{{bucket}}/o/{{object}}' end end ================================================ FILE: libraries/google_storage_bucket_objects.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class StorageBucketObjects < GcpResourceBase name 'google_storage_bucket_objects' desc 'BucketObject plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:object_buckets, field: :object_bucket) filter_table_config.add(:objects, field: :object) filter_table_config.add(:content_types, field: :content_type) filter_table_config.add(:crc32cs, field: :crc32c) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:generations, field: :generation) filter_table_config.add(:ids, field: :id) filter_table_config.add(:md5_hashes, field: :md5_hash) filter_table_config.add(:media_links, field: :media_link) filter_table_config.add(:metagenerations, field: :metageneration) filter_table_config.add(:object_names, field: :object_name) filter_table_config.add(:sizes, field: :size) filter_table_config.add(:storage_classes, field: :storage_class) filter_table_config.add(:object_created_times, field: :object_created_times) filter_table_config.add(:time_deleteds, field: :time_deleted) filter_table_config.add(:time_storage_class_updateds, field: :time_storage_class_updated) filter_table_config.add(:time_updateds, field: :time_updated) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'bucket' => ->(obj) { [:object_bucket, obj['bucket']] }, 'object' => ->(obj) { [:object, obj['object']] }, 'contentType' => ->(obj) { [:content_type, obj['contentType']] }, 'crc32c' => ->(obj) { [:crc32c, obj['crc32c']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'generation' => ->(obj) { [:generation, obj['generation']] }, 'id' => ->(obj) { [:id, obj['id']] }, 'md5Hash' => ->(obj) { [:md5_hash, obj['md5Hash']] }, 'mediaLink' => ->(obj) { [:media_link, obj['mediaLink']] }, 'metageneration' => ->(obj) { [:metageneration, obj['metageneration']] }, 'name' => ->(obj) { [:object_name, obj['name']] }, 'size' => ->(obj) { [:size, obj['size']] }, 'storageClass' => ->(obj) { [:storage_class, obj['storageClass']] }, 'timeCreated' => ->(obj) { [:object_created_times, parse_time_string(obj['timeCreated'])] }, 'timeDeleted' => ->(obj) { [:time_deleted, parse_time_string(obj['timeDeleted'])] }, 'timeStorageClassUpdated' => ->(obj) { [:time_storage_class_updated, parse_time_string(obj['timeStorageClassUpdated'])] }, 'updated' => ->(obj) { [:time_updated, parse_time_string(obj['updated'])] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://storage.googleapis.com/storage/v1/' end def resource_base_url 'b/{{bucket}}/o' end end ================================================ FILE: libraries/google_storage_buckets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class StorageBuckets < GcpResourceBase name 'google_storage_buckets' desc 'Bucket plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:acls, field: :acl) filter_table_config.add(:cors, field: :cors) filter_table_config.add(:default_event_based_holds, field: :default_event_based_hold) filter_table_config.add(:default_object_acls, field: :default_object_acl) filter_table_config.add(:bucket_ids, field: :bucket_id) filter_table_config.add(:lifecycles, field: :lifecycle) filter_table_config.add(:bucket_locations, field: :bucket_location) filter_table_config.add(:loggings, field: :logging) filter_table_config.add(:metagenerations, field: :metageneration) filter_table_config.add(:bucket_names, field: :bucket_name) filter_table_config.add(:owners, field: :owner) filter_table_config.add(:bucket_project_numbers, field: :bucket_project_number) filter_table_config.add(:storage_classes, field: :storage_class) filter_table_config.add(:time_createds, field: :time_created) filter_table_config.add(:updateds, field: :updated) filter_table_config.add(:versionings, field: :versioning) filter_table_config.add(:websites, field: :website) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:encryptions, field: :encryption) filter_table_config.add(:retention_policies, field: :retention_policy) filter_table_config.add(:projects, field: :project) filter_table_config.add(:predefined_default_object_acls, field: :predefined_default_object_acl) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('items') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'acl' => ->(obj) { [:acl, GoogleInSpec::Storage::Property::BucketAclArray.parse(obj['acl'], to_s)] }, 'cors' => ->(obj) { [:cors, GoogleInSpec::Storage::Property::BucketCorsArray.parse(obj['cors'], to_s)] }, 'defaultEventBasedHold' => ->(obj) { [:default_event_based_hold, obj['defaultEventBasedHold']] }, 'defaultObjectAcl' => ->(obj) { [:default_object_acl, GoogleInSpec::Storage::Property::BucketDefaultObjectAclArray.parse(obj['defaultObjectAcl'], to_s)] }, 'id' => ->(obj) { [:bucket_id, obj['id']] }, 'lifecycle' => ->(obj) { [:lifecycle, GoogleInSpec::Storage::Property::BucketLifecycle.new(obj['lifecycle'], to_s)] }, 'location' => ->(obj) { [:bucket_location, obj['location']] }, 'logging' => ->(obj) { [:logging, GoogleInSpec::Storage::Property::BucketLogging.new(obj['logging'], to_s)] }, 'metageneration' => ->(obj) { [:metageneration, obj['metageneration']] }, 'name' => ->(obj) { [:bucket_name, obj['name']] }, 'owner' => ->(obj) { [:owner, GoogleInSpec::Storage::Property::BucketOwner.new(obj['owner'], to_s)] }, 'projectNumber' => ->(obj) { [:bucket_project_number, obj['projectNumber']] }, 'storageClass' => ->(obj) { [:storage_class, obj['storageClass']] }, 'timeCreated' => ->(obj) { [:time_created, parse_time_string(obj['timeCreated'])] }, 'updated' => ->(obj) { [:updated, parse_time_string(obj['updated'])] }, 'versioning' => ->(obj) { [:versioning, GoogleInSpec::Storage::Property::BucketVersioning.new(obj['versioning'], to_s)] }, 'website' => ->(obj) { [:website, GoogleInSpec::Storage::Property::BucketWebsite.new(obj['website'], to_s)] }, 'labels' => ->(obj) { [:labels, obj['labels']] }, 'encryption' => ->(obj) { [:encryption, GoogleInSpec::Storage::Property::BucketEncryption.new(obj['encryption'], to_s)] }, 'retentionPolicy' => ->(obj) { [:retention_policy, GoogleInSpec::Storage::Property::BucketRetentionPolicy.new(obj['retentionPolicy'], to_s)] }, 'project' => ->(obj) { [:project, obj['project']] }, 'predefinedDefaultObjectAcl' => ->(obj) { [:predefined_default_object_acl, obj['predefinedDefaultObjectAcl']] }, } end # Handles parsing RFC3339 time string def parse_time_string(time_string) time_string ? Time.parse(time_string) : nil end private def product_url(_ = nil) 'https://storage.googleapis.com/storage/v1/' end def resource_base_url 'b?project={{project}}&projection=full' end end ================================================ FILE: libraries/google_storage_default_object_acl.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/storage/property/defaultobjectacl_project_team' # A provider to manage Cloud Storage resources. class StorageDefaultObjectACL < GcpResourceBase name 'google_storage_default_object_acl' desc 'DefaultObjectACL' supports platform: 'gcp' attr_reader :params attr_reader :domain attr_reader :email attr_reader :entity attr_reader :entity_id attr_reader :generation attr_reader :id attr_reader :object attr_reader :project_team attr_reader :role def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @domain = @fetched['domain'] @email = @fetched['email'] @entity = @fetched['entity'] @entity_id = @fetched['entityId'] @generation = @fetched['generation'] @id = @fetched['id'] @object = @fetched['object'] @project_team = GoogleInSpec::Storage::Property::DefaultObjectACLProjectTeam.new(@fetched['projectTeam'], to_s) @role = @fetched['role'] end def exists? !@fetched.nil? end def to_s "DefaultObjectACL #{@params[:entity]}" end def bucket @params[:bucket] end private def product_url(_ = nil) 'https://storage.googleapis.com/storage/v1/' end def resource_base_url 'b/{{bucket}}/defaultObjectAcl/{{entity}}' end end ================================================ FILE: libraries/google_storage_object_acl.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/storage/property/objectacl_project_team' # A provider to manage Cloud Storage resources. class StorageObjectACL < GcpResourceBase name 'google_storage_object_acl' desc 'ObjectACL' supports platform: 'gcp' attr_reader :params attr_reader :domain attr_reader :email attr_reader :entity attr_reader :entity_id attr_reader :generation attr_reader :id attr_reader :object attr_reader :project_team attr_reader :role def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @domain = @fetched['domain'] @email = @fetched['email'] @entity = @fetched['entity'] @entity_id = @fetched['entityId'] @generation = @fetched['generation'] @id = @fetched['id'] @object = @fetched['object'] @project_team = GoogleInSpec::Storage::Property::ObjectACLProjectTeam.new(@fetched['projectTeam'], to_s) @role = @fetched['role'] end def exists? !@fetched.nil? end def to_s "ObjectACL #{@params[:entity]}" end def bucket @params[:bucket] end private def product_url(_ = nil) 'https://storage.googleapis.com/storage/v1/' end def resource_base_url 'b/{{bucket}}/o/{{object}}/acl/{{entity}}' end end ================================================ FILE: libraries/google_user.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/admin_directory_v1' module Inspec::Resources class GoogleUser < GcpResourceBase name 'google_user' desc 'Verifies settings for a GCP user' example " describe google_user(user_key: '110491234567894702010') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @display_name = opts[:user_key] catch_gcp_errors do @user = @gcp.gcp_admin_client.get_user(opts[:user_key]) create_resource_methods(@user) end end def exists? !@user.nil? end def suspended? return false if !defined?(@user.suspended) || @user.suspended.nil? @user.suspended end def has_mfa_enabled? return false if !defined?(@user.is_enrolled_in2_sv) || @user.is_enrolled_in2_sv.nil? @user.is_enrolled_in2_sv end def to_s "User #{@display_name}" end end end ================================================ FILE: libraries/google_users.rb ================================================ # frozen_string_literal: true require 'gcp_backend' require 'google/apis/admin_directory_v1' module Inspec::Resources class GoogleUsers < GcpResourceBase name 'google_users' desc 'Verifies settings for GCP users in bulk' example " describe google_users(customer: 'my_customer') do it { should exist } end " def initialize(opts = {}) # Call the parent class constructor super(opts) @customer = opts[:customer] || 'my_customer' @domain = opts[:domain] || '' end # FilterTable setup filter_table_config = FilterTable.create filter_table_config.add(:user_ids, field: :user_id) filter_table_config.add(:user_full_names, field: :user_full_name) filter_table_config.add(:user_emails, field: :user_email) filter_table_config.connect(self, :fetch_data) def fetch_data user_rows = [] next_page = nil loop do catch_gcp_errors do @users = @gcp.gcp_admin_client.list_users(customer: @customer, domain: @domain, page_token: next_page) end return [] if !@users || !@users.users @users.users.map do |user| user_rows+=[{ user_id: user.id, user_name: user.name.full_name, user_email: user.primary_email }] end next_page = @users.next_page_token break unless next_page end @table = user_rows end end end ================================================ FILE: libraries/google_vertex_ai_batch_prediction_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/batchpredictionjob_completion_stats' require 'google/vertexai/property/batchpredictionjob_dedicated_resources' require 'google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec' require 'google/vertexai/property/batchpredictionjob_encryption_spec' require 'google/vertexai/property/batchpredictionjob_error' require 'google/vertexai/property/batchpredictionjob_explanation_spec' require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata' require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs' require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/batchpredictionjob_espigabb_config' require 'google/vertexai/property/batchpredictionjob_espigasg_config' require 'google/vertexai/property/batchpredictionjob_espigasgcfn_sigma' require 'google/vertexai/property/batchpredictionjob_espigasgcfnsn_sigma' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/batchpredictionjob_espxasgcfn_sigma' require 'google/vertexai/property/batchpredictionjob_espxasgcfnsn_sigma' require 'google/vertexai/property/batchpredictionjob_input_config' require 'google/vertexai/property/batchpredictionjob_input_config_bigquery_source' require 'google/vertexai/property/batchpredictionjob_input_config_gcs_source' require 'google/vertexai/property/batchpredictionjob_instance_config' require 'google/vertexai/property/batchpredictionjob_labels' require 'google/vertexai/property/batchpredictionjob_manual_batch_tuning_parameters' require 'google/vertexai/property/batchpredictionjob_output_config' require 'google/vertexai/property/batchpredictionjob_output_config_bigquery_destination' require 'google/vertexai/property/batchpredictionjob_output_config_gcs_destination' require 'google/vertexai/property/batchpredictionjob_output_info' require 'google/vertexai/property/batchpredictionjob_partial_failures' require 'google/vertexai/property/batchpredictionjob_resources_consumed' require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model' require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec' require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env' require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports' require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata' # A provider to manage Vertex AI resources. class VertexAIBatchPredictionJob < GcpResourceBase name 'google_vertex_ai_batch_prediction_job' desc 'BatchPredictionJob' supports platform: 'gcp' attr_reader :params attr_reader :create_time attr_reader :model_parameters attr_reader :instance_config attr_reader :model_version_id attr_reader :dedicated_resources attr_reader :output_info attr_reader :disable_container_logging attr_reader :explanation_spec attr_reader :end_time attr_reader :generate_explanation attr_reader :resources_consumed attr_reader :error attr_reader :input_config attr_reader :unmanaged_container_model attr_reader :completion_stats attr_reader :start_time attr_reader :manual_batch_tuning_parameters attr_reader :update_time attr_reader :name attr_reader :labels attr_reader :state attr_reader :encryption_spec attr_reader :partial_failures attr_reader :model attr_reader :output_config attr_reader :display_name attr_reader :service_account def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @create_time = @fetched['createTime'] @model_parameters = @fetched['modelParameters'] @instance_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobInstanceConfig.new(@fetched['instanceConfig'], to_s) @model_version_id = @fetched['modelVersionId'] @dedicated_resources = GoogleInSpec::VertexAI::Property::BatchPredictionJobDedicatedResources.new(@fetched['dedicatedResources'], to_s) @output_info = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputInfo.new(@fetched['outputInfo'], to_s) @disable_container_logging = @fetched['disableContainerLogging'] @explanation_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpec.new(@fetched['explanationSpec'], to_s) @end_time = @fetched['endTime'] @generate_explanation = @fetched['generateExplanation'] @resources_consumed = GoogleInSpec::VertexAI::Property::BatchPredictionJobResourcesConsumed.new(@fetched['resourcesConsumed'], to_s) @error = GoogleInSpec::VertexAI::Property::BatchPredictionJobError.new(@fetched['error'], to_s) @input_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfig.new(@fetched['inputConfig'], to_s) @unmanaged_container_model = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModel.new(@fetched['unmanagedContainerModel'], to_s) @completion_stats = GoogleInSpec::VertexAI::Property::BatchPredictionJobCompletionStats.new(@fetched['completionStats'], to_s) @start_time = @fetched['startTime'] @manual_batch_tuning_parameters = GoogleInSpec::VertexAI::Property::BatchPredictionJobManualBatchTuningParameters.new(@fetched['manualBatchTuningParameters'], to_s) @update_time = @fetched['updateTime'] @name = @fetched['name'] @labels = GoogleInSpec::VertexAI::Property::BatchPredictionJobLabels.new(@fetched['labels'], to_s) @state = @fetched['state'] @encryption_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @partial_failures = GoogleInSpec::VertexAI::Property::BatchPredictionJobPartialFailuresArray.parse(@fetched['partialFailures'], to_s) @model = @fetched['model'] @output_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfig.new(@fetched['outputConfig'], to_s) @display_name = @fetched['displayName'] @service_account = @fetched['serviceAccount'] end def exists? !@fetched.nil? end def to_s "BatchPredictionJob #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_batch_prediction_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIBatchPredictionJobs < GcpResourceBase name 'google_vertex_ai_batch_prediction_jobs' desc 'BatchPredictionJob plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:model_parameters, field: :model_parameters) filter_table_config.add(:instance_configs, field: :instance_config) filter_table_config.add(:model_version_ids, field: :model_version_id) filter_table_config.add(:dedicated_resources, field: :dedicated_resources) filter_table_config.add(:output_infos, field: :output_info) filter_table_config.add(:disable_container_loggings, field: :disable_container_logging) filter_table_config.add(:explanation_specs, field: :explanation_spec) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:generate_explanations, field: :generate_explanation) filter_table_config.add(:resources_consumeds, field: :resources_consumed) filter_table_config.add(:errors, field: :error) filter_table_config.add(:input_configs, field: :input_config) filter_table_config.add(:unmanaged_container_models, field: :unmanaged_container_model) filter_table_config.add(:completion_stats, field: :completion_stats) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:manual_batch_tuning_parameters, field: :manual_batch_tuning_parameters) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:names, field: :name) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:states, field: :state) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:partial_failures, field: :partial_failures) filter_table_config.add(:models, field: :model) filter_table_config.add(:output_configs, field: :output_config) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:service_accounts, field: :service_account) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('batchPredictionJobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'modelParameters' => ->(obj) { [:model_parameters, obj['modelParameters']] }, 'instanceConfig' => ->(obj) { [:instance_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobInstanceConfig.new(obj['instanceConfig'], to_s)] }, 'modelVersionId' => ->(obj) { [:model_version_id, obj['modelVersionId']] }, 'dedicatedResources' => ->(obj) { [:dedicated_resources, GoogleInSpec::VertexAI::Property::BatchPredictionJobDedicatedResources.new(obj['dedicatedResources'], to_s)] }, 'outputInfo' => ->(obj) { [:output_info, GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputInfo.new(obj['outputInfo'], to_s)] }, 'disableContainerLogging' => ->(obj) { [:disable_container_logging, obj['disableContainerLogging']] }, 'explanationSpec' => ->(obj) { [:explanation_spec, GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpec.new(obj['explanationSpec'], to_s)] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'generateExplanation' => ->(obj) { [:generate_explanation, obj['generateExplanation']] }, 'resourcesConsumed' => ->(obj) { [:resources_consumed, GoogleInSpec::VertexAI::Property::BatchPredictionJobResourcesConsumed.new(obj['resourcesConsumed'], to_s)] }, 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::BatchPredictionJobError.new(obj['error'], to_s)] }, 'inputConfig' => ->(obj) { [:input_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfig.new(obj['inputConfig'], to_s)] }, 'unmanagedContainerModel' => ->(obj) { [:unmanaged_container_model, GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModel.new(obj['unmanagedContainerModel'], to_s)] }, 'completionStats' => ->(obj) { [:completion_stats, GoogleInSpec::VertexAI::Property::BatchPredictionJobCompletionStats.new(obj['completionStats'], to_s)] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'manualBatchTuningParameters' => ->(obj) { [:manual_batch_tuning_parameters, GoogleInSpec::VertexAI::Property::BatchPredictionJobManualBatchTuningParameters.new(obj['manualBatchTuningParameters'], to_s)] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::BatchPredictionJobLabels.new(obj['labels'], to_s)] }, 'state' => ->(obj) { [:state, obj['state']] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::BatchPredictionJobEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'partialFailures' => ->(obj) { [:partial_failures, GoogleInSpec::VertexAI::Property::BatchPredictionJobPartialFailuresArray.parse(obj['partialFailures'], to_s)] }, 'model' => ->(obj) { [:model, obj['model']] }, 'outputConfig' => ->(obj) { [:output_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfig.new(obj['outputConfig'], to_s)] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'serviceAccount' => ->(obj) { [:service_account, obj['serviceAccount']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/batchPredictionJobs' end end ================================================ FILE: libraries/google_vertex_ai_custom_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/customjob_encryption_spec' require 'google/vertexai/property/customjob_error' require 'google/vertexai/property/customjob_job_spec' require 'google/vertexai/property/customjob_job_spec_base_output_directory' require 'google/vertexai/property/customjob_job_spec_scheduling' require 'google/vertexai/property/customjob_job_spec_worker_pool_specs' require 'google/vertexai/property/customjob_labels' require 'google/vertexai/property/customjob_web_access_uris' # A provider to manage Vertex AI resources. class VertexAICustomJob < GcpResourceBase name 'google_vertex_ai_custom_job' desc 'CustomJob' supports platform: 'gcp' attr_reader :params attr_reader :error attr_reader :web_access_uris attr_reader :job_spec attr_reader :start_time attr_reader :labels attr_reader :encryption_spec attr_reader :create_time attr_reader :update_time attr_reader :end_time attr_reader :state attr_reader :display_name attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @error = GoogleInSpec::VertexAI::Property::CustomJobError.new(@fetched['error'], to_s) @web_access_uris = GoogleInSpec::VertexAI::Property::CustomJobWebAccessUris.new(@fetched['webAccessUris'], to_s) @job_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpec.new(@fetched['jobSpec'], to_s) @start_time = @fetched['startTime'] @labels = GoogleInSpec::VertexAI::Property::CustomJobLabels.new(@fetched['labels'], to_s) @encryption_spec = GoogleInSpec::VertexAI::Property::CustomJobEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @end_time = @fetched['endTime'] @state = @fetched['state'] @display_name = @fetched['displayName'] @name = @fetched['name'] end def exists? !@fetched.nil? end def to_s "CustomJob #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_custom_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAICustomJobs < GcpResourceBase name 'google_vertex_ai_custom_jobs' desc 'CustomJob plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:errors, field: :error) filter_table_config.add(:web_access_uris, field: :web_access_uris) filter_table_config.add(:job_specs, field: :job_spec) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:states, field: :state) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('customJobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::CustomJobError.new(obj['error'], to_s)] }, 'webAccessUris' => ->(obj) { [:web_access_uris, GoogleInSpec::VertexAI::Property::CustomJobWebAccessUris.new(obj['webAccessUris'], to_s)] }, 'jobSpec' => ->(obj) { [:job_spec, GoogleInSpec::VertexAI::Property::CustomJobJobSpec.new(obj['jobSpec'], to_s)] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::CustomJobLabels.new(obj['labels'], to_s)] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::CustomJobEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/customJobs' end end ================================================ FILE: libraries/google_vertex_ai_dataset.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/dataset_encryption_spec' require 'google/vertexai/property/dataset_labels' require 'google/vertexai/property/dataset_saved_queries' # A provider to manage Vertex AI resources. class VertexAIDataset < GcpResourceBase name 'google_vertex_ai_dataset' desc 'Dataset' supports platform: 'gcp' attr_reader :params attr_reader :saved_queries attr_reader :create_time attr_reader :encryption_spec attr_reader :name attr_reader :metadata attr_reader :etag attr_reader :description attr_reader :labels attr_reader :metadata_schema_uri attr_reader :metadata_artifact attr_reader :update_time attr_reader :data_item_count attr_reader :display_name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @saved_queries = GoogleInSpec::VertexAI::Property::DatasetSavedQueriesArray.parse(@fetched['savedQueries'], to_s) @create_time = @fetched['createTime'] @encryption_spec = GoogleInSpec::VertexAI::Property::DatasetEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @name = @fetched['name'] @metadata = @fetched['metadata'] @etag = @fetched['etag'] @description = @fetched['description'] @labels = GoogleInSpec::VertexAI::Property::DatasetLabels.new(@fetched['labels'], to_s) @metadata_schema_uri = @fetched['metadataSchemaUri'] @metadata_artifact = @fetched['metadataArtifact'] @update_time = @fetched['updateTime'] @data_item_count = @fetched['dataItemCount'] @display_name = @fetched['displayName'] end def exists? !@fetched.nil? end def to_s "Dataset #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_dataset_data_item_annotations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIDatasetDataItemAnnotations < GcpResourceBase name 'google_vertex_ai_dataset_data_item_annotations' desc 'DatasetDataItemAnnotation plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:payload_schema_uris, field: :payload_schema_uri) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:payloads, field: :payload) filter_table_config.add(:annotation_sources, field: :annotation_source) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('annotations') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'payloadSchemaUri' => ->(obj) { [:payload_schema_uri, obj['payloadSchemaUri']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::DatasetDataItemAnnotationLabels.new(obj['labels'], to_s)] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'payload' => ->(obj) { [:payload, obj['payload']] }, 'annotationSource' => ->(obj) { [:annotation_source, obj['annotationSource']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/annotations' end end ================================================ FILE: libraries/google_vertex_ai_datasets.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIDatasets < GcpResourceBase name 'google_vertex_ai_datasets' desc 'Dataset plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:saved_queries, field: :saved_queries) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:names, field: :name) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:metadata_schema_uris, field: :metadata_schema_uri) filter_table_config.add(:metadata_artifacts, field: :metadata_artifact) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:data_item_counts, field: :data_item_count) filter_table_config.add(:display_names, field: :display_name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('datasets') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'savedQueries' => ->(obj) { [:saved_queries, GoogleInSpec::VertexAI::Property::DatasetSavedQueriesArray.parse(obj['savedQueries'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::DatasetEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::DatasetLabels.new(obj['labels'], to_s)] }, 'metadataSchemaUri' => ->(obj) { [:metadata_schema_uri, obj['metadataSchemaUri']] }, 'metadataArtifact' => ->(obj) { [:metadata_artifact, obj['metadataArtifact']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'dataItemCount' => ->(obj) { [:data_item_count, obj['dataItemCount']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/datasets' end end ================================================ FILE: libraries/google_vertex_ai_datasets_annotation_spec.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Vertex AI resources. class VertexAIDatasetsAnnotationSpec < GcpResourceBase name 'google_vertex_ai_datasets_annotation_spec' desc 'DatasetsAnnotationSpec' supports platform: 'gcp' attr_reader :params attr_reader :display_name attr_reader :name attr_reader :etag attr_reader :create_time attr_reader :update_time def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @display_name = @fetched['displayName'] @name = @fetched['name'] @etag = @fetched['etag'] @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] end def exists? !@fetched.nil? end def to_s "DatasetsAnnotationSpec #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_datasets_data_items.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIDatasetsDataItems < GcpResourceBase name 'google_vertex_ai_datasets_data_items' desc 'DatasetsDataItem plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:payloads, field: :payload) filter_table_config.add(:labels, field: :labels) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('dataItems') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'payload' => ->(obj) { [:payload, obj['payload']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::DatasetsDataItemLabels.new(obj['labels'], to_s)] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/dataItems' end end ================================================ FILE: libraries/google_vertex_ai_datasets_saved_queries.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIDatasetsSavedQuerys < GcpResourceBase name 'google_vertex_ai_datasets_saved_queries' desc 'DatasetsSavedQuery plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:annotation_spec_counts, field: :annotation_spec_count) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:support_automl_trainings, field: :support_automl_training) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:problem_types, field: :problem_type) filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:annotation_filters, field: :annotation_filter) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('savedQueries') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'annotationSpecCount' => ->(obj) { [:annotation_spec_count, obj['annotationSpecCount']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'supportAutomlTraining' => ->(obj) { [:support_automl_training, obj['supportAutomlTraining']] }, 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, 'problemType' => ->(obj) { [:problem_type, obj['problemType']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'annotationFilter' => ->(obj) { [:annotation_filter, obj['annotationFilter']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/savedQueries' end end ================================================ FILE: libraries/google_vertex_ai_endpoint.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/endpoint_deployed_models' require 'google/vertexai/property/endpoint_encryption_spec' require 'google/vertexai/property/endpoint_labels' require 'google/vertexai/property/endpoint_predict_request_response_logging_config' require 'google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination' require 'google/vertexai/property/endpoint_traffic_split' # A provider to manage Vertex AI resources. class VertexAIEndpoint < GcpResourceBase name 'google_vertex_ai_endpoint' desc 'Endpoint' supports platform: 'gcp' attr_reader :params attr_reader :encryption_spec attr_reader :enable_private_service_connect attr_reader :update_time attr_reader :model_deployment_monitoring_job attr_reader :description attr_reader :deployed_models attr_reader :network attr_reader :traffic_split attr_reader :labels attr_reader :display_name attr_reader :predict_request_response_logging_config attr_reader :etag attr_reader :create_time attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @encryption_spec = GoogleInSpec::VertexAI::Property::EndpointEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @enable_private_service_connect = @fetched['enablePrivateServiceConnect'] @update_time = @fetched['updateTime'] @model_deployment_monitoring_job = @fetched['modelDeploymentMonitoringJob'] @description = @fetched['description'] @deployed_models = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsArray.parse(@fetched['deployedModels'], to_s) @network = @fetched['network'] @traffic_split = GoogleInSpec::VertexAI::Property::EndpointTrafficSplit.new(@fetched['trafficSplit'], to_s) @labels = GoogleInSpec::VertexAI::Property::EndpointLabels.new(@fetched['labels'], to_s) @display_name = @fetched['displayName'] @predict_request_response_logging_config = GoogleInSpec::VertexAI::Property::EndpointPredictRequestResponseLoggingConfig.new(@fetched['predictRequestResponseLoggingConfig'], to_s) @etag = @fetched['etag'] @create_time = @fetched['createTime'] @name = @fetched['name'] end def exists? !@fetched.nil? end def to_s "Endpoint #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_endpoints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIEndpoints < GcpResourceBase name 'google_vertex_ai_endpoints' desc 'Endpoint plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:enable_private_service_connects, field: :enable_private_service_connect) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:model_deployment_monitoring_jobs, field: :model_deployment_monitoring_job) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:deployed_models, field: :deployed_models) filter_table_config.add(:networks, field: :network) filter_table_config.add(:traffic_splits, field: :traffic_split) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:predict_request_response_logging_configs, field: :predict_request_response_logging_config) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('endpoints') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::EndpointEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'enablePrivateServiceConnect' => ->(obj) { [:enable_private_service_connect, obj['enablePrivateServiceConnect']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'modelDeploymentMonitoringJob' => ->(obj) { [:model_deployment_monitoring_job, obj['modelDeploymentMonitoringJob']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'deployedModels' => ->(obj) { [:deployed_models, GoogleInSpec::VertexAI::Property::EndpointDeployedModelsArray.parse(obj['deployedModels'], to_s)] }, 'network' => ->(obj) { [:network, obj['network']] }, 'trafficSplit' => ->(obj) { [:traffic_split, GoogleInSpec::VertexAI::Property::EndpointTrafficSplit.new(obj['trafficSplit'], to_s)] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::EndpointLabels.new(obj['labels'], to_s)] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'predictRequestResponseLoggingConfig' => ->(obj) { [:predict_request_response_logging_config, GoogleInSpec::VertexAI::Property::EndpointPredictRequestResponseLoggingConfig.new(obj['predictRequestResponseLoggingConfig'], to_s)] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/endpoints' end end ================================================ FILE: libraries/google_vertex_ai_featurestore.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/featurestore_encryption_spec' require 'google/vertexai/property/featurestore_labels' require 'google/vertexai/property/featurestore_online_serving_config' require 'google/vertexai/property/featurestore_online_serving_config_scaling' # A provider to manage Vertex AI resources. class VertexAIFeaturestore < GcpResourceBase name 'google_vertex_ai_featurestore' desc 'Featurestore' supports platform: 'gcp' attr_reader :params attr_reader :state attr_reader :create_time attr_reader :etag attr_reader :online_storage_ttl_days attr_reader :encryption_spec attr_reader :labels attr_reader :update_time attr_reader :name attr_reader :online_serving_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @state = @fetched['state'] @create_time = @fetched['createTime'] @etag = @fetched['etag'] @online_storage_ttl_days = @fetched['onlineStorageTtlDays'] @encryption_spec = GoogleInSpec::VertexAI::Property::FeaturestoreEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @labels = GoogleInSpec::VertexAI::Property::FeaturestoreLabels.new(@fetched['labels'], to_s) @update_time = @fetched['updateTime'] @name = @fetched['name'] @online_serving_config = GoogleInSpec::VertexAI::Property::FeaturestoreOnlineServingConfig.new(@fetched['onlineServingConfig'], to_s) end def exists? !@fetched.nil? end def to_s "Featurestore #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_featurestore_entity_type_feature.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/featurestoreentitytypefeature_labels' # A provider to manage Vertex AI resources. class VertexAIFeaturestoreEntityTypeFeature < GcpResourceBase name 'google_vertex_ai_featurestore_entity_type_feature' desc 'FeaturestoreEntityTypeFeature' supports platform: 'gcp' attr_reader :params attr_reader :description attr_reader :create_time attr_reader :monitoring_stats_anomalies attr_reader :etag attr_reader :labels attr_reader :name attr_reader :update_time attr_reader :disable_monitoring attr_reader :value_type def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @description = @fetched['description'] @create_time = @fetched['createTime'] @monitoring_stats_anomalies = @fetched['monitoringStatsAnomalies'] @etag = @fetched['etag'] @labels = GoogleInSpec::VertexAI::Property::FeaturestoreEntityTypeFeatureLabels.new(@fetched['labels'], to_s) @name = @fetched['name'] @update_time = @fetched['updateTime'] @disable_monitoring = @fetched['disableMonitoring'] @value_type = @fetched['valueType'] end def exists? !@fetched.nil? end def to_s "FeaturestoreEntityTypeFeature #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_featurestore_entity_type_features.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIFeaturestoreEntityTypeFeatures < GcpResourceBase name 'google_vertex_ai_featurestore_entity_type_features' desc 'FeaturestoreEntityTypeFeature plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:monitoring_stats_anomalies, field: :monitoring_stats_anomalies) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:names, field: :name) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:disable_monitorings, field: :disable_monitoring) filter_table_config.add(:value_types, field: :value_type) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('features') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'description' => ->(obj) { [:description, obj['description']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'monitoringStatsAnomalies' => ->(obj) { [:monitoring_stats_anomalies, obj['monitoringStatsAnomalies']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::FeaturestoreEntityTypeFeatureLabels.new(obj['labels'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'disableMonitoring' => ->(obj) { [:disable_monitoring, obj['disableMonitoring']] }, 'valueType' => ->(obj) { [:value_type, obj['valueType']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/features' end end ================================================ FILE: libraries/google_vertex_ai_featurestores.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIFeaturestores < GcpResourceBase name 'google_vertex_ai_featurestores' desc 'Featurestore plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:states, field: :state) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:online_storage_ttl_days, field: :online_storage_ttl_days) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:names, field: :name) filter_table_config.add(:online_serving_configs, field: :online_serving_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('featurestores') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'state' => ->(obj) { [:state, obj['state']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'onlineStorageTtlDays' => ->(obj) { [:online_storage_ttl_days, obj['onlineStorageTtlDays']] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::FeaturestoreEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::FeaturestoreLabels.new(obj['labels'], to_s)] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'onlineServingConfig' => ->(obj) { [:online_serving_config, GoogleInSpec::VertexAI::Property::FeaturestoreOnlineServingConfig.new(obj['onlineServingConfig'], to_s)] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/featurestores' end end ================================================ FILE: libraries/google_vertex_ai_featurestores_entity_type.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/featurestoresentitytype_labels' require 'google/vertexai/property/featurestoresentitytype_monitoring_config' require 'google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config' require 'google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis' require 'google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config' require 'google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis' # A provider to manage Vertex AI resources. class VertexAIFeaturestoresEntityType < GcpResourceBase name 'google_vertex_ai_featurestores_entity_type' desc 'FeaturestoresEntityType' supports platform: 'gcp' attr_reader :params attr_reader :labels attr_reader :description attr_reader :name attr_reader :create_time attr_reader :monitoring_config attr_reader :etag attr_reader :update_time attr_reader :offline_storage_ttl_days def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @labels = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeLabels.new(@fetched['labels'], to_s) @description = @fetched['description'] @name = @fetched['name'] @create_time = @fetched['createTime'] @monitoring_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfig.new(@fetched['monitoringConfig'], to_s) @etag = @fetched['etag'] @update_time = @fetched['updateTime'] @offline_storage_ttl_days = @fetched['offlineStorageTtlDays'] end def exists? !@fetched.nil? end def to_s "FeaturestoresEntityType #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_featurestores_entity_types.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIFeaturestoresEntityTypes < GcpResourceBase name 'google_vertex_ai_featurestores_entity_types' desc 'FeaturestoresEntityType plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:labels, field: :labels) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:monitoring_configs, field: :monitoring_config) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:offline_storage_ttl_days, field: :offline_storage_ttl_days) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('entityTypes') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeLabels.new(obj['labels'], to_s)] }, 'description' => ->(obj) { [:description, obj['description']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'monitoringConfig' => ->(obj) { [:monitoring_config, GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfig.new(obj['monitoringConfig'], to_s)] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'offlineStorageTtlDays' => ->(obj) { [:offline_storage_ttl_days, obj['offlineStorageTtlDays']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/entityTypes' end end ================================================ FILE: libraries/google_vertex_ai_hyperparameter_tuning_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/hyperparametertuningjob_labels' # A provider to manage Vertex AI resources. class VertexAIHyperparameterTuningJob < GcpResourceBase name 'google_vertex_ai_hyperparameter_tuning_job' desc 'HyperparameterTuningJob' supports platform: 'gcp' attr_reader :params attr_reader :study_spec attr_reader :trials attr_reader :state attr_reader :max_failed_trial_count attr_reader :encryption_spec attr_reader :error attr_reader :end_time attr_reader :update_time attr_reader :start_time attr_reader :labels attr_reader :create_time attr_reader :parallel_trial_count attr_reader :trial_job_spec attr_reader :max_trial_count attr_reader :display_name attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @study_spec = @fetched['studySpec'] @trials = @fetched['trials'] @state = @fetched['state'] @max_failed_trial_count = @fetched['maxFailedTrialCount'] @encryption_spec = @fetched['encryptionSpec'] @error = @fetched['error'] @end_time = @fetched['endTime'] @update_time = @fetched['updateTime'] @start_time = @fetched['startTime'] @labels = GoogleInSpec::VertexAI::Property::HyperparameterTuningJobLabels.new(@fetched['labels'], to_s) @create_time = @fetched['createTime'] @parallel_trial_count = @fetched['parallelTrialCount'] @trial_job_spec = @fetched['trialJobSpec'] @max_trial_count = @fetched['maxTrialCount'] @display_name = @fetched['displayName'] @name = @fetched['name'] end def exists? !@fetched.nil? end def to_s "HyperparameterTuningJob #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_hyperparameter_tuning_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIHyperparameterTuningJobs < GcpResourceBase name 'google_vertex_ai_hyperparameter_tuning_jobs' desc 'HyperparameterTuningJob plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:study_specs, field: :study_spec) filter_table_config.add(:trials, field: :trials) filter_table_config.add(:states, field: :state) filter_table_config.add(:max_failed_trial_counts, field: :max_failed_trial_count) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:errors, field: :error) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:parallel_trial_counts, field: :parallel_trial_count) filter_table_config.add(:trial_job_specs, field: :trial_job_spec) filter_table_config.add(:max_trial_counts, field: :max_trial_count) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('hyperparameterTuningJobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'studySpec' => ->(obj) { [:study_spec, obj['studySpec']] }, 'trials' => ->(obj) { [:trials, obj['trials']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'maxFailedTrialCount' => ->(obj) { [:max_failed_trial_count, obj['maxFailedTrialCount']] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, obj['encryptionSpec']] }, 'error' => ->(obj) { [:error, obj['error']] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::HyperparameterTuningJobLabels.new(obj['labels'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'parallelTrialCount' => ->(obj) { [:parallel_trial_count, obj['parallelTrialCount']] }, 'trialJobSpec' => ->(obj) { [:trial_job_spec, obj['trialJobSpec']] }, 'maxTrialCount' => ->(obj) { [:max_trial_count, obj['maxTrialCount']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/hyperparameterTuningJobs' end end ================================================ FILE: libraries/google_vertex_ai_index.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/index_labels' # A provider to manage Vertex AI resources. class VertexAIIndex < GcpResourceBase name 'google_vertex_ai_index' desc 'Index' supports platform: 'gcp' attr_reader :params attr_reader :description attr_reader :metadata attr_reader :index_stats attr_reader :name attr_reader :deployed_indexes attr_reader :display_name attr_reader :metadata_schema_uri attr_reader :index_update_method attr_reader :update_time attr_reader :create_time attr_reader :etag attr_reader :labels def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @description = @fetched['description'] @metadata = @fetched['metadata'] @index_stats = @fetched['indexStats'] @name = @fetched['name'] @deployed_indexes = @fetched['deployedIndexes'] @display_name = @fetched['displayName'] @metadata_schema_uri = @fetched['metadataSchemaUri'] @index_update_method = @fetched['indexUpdateMethod'] @update_time = @fetched['updateTime'] @create_time = @fetched['createTime'] @etag = @fetched['etag'] @labels = GoogleInSpec::VertexAI::Property::IndexLabels.new(@fetched['labels'], to_s) end def exists? !@fetched.nil? end def to_s "Index #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_index_endpoint.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/indexendpoint_deployed_indexes' require 'google/vertexai/property/indexendpoint_labels' require 'google/vertexai/property/indexendpoint_private_service_connect_config' # A provider to manage Vertex AI resources. class VertexAIIndexEndpoint < GcpResourceBase name 'google_vertex_ai_index_endpoint' desc 'IndexEndpoint' supports platform: 'gcp' attr_reader :params attr_reader :deployed_indexes attr_reader :private_service_connect_config attr_reader :display_name attr_reader :public_endpoint_enabled attr_reader :labels attr_reader :create_time attr_reader :name attr_reader :network attr_reader :update_time attr_reader :public_endpoint_domain_name attr_reader :enable_private_service_connect attr_reader :etag attr_reader :description def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @deployed_indexes = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesArray.parse(@fetched['deployedIndexes'], to_s) @private_service_connect_config = GoogleInSpec::VertexAI::Property::IndexEndpointPrivateServiceConnectConfig.new(@fetched['privateServiceConnectConfig'], to_s) @display_name = @fetched['displayName'] @public_endpoint_enabled = @fetched['publicEndpointEnabled'] @labels = GoogleInSpec::VertexAI::Property::IndexEndpointLabels.new(@fetched['labels'], to_s) @create_time = @fetched['createTime'] @name = @fetched['name'] @network = @fetched['network'] @update_time = @fetched['updateTime'] @public_endpoint_domain_name = @fetched['publicEndpointDomainName'] @enable_private_service_connect = @fetched['enablePrivateServiceConnect'] @etag = @fetched['etag'] @description = @fetched['description'] end def exists? !@fetched.nil? end def to_s "IndexEndpoint #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_index_endpoints.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIIndexEndpoints < GcpResourceBase name 'google_vertex_ai_index_endpoints' desc 'IndexEndpoint plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:deployed_indexes, field: :deployed_indexes) filter_table_config.add(:private_service_connect_configs, field: :private_service_connect_config) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:public_endpoint_enableds, field: :public_endpoint_enabled) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:names, field: :name) filter_table_config.add(:networks, field: :network) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:public_endpoint_domain_names, field: :public_endpoint_domain_name) filter_table_config.add(:enable_private_service_connects, field: :enable_private_service_connect) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:descriptions, field: :description) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('indexEndpoints') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'deployedIndexes' => ->(obj) { [:deployed_indexes, GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesArray.parse(obj['deployedIndexes'], to_s)] }, 'privateServiceConnectConfig' => ->(obj) { [:private_service_connect_config, GoogleInSpec::VertexAI::Property::IndexEndpointPrivateServiceConnectConfig.new(obj['privateServiceConnectConfig'], to_s)] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'publicEndpointEnabled' => ->(obj) { [:public_endpoint_enabled, obj['publicEndpointEnabled']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::IndexEndpointLabels.new(obj['labels'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'network' => ->(obj) { [:network, obj['network']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'publicEndpointDomainName' => ->(obj) { [:public_endpoint_domain_name, obj['publicEndpointDomainName']] }, 'enablePrivateServiceConnect' => ->(obj) { [:enable_private_service_connect, obj['enablePrivateServiceConnect']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'description' => ->(obj) { [:description, obj['description']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/indexEndpoints' end end ================================================ FILE: libraries/google_vertex_ai_indices.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIIndexs < GcpResourceBase name 'google_vertex_ai_indices' desc 'Index plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:index_stats, field: :index_stats) filter_table_config.add(:names, field: :name) filter_table_config.add(:deployed_indexes, field: :deployed_indexes) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:metadata_schema_uris, field: :metadata_schema_uri) filter_table_config.add(:index_update_methods, field: :index_update_method) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:labels, field: :labels) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('indexes') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'description' => ->(obj) { [:description, obj['description']] }, 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, 'indexStats' => ->(obj) { [:index_stats, obj['indexStats']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'deployedIndexes' => ->(obj) { [:deployed_indexes, obj['deployedIndexes']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'metadataSchemaUri' => ->(obj) { [:metadata_schema_uri, obj['metadataSchemaUri']] }, 'indexUpdateMethod' => ->(obj) { [:index_update_method, obj['indexUpdateMethod']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::IndexLabels.new(obj['labels'], to_s)] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/indexes' end end ================================================ FILE: libraries/google_vertex_ai_metadata_store.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/metadatastore_encryption_spec' require 'google/vertexai/property/metadatastore_state' # A provider to manage Vertex AI resources. class VertexAIMetadataStore < GcpResourceBase name 'google_vertex_ai_metadata_store' desc 'MetadataStore' supports platform: 'gcp' attr_reader :params attr_reader :description attr_reader :create_time attr_reader :update_time attr_reader :encryption_spec attr_reader :state attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @description = @fetched['description'] @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @encryption_spec = GoogleInSpec::VertexAI::Property::MetadataStoreEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @state = GoogleInSpec::VertexAI::Property::MetadataStoreState.new(@fetched['state'], to_s) @name = @fetched['name'] end def exists? !@fetched.nil? end def to_s "MetadataStore #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_metadata_stores.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIMetadataStores < GcpResourceBase name 'google_vertex_ai_metadata_stores' desc 'MetadataStore plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:states, field: :state) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('metadataStores') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'description' => ->(obj) { [:description, obj['description']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::MetadataStoreEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'state' => ->(obj) { [:state, GoogleInSpec::VertexAI::Property::MetadataStoreState.new(obj['state'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/metadataStores' end end ================================================ FILE: libraries/google_vertex_ai_metadata_stores_artifact.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/metadatastoresartifact_labels' require 'google/vertexai/property/metadatastoresartifact_metadata' # A provider to manage Vertex AI resources. class VertexAIMetadataStoresArtifact < GcpResourceBase name 'google_vertex_ai_metadata_stores_artifact' desc 'MetadataStoresArtifact' supports platform: 'gcp' attr_reader :params attr_reader :schema_version attr_reader :display_name attr_reader :etag attr_reader :name attr_reader :update_time attr_reader :state attr_reader :metadata attr_reader :uri attr_reader :create_time attr_reader :schema_title attr_reader :description attr_reader :labels def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @schema_version = @fetched['schemaVersion'] @display_name = @fetched['displayName'] @etag = @fetched['etag'] @name = @fetched['name'] @update_time = @fetched['updateTime'] @state = @fetched['state'] @metadata = GoogleInSpec::VertexAI::Property::MetadataStoresArtifactMetadata.new(@fetched['metadata'], to_s) @uri = @fetched['uri'] @create_time = @fetched['createTime'] @schema_title = @fetched['schemaTitle'] @description = @fetched['description'] @labels = GoogleInSpec::VertexAI::Property::MetadataStoresArtifactLabels.new(@fetched['labels'], to_s) end def exists? !@fetched.nil? end def to_s "MetadataStoresArtifact #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_metadata_stores_artifacts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIMetadataStoresArtifacts < GcpResourceBase name 'google_vertex_ai_metadata_stores_artifacts' desc 'MetadataStoresArtifact plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:schema_versions, field: :schema_version) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:names, field: :name) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:states, field: :state) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:uris, field: :uri) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:schema_titles, field: :schema_title) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:labels, field: :labels) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('artifacts') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'schemaVersion' => ->(obj) { [:schema_version, obj['schemaVersion']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'metadata' => ->(obj) { [:metadata, GoogleInSpec::VertexAI::Property::MetadataStoresArtifactMetadata.new(obj['metadata'], to_s)] }, 'uri' => ->(obj) { [:uri, obj['uri']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'schemaTitle' => ->(obj) { [:schema_title, obj['schemaTitle']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::MetadataStoresArtifactLabels.new(obj['labels'], to_s)] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/artifacts' end end ================================================ FILE: libraries/google_vertex_ai_metadata_stores_context.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/metadatastorescontext_labels' require 'google/vertexai/property/metadatastorescontext_metadata' # A provider to manage Vertex AI resources. class VertexAIMetadataStoresContext < GcpResourceBase name 'google_vertex_ai_metadata_stores_context' desc 'MetadataStoresContext' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :schema_title attr_reader :etag attr_reader :description attr_reader :display_name attr_reader :schema_version attr_reader :create_time attr_reader :labels attr_reader :metadata attr_reader :update_time attr_reader :parent_contexts def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @schema_title = @fetched['schemaTitle'] @etag = @fetched['etag'] @description = @fetched['description'] @display_name = @fetched['displayName'] @schema_version = @fetched['schemaVersion'] @create_time = @fetched['createTime'] @labels = GoogleInSpec::VertexAI::Property::MetadataStoresContextLabels.new(@fetched['labels'], to_s) @metadata = GoogleInSpec::VertexAI::Property::MetadataStoresContextMetadata.new(@fetched['metadata'], to_s) @update_time = @fetched['updateTime'] @parent_contexts = @fetched['parentContexts'] end def exists? !@fetched.nil? end def to_s "MetadataStoresContext #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_metadata_stores_contexts.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIMetadataStoresContexts < GcpResourceBase name 'google_vertex_ai_metadata_stores_contexts' desc 'MetadataStoresContext plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:schema_titles, field: :schema_title) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:schema_versions, field: :schema_version) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:parent_contexts, field: :parent_contexts) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('contexts') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'schemaTitle' => ->(obj) { [:schema_title, obj['schemaTitle']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'schemaVersion' => ->(obj) { [:schema_version, obj['schemaVersion']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::MetadataStoresContextLabels.new(obj['labels'], to_s)] }, 'metadata' => ->(obj) { [:metadata, GoogleInSpec::VertexAI::Property::MetadataStoresContextMetadata.new(obj['metadata'], to_s)] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'parentContexts' => ->(obj) { [:parent_contexts, obj['parentContexts']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/contexts' end end ================================================ FILE: libraries/google_vertex_ai_metadata_stores_execution.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/metadatastoresexecution_labels' require 'google/vertexai/property/metadatastoresexecution_metadata' # A provider to manage Vertex AI resources. class VertexAIMetadataStoresExecution < GcpResourceBase name 'google_vertex_ai_metadata_stores_execution' desc 'MetadataStoresExecution' supports platform: 'gcp' attr_reader :params attr_reader :labels attr_reader :create_time attr_reader :schema_version attr_reader :state attr_reader :name attr_reader :etag attr_reader :display_name attr_reader :metadata attr_reader :schema_title attr_reader :description attr_reader :update_time def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @labels = GoogleInSpec::VertexAI::Property::MetadataStoresExecutionLabels.new(@fetched['labels'], to_s) @create_time = @fetched['createTime'] @schema_version = @fetched['schemaVersion'] @state = @fetched['state'] @name = @fetched['name'] @etag = @fetched['etag'] @display_name = @fetched['displayName'] @metadata = GoogleInSpec::VertexAI::Property::MetadataStoresExecutionMetadata.new(@fetched['metadata'], to_s) @schema_title = @fetched['schemaTitle'] @description = @fetched['description'] @update_time = @fetched['updateTime'] end def exists? !@fetched.nil? end def to_s "MetadataStoresExecution #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_metadata_stores_executions.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIMetadataStoresExecutions < GcpResourceBase name 'google_vertex_ai_metadata_stores_executions' desc 'MetadataStoresExecution plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:labels, field: :labels) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:schema_versions, field: :schema_version) filter_table_config.add(:states, field: :state) filter_table_config.add(:names, field: :name) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:schema_titles, field: :schema_title) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:update_times, field: :update_time) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('executions') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::MetadataStoresExecutionLabels.new(obj['labels'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'schemaVersion' => ->(obj) { [:schema_version, obj['schemaVersion']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'metadata' => ->(obj) { [:metadata, GoogleInSpec::VertexAI::Property::MetadataStoresExecutionMetadata.new(obj['metadata'], to_s)] }, 'schemaTitle' => ->(obj) { [:schema_title, obj['schemaTitle']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/executions' end end ================================================ FILE: libraries/google_vertex_ai_metadata_stores_metadata_schema.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Vertex AI resources. class VertexAIMetadataStoresMetadataSchema < GcpResourceBase name 'google_vertex_ai_metadata_stores_metadata_schema' desc 'MetadataStoresMetadataSchema' supports platform: 'gcp' attr_reader :params attr_reader :schema_type attr_reader :description attr_reader :schema_version attr_reader :name attr_reader :create_time attr_reader :schema def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @schema_type = @fetched['schemaType'] @description = @fetched['description'] @schema_version = @fetched['schemaVersion'] @name = @fetched['name'] @create_time = @fetched['createTime'] @schema = @fetched['schema'] end def exists? !@fetched.nil? end def to_s "MetadataStoresMetadataSchema #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_metadata_stores_metadata_schemas.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIMetadataStoresMetadataSchemas < GcpResourceBase name 'google_vertex_ai_metadata_stores_metadata_schemas' desc 'MetadataStoresMetadataSchema plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:schema_types, field: :schema_type) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:schema_versions, field: :schema_version) filter_table_config.add(:names, field: :name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:schemas, field: :schema) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('metadataSchemas') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'schemaType' => ->(obj) { [:schema_type, obj['schemaType']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'schemaVersion' => ->(obj) { [:schema_version, obj['schemaVersion']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'schema' => ->(obj) { [:schema, obj['schema']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/metadataSchemas' end end ================================================ FILE: libraries/google_vertex_ai_model.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/model_container_spec' require 'google/vertexai/property/model_container_spec_env' require 'google/vertexai/property/model_container_spec_ports' require 'google/vertexai/property/model_deployed_models' require 'google/vertexai/property/model_encryption_spec' require 'google/vertexai/property/model_explanation_spec' require 'google/vertexai/property/model_explanation_spec_metadata' require 'google/vertexai/property/model_explanation_spec_metadata_inputs' require 'google/vertexai/property/model_explanation_spec_metadata_outputs' require 'google/vertexai/property/model_explanation_spec_parameters' require 'google/vertexai/property/model_explanation_spec_parameters_examples' require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' require 'google/vertexai/property/model_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' require 'google/vertexai/property/model_espigasgcfn_sigma' require 'google/vertexai/property/model_espigasgcfnsn_sigma' require 'google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' require 'google/vertexai/property/model_espxasgcfnsn_sigma' require 'google/vertexai/property/model_labels' require 'google/vertexai/property/model_model_source_info' require 'google/vertexai/property/model_original_model_info' require 'google/vertexai/property/model_predict_schemata' require 'google/vertexai/property/model_supported_export_formats' # A provider to manage Vertex AI resources. class VertexAIModel < GcpResourceBase name 'google_vertex_ai_model' desc 'Model' supports platform: 'gcp' attr_reader :params attr_reader :model_source_info attr_reader :name attr_reader :metadata attr_reader :update_time attr_reader :etag attr_reader :description attr_reader :deployed_models attr_reader :create_time attr_reader :explanation_spec attr_reader :encryption_spec attr_reader :pipeline_job attr_reader :predict_schemata attr_reader :version_update_time attr_reader :supported_export_formats attr_reader :original_model_info attr_reader :metadata_artifact attr_reader :supported_input_storage_formats attr_reader :metadata_schema_uri attr_reader :container_spec attr_reader :version_id attr_reader :artifact_uri attr_reader :training_pipeline attr_reader :display_name attr_reader :supported_deployment_resources_types attr_reader :supported_output_storage_formats attr_reader :version_aliases attr_reader :version_create_time attr_reader :version_description attr_reader :labels def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @model_source_info = GoogleInSpec::VertexAI::Property::ModelModelSourceInfo.new(@fetched['modelSourceInfo'], to_s) @name = @fetched['name'] @metadata = @fetched['metadata'] @update_time = @fetched['updateTime'] @etag = @fetched['etag'] @description = @fetched['description'] @deployed_models = GoogleInSpec::VertexAI::Property::ModelDeployedModelsArray.parse(@fetched['deployedModels'], to_s) @create_time = @fetched['createTime'] @explanation_spec = GoogleInSpec::VertexAI::Property::ModelExplanationSpec.new(@fetched['explanationSpec'], to_s) @encryption_spec = GoogleInSpec::VertexAI::Property::ModelEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @pipeline_job = @fetched['pipelineJob'] @predict_schemata = GoogleInSpec::VertexAI::Property::ModelPredictSchemata.new(@fetched['predictSchemata'], to_s) @version_update_time = @fetched['versionUpdateTime'] @supported_export_formats = GoogleInSpec::VertexAI::Property::ModelSupportedExportFormatsArray.parse(@fetched['supportedExportFormats'], to_s) @original_model_info = GoogleInSpec::VertexAI::Property::ModelOriginalModelInfo.new(@fetched['originalModelInfo'], to_s) @metadata_artifact = @fetched['metadataArtifact'] @supported_input_storage_formats = @fetched['supportedInputStorageFormats'] @metadata_schema_uri = @fetched['metadataSchemaUri'] @container_spec = GoogleInSpec::VertexAI::Property::ModelContainerSpec.new(@fetched['containerSpec'], to_s) @version_id = @fetched['versionId'] @artifact_uri = @fetched['artifactUri'] @training_pipeline = @fetched['trainingPipeline'] @display_name = @fetched['displayName'] @supported_deployment_resources_types = @fetched['supportedDeploymentResourcesTypes'] @supported_output_storage_formats = @fetched['supportedOutputStorageFormats'] @version_aliases = @fetched['versionAliases'] @version_create_time = @fetched['versionCreateTime'] @version_description = @fetched['versionDescription'] @labels = GoogleInSpec::VertexAI::Property::ModelLabels.new(@fetched['labels'], to_s) end def exists? !@fetched.nil? end def to_s "Model #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_model_deployment_monitoring_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/modeldeploymentmonitoringjob_bigquery_tables' require 'google/vertexai/property/modeldeploymentmonitoringjob_encryption_spec' require 'google/vertexai/property/modeldeploymentmonitoringjob_error' require 'google/vertexai/property/modeldeploymentmonitoringjob_labels' require 'google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata' require 'google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status' require 'google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy' require 'google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs' require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_schedule_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config' require 'google/vertexai/property/modeldeploymentmonitoringjob_stats_anomalies_base_directory' # A provider to manage Vertex AI resources. class VertexAIModelDeploymentMonitoringJob < GcpResourceBase name 'google_vertex_ai_model_deployment_monitoring_job' desc 'ModelDeploymentMonitoringJob' supports platform: 'gcp' attr_reader :params attr_reader :model_deployment_monitoring_objective_configs attr_reader :labels attr_reader :state attr_reader :analysis_instance_schema_uri attr_reader :enable_monitoring_pipeline_logs attr_reader :endpoint attr_reader :logging_sampling_strategy attr_reader :bigquery_tables attr_reader :display_name attr_reader :schedule_state attr_reader :error attr_reader :model_monitoring_alert_config attr_reader :latest_monitoring_pipeline_metadata attr_reader :sample_predict_instance attr_reader :predict_instance_schema_uri attr_reader :next_schedule_time attr_reader :create_time attr_reader :log_ttl attr_reader :stats_anomalies_base_directory attr_reader :update_time attr_reader :model_deployment_monitoring_schedule_config attr_reader :encryption_spec attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @model_deployment_monitoring_objective_configs = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsArray.parse(@fetched['modelDeploymentMonitoringObjectiveConfigs'], to_s) @labels = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLabels.new(@fetched['labels'], to_s) @state = @fetched['state'] @analysis_instance_schema_uri = @fetched['analysisInstanceSchemaUri'] @enable_monitoring_pipeline_logs = @fetched['enableMonitoringPipelineLogs'] @endpoint = @fetched['endpoint'] @logging_sampling_strategy = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLoggingSamplingStrategy.new(@fetched['loggingSamplingStrategy'], to_s) @bigquery_tables = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobBigqueryTablesArray.parse(@fetched['bigqueryTables'], to_s) @display_name = @fetched['displayName'] @schedule_state = @fetched['scheduleState'] @error = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobError.new(@fetched['error'], to_s) @model_monitoring_alert_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelMonitoringAlertConfig.new(@fetched['modelMonitoringAlertConfig'], to_s) @latest_monitoring_pipeline_metadata = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadata.new(@fetched['latestMonitoringPipelineMetadata'], to_s) @sample_predict_instance = @fetched['samplePredictInstance'] @predict_instance_schema_uri = @fetched['predictInstanceSchemaUri'] @next_schedule_time = @fetched['nextScheduleTime'] @create_time = @fetched['createTime'] @log_ttl = @fetched['logTtl'] @stats_anomalies_base_directory = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobStatsAnomaliesBaseDirectory.new(@fetched['statsAnomaliesBaseDirectory'], to_s) @update_time = @fetched['updateTime'] @model_deployment_monitoring_schedule_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringScheduleConfig.new(@fetched['modelDeploymentMonitoringScheduleConfig'], to_s) @encryption_spec = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @name = @fetched['name'] end def exists? !@fetched.nil? end def to_s "ModelDeploymentMonitoringJob #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_model_deployment_monitoring_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIModelDeploymentMonitoringJobs < GcpResourceBase name 'google_vertex_ai_model_deployment_monitoring_jobs' desc 'ModelDeploymentMonitoringJob plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:model_deployment_monitoring_objective_configs, field: :model_deployment_monitoring_objective_configs) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:states, field: :state) filter_table_config.add(:analysis_instance_schema_uris, field: :analysis_instance_schema_uri) filter_table_config.add(:enable_monitoring_pipeline_logs, field: :enable_monitoring_pipeline_logs) filter_table_config.add(:endpoints, field: :endpoint) filter_table_config.add(:logging_sampling_strategies, field: :logging_sampling_strategy) filter_table_config.add(:bigquery_tables, field: :bigquery_tables) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:schedule_states, field: :schedule_state) filter_table_config.add(:errors, field: :error) filter_table_config.add(:model_monitoring_alert_configs, field: :model_monitoring_alert_config) filter_table_config.add(:latest_monitoring_pipeline_metadata, field: :latest_monitoring_pipeline_metadata) filter_table_config.add(:sample_predict_instances, field: :sample_predict_instance) filter_table_config.add(:predict_instance_schema_uris, field: :predict_instance_schema_uri) filter_table_config.add(:next_schedule_times, field: :next_schedule_time) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:log_ttls, field: :log_ttl) filter_table_config.add(:stats_anomalies_base_directories, field: :stats_anomalies_base_directory) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:model_deployment_monitoring_schedule_configs, field: :model_deployment_monitoring_schedule_config) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('modelDeploymentMonitoringJobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'modelDeploymentMonitoringObjectiveConfigs' => ->(obj) { [:model_deployment_monitoring_objective_configs, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsArray.parse(obj['modelDeploymentMonitoringObjectiveConfigs'], to_s)] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLabels.new(obj['labels'], to_s)] }, 'state' => ->(obj) { [:state, obj['state']] }, 'analysisInstanceSchemaUri' => ->(obj) { [:analysis_instance_schema_uri, obj['analysisInstanceSchemaUri']] }, 'enableMonitoringPipelineLogs' => ->(obj) { [:enable_monitoring_pipeline_logs, obj['enableMonitoringPipelineLogs']] }, 'endpoint' => ->(obj) { [:endpoint, obj['endpoint']] }, 'loggingSamplingStrategy' => ->(obj) { [:logging_sampling_strategy, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLoggingSamplingStrategy.new(obj['loggingSamplingStrategy'], to_s)] }, 'bigqueryTables' => ->(obj) { [:bigquery_tables, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobBigqueryTablesArray.parse(obj['bigqueryTables'], to_s)] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'scheduleState' => ->(obj) { [:schedule_state, obj['scheduleState']] }, 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobError.new(obj['error'], to_s)] }, 'modelMonitoringAlertConfig' => ->(obj) { [:model_monitoring_alert_config, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelMonitoringAlertConfig.new(obj['modelMonitoringAlertConfig'], to_s)] }, 'latestMonitoringPipelineMetadata' => ->(obj) { [:latest_monitoring_pipeline_metadata, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadata.new(obj['latestMonitoringPipelineMetadata'], to_s)] }, 'samplePredictInstance' => ->(obj) { [:sample_predict_instance, obj['samplePredictInstance']] }, 'predictInstanceSchemaUri' => ->(obj) { [:predict_instance_schema_uri, obj['predictInstanceSchemaUri']] }, 'nextScheduleTime' => ->(obj) { [:next_schedule_time, obj['nextScheduleTime']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'logTtl' => ->(obj) { [:log_ttl, obj['logTtl']] }, 'statsAnomaliesBaseDirectory' => ->(obj) { [:stats_anomalies_base_directory, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobStatsAnomaliesBaseDirectory.new(obj['statsAnomaliesBaseDirectory'], to_s)] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'modelDeploymentMonitoringScheduleConfig' => ->(obj) { [:model_deployment_monitoring_schedule_config, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringScheduleConfig.new(obj['modelDeploymentMonitoringScheduleConfig'], to_s)] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/modelDeploymentMonitoringJobs' end end ================================================ FILE: libraries/google_vertex_ai_model_evaluation_slice.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/modelevaluationslice_model_explanation' require 'google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions' require 'google/vertexai/property/modelevaluationslice_slice' require 'google/vertexai/property/modelevaluationslice_slice_slice_spec' require 'google/vertexai/property/modelevaluationslice_slice_slice_spec_configs' # A provider to manage Vertex AI resources. class VertexAIModelEvaluationSlice < GcpResourceBase name 'google_vertex_ai_model_evaluation_slice' desc 'ModelEvaluationSlice' supports platform: 'gcp' attr_reader :params attr_reader :create_time attr_reader :model_explanation attr_reader :name attr_reader :metrics attr_reader :slice attr_reader :metrics_schema_uri def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @create_time = @fetched['createTime'] @model_explanation = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceModelExplanation.new(@fetched['modelExplanation'], to_s) @name = @fetched['name'] @metrics = @fetched['metrics'] @slice = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSlice.new(@fetched['slice'], to_s) @metrics_schema_uri = @fetched['metricsSchemaUri'] end def exists? !@fetched.nil? end def to_s "ModelEvaluationSlice #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_model_evaluation_slices.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIModelEvaluationSlices < GcpResourceBase name 'google_vertex_ai_model_evaluation_slices' desc 'ModelEvaluationSlice plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:model_explanations, field: :model_explanation) filter_table_config.add(:names, field: :name) filter_table_config.add(:metrics, field: :metrics) filter_table_config.add(:slices, field: :slice) filter_table_config.add(:metrics_schema_uris, field: :metrics_schema_uri) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('modelEvaluationSlices') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'modelExplanation' => ->(obj) { [:model_explanation, GoogleInSpec::VertexAI::Property::ModelEvaluationSliceModelExplanation.new(obj['modelExplanation'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'metrics' => ->(obj) { [:metrics, obj['metrics']] }, 'slice' => ->(obj) { [:slice, GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSlice.new(obj['slice'], to_s)] }, 'metricsSchemaUri' => ->(obj) { [:metrics_schema_uri, obj['metricsSchemaUri']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/slices' end end ================================================ FILE: libraries/google_vertex_ai_models.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIModels < GcpResourceBase name 'google_vertex_ai_models' desc 'Model plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:model_source_infos, field: :model_source_info) filter_table_config.add(:names, field: :name) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:deployed_models, field: :deployed_models) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:explanation_specs, field: :explanation_spec) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:pipeline_jobs, field: :pipeline_job) filter_table_config.add(:predict_schemata, field: :predict_schemata) filter_table_config.add(:version_update_times, field: :version_update_time) filter_table_config.add(:supported_export_formats, field: :supported_export_formats) filter_table_config.add(:original_model_infos, field: :original_model_info) filter_table_config.add(:metadata_artifacts, field: :metadata_artifact) filter_table_config.add(:supported_input_storage_formats, field: :supported_input_storage_formats) filter_table_config.add(:metadata_schema_uris, field: :metadata_schema_uri) filter_table_config.add(:container_specs, field: :container_spec) filter_table_config.add(:version_ids, field: :version_id) filter_table_config.add(:artifact_uris, field: :artifact_uri) filter_table_config.add(:training_pipelines, field: :training_pipeline) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:supported_deployment_resources_types, field: :supported_deployment_resources_types) filter_table_config.add(:supported_output_storage_formats, field: :supported_output_storage_formats) filter_table_config.add(:version_aliases, field: :version_aliases) filter_table_config.add(:version_create_times, field: :version_create_time) filter_table_config.add(:version_descriptions, field: :version_description) filter_table_config.add(:labels, field: :labels) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('models') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'modelSourceInfo' => ->(obj) { [:model_source_info, GoogleInSpec::VertexAI::Property::ModelModelSourceInfo.new(obj['modelSourceInfo'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'deployedModels' => ->(obj) { [:deployed_models, GoogleInSpec::VertexAI::Property::ModelDeployedModelsArray.parse(obj['deployedModels'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'explanationSpec' => ->(obj) { [:explanation_spec, GoogleInSpec::VertexAI::Property::ModelExplanationSpec.new(obj['explanationSpec'], to_s)] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::ModelEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'pipelineJob' => ->(obj) { [:pipeline_job, obj['pipelineJob']] }, 'predictSchemata' => ->(obj) { [:predict_schemata, GoogleInSpec::VertexAI::Property::ModelPredictSchemata.new(obj['predictSchemata'], to_s)] }, 'versionUpdateTime' => ->(obj) { [:version_update_time, obj['versionUpdateTime']] }, 'supportedExportFormats' => ->(obj) { [:supported_export_formats, GoogleInSpec::VertexAI::Property::ModelSupportedExportFormatsArray.parse(obj['supportedExportFormats'], to_s)] }, 'originalModelInfo' => ->(obj) { [:original_model_info, GoogleInSpec::VertexAI::Property::ModelOriginalModelInfo.new(obj['originalModelInfo'], to_s)] }, 'metadataArtifact' => ->(obj) { [:metadata_artifact, obj['metadataArtifact']] }, 'supportedInputStorageFormats' => ->(obj) { [:supported_input_storage_formats, obj['supportedInputStorageFormats']] }, 'metadataSchemaUri' => ->(obj) { [:metadata_schema_uri, obj['metadataSchemaUri']] }, 'containerSpec' => ->(obj) { [:container_spec, GoogleInSpec::VertexAI::Property::ModelContainerSpec.new(obj['containerSpec'], to_s)] }, 'versionId' => ->(obj) { [:version_id, obj['versionId']] }, 'artifactUri' => ->(obj) { [:artifact_uri, obj['artifactUri']] }, 'trainingPipeline' => ->(obj) { [:training_pipeline, obj['trainingPipeline']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'supportedDeploymentResourcesTypes' => ->(obj) { [:supported_deployment_resources_types, obj['supportedDeploymentResourcesTypes']] }, 'supportedOutputStorageFormats' => ->(obj) { [:supported_output_storage_formats, obj['supportedOutputStorageFormats']] }, 'versionAliases' => ->(obj) { [:version_aliases, obj['versionAliases']] }, 'versionCreateTime' => ->(obj) { [:version_create_time, obj['versionCreateTime']] }, 'versionDescription' => ->(obj) { [:version_description, obj['versionDescription']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::ModelLabels.new(obj['labels'], to_s)] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/models' end end ================================================ FILE: libraries/google_vertex_ai_models_evaluation.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/modelsevaluation_explanation_specs' require 'google/vertexai/property/modelsevaluation_model_explanation' require 'google/vertexai/property/modelsevaluation_model_explanation_mean_attributions' # A provider to manage Vertex AI resources. class VertexAIModelsEvaluation < GcpResourceBase name 'google_vertex_ai_models_evaluation' desc 'ModelsEvaluation' supports platform: 'gcp' attr_reader :params attr_reader :data_item_schema_uri attr_reader :metadata attr_reader :metrics_schema_uri attr_reader :create_time attr_reader :annotation_schema_uri attr_reader :metrics attr_reader :explanation_specs attr_reader :slice_dimensions attr_reader :model_explanation attr_reader :name attr_reader :display_name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @data_item_schema_uri = @fetched['dataItemSchemaUri'] @metadata = @fetched['metadata'] @metrics_schema_uri = @fetched['metricsSchemaUri'] @create_time = @fetched['createTime'] @annotation_schema_uri = @fetched['annotationSchemaUri'] @metrics = @fetched['metrics'] @explanation_specs = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsArray.parse(@fetched['explanationSpecs'], to_s) @slice_dimensions = @fetched['sliceDimensions'] @model_explanation = GoogleInSpec::VertexAI::Property::ModelsEvaluationModelExplanation.new(@fetched['modelExplanation'], to_s) @name = @fetched['name'] @display_name = @fetched['displayName'] end def exists? !@fetched.nil? end def to_s "ModelsEvaluation #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_models_evaluations.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIModelsEvaluations < GcpResourceBase name 'google_vertex_ai_models_evaluations' desc 'ModelsEvaluation plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:data_item_schema_uris, field: :data_item_schema_uri) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:metrics_schema_uris, field: :metrics_schema_uri) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:annotation_schema_uris, field: :annotation_schema_uri) filter_table_config.add(:metrics, field: :metrics) filter_table_config.add(:explanation_specs, field: :explanation_specs) filter_table_config.add(:slice_dimensions, field: :slice_dimensions) filter_table_config.add(:model_explanations, field: :model_explanation) filter_table_config.add(:names, field: :name) filter_table_config.add(:display_names, field: :display_name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('modelEvaluations') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'dataItemSchemaUri' => ->(obj) { [:data_item_schema_uri, obj['dataItemSchemaUri']] }, 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, 'metricsSchemaUri' => ->(obj) { [:metrics_schema_uri, obj['metricsSchemaUri']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'annotationSchemaUri' => ->(obj) { [:annotation_schema_uri, obj['annotationSchemaUri']] }, 'metrics' => ->(obj) { [:metrics, obj['metrics']] }, 'explanationSpecs' => ->(obj) { [:explanation_specs, GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsArray.parse(obj['explanationSpecs'], to_s)] }, 'sliceDimensions' => ->(obj) { [:slice_dimensions, obj['sliceDimensions']] }, 'modelExplanation' => ->(obj) { [:model_explanation, GoogleInSpec::VertexAI::Property::ModelsEvaluationModelExplanation.new(obj['modelExplanation'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/evaluations' end end ================================================ FILE: libraries/google_vertex_ai_nas_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/nasjob_encryption_spec' require 'google/vertexai/property/nasjob_error' require 'google/vertexai/property/nasjob_labels' require 'google/vertexai/property/nasjob_nas_job_output' require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output' require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials' require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials' require 'google/vertexai/property/nasjob_nas_job_spec' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec' require 'google/vertexai/property/nasjob_njsmtasstsstjsbo_directory' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling' require 'google/vertexai/property/nasjob_njsmtasstsstjswp_specs' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec' require 'google/vertexai/property/nasjob_njsmtasttsttjsbo_directory' require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling' require 'google/vertexai/property/nasjob_njsmtasttsttjswp_specs' # A provider to manage Vertex AI resources. class VertexAINasJob < GcpResourceBase name 'google_vertex_ai_nas_job' desc 'NasJob' supports platform: 'gcp' attr_reader :params attr_reader :nas_job_output attr_reader :name attr_reader :end_time attr_reader :error attr_reader :state attr_reader :create_time attr_reader :display_name attr_reader :nas_job_spec attr_reader :enable_restricted_image_training attr_reader :start_time attr_reader :encryption_spec attr_reader :labels attr_reader :update_time def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @nas_job_output = GoogleInSpec::VertexAI::Property::NasJobNasJobOutput.new(@fetched['nasJobOutput'], to_s) @name = @fetched['name'] @end_time = @fetched['endTime'] @error = GoogleInSpec::VertexAI::Property::NasJobError.new(@fetched['error'], to_s) @state = @fetched['state'] @create_time = @fetched['createTime'] @display_name = @fetched['displayName'] @nas_job_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpec.new(@fetched['nasJobSpec'], to_s) @enable_restricted_image_training = @fetched['enableRestrictedImageTraining'] @start_time = @fetched['startTime'] @encryption_spec = GoogleInSpec::VertexAI::Property::NasJobEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @labels = GoogleInSpec::VertexAI::Property::NasJobLabels.new(@fetched['labels'], to_s) @update_time = @fetched['updateTime'] end def exists? !@fetched.nil? end def to_s "NasJob #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_nas_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAINasJobs < GcpResourceBase name 'google_vertex_ai_nas_jobs' desc 'NasJob plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:nas_job_outputs, field: :nas_job_output) filter_table_config.add(:names, field: :name) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:errors, field: :error) filter_table_config.add(:states, field: :state) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:nas_job_specs, field: :nas_job_spec) filter_table_config.add(:enable_restricted_image_trainings, field: :enable_restricted_image_training) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:update_times, field: :update_time) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('nasJobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'nasJobOutput' => ->(obj) { [:nas_job_output, GoogleInSpec::VertexAI::Property::NasJobNasJobOutput.new(obj['nasJobOutput'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::NasJobError.new(obj['error'], to_s)] }, 'state' => ->(obj) { [:state, obj['state']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'nasJobSpec' => ->(obj) { [:nas_job_spec, GoogleInSpec::VertexAI::Property::NasJobNasJobSpec.new(obj['nasJobSpec'], to_s)] }, 'enableRestrictedImageTraining' => ->(obj) { [:enable_restricted_image_training, obj['enableRestrictedImageTraining']] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::NasJobEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::NasJobLabels.new(obj['labels'], to_s)] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/nasJobs' end end ================================================ FILE: libraries/google_vertex_ai_nas_jobs_nas_trial_detail.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/nasjobsnastrialdetail_search_trial' require 'google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement' require 'google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics' require 'google/vertexai/property/nasjobsnastrialdetail_train_trial' require 'google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement' require 'google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics' # A provider to manage Vertex AI resources. class VertexAINasJobsNasTrialDetail < GcpResourceBase name 'google_vertex_ai_nas_jobs_nas_trial_detail' desc 'NasJobsNasTrialDetail' supports platform: 'gcp' attr_reader :params attr_reader :parameters attr_reader :name attr_reader :search_trial attr_reader :train_trial def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @parameters = @fetched['parameters'] @name = @fetched['name'] @search_trial = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrial.new(@fetched['searchTrial'], to_s) @train_trial = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrial.new(@fetched['trainTrial'], to_s) end def exists? !@fetched.nil? end def to_s "NasJobsNasTrialDetail #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_nas_jobs_nas_trial_details.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAINasJobsNasTrialDetails < GcpResourceBase name 'google_vertex_ai_nas_jobs_nas_trial_details' desc 'NasJobsNasTrialDetail plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:parameters, field: :parameters) filter_table_config.add(:names, field: :name) filter_table_config.add(:search_trials, field: :search_trial) filter_table_config.add(:train_trials, field: :train_trial) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('nasTrialDetails') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'parameters' => ->(obj) { [:parameters, obj['parameters']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'searchTrial' => ->(obj) { [:search_trial, GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrial.new(obj['searchTrial'], to_s)] }, 'trainTrial' => ->(obj) { [:train_trial, GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrial.new(obj['trainTrial'], to_s)] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/nasTrialDetails' end end ================================================ FILE: libraries/google_vertex_ai_pipeline_job.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/pipelinejob_encryption_spec' require 'google/vertexai/property/pipelinejob_error' require 'google/vertexai/property/pipelinejob_job_detail' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels' require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata' require 'google/vertexai/property/pipelinejob_job_detail_task_details' require 'google/vertexai/property/pipelinejob_labels' require 'google/vertexai/property/pipelinejob_pipeline_spec' require 'google/vertexai/property/pipelinejob_runtime_config' require 'google/vertexai/property/pipelinejob_runtime_config_input_artifacts' require 'google/vertexai/property/pipelinejob_runtime_config_parameter_values' require 'google/vertexai/property/pipelinejob_runtime_config_parameters' require 'google/vertexai/property/pipelinejob_template_metadata' # A provider to manage Vertex AI resources. class VertexAIPipelineJob < GcpResourceBase name 'google_vertex_ai_pipeline_job' desc 'PipelineJob' supports platform: 'gcp' attr_reader :params attr_reader :encryption_spec attr_reader :end_time attr_reader :error attr_reader :update_time attr_reader :job_detail attr_reader :template_metadata attr_reader :state attr_reader :create_time attr_reader :name attr_reader :schedule_name attr_reader :reserved_ip_ranges attr_reader :start_time attr_reader :service_account attr_reader :display_name attr_reader :template_uri attr_reader :pipeline_spec attr_reader :network attr_reader :labels attr_reader :runtime_config def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @encryption_spec = GoogleInSpec::VertexAI::Property::PipelineJobEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @end_time = @fetched['endTime'] @error = GoogleInSpec::VertexAI::Property::PipelineJobError.new(@fetched['error'], to_s) @update_time = @fetched['updateTime'] @job_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetail.new(@fetched['jobDetail'], to_s) @template_metadata = GoogleInSpec::VertexAI::Property::PipelineJobTemplateMetadata.new(@fetched['templateMetadata'], to_s) @state = @fetched['state'] @create_time = @fetched['createTime'] @name = @fetched['name'] @schedule_name = @fetched['scheduleName'] @reserved_ip_ranges = @fetched['reservedIpRanges'] @start_time = @fetched['startTime'] @service_account = @fetched['serviceAccount'] @display_name = @fetched['displayName'] @template_uri = @fetched['templateUri'] @pipeline_spec = GoogleInSpec::VertexAI::Property::PipelineJobPipelineSpec.new(@fetched['pipelineSpec'], to_s) @network = @fetched['network'] @labels = GoogleInSpec::VertexAI::Property::PipelineJobLabels.new(@fetched['labels'], to_s) @runtime_config = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfig.new(@fetched['runtimeConfig'], to_s) end def exists? !@fetched.nil? end def to_s "PipelineJob #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_pipeline_jobs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIPipelineJobs < GcpResourceBase name 'google_vertex_ai_pipeline_jobs' desc 'PipelineJob plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:errors, field: :error) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:job_details, field: :job_detail) filter_table_config.add(:template_metadata, field: :template_metadata) filter_table_config.add(:states, field: :state) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:names, field: :name) filter_table_config.add(:schedule_names, field: :schedule_name) filter_table_config.add(:reserved_ip_ranges, field: :reserved_ip_ranges) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:service_accounts, field: :service_account) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:template_uris, field: :template_uri) filter_table_config.add(:pipeline_specs, field: :pipeline_spec) filter_table_config.add(:networks, field: :network) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:runtime_configs, field: :runtime_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('pipelineJobs') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::PipelineJobEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::PipelineJobError.new(obj['error'], to_s)] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'jobDetail' => ->(obj) { [:job_detail, GoogleInSpec::VertexAI::Property::PipelineJobJobDetail.new(obj['jobDetail'], to_s)] }, 'templateMetadata' => ->(obj) { [:template_metadata, GoogleInSpec::VertexAI::Property::PipelineJobTemplateMetadata.new(obj['templateMetadata'], to_s)] }, 'state' => ->(obj) { [:state, obj['state']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'scheduleName' => ->(obj) { [:schedule_name, obj['scheduleName']] }, 'reservedIpRanges' => ->(obj) { [:reserved_ip_ranges, obj['reservedIpRanges']] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'serviceAccount' => ->(obj) { [:service_account, obj['serviceAccount']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'templateUri' => ->(obj) { [:template_uri, obj['templateUri']] }, 'pipelineSpec' => ->(obj) { [:pipeline_spec, GoogleInSpec::VertexAI::Property::PipelineJobPipelineSpec.new(obj['pipelineSpec'], to_s)] }, 'network' => ->(obj) { [:network, obj['network']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::PipelineJobLabels.new(obj['labels'], to_s)] }, 'runtimeConfig' => ->(obj) { [:runtime_config, GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfig.new(obj['runtimeConfig'], to_s)] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/pipelineJobs' end end ================================================ FILE: libraries/google_vertex_ai_schedule.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/schedule_create_pipeline_job_request' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters' require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata' require 'google/vertexai/property/schedule_last_scheduled_run_response' # A provider to manage Vertex AI resources. class VertexAISchedule < GcpResourceBase name 'google_vertex_ai_schedule' desc 'Schedule' supports platform: 'gcp' attr_reader :params attr_reader :started_run_count attr_reader :allow_queueing attr_reader :name attr_reader :cron attr_reader :last_pause_time attr_reader :create_time attr_reader :start_time attr_reader :max_run_count attr_reader :next_run_time attr_reader :update_time attr_reader :last_scheduled_run_response attr_reader :last_resume_time attr_reader :max_concurrent_run_count attr_reader :state attr_reader :create_pipeline_job_request attr_reader :display_name attr_reader :catch_up attr_reader :end_time def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @started_run_count = @fetched['startedRunCount'] @allow_queueing = @fetched['allowQueueing'] @name = @fetched['name'] @cron = @fetched['cron'] @last_pause_time = @fetched['lastPauseTime'] @create_time = @fetched['createTime'] @start_time = @fetched['startTime'] @max_run_count = @fetched['maxRunCount'] @next_run_time = @fetched['nextRunTime'] @update_time = @fetched['updateTime'] @last_scheduled_run_response = GoogleInSpec::VertexAI::Property::ScheduleLastScheduledRunResponse.new(@fetched['lastScheduledRunResponse'], to_s) @last_resume_time = @fetched['lastResumeTime'] @max_concurrent_run_count = @fetched['maxConcurrentRunCount'] @state = @fetched['state'] @create_pipeline_job_request = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequest.new(@fetched['createPipelineJobRequest'], to_s) @display_name = @fetched['displayName'] @catch_up = @fetched['catchUp'] @end_time = @fetched['endTime'] end def exists? !@fetched.nil? end def to_s "Schedule #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_schedules.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAISchedules < GcpResourceBase name 'google_vertex_ai_schedules' desc 'Schedule plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:started_run_counts, field: :started_run_count) filter_table_config.add(:allow_queueings, field: :allow_queueing) filter_table_config.add(:names, field: :name) filter_table_config.add(:crons, field: :cron) filter_table_config.add(:last_pause_times, field: :last_pause_time) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:max_run_counts, field: :max_run_count) filter_table_config.add(:next_run_times, field: :next_run_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:last_scheduled_run_responses, field: :last_scheduled_run_response) filter_table_config.add(:last_resume_times, field: :last_resume_time) filter_table_config.add(:max_concurrent_run_counts, field: :max_concurrent_run_count) filter_table_config.add(:states, field: :state) filter_table_config.add(:create_pipeline_job_requests, field: :create_pipeline_job_request) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:catch_ups, field: :catch_up) filter_table_config.add(:end_times, field: :end_time) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('schedules') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'startedRunCount' => ->(obj) { [:started_run_count, obj['startedRunCount']] }, 'allowQueueing' => ->(obj) { [:allow_queueing, obj['allowQueueing']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'cron' => ->(obj) { [:cron, obj['cron']] }, 'lastPauseTime' => ->(obj) { [:last_pause_time, obj['lastPauseTime']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'maxRunCount' => ->(obj) { [:max_run_count, obj['maxRunCount']] }, 'nextRunTime' => ->(obj) { [:next_run_time, obj['nextRunTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'lastScheduledRunResponse' => ->(obj) { [:last_scheduled_run_response, GoogleInSpec::VertexAI::Property::ScheduleLastScheduledRunResponse.new(obj['lastScheduledRunResponse'], to_s)] }, 'lastResumeTime' => ->(obj) { [:last_resume_time, obj['lastResumeTime']] }, 'maxConcurrentRunCount' => ->(obj) { [:max_concurrent_run_count, obj['maxConcurrentRunCount']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'createPipelineJobRequest' => ->(obj) { [:create_pipeline_job_request, GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequest.new(obj['createPipelineJobRequest'], to_s)] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'catchUp' => ->(obj) { [:catch_up, obj['catchUp']] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/schedules' end end ================================================ FILE: libraries/google_vertex_ai_studies.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIStudys < GcpResourceBase name 'google_vertex_ai_studies' desc 'Study plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:study_specs, field: :study_spec) filter_table_config.add(:names, field: :name) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:states, field: :state) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:inactive_reasons, field: :inactive_reason) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('studies') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'studySpec' => ->(obj) { [:study_spec, obj['studySpec']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'inactiveReason' => ->(obj) { [:inactive_reason, obj['inactiveReason']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/studies' end end ================================================ FILE: libraries/google_vertex_ai_studies_trial.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/studiestrial_final_measurement' require 'google/vertexai/property/studiestrial_final_measurement_metrics' require 'google/vertexai/property/studiestrial_measurements' require 'google/vertexai/property/studiestrial_parameters' require 'google/vertexai/property/studiestrial_web_access_uris' # A provider to manage Vertex AI resources. class VertexAIStudiesTrial < GcpResourceBase name 'google_vertex_ai_studies_trial' desc 'StudiesTrial' supports platform: 'gcp' attr_reader :params attr_reader :measurements attr_reader :start_time attr_reader :end_time attr_reader :parameters attr_reader :name attr_reader :infeasible_reason attr_reader :final_measurement attr_reader :client_id attr_reader :custom_job attr_reader :state attr_reader :web_access_uris attr_reader :id def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @measurements = GoogleInSpec::VertexAI::Property::StudiesTrialMeasurementsArray.parse(@fetched['measurements'], to_s) @start_time = @fetched['startTime'] @end_time = @fetched['endTime'] @parameters = GoogleInSpec::VertexAI::Property::StudiesTrialParametersArray.parse(@fetched['parameters'], to_s) @name = @fetched['name'] @infeasible_reason = @fetched['infeasibleReason'] @final_measurement = GoogleInSpec::VertexAI::Property::StudiesTrialFinalMeasurement.new(@fetched['finalMeasurement'], to_s) @client_id = @fetched['clientId'] @custom_job = @fetched['customJob'] @state = @fetched['state'] @web_access_uris = GoogleInSpec::VertexAI::Property::StudiesTrialWebAccessUris.new(@fetched['webAccessUris'], to_s) @id = @fetched['id'] end def exists? !@fetched.nil? end def to_s "StudiesTrial #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_studies_trials.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAIStudiesTrials < GcpResourceBase name 'google_vertex_ai_studies_trials' desc 'StudiesTrial plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:measurements, field: :measurements) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:parameters, field: :parameters) filter_table_config.add(:names, field: :name) filter_table_config.add(:infeasible_reasons, field: :infeasible_reason) filter_table_config.add(:final_measurements, field: :final_measurement) filter_table_config.add(:client_ids, field: :client_id) filter_table_config.add(:custom_jobs, field: :custom_job) filter_table_config.add(:states, field: :state) filter_table_config.add(:web_access_uris, field: :web_access_uris) filter_table_config.add(:ids, field: :id) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('trials') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'measurements' => ->(obj) { [:measurements, GoogleInSpec::VertexAI::Property::StudiesTrialMeasurementsArray.parse(obj['measurements'], to_s)] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'parameters' => ->(obj) { [:parameters, GoogleInSpec::VertexAI::Property::StudiesTrialParametersArray.parse(obj['parameters'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'infeasibleReason' => ->(obj) { [:infeasible_reason, obj['infeasibleReason']] }, 'finalMeasurement' => ->(obj) { [:final_measurement, GoogleInSpec::VertexAI::Property::StudiesTrialFinalMeasurement.new(obj['finalMeasurement'], to_s)] }, 'clientId' => ->(obj) { [:client_id, obj['clientId']] }, 'customJob' => ->(obj) { [:custom_job, obj['customJob']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'webAccessUris' => ->(obj) { [:web_access_uris, GoogleInSpec::VertexAI::Property::StudiesTrialWebAccessUris.new(obj['webAccessUris'], to_s)] }, 'id' => ->(obj) { [:id, obj['id']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/trials' end end ================================================ FILE: libraries/google_vertex_ai_study.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Vertex AI resources. class VertexAIStudy < GcpResourceBase name 'google_vertex_ai_study' desc 'Study' supports platform: 'gcp' attr_reader :params attr_reader :study_spec attr_reader :name attr_reader :display_name attr_reader :state attr_reader :create_time attr_reader :inactive_reason def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @study_spec = @fetched['studySpec'] @name = @fetched['name'] @display_name = @fetched['displayName'] @state = @fetched['state'] @create_time = @fetched['createTime'] @inactive_reason = @fetched['inactiveReason'] end def exists? !@fetched.nil? end def to_s "Study #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_tensorboard.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/tensorboard_encryption_spec' require 'google/vertexai/property/tensorboard_labels' # A provider to manage Vertex AI resources. class VertexAITensorboard < GcpResourceBase name 'google_vertex_ai_tensorboard' desc 'Tensorboard' supports platform: 'gcp' attr_reader :params attr_reader :name attr_reader :is_default attr_reader :update_time attr_reader :labels attr_reader :blob_storage_path_prefix attr_reader :etag attr_reader :create_time attr_reader :run_count attr_reader :encryption_spec attr_reader :display_name attr_reader :description def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @name = @fetched['name'] @is_default = @fetched['isDefault'] @update_time = @fetched['updateTime'] @labels = GoogleInSpec::VertexAI::Property::TensorboardLabels.new(@fetched['labels'], to_s) @blob_storage_path_prefix = @fetched['blobStoragePathPrefix'] @etag = @fetched['etag'] @create_time = @fetched['createTime'] @run_count = @fetched['runCount'] @encryption_spec = GoogleInSpec::VertexAI::Property::TensorboardEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @display_name = @fetched['displayName'] @description = @fetched['description'] end def exists? !@fetched.nil? end def to_s "Tensorboard #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_tensorboard_experiment_run.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/tensorboardexperimentrun_labels' # A provider to manage Vertex AI resources. class VertexAITensorboardExperimentRun < GcpResourceBase name 'google_vertex_ai_tensorboard_experiment_run' desc 'TensorboardExperimentRun' supports platform: 'gcp' attr_reader :params attr_reader :display_name attr_reader :update_time attr_reader :description attr_reader :etag attr_reader :labels attr_reader :create_time attr_reader :name def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @display_name = @fetched['displayName'] @update_time = @fetched['updateTime'] @description = @fetched['description'] @etag = @fetched['etag'] @labels = GoogleInSpec::VertexAI::Property::TensorboardExperimentRunLabels.new(@fetched['labels'], to_s) @create_time = @fetched['createTime'] @name = @fetched['name'] end def exists? !@fetched.nil? end def to_s "TensorboardExperimentRun #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_tensorboard_experiment_run_time_series_resource.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' # A provider to manage Vertex AI resources. class VertexAITensorboardExperimentRunTimeSeriesResource < GcpResourceBase name 'google_vertex_ai_tensorboard_experiment_run_time_series_resource' desc 'TensorboardExperimentRunTimeSeriesResource' supports platform: 'gcp' attr_reader :params attr_reader :plugin_name attr_reader :plugin_data attr_reader :description attr_reader :etag attr_reader :display_name attr_reader :update_time attr_reader :create_time attr_reader :name attr_reader :metadata attr_reader :value_type def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @plugin_name = @fetched['pluginName'] @plugin_data = @fetched['pluginData'] @description = @fetched['description'] @etag = @fetched['etag'] @display_name = @fetched['displayName'] @update_time = @fetched['updateTime'] @create_time = @fetched['createTime'] @name = @fetched['name'] @metadata = @fetched['metadata'] @value_type = @fetched['valueType'] end def exists? !@fetched.nil? end def to_s "TensorboardExperimentRunTimeSeriesResource #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_tensorboard_experiment_run_time_series_resources.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAITensorboardExperimentRunTimeSeriesResources < GcpResourceBase name 'google_vertex_ai_tensorboard_experiment_run_time_series_resources' desc 'TensorboardExperimentRunTimeSeriesResource plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:plugin_names, field: :plugin_name) filter_table_config.add(:plugin_data, field: :plugin_data) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:names, field: :name) filter_table_config.add(:metadata, field: :metadata) filter_table_config.add(:value_types, field: :value_type) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('tensorboardTimeSeries') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'pluginName' => ->(obj) { [:plugin_name, obj['pluginName']] }, 'pluginData' => ->(obj) { [:plugin_data, obj['pluginData']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, 'valueType' => ->(obj) { [:value_type, obj['valueType']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/timeSeries' end end ================================================ FILE: libraries/google_vertex_ai_tensorboard_experiment_runs.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAITensorboardExperimentRuns < GcpResourceBase name 'google_vertex_ai_tensorboard_experiment_runs' desc 'TensorboardExperimentRun plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:names, field: :name) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('tensorboardRuns') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'description' => ->(obj) { [:description, obj['description']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TensorboardExperimentRunLabels.new(obj['labels'], to_s)] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'name' => ->(obj) { [:name, obj['name']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/runs' end end ================================================ FILE: libraries/google_vertex_ai_tensorboards.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAITensorboards < GcpResourceBase name 'google_vertex_ai_tensorboards' desc 'Tensorboard plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) filter_table_config.add(:is_defaults, field: :is_default) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:blob_storage_path_prefixes, field: :blob_storage_path_prefix) filter_table_config.add(:etags, field: :etag) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:run_counts, field: :run_count) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:descriptions, field: :description) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('tensorboards') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'name' => ->(obj) { [:name, obj['name']] }, 'isDefault' => ->(obj) { [:is_default, obj['isDefault']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TensorboardLabels.new(obj['labels'], to_s)] }, 'blobStoragePathPrefix' => ->(obj) { [:blob_storage_path_prefix, obj['blobStoragePathPrefix']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'runCount' => ->(obj) { [:run_count, obj['runCount']] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::TensorboardEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'description' => ->(obj) { [:description, obj['description']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/tensorboards' end end ================================================ FILE: libraries/google_vertex_ai_tensorboards_experiment.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/tensorboardsexperiment_labels' # A provider to manage Vertex AI resources. class VertexAITensorboardsExperiment < GcpResourceBase name 'google_vertex_ai_tensorboards_experiment' desc 'TensorboardsExperiment' supports platform: 'gcp' attr_reader :params attr_reader :description attr_reader :source attr_reader :display_name attr_reader :create_time attr_reader :update_time attr_reader :labels attr_reader :name attr_reader :etag def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @description = @fetched['description'] @source = @fetched['source'] @display_name = @fetched['displayName'] @create_time = @fetched['createTime'] @update_time = @fetched['updateTime'] @labels = GoogleInSpec::VertexAI::Property::TensorboardsExperimentLabels.new(@fetched['labels'], to_s) @name = @fetched['name'] @etag = @fetched['etag'] end def exists? !@fetched.nil? end def to_s "TensorboardsExperiment #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_tensorboards_experiments.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAITensorboardsExperiments < GcpResourceBase name 'google_vertex_ai_tensorboards_experiments' desc 'TensorboardsExperiment plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:descriptions, field: :description) filter_table_config.add(:sources, field: :source) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:names, field: :name) filter_table_config.add(:etags, field: :etag) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('tensorboardExperiments') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'description' => ->(obj) { [:description, obj['description']] }, 'source' => ->(obj) { [:source, obj['source']] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TensorboardsExperimentLabels.new(obj['labels'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'etag' => ->(obj) { [:etag, obj['etag']] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/experiments' end end ================================================ FILE: libraries/google_vertex_ai_training_pipeline.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' require 'google/vertexai/property/trainingpipeline_encryption_spec' require 'google/vertexai/property/trainingpipeline_error' require 'google/vertexai/property/trainingpipeline_input_data_config' require 'google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination' require 'google/vertexai/property/trainingpipeline_input_data_config_filter_split' require 'google/vertexai/property/trainingpipeline_input_data_config_fraction_split' require 'google/vertexai/property/trainingpipeline_input_data_config_gcs_destination' require 'google/vertexai/property/trainingpipeline_input_data_config_predefined_split' require 'google/vertexai/property/trainingpipeline_input_data_config_stratified_split' require 'google/vertexai/property/trainingpipeline_input_data_config_timestamp_split' require 'google/vertexai/property/trainingpipeline_labels' require 'google/vertexai/property/trainingpipeline_model_to_upload' require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec' require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env' require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports' require 'google/vertexai/property/trainingpipeline_model_to_upload_deployed_models' require 'google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source' require 'google/vertexai/property/trainingpipeline_mtuespeegsg_source' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution' require 'google/vertexai/property/trainingpipeline_mtuespigabb_config' require 'google/vertexai/property/trainingpipeline_mtuespigasg_config' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespigasgcfnsn_sigma' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution' require 'google/vertexai/property/trainingpipeline_mtuespxabb_config' require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfn_sigma' require 'google/vertexai/property/trainingpipeline_mtuespxasgcfnsn_sigma' require 'google/vertexai/property/trainingpipeline_model_to_upload_labels' require 'google/vertexai/property/trainingpipeline_model_to_upload_model_source_info' require 'google/vertexai/property/trainingpipeline_model_to_upload_original_model_info' require 'google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata' require 'google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats' # A provider to manage Vertex AI resources. class VertexAITrainingPipeline < GcpResourceBase name 'google_vertex_ai_training_pipeline' desc 'TrainingPipeline' supports platform: 'gcp' attr_reader :params attr_reader :end_time attr_reader :error attr_reader :display_name attr_reader :name attr_reader :input_data_config attr_reader :parent_model attr_reader :update_time attr_reader :state attr_reader :labels attr_reader :training_task_definition attr_reader :start_time attr_reader :create_time attr_reader :training_task_metadata attr_reader :training_task_inputs attr_reader :model_id attr_reader :encryption_spec attr_reader :model_to_upload def initialize(params) super(params.merge({ use_http_transport: true })) @params = params @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') parse unless @fetched.nil? end def parse @end_time = @fetched['endTime'] @error = GoogleInSpec::VertexAI::Property::TrainingPipelineError.new(@fetched['error'], to_s) @display_name = @fetched['displayName'] @name = @fetched['name'] @input_data_config = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfig.new(@fetched['inputDataConfig'], to_s) @parent_model = @fetched['parentModel'] @update_time = @fetched['updateTime'] @state = @fetched['state'] @labels = GoogleInSpec::VertexAI::Property::TrainingPipelineLabels.new(@fetched['labels'], to_s) @training_task_definition = @fetched['trainingTaskDefinition'] @start_time = @fetched['startTime'] @create_time = @fetched['createTime'] @training_task_metadata = @fetched['trainingTaskMetadata'] @training_task_inputs = @fetched['trainingTaskInputs'] @model_id = @fetched['modelId'] @encryption_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineEncryptionSpec.new(@fetched['encryptionSpec'], to_s) @model_to_upload = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUpload.new(@fetched['modelToUpload'], to_s) end def exists? !@fetched.nil? end def to_s "TrainingPipeline #{@params[:name]}" end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{name}}' end end ================================================ FILE: libraries/google_vertex_ai_training_pipelines.rb ================================================ # frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- require 'gcp_backend' class VertexAITrainingPipelines < GcpResourceBase name 'google_vertex_ai_training_pipelines' desc 'TrainingPipeline plural resource' supports platform: 'gcp' attr_reader :table filter_table_config = FilterTable.create filter_table_config.add(:end_times, field: :end_time) filter_table_config.add(:errors, field: :error) filter_table_config.add(:display_names, field: :display_name) filter_table_config.add(:names, field: :name) filter_table_config.add(:input_data_configs, field: :input_data_config) filter_table_config.add(:parent_models, field: :parent_model) filter_table_config.add(:update_times, field: :update_time) filter_table_config.add(:states, field: :state) filter_table_config.add(:labels, field: :labels) filter_table_config.add(:training_task_definitions, field: :training_task_definition) filter_table_config.add(:start_times, field: :start_time) filter_table_config.add(:create_times, field: :create_time) filter_table_config.add(:training_task_metadata, field: :training_task_metadata) filter_table_config.add(:training_task_inputs, field: :training_task_inputs) filter_table_config.add(:model_ids, field: :model_id) filter_table_config.add(:encryption_specs, field: :encryption_spec) filter_table_config.add(:model_to_uploads, field: :model_to_upload) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params @table = fetch_wrapped_resource('trainingPipelines') end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] result.each do |response| next if response.nil? || !response.key?(wrap_path) response[wrap_path].each do |hash| hash_with_symbols = {} hash.each_key do |key| name, value = transform(key, hash) hash_with_symbols[name] = value end converted.push(hash_with_symbols) end end converted end def transform(key, value) return transformers[key].call(value) if transformers.key?(key) [key.to_sym, value] end def transformers { 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::TrainingPipelineError.new(obj['error'], to_s)] }, 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, 'name' => ->(obj) { [:name, obj['name']] }, 'inputDataConfig' => ->(obj) { [:input_data_config, GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfig.new(obj['inputDataConfig'], to_s)] }, 'parentModel' => ->(obj) { [:parent_model, obj['parentModel']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, 'state' => ->(obj) { [:state, obj['state']] }, 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TrainingPipelineLabels.new(obj['labels'], to_s)] }, 'trainingTaskDefinition' => ->(obj) { [:training_task_definition, obj['trainingTaskDefinition']] }, 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'trainingTaskMetadata' => ->(obj) { [:training_task_metadata, obj['trainingTaskMetadata']] }, 'trainingTaskInputs' => ->(obj) { [:training_task_inputs, obj['trainingTaskInputs']] }, 'modelId' => ->(obj) { [:model_id, obj['modelId']] }, 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::TrainingPipelineEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, 'modelToUpload' => ->(obj) { [:model_to_upload, GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUpload.new(obj['modelToUpload'], to_s)] }, } end private def product_url(_ = nil) 'https://{{region}}-aiplatform.googleapis.com/v1/' end def resource_base_url '{{parent}}/trainingPipelines' end end ================================================ FILE: sonar-project.properties ================================================ # SonarQube configuration file # # Sample Ruby Sonar file - https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/languages/ruby/ # properties defined in https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/analysis-parameters/ # # view this repo in sonar: https://sonar.progress.com/dashboard?id=inspec_inspec-gcp_c2d41690-b668-4802-9695-0b72208e9220 # Required metadata sonar.projectKey=inspec_inspec-gcp_c2d41690-b668-4802-9695-0b72208e9220 # project name is 3 parts: "Chef" + "" + "" with underscores between # choices: Chef-Agents | Chef-Automate | Chef360 | Chef-Habitat | Chef-Infra-Server | Chef-Shared-Services # example project name: chef/chef-vault repo would be Chef_Chef-Infra-Client_chef-vault sonar.projectName=Chef-Inspec-GCP # sonar.projectVersion=1.0 # sonar.projectDescription= # Language - https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/languages/overview/ go, ruby, rust sonar.language=ruby sonar.sources=lib # sonar.sources=lib <-- for Ruby, match this with the /spec directory for tests & SARIF output directory for test results/rcov # sonar.exclusions=**/*_test.go, **/*.js, **/*.sql, **/*.yml, **/*.yaml; may exclude **/vendor/** for Ruby sonar.exclusions=**/*.java,**/*.js,vendor/* # Unit tests sonar.tests=test # was spec/**/*.rb # sonar.test.inclusions=**/*_test.go **/*Test.java # Coverage report sonar.ruby.coverage.framework=RSpec sonar.ruby.coverage.reportPaths=coverage/coverage.json # ^^^ comma-delimited paths to Rubocop reports, SimpleCov, or RSpec plugin reports (coverage/coverage.json <-- default output for simpleCov) sonar.coverage.exclusions=lib/bundles/inspec-compliance/*,examples/**/*,test/**,lib/plugins/*/test/**/*,test/unit/**/*,test/unit/*,test/functional/*,test/fixtures/**/*,test/artifacts/**/*\ # sonar.ruby.rubocop.reportPaths=./rubocop-report.json -- import Ruby Rubocop # sonar.dependencyCheck.htmlReportPath=./dependency-check-report.html -- import OWASP dependency check report # sonar.externalIssuesReportPaths Comma-delimited list of paths to generic issue reports. # sonar.sarifReportPaths Comma-delimited list of paths to SARIF issue reports. # Additional settings # sonar.qualitygate.wait=false # sonar.qualitygate.timeout=300 # skip C-language processor sonar.c.file.suffixes=- sonar.cpp.file.suffixes=- sonar.objc.file.suffixes=- ================================================ FILE: test/integration/build/gcp-mm.tf ================================================ variable "ssl_policy" { type = any } variable "topic" { type = any } variable "subscription" { type = any } variable "managed_zone" { type = any } variable "record_set" { type = any } variable "instance_group_manager" { type = any } variable "autoscaler" { type = any } variable "target_pool" { type = any } variable "trigger" { type = any } variable "health_check" { type = any } variable "backend_service" { type = any } variable "http_health_check" { type = any } variable "https_health_check" { type = any } variable "instance_template" { type = any } variable "global_address" { type = any } variable "url_map" { type = any } variable "http_proxy" { type = any } variable "global_forwarding_rule" { type = any } variable "target_tcp_proxy" { type = any } variable "route" { type = any } variable "router" { type = any } variable "snapshot" { type = any } variable "https_proxy" { type = any } variable "ssl_certificate" { type = any } variable "dataset" { type = any } variable "bigquery_table" { type = any } variable "repository" { type = any } variable "folder" { type = any } variable "gcp_organization_id" { type = string default = "none" } variable "cloudfunction" { type = any } variable "backend_bucket" { type = any } variable "gcp_cloud_function_region" {} variable "regional_node_pool" { type = any } variable "region_backend_service_health_check" { type = any } variable "region_health_check" { type = any } variable "region_backend_service" { type = any } variable "org_sink" { type = any } variable "standardappversion" { type = any } variable "ml_model" { type = any } variable "dataproc_cluster" { type = any } variable "folder_exclusion" { type = any } variable "filestore_instance" { type = any } variable "folder_sink" { type = any } variable "runtimeconfig_config" { type = any } variable "runtimeconfig_variable" { type = any } variable "redis" { type = any } variable "network_endpoint_group" { type = any } variable "global_network_endpoint_group" { type = any } variable "node_template" { type = any } variable "node_group" { type = any } variable "router_nat" { type = any } variable "service" { type = any } variable "spannerinstance" { type = any } variable "spannerdatabase" { type = any } variable "scheduler_job" { type = any } variable "project_location_repository" { type = any } variable "cloud_composer_v1" { type = any } variable "compute_service_attachment_conf" { type = any } variable "apigee_organization_envgroup_attachment" { type = any } variable "organization_envgroup" { type = any } variable "vpn_gateway" { type = any } variable "region_network_endpoint_group" { type = any } variable "secrets_manager_v1" { type = any } variable "compute_machine_images" { type = any } variable "network_attachments" { type = any } variable "compute_target_vpn_gateway" { type = any } variable "bigtable_instance_cluster" { type = any } variable "dataproc_metastore_service" { type = any } variable "dataproc_metastore_federation" { type = any } variable "data_fusion_instance" { type = any } variable "cloud_run_jobs" { type = any } variable "dataproc_serverless_batches" { type = any } variable "monitoring_group" { type = any } resource "google_compute_ssl_policy" "custom-ssl-policy" { name = var.ssl_policy["name"] min_tls_version = var.ssl_policy["min_tls_version"] profile = var.ssl_policy["profile"] custom_features = [var.ssl_policy["custom_feature"], var.ssl_policy["custom_feature2"]] project = var.gcp_project_id } resource "google_pubsub_topic" "topic" { project = var.gcp_project_id name = var.topic["name"] } resource "google_pubsub_subscription" "default" { project = var.gcp_project_id name = var.subscription["name"] topic = google_pubsub_topic.topic.name ack_deadline_seconds = var.subscription["ack_deadline_seconds"] } resource "google_dns_managed_zone" "prod" { name = var.managed_zone["name"] dns_name = var.managed_zone["dns_name"] description = var.managed_zone["description"] labels = { key = var.managed_zone["label_value"] } project = var.gcp_project_id } resource "google_dns_record_set" "a" { name = var.record_set["name"] managed_zone = google_dns_managed_zone.prod.name type = var.record_set["type"] ttl = var.record_set["ttl"] rrdatas = [var.record_set["rrdatas1"], var.record_set["rrdatas2"]] project = var.gcp_project_id } resource "google_compute_instance_group_manager" "gcp-inspec-igm" { project = var.gcp_project_id zone = var.gcp_zone name = var.instance_group_manager["name"] version { instance_template = google_compute_instance_template.default.self_link } base_instance_name = var.instance_group_manager["base_instance_name"] target_pools = [] target_size = 0 named_port { name = var.instance_group_manager["named_port_name"] port = var.instance_group_manager["named_port_port"] } } resource "google_compute_autoscaler" "gcp-inspec-autoscaler" { project = var.gcp_project_id name = var.autoscaler["name"] zone = var.gcp_zone target = google_compute_instance_group_manager.gcp-inspec-igm.self_link autoscaling_policy { max_replicas = var.autoscaler["max_replicas"] min_replicas = var.autoscaler["min_replicas"] cooldown_period = var.autoscaler["cooldown_period"] cpu_utilization { target = var.autoscaler["cpu_utilization_target"] } } } resource "google_compute_target_pool" "gcp-inspec-target-pool" { project = var.gcp_project_id name = var.target_pool["name"] session_affinity = var.target_pool["session_affinity"] instances = [ "${var.gcp_zone}/${var.gcp_ext_vm_name}", ] } resource "google_cloudbuild_trigger" "gcp-inspec-cloudbuild-trigger" { project = var.gcp_project_id trigger_template { branch_name = var.trigger["trigger_template_branch"] project_id = var.trigger["trigger_template_project"] repo_name = var.trigger["trigger_template_repo"] } filename = var.trigger["filename"] } resource "google_compute_health_check" "gcp-inspec-health-check" { project = var.gcp_project_id name = var.health_check["name"] timeout_sec = var.health_check["timeout_sec"] check_interval_sec = var.health_check["check_interval_sec"] tcp_health_check { port = var.health_check["tcp_health_check_port"] } } resource "google_compute_region_health_check" "tcp-region-health-check" { project = var.gcp_project_id name = var.region_health_check["name"] region = var.region_health_check["region"] timeout_sec = 1 check_interval_sec = 1 tcp_health_check { port = "80" } } resource "google_compute_backend_service" "gcp-inspec-backend-service" { project = var.gcp_project_id name = var.backend_service["name"] description = var.backend_service["description"] port_name = var.backend_service["port_name"] protocol = var.backend_service["protocol"] timeout_sec = var.backend_service["timeout_sec"] enable_cdn = var.backend_service["enable_cdn"] backend { group = google_compute_instance_group_manager.gcp-inspec-igm.instance_group } health_checks = [google_compute_health_check.gcp-inspec-health-check.self_link] } resource "google_compute_health_check" "gcp-inspec-region-backend-service-hc" { project = var.gcp_project_id name = var.region_backend_service_health_check["name"] timeout_sec = var.region_backend_service_health_check["timeout_sec"] check_interval_sec = var.region_backend_service_health_check["check_interval_sec"] tcp_health_check { port = var.region_backend_service_health_check["tcp_health_check_port"] } } resource "google_compute_region_backend_service" "gcp-inspec-region-backend-service" { project = var.gcp_project_id region = var.gcp_location name = var.region_backend_service["name"] description = var.region_backend_service["description"] protocol = var.region_backend_service["protocol"] timeout_sec = var.region_backend_service["timeout_sec"] health_checks = [google_compute_health_check.gcp-inspec-region-backend-service-hc.self_link] } resource "google_compute_http_health_check" "gcp-inspec-http-health-check" { project = var.gcp_project_id name = var.http_health_check["name"] request_path = var.http_health_check["request_path"] timeout_sec = var.http_health_check["timeout_sec"] check_interval_sec = var.http_health_check["check_interval_sec"] } resource "google_compute_https_health_check" "gcp-inspec-https-health-check" { project = var.gcp_project_id name = var.https_health_check["name"] request_path = var.https_health_check["request_path"] timeout_sec = var.https_health_check["timeout_sec"] check_interval_sec = var.https_health_check["check_interval_sec"] unhealthy_threshold = var.https_health_check["unhealthy_threshold"] } resource "google_compute_instance_template" "gcp-inspec-instance-template" { project = var.gcp_project_id name = var.instance_template["name"] description = var.instance_template["description"] tags = [var.instance_template["tag"]] instance_description = var.instance_template["instance_description"] machine_type = var.instance_template["machine_type"] can_ip_forward = var.instance_template["can_ip_forward"] scheduling { automatic_restart = var.instance_template["scheduling_automatic_restart"] on_host_maintenance = var.instance_template["scheduling_on_host_maintenance"] } // Create a new boot disk from an image disk { source_image = var.instance_template["disk_source_image"] auto_delete = var.instance_template["disk_auto_delete"] boot = var.instance_template["disk_boot"] } network_interface { network = var.instance_template["network_interface_network"] } service_account { scopes = [var.instance_template["service_account_scope"]] } } resource "google_compute_global_address" "gcp-inspec-global-address" { project = var.gcp_project_id name = var.global_address["name"] ip_version = var.global_address["ip_version"] } resource "google_compute_url_map" "gcp-inspec-url-map" { project = var.gcp_project_id name = var.url_map["name"] description = var.url_map["description"] default_service = google_compute_backend_service.gcp-inspec-backend-service.self_link host_rule { hosts = [var.url_map["host_rule_host"]] path_matcher = var.url_map["path_matcher_name"] } path_matcher { name = var.url_map["path_matcher_name"] default_service = google_compute_backend_service.gcp-inspec-backend-service.self_link path_rule { paths = [var.url_map["path_rule_path"]] service = google_compute_backend_service.gcp-inspec-backend-service.self_link } } test { service = google_compute_backend_service.gcp-inspec-backend-service.self_link host = var.url_map["test_host"] path = var.url_map["test_path"] } } resource "google_compute_target_http_proxy" "gcp-inspec-http-proxy" { project = var.gcp_project_id name = var.http_proxy["name"] url_map = google_compute_url_map.gcp-inspec-url-map.self_link description = var.http_proxy["description"] } resource "google_compute_global_forwarding_rule" "gcp-inspec-global-forwarding-rule" { project = var.gcp_project_id name = var.global_forwarding_rule["name"] target = google_compute_target_http_proxy.gcp-inspec-http-proxy.self_link port_range = var.global_forwarding_rule["port_range"] } resource "google_compute_backend_service" "gcp-inspec-tcp-backend-service" { project = var.gcp_project_id name = var.target_tcp_proxy["tcp_backend_service_name"] protocol = "TCP" timeout_sec = 10 health_checks = [google_compute_health_check.gcp-inspec-health-check.self_link] } resource "google_compute_target_tcp_proxy" "gcp-inspec-target-tcp-proxy" { project = var.gcp_project_id name = var.target_tcp_proxy["name"] proxy_header = var.target_tcp_proxy["proxy_header"] backend_service = google_compute_backend_service.gcp-inspec-tcp-backend-service.self_link } resource "google_compute_route" "gcp-inspec-route" { project = var.gcp_project_id name = var.route["name"] dest_range = var.route["dest_range"] network = google_compute_network.inspec-gcp-network.name next_hop_ip = var.route["next_hop_ip"] priority = var.route["priority"] # google_compute_route depends on next_hop_ip belonging to a subnetwork # of the named network in this block. Since inspec-gcp-network does not # automatically create subnetworks, we need to create a dependency so # the route is not created before the subnetwork depends_on = [google_compute_subnetwork.inspec-gcp-subnetwork] } resource "google_compute_router" "gcp-inspec-router" { project = var.gcp_project_id name = var.router["name"] network = google_compute_network.inspec-gcp-network.name bgp { asn = var.router["bgp_asn"] advertise_mode = var.router["bgp_advertise_mode"] advertised_groups = [var.router["bgp_advertised_group"]] advertised_ip_ranges { range = var.router["bgp_advertised_ip_range1"] } advertised_ip_ranges { range = var.router["bgp_advertised_ip_range2"] } } } resource "google_compute_disk" "snapshot-disk" { project = var.gcp_project_id name = var.snapshot["disk_name"] type = var.snapshot["disk_type"] zone = var.gcp_zone image = var.snapshot["disk_image"] labels = { environment = "generic_compute_disk_label" } } resource "google_compute_snapshot" "gcp-inspec-snapshot" { project = var.gcp_project_id name = var.snapshot["name"] source_disk = google_compute_disk.snapshot-disk.name zone = var.gcp_zone } resource "google_compute_ssl_certificate" "gcp-inspec-ssl-certificate" { project = var.gcp_project_id name = var.ssl_certificate["name"] private_key = var.ssl_certificate["private_key"] certificate = var.ssl_certificate["certificate"] description = var.ssl_certificate["description"] } resource "google_compute_target_https_proxy" "gcp-inspec-https-proxy" { project = var.gcp_project_id name = var.https_proxy["name"] url_map = google_compute_url_map.gcp-inspec-url-map.self_link description = var.https_proxy["description"] ssl_certificates = [google_compute_ssl_certificate.gcp-inspec-ssl-certificate.self_link] } resource "google_bigquery_dataset" "gcp-inspec-dataset" { project = var.gcp_project_id dataset_id = var.dataset["dataset_id"] friendly_name = var.dataset["friendly_name"] description = var.dataset["description"] location = var.dataset["location"] default_table_expiration_ms = var.dataset["default_table_expiration_ms"] access { role = var.dataset["access_writer_role"] special_group = var.dataset["access_writer_special_group"] } access { role = "OWNER" special_group = "projectOwners" } } resource "google_bigquery_table" "gcp-inspec-bigquery-table" { project = var.gcp_project_id dataset_id = google_bigquery_dataset.gcp-inspec-dataset.dataset_id table_id = var.bigquery_table["table_id"] time_partitioning { type = var.bigquery_table["time_partitioning_type"] } description = var.bigquery_table["description"] expiration_time = var.bigquery_table["expiration_time"] } resource "google_sourcerepo_repository" "gcp-inspec-sourcerepo-repository" { project = var.gcp_project_id name = var.repository["name"] } resource "google_folder" "inspec-gcp-folder" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" display_name = var.folder["display_name"] parent = "organizations/${var.gcp_organization_id}" } resource "google_storage_bucket_object" "archive" { name = "index.js.zip" bucket = google_storage_bucket.generic-storage-bucket.name source = "../configuration/index.js.zip" } resource "google_cloudfunctions_function" "function" { project = var.gcp_project_id region = var.gcp_cloud_function_region name = var.cloudfunction["name"] description = var.cloudfunction["description"] available_memory_mb = var.cloudfunction["available_memory_mb"] source_archive_bucket = google_storage_bucket.generic-storage-bucket.name source_archive_object = google_storage_bucket_object.archive.name trigger_http = var.cloudfunction["trigger_http"] timeout = var.cloudfunction["timeout"] entry_point = var.cloudfunction["entry_point"] runtime = "nodejs8" environment_variables = { MY_ENV_VAR = var.cloudfunction["env_var_value"] } } resource "google_compute_backend_bucket" "image_backend" { project = var.gcp_project_id name = var.backend_bucket["name"] description = var.backend_bucket["description"] bucket_name = google_storage_bucket.generic-storage-bucket.name enable_cdn = var.backend_bucket["enable_cdn"] } resource "google_container_node_pool" "inspec-gcp-node-pool" { project = var.gcp_project_id name = var.regional_node_pool["name"] location = google_container_cluster.primary.location cluster = google_container_cluster.primary.name node_count = var.regional_node_pool["node_count"] } resource "google_logging_organization_sink" "my-sink" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" name = var.org_sink.name org_id = var.gcp_organization_id # Can export to pubsub, cloud storage, or bigquery destination = "storage.googleapis.com/${google_storage_bucket.generic-storage-bucket.name}" # Log all WARN or higher severity messages relating to instances filter = var.org_sink.filter } variable "project_sink" { type = any } resource "google_logging_project_sink" "project-logging-sink" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" project = var.gcp_project_id name = var.project_sink.name destination = "storage.googleapis.com/${google_storage_bucket.project-logging-bucket[0].name}" filter = var.project_sink.filter unique_writer_identity = true } resource "google_storage_bucket" "bucket" { name = "inspec-gcp-static-${var.gcp_project_id}" project = var.gcp_project_id location = var.gcp_location force_destroy = true labels = { "key" = "value" } retention_policy { retention_period = 1000 } } resource "google_storage_bucket_object" "object" { name = "hello-world.zip" bucket = google_storage_bucket.bucket.name source = "../configuration/hello-world.zip" } resource "google_app_engine_standard_app_version" "default" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" project = var.gcp_project_id version_id = var.standardappversion["version_id"] service = var.standardappversion["service"] runtime = var.standardappversion["runtime"] noop_on_destroy = true entrypoint { shell = var.standardappversion["entrypoint"] } deployment { zip { source_url = "https://storage.googleapis.com/${google_storage_bucket.bucket.name}/hello-world.zip" } } env_variables = { port = var.standardappversion["port"] } } resource "google_ml_engine_model" "inspec-gcp-model" { project = var.gcp_project_id name = var.ml_model["name"] description = var.ml_model["description"] regions = [var.ml_model["region"]] online_prediction_logging = var.ml_model["online_prediction_logging"] online_prediction_console_logging = var.ml_model["online_prediction_console_logging"] } resource "google_compute_firewall" "dataproc" { project = var.gcp_project_id name = "dataproc-firewall" network = google_compute_network.dataproc.name source_ranges = ["10.128.0.0/9"] allow { protocol = "icmp" } allow { protocol = "tcp" ports = ["0-65535"] } allow { protocol = "udp" ports = ["0-65535"] } } resource "google_compute_network" "dataproc" { project = var.gcp_project_id name = "dataproc-network" } resource "google_dataproc_cluster" "mycluster" { project = var.gcp_project_id region = var.gcp_location name = var.dataproc_cluster["name"] labels = { "${var.dataproc_cluster["label_key"]}" = var.dataproc_cluster["label_value"] } cluster_config { master_config { num_instances = var.dataproc_cluster["config"]["master_config"]["num_instances"] machine_type = var.dataproc_cluster["config"]["master_config"]["machine_type"] disk_config { boot_disk_type = var.dataproc_cluster["config"]["master_config"]["boot_disk_type"] boot_disk_size_gb = var.dataproc_cluster["config"]["master_config"]["boot_disk_size_gb"] } } worker_config { num_instances = var.dataproc_cluster["config"]["worker_config"]["num_instances"] machine_type = var.dataproc_cluster["config"]["worker_config"]["machine_type"] disk_config { boot_disk_size_gb = var.dataproc_cluster["config"]["worker_config"]["boot_disk_size_gb"] num_local_ssds = var.dataproc_cluster["config"]["worker_config"]["num_local_ssds"] } } # Override or set some custom properties software_config { override_properties = { "${var.dataproc_cluster["config"]["software_config"]["prop_key"]}" = var.dataproc_cluster["config"]["software_config"]["prop_value"] } } gce_cluster_config { network = google_compute_network.dataproc.self_link tags = [var.dataproc_cluster["config"]["gce_cluster_config"]["tag"]] } } } resource "google_logging_folder_exclusion" "my-exclusion" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" name = var.folder_exclusion["name"] folder = google_folder.inspec-gcp-folder.0.name description = var.folder_exclusion["description"] filter = var.folder_exclusion["filter"] } variable "project_exclusion" { type = any } resource "google_logging_project_exclusion" "project-exclusion" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" name = var.project_exclusion["name"] project = var.gcp_project_id description = var.project_exclusion["description"] filter = var.project_exclusion["filter"] } resource "google_filestore_instance" "instance" { project = var.gcp_project_id name = var.filestore_instance["name"] zone = var.filestore_instance["zone"] tier = var.filestore_instance["tier"] file_shares { capacity_gb = var.filestore_instance["fileshare_capacity_gb"] name = var.filestore_instance["fileshare_name"] } networks { network = var.filestore_instance["network_name"] modes = [var.filestore_instance["network_mode"]] } } resource "google_logging_folder_sink" "folder-sink" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" name = var.folder_sink.name folder = google_folder.inspec-gcp-folder.0.name destination = "storage.googleapis.com/${google_storage_bucket.generic-storage-bucket.name}" filter = var.folder_sink.filter } resource "google_runtimeconfig_config" "inspec-runtime-config" { project = var.gcp_project_id name = var.runtimeconfig_config["name"] description = var.runtimeconfig_config["description"] } resource "google_runtimeconfig_variable" "inspec-runtime-variable" { project = var.gcp_project_id parent = google_runtimeconfig_config.inspec-runtime-config.name name = var.runtimeconfig_variable["name"] text = var.runtimeconfig_variable["text"] } resource "google_redis_instance" "inspec-redis" { project = var.gcp_project_id name = var.redis["name"] tier = var.redis["tier"] memory_size_gb = var.redis["memory_size_gb"] location_id = var.redis["location_id"] alternative_location_id = var.redis["alternative_location_id"] redis_version = var.redis["redis_version"] display_name = var.redis["display_name"] reserved_ip_range = var.redis["reserved_ip_range"] labels = { "${var.redis["label_key"]}" = var.redis["label_value"] } } resource "google_compute_network_endpoint_group" "inspec-endpoint-group" { project = var.gcp_project_id name = var.network_endpoint_group["name"] network = google_compute_subnetwork.inspec-gcp-subnetwork.network subnetwork = google_compute_subnetwork.inspec-gcp-subnetwork.self_link default_port = var.network_endpoint_group["default_port"] zone = var.gcp_zone } resource "google_compute_global_network_endpoint_group" "inspec-global-endpoint-group" { project = var.gcp_project_id name = var.global_network_endpoint_group["name"] default_port = var.global_network_endpoint_group["default_port"] network_endpoint_type = var.global_network_endpoint_group["network_endpoint_type"] } data "google_compute_node_types" "zone-node-type" { project = var.gcp_project_id zone = var.gcp_zone } resource "google_compute_node_template" "inspec-template" { project = var.gcp_project_id region = var.gcp_location name = var.node_template["name"] node_type = data.google_compute_node_types.zone-node-type.names[0] node_affinity_labels = { "${var.node_template["label_key"]}" = var.node_template["label_value"] } } resource "google_compute_node_group" "inspec-node-group" { project = var.gcp_project_id name = var.node_group["name"] zone = var.gcp_zone description = var.node_group["description"] size = var.node_group["size"] node_template = google_compute_node_template.inspec-template.self_link } resource "google_compute_router_nat" "inspec-nat" { project = var.gcp_project_id name = var.router_nat["name"] router = google_compute_router.gcp-inspec-router.name region = google_compute_router.gcp-inspec-router.region nat_ip_allocate_option = var.router_nat["nat_ip_allocate_option"] source_subnetwork_ip_ranges_to_nat = var.router_nat["source_subnetwork_ip_ranges_to_nat"] min_ports_per_vm = var.router_nat["min_ports_per_vm"] log_config { enable = var.router_nat["log_config_enable"] filter = var.router_nat["log_config_filter"] } } resource "google_project_service" "project" { project = var.gcp_project_id service = var.service["name"] } resource "google_service_account" "spanner_service_account" { project = var.gcp_project_id account_id = "${var.gcp_service_account_display_name}-sp" display_name = "${var.gcp_service_account_display_name}-sp" } resource "google_service_account_key" "userkey" { service_account_id = google_service_account.spanner_service_account.name public_key_type = "TYPE_X509_PEM_FILE" } resource "google_spanner_instance" "spanner_instance" { project = var.gcp_project_id config = var.spannerinstance["config"] name = var.spannerinstance["name"] display_name = var.spannerinstance["display_name"] num_nodes = var.spannerinstance["num_nodes"] labels = { "${var.spannerinstance["label_key"]}" = var.spannerinstance["label_value"] } } resource "google_spanner_instance_iam_binding" "instance" { project = var.gcp_project_id instance = google_spanner_instance.spanner_instance.name role = "roles/editor" members = [ "serviceAccount:${google_service_account.spanner_service_account.email}", ] } resource "google_spanner_database" "database" { project = var.gcp_project_id instance = google_spanner_instance.spanner_instance.name name = var.spannerdatabase["name"] ddl = [var.spannerdatabase["ddl"]] } resource "google_cloud_scheduler_job" "job" { project = var.gcp_project_id region = var.scheduler_job["region"] name = var.scheduler_job["name"] description = var.scheduler_job["description"] schedule = var.scheduler_job["schedule"] time_zone = var.scheduler_job["time_zone"] http_target { http_method = var.scheduler_job["http_method"] uri = var.scheduler_job["http_target_uri"] } } variable "service_perimeter" { type = any } resource "google_access_context_manager_service_perimeter" "service-perimeter" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" parent = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}" name = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}/servicePerimeters/${var.service_perimeter["name"]}" title = var.service_perimeter["title"] status { restricted_services = [var.service_perimeter["restricted_service"]] } } resource "google_access_context_manager_access_policy" "access-policy" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" parent = "organizations/${var.gcp_organization_id}" title = var.service_perimeter["policy_title"] } resource "google_access_context_manager_access_level" "access-level" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" parent = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}" name = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}/accessLevels/os_lock" title = "os_lock" basic { conditions { device_policy { require_screen_lock = true } regions = [ "CH", "IT", "US", ] } } } variable "firewall" { type = any } resource "google_compute_firewall" "mm-firewall" { project = var.gcp_project_id name = var.firewall["name"] enable_logging = true network = google_compute_network.inspec-gcp-network.name allow { protocol = "tcp" ports = ["80", "8080", "1000-2000"] } source_tags = [var.firewall["source_tag"]] } variable "address" { type = any } resource "google_compute_address" "internal_with_subnet_and_address" { project = var.gcp_project_id name = var.address["name"] subnetwork = google_compute_subnetwork.inspec-gcp-subnetwork.self_link address_type = var.address["address_type"] address = var.address["address"] region = var.gcp_location } variable "instance_group" { type = any } resource "google_compute_instance_group" "inspec-instance-group" { project = var.gcp_project_id zone = var.gcp_zone name = var.instance_group["name"] description = var.instance_group["description"] named_port { name = var.instance_group["named_port_name"] port = var.instance_group["named_port_port"] } } variable "instance" { type = any } resource "google_compute_instance" "inspec-instance" { project = var.gcp_project_id zone = var.gcp_zone name = var.instance["name"] machine_type = var.instance["machine_type"] tags = [var.instance["tag_1"], var.instance["tag_2"]] boot_disk { initialize_params { image = "debian-cloud/debian-9" } } network_interface { network = "default" access_config { // Ephemeral IP } } metadata = { "${var.instance["metadata_key"]}" = var.instance["metadata_value"] } metadata_startup_script = var.instance["startup_script"] service_account { scopes = [var.instance["sa_scope"]] } } variable "network" { type = any } resource "google_compute_network" "inspec-network" { project = var.gcp_project_id name = var.network["name"] routing_mode = var.network["routing_mode"] } variable "subnetwork" { type = any } resource "google_compute_subnetwork" "subnet-with-logging" { project = var.gcp_project_id region = var.gcp_location name = var.subnetwork["name"] ip_cidr_range = var.subnetwork["ip_cidr_range"] network = google_compute_network.inspec-network.self_link log_config { aggregation_interval = var.subnetwork["log_interval"] flow_sampling = var.subnetwork["log_sampling"] metadata = var.subnetwork["log_metadata"] } } variable "rigm" { type = any } variable "sql_connect" { type = any } resource "google_compute_region_instance_group_manager" "inspec-rigm" { project = var.gcp_project_id region = var.gcp_location name = var.rigm["name"] base_instance_name = var.rigm["base_instance_name"] version { instance_template = google_compute_instance_template.gcp-inspec-instance-template.self_link } target_pools = [google_compute_target_pool.gcp-inspec-target-pool.self_link] target_size = var.rigm["target_size"] named_port { name = var.rigm["named_port_name"] port = var.rigm["named_port_port"] } auto_healing_policies { health_check = google_compute_health_check.gcp-inspec-health-check.self_link initial_delay_sec = var.rigm["healing_delay"] } } variable "vpn_tunnel" { type = any } resource "google_compute_vpn_tunnel" "tunnel1" { project = var.gcp_project_id name = var.vpn_tunnel["name"] peer_ip = var.vpn_tunnel["peer_ip"] shared_secret = var.vpn_tunnel["shared_secret"] remote_traffic_selector = ["0.0.0.0/0"] local_traffic_selector = ["0.0.0.0/0"] target_vpn_gateway = google_compute_vpn_gateway.inspec-gcp-vpn-gateway.self_link depends_on = [ google_compute_forwarding_rule.inspec-gcp-fr-esp, google_compute_forwarding_rule.inspec-gcp-fr-udp500, google_compute_forwarding_rule.inspec-gcp-fr-udp4500, ] } variable "alert_policy" { type = any } resource "google_monitoring_alert_policy" "alert_policy" { project = var.gcp_project_id display_name = var.alert_policy["display_name"] combiner = var.alert_policy["combiner"] conditions { display_name = var.alert_policy["condition_display_name"] condition_threshold { filter = var.alert_policy["condition_filter"] duration = var.alert_policy["condition_duration"] comparison = var.alert_policy["condition_comparison"] aggregations { alignment_period = "60s" per_series_aligner = "ALIGN_RATE" } } } } variable "dns_managed_zone" { type = any } variable "gcp_dns_zone_name" {} resource "google_dns_managed_zone" "example-zone" { project = var.gcp_project_id name = var.dns_managed_zone["name"] dns_name = "${var.gcp_dns_zone_name}" description = var.dns_managed_zone["description"] dnssec_config { state = var.dns_managed_zone["dnssec_config_state"] default_key_specs { algorithm = "rsasha256" key_type = "zoneSigning" key_length = 2048 } default_key_specs { algorithm = "rsasha512" key_type = "keySigning" key_length = 2048 } } } variable "logging_metric" { type = any } resource "google_logging_metric" "logging_metric" { project = var.gcp_project_id name = var.logging_metric["name"] filter = var.logging_metric["filter"] metric_descriptor { metric_kind = var.logging_metric["metric_kind"] value_type = var.logging_metric["value_type"] } } variable "compute_image" { type = any } resource "google_compute_image" "example" { project = var.gcp_project_id name = var.compute_image["name"] raw_disk { source = var.compute_image["source"] } } variable "gcp_organization_iam_custom_role_id" {} resource "google_organization_iam_custom_role" "generic_org_iam_custom_role" { count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" org_id = var.gcp_organization_id role_id = var.gcp_organization_iam_custom_role_id title = "GCP Inspec Generic Organization IAM Custom Role" description = "Custom role allowing to list IAM roles only" permissions = ["iam.roles.list"] } variable "security_policy" { type = any } resource "google_compute_security_policy" "policy" { project = var.gcp_project_id name = var.security_policy["name"] rule { action = var.security_policy["action"] priority = var.security_policy["priority"] match { versioned_expr = "SRC_IPS_V1" config { src_ip_ranges = [var.security_policy["ip_range"]] } } description = var.security_policy["description"] } rule { action = "allow" priority = "2147483647" match { versioned_expr = "SRC_IPS_V1" config { src_ip_ranges = ["*"] } } description = "default rule" } } variable "memcache_instance" { type = any } resource "google_compute_network" "memcache_network" { provider = google-beta project = var.gcp_project_id name = "inspec-gcp-memcache" } resource "google_compute_global_address" "service_range" { provider = google-beta project = var.gcp_project_id name = "inspec-gcp-memcache" purpose = "VPC_PEERING" address_type = "INTERNAL" prefix_length = 16 network = google_compute_network.memcache_network.id } resource "google_service_networking_connection" "private_service_connection" { provider = google-beta network = google_compute_network.memcache_network.id service = "servicenetworking.googleapis.com" reserved_peering_ranges = [google_compute_global_address.service_range.name] } resource "google_memcache_instance" "instance" { provider = google-beta name = var.memcache_instance["name"] project = var.gcp_project_id region = var.gcp_location authorized_network = google_service_networking_connection.private_service_connection.network node_config { cpu_count = 1 memory_size_mb = 1024 } node_count = 1 } resource "google_compute_router" "gcr" { project = var.gcp_project_id name = "router" network = "test" bgp { asn = 16550 } } resource "google_compute_external_vpn_gateway" "external_gateway" { name = "external-gateway" redundancy_type = "SINGLE_IP_INTERNALLY_REDUNDANT" description = "An externally managed VPN gateway" project = var.gcp_project_id interface { id = 0 ip_address = "8.8.8.8" } } resource "google_compute_interconnect_attachment" "on_prem" { name = "on-prem-attachment" edge_availability_domain = "AVAILABILITY_DOMAIN_1" type = "PARTNER" router = google_compute_router.gcp-inspec-router.id mtu = 1500 } resource "google_sql_ssl_cert" "client_cert" { project = var.gcp_project_id common_name = var.sql_connect["common_name"] instance = var.gcp_db_instance_name } resource "google_data_loss_prevention_stored_info_type" "basic" { parent = "projects/my-project-name" description = "Description" display_name = "Displayname" regex { pattern = "patient" group_indexes = [2] } } resource "google_data_loss_prevention_inspect_template" "basic" { parent = "projects/my-project-name" description = "My description" display_name = "display_name" inspect_config { info_types { name = "EMAIL_ADDRESS" } info_types { name = "PERSON_NAME" } info_types { name = "LAST_NAME" } info_types { name = "DOMAIN_NAME" } info_types { name = "PHONE_NUMBER" } info_types { name = "FIRST_NAME" } min_likelihood = "UNLIKELY" rule_set { info_types { name = "EMAIL_ADDRESS" } rules { exclusion_rule { regex { pattern = ".+@example.com" } matching_type = "MATCHING_TYPE_FULL_MATCH" } } } rule_set { info_types { name = "EMAIL_ADDRESS" } info_types { name = "DOMAIN_NAME" } info_types { name = "PHONE_NUMBER" } info_types { name = "PERSON_NAME" } info_types { name = "FIRST_NAME" } rules { exclusion_rule { dictionary { word_list { words = ["TEST"] } } matching_type = "MATCHING_TYPE_PARTIAL_MATCH" } } } rule_set { info_types { name = "PERSON_NAME" } rules { hotword_rule { hotword_regex { pattern = "patient" } proximity { window_before = 50 } likelihood_adjustment { fixed_likelihood = "VERY_LIKELY" } } } } limits { max_findings_per_item = 10 max_findings_per_request = 50 max_findings_per_info_type { max_findings = "75" info_type { name = "PERSON_NAME" } } max_findings_per_info_type { max_findings = "80" info_type { name = "LAST_NAME" } } } } } variable "compute_image_family_view_name" { default = "test" } variable "compute_image_family_image_name" { default = "image-1" } variable "compute_image_family_source_disk" { default = "projects/ppradhan/zones/us-central1-a/disks/inspec-image-1" } resource "google_compute_image" "image_family_view" { project = var.gcp_project_id name = var.compute_image_family_image_name source_disk = var.compute_image_family_source_disk family = var.compute_image_family_view_name } resource "google_storage_bucket" "bucket_delete_unique_221_11111" { name = "vertex-bucket_delete" location = "us-central1" uniform_bucket_level_access = true project = "ppradhan" } # The sample data comes from the following link: # https://cloud.google.com/vertex-ai/docs/matching-engine/filtering#specify-namespaces-tokens resource "google_storage_bucket_object" "data" { name = "contents/data.json" bucket = google_storage_bucket.bucket_delete_unique_221_11111.name content = < EXTERNAL_IP=$(terraform output -module gce-lb-fr | grep external_ip | cut -d = -f2 | xargs echo -n) # > open http://${EXTERNAL_IP} ############################################################## # End of the google lb example adapted template. ############################################################## ############################################################## # Start of the GKE cluster example ############################################################## resource "google_container_cluster" "primary" { project = var.gcp_project_id provider = google-beta name = var.gcp_kube_cluster_name location = var.gcp_kube_cluster_zone initial_node_count = var.gcp_kube_cluster_size node_locations = [ var.gcp_kube_cluster_zone_extra1, var.gcp_kube_cluster_zone_extra2, ] master_auth { username = var.gcp_kube_cluster_master_user password = var.gcp_kube_cluster_master_pass client_certificate_config { issue_client_certificate = false } } maintenance_policy { daily_maintenance_window { start_time = "23:00" } } node_config { oauth_scopes = [ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring", ] } release_channel { channel = "RAPID" } } # The following outputs allow authentication and connectivity to the GKE Cluster. output "client_certificate" { value = google_container_cluster.primary.master_auth.0.client_certificate } output "client_key" { value = google_container_cluster.primary.master_auth.0.client_key } output "cluster_ca_certificate" { value = google_container_cluster.primary.master_auth.0.cluster_ca_certificate } # Future work - as a more realistic example, could stand up another cluster and # extend with the GKE NAT Gateway template: # https://github.com/GoogleCloudPlatform/terraform-google-nat-gateway/tree/master/examples/gke-nat-gateway # requires the master node IP and tag name which could be tough to get hold of ############################################################## # End of the GKE cluster example ############################################################## # Start GCP KMS resources # This reuses service account email address that was created earlier to test IAM policies/binding/memberships #Note: google_kms_key_ring_iam_policy cannot be used in conjunction with google_kms_key_ring_iam_binding and google_kms_key_ring_iam_member or they will fight over what your policy should be. resource "google_kms_key_ring" "gcp_kms_key_ring_policy" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_kms_key_ring_policy_name location = var.gcp_location } #Note: google_kms_key_ring_iam_binding resources can be used in conjunction with google_kms_key_ring_iam_member resources only if they do not grant privilege to the same role. resource "google_kms_key_ring" "gcp_kms_key_ring_binding_member" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_kms_key_ring_binding_member_name location = var.gcp_location } # Use the first key ring to attach an IAM policy data "google_iam_policy" "gcp_inspec_admin_key_ring" { count = var.gcp_enable_privileged_resources binding { role = "roles/editor" members = [ "serviceAccount:${google_service_account.generic_service_account_object_viewer[0].email}", ] } } resource "google_kms_key_ring_iam_policy" "key_ring_policy" { count = var.gcp_enable_privileged_resources key_ring_id = google_kms_key_ring.gcp_kms_key_ring_policy[0].id policy_data = data.google_iam_policy.gcp_inspec_admin_key_ring[0].policy_data } # Use the second key ring to attach an IAM binding plus IAM member affecting different roles resource "google_kms_key_ring_iam_binding" "key_ring_binding" { count = var.gcp_enable_privileged_resources key_ring_id = google_kms_key_ring.gcp_kms_key_ring_binding_member[0].id role = "roles/editor" members = [ "serviceAccount:${google_service_account.generic_service_account_object_viewer[0].email}", ] } resource "google_kms_key_ring_iam_member" "key_ring_iam_member" { count = var.gcp_enable_privileged_resources key_ring_id = google_kms_key_ring.gcp_kms_key_ring_binding_member[0].id role = "roles/owner" member = "serviceAccount:${google_service_account.generic_service_account_object_viewer[0].email}" } resource "google_kms_crypto_key" "crypto_key_policy" { count = var.gcp_enable_privileged_resources name = var.gcp_kms_crypto_key_name_policy key_ring = google_kms_key_ring.gcp_kms_key_ring_policy[0].id rotation_period = "100000s" } resource "google_kms_crypto_key" "crypto_key_binding" { count = var.gcp_enable_privileged_resources name = var.gcp_kms_crypto_key_name_binding key_ring = google_kms_key_ring.gcp_kms_key_ring_binding_member[0].id rotation_period = "100000s" } resource "google_kms_crypto_key_iam_member" "crypto_key_iam_member" { count = var.gcp_enable_privileged_resources crypto_key_id = google_kms_crypto_key.crypto_key_policy[0].id role = "roles/editor" member = "serviceAccount:${google_service_account.generic_service_account_object_viewer[0].email}" } resource "google_kms_crypto_key_iam_binding" "crypto_key_iam_binding" { count = var.gcp_enable_privileged_resources crypto_key_id = google_kms_crypto_key.crypto_key_binding[0].id role = "roles/editor" members = [ "serviceAccount:${google_service_account.generic_service_account_object_viewer[0].email}", ] } # End GCP KMS resources # Start storage bucket resources resource "google_storage_bucket" "generic-storage-bucket" { project = var.gcp_project_id name = var.gcp_storage_bucket_name location = var.gcp_location } # let's add a default ACL on the previous bucket resource "google_storage_default_object_acl" "bucket-default-acl" { count = var.gcp_enable_privileged_resources bucket = google_storage_bucket.generic-storage-bucket.name role_entity = [ "OWNER:user-${google_service_account.generic_service_account_object_viewer[0].email}", "OWNER:project-owners-${var.gcp_project_number}", ] } # now test adding an ACL to a bucket resource "google_storage_bucket" "bucket-with-acl" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_storage_bucket_acl location = var.gcp_location } # make use of project convenience values as described here - https://cloud.google.com/storage/docs/access-control/lists resource "google_storage_bucket_acl" "bucket-acl" { count = var.gcp_enable_privileged_resources bucket = google_storage_bucket.bucket-with-acl[0].name role_entity = [ "OWNER:user-${google_service_account.generic_service_account_object_viewer[0].email}", "OWNER:project-owners-${var.gcp_project_number}", ] } # Note: google_storage_bucket_iam_binding resources can be used in conjunction with google_storage_bucket_iam_member resources only if they do not grant privilege to the same role. # for simplicity here, create a bucket for iam binding and member cases resource "google_storage_bucket" "bucket-with-iam-binding" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_storage_bucket_binding location = var.gcp_location } resource "google_storage_bucket_iam_binding" "bucket-iam-binding" { count = var.gcp_enable_privileged_resources bucket = google_storage_bucket.bucket-with-iam-binding[0].name role = "roles/storage.objectViewer" members = [ "serviceAccount:${google_service_account.generic_service_account_object_viewer[0].email}", ] } resource "google_storage_bucket" "bucket-with-iam-member" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_storage_bucket_member location = var.gcp_location } resource "google_storage_bucket_iam_member" "bucket-iam-member" { count = var.gcp_enable_privileged_resources bucket = google_storage_bucket.bucket-with-iam-member[0].name role = "roles/storage.objectViewer" member = "serviceAccount:${google_service_account.generic_service_account_object_viewer[0].email}" } # now for the IAM policy case resource "google_storage_bucket" "bucket-with-iam-policy" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_storage_bucket_policy location = var.gcp_location } data "google_iam_policy" "bucket-iam-policy" { count = var.gcp_enable_privileged_resources binding { role = "roles/storage.admin" members = [ "serviceAccount:${google_service_account.generic_service_account_object_viewer[0].email}" ] } } resource "google_storage_bucket_iam_policy" "bucket-iam-policy-add" { count = var.gcp_enable_privileged_resources bucket = google_storage_bucket.bucket-with-iam-policy[0].name policy_data = data.google_iam_policy.bucket-iam-policy[0].policy_data } # finally let's create a bucket with object plus an object ACL resource "google_storage_bucket" "bucket-with-object" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_storage_bucket_object location = var.gcp_location } resource "google_storage_bucket_object" "bucket-object" { count = var.gcp_enable_privileged_resources name = var.gcp_storage_bucket_object_name bucket = google_storage_bucket.bucket-with-object[0].name content = "Bucket Object ${var.gcp_storage_bucket_object_name} for bucket ${var.gcp_storage_bucket_object} in ${var.gcp_project_id} with ACL." } #finally, add object ACL resource "google_storage_object_acl" "bucket-object-acl" { count = var.gcp_enable_privileged_resources bucket = google_storage_bucket.bucket-with-object[0].name object = google_storage_bucket_object.bucket-object[0].name role_entity = [ "OWNER:project-owners-${var.gcp_project_number}", "OWNER:user-${google_service_account.generic_service_account_object_viewer[0].email}", ] } # try the last scenario of adding an IAM policy to an object # note at the time of writing, terraform isn't supporting the IAM policy applied to storage object case # https://www.terraform.io/docs/providers/google/r/storage_bucket_object.html # will revisit based on outcome of https://github.com/terraform-providers/terraform-provider-google/issues/1871 //resource "google_storage_bucket_object" "bucket-object-attach-policy" { // count = var.gcp_enable_privileged_resources // name = "${var.gcp_storage_bucket_object_name}-iam" // bucket = google_storage_bucket.bucket-with-object.name // content = "Bucket Object ${var.gcp_storage_bucket_object_name} for bucket ${var.gcp_storage_bucket_object} in ${var.gcp_project_id} with IAM policy." //} // //data "google_iam_policy" "object-iam-policy" { // count = var.gcp_enable_privileged_resources // binding { // role = "roles/storage.admin" // // members = [ "serviceAccount:${google_service_account.generic_service_account_object_viewer.email}" ] // } //} // //# would expect this to be something like below: //resource "google_storage_object_iam_policy" "object-iam-policy-add" { // count = var.gcp_enable_privileged_resources // bucket = google_storage_bucket.bucket-with-object.name // object = google_storage_bucket_object.bucket-object-attach-policy.name // policy_data = data.google_iam_policy.object-iam-policy.policy_data //} # END storage bucket resources # Start logging resources - initially for projects resource "google_compute_instance" "vm-with-project-logging" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_logging_vm_name machine_type = var.gcp_int_vm_size zone = var.gcp_zone boot_disk { initialize_params { image = var.gcp_int_vm_image } } network_interface { network = "default" access_config {} } } resource "google_storage_bucket" "project-logging-bucket" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_logging_bucket_name location = var.gcp_location } resource "google_logging_project_sink" "project-logging-instance-sink" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_logging_project_sink_name destination = "storage.googleapis.com/${google_storage_bucket.project-logging-bucket[0].name}" filter = "resource.type = gce_instance AND resource.labels.instance_id = \"${google_compute_instance.vm-with-project-logging[0].instance_id}\"" unique_writer_identity = true } resource "google_project_iam_binding" "project-log-writer-iam-binding" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id role = "roles/storage.objectCreator" members = [ google_logging_project_sink.project-logging-instance-sink[0].writer_identity, ] } resource "google_logging_project_exclusion" "project-logging-exclusion" { count = var.gcp_enable_privileged_resources project = var.gcp_project_id name = var.gcp_logging_project_exclusion_name description = "Exclude GCE instance debug logs" # Exclude all DEBUG or lower severity messages relating to instances filter = "resource.type = gce_instance AND severity <= DEBUG" } # End logging resources # Start network resources resource "google_compute_network" "inspec-gcp-network" { project = var.gcp_project_id name = var.gcp_network_name auto_create_subnetworks = "false" } resource "google_compute_subnetwork" "inspec-gcp-subnetwork" { project = var.gcp_project_id ip_cidr_range = "10.2.0.0/29" # i.e. 8 total & 6 usable IPs name = var.gcp_subnetwork_name region = var.gcp_location network = google_compute_network.inspec-gcp-network.self_link } resource "google_compute_vpn_gateway" "inspec-gcp-vpn-gateway" { name = var.gcp_vpn_gateway_name project = var.gcp_project_id region = var.gcp_location network = google_compute_network.inspec-gcp-network.self_link } resource "google_compute_address" "inspec-gcp-address" { name = var.gcp_address_name project = var.gcp_project_id region = var.gcp_location } resource "google_compute_address" "inspec-gcp-vpn-address" { name = var.gcp_vpn_address_name project = var.gcp_project_id region = var.gcp_location } resource "google_compute_forwarding_rule" "inspec-gcp-fr-esp" { name = var.gcp_fr_esp_name project = var.gcp_project_id region = var.gcp_location ip_protocol = "ESP" ip_address = google_compute_address.inspec-gcp-vpn-address.address target = google_compute_vpn_gateway.inspec-gcp-vpn-gateway.self_link } resource "google_compute_forwarding_rule" "inspec-gcp-fr-udp500" { name = "${var.gcp_fr_udp_name}-500" project = var.gcp_project_id region = var.gcp_location ip_protocol = "UDP" port_range = "500-500" ip_address = google_compute_address.inspec-gcp-vpn-address.address target = google_compute_vpn_gateway.inspec-gcp-vpn-gateway.self_link } resource "google_compute_forwarding_rule" "inspec-gcp-fr-udp4500" { name = "${var.gcp_fr_udp_name}-4500" project = var.gcp_project_id region = var.gcp_location ip_protocol = "UDP" port_range = "4500-4500" ip_address = google_compute_address.inspec-gcp-vpn-address.address target = google_compute_vpn_gateway.inspec-gcp-vpn-gateway.self_link } resource "google_compute_vpn_tunnel" "inspec-gcp-vpn-tunnel" { name = var.gcp_vpn_tunnel_name project = var.gcp_project_id region = var.gcp_location peer_ip = google_compute_address.inspec-gcp-address.address shared_secret = "generic_secret" target_vpn_gateway = google_compute_vpn_gateway.inspec-gcp-vpn-gateway.self_link remote_traffic_selector = ["0.0.0.0/0"] local_traffic_selector = ["0.0.0.0/0"] depends_on = [ google_compute_forwarding_rule.inspec-gcp-fr-esp, google_compute_forwarding_rule.inspec-gcp-fr-udp500, google_compute_forwarding_rule.inspec-gcp-fr-udp4500, ] } # End network resources # Start Google SQL resources resource "google_sql_database_instance" "cloud-sql-db-instance" { project = var.gcp_project_id name = var.gcp_db_instance_name database_version = var.gcp_db_type region = var.gcp_location settings { # Second-generation instance tiers are based on the machine # type. See argument reference below. tier = var.gcp_db_size } } resource "google_sql_database" "cloud-sql-db-name" { project = var.gcp_project_id name = var.gcp_db_name instance = google_sql_database_instance.cloud-sql-db-instance.name charset = "utf8" collation = "utf8_general_ci" } resource "google_sql_user" "cloud-sql-db-user" { project = var.gcp_project_id name = var.gcp_db_user_name instance = google_sql_database_instance.cloud-sql-db-instance.name password = var.gcp_db_user_password host = "example.com" } # End Google SQL resources # Resources that used to be created via terraform modules that no longer work resource "google_compute_firewall" "health-check-firewall" { project = var.gcp_project_id name = "vm-hc-inspec-gcp" network = google_compute_network.inspec-gcp-network.name allow { protocol = "tcp" ports = ["80"] } source_ranges = ["130.211.0.0/22", "35.191.0.0/16"] } resource "google_compute_firewall" "default-ssh" { project = var.gcp_project_id name = "vm-ssh-inspec-gcp" network = google_compute_network.inspec-gcp-network.name allow { protocol = "tcp" ports = ["22"] } source_ranges = ["0.0.0.0/0"] target_tags = ["allow-ssh"] } resource "google_compute_firewall" "inspec-gcp-tag-test-fw" { project = var.gcp_project_id name = "inspec-gcp-tag-test-fw" network = google_compute_network.inspec-gcp-network.name allow { protocol = "tcp" ports = ["80"] } source_ranges = ["0.0.0.0/0"] target_tags = ["allow-gcp-inspec-app-mig2","allow-gcp-inspec-app-mig3"] source_tags = ["allow-gcp-inspec-app-mig1"] } resource "google_compute_region_disk" "regiondisk" { project = var.gcp_project_id name = "${var.gcp_compute_disk_name}-regional" type = var.gcp_compute_disk_type region = var.gcp_location replica_zones = [var.gcp_kube_cluster_zone, var.gcp_kube_cluster_zone_extra1] } ================================================ FILE: test/integration/build/templates/gceme.sh.tpl ================================================ #!/bin/bash -xe # adapted from https://github.com/GoogleCloudPlatform/terraform-google-lb-internal/blob/master/examples/simple/gceme.sh.tpl apt-get update apt-get install -y apache2 php5 cat > /var/www/html/index.php <<'EOF' [ "method" => "GET", "header" => "Metadata-Flavor: Google" ] ]; $context = stream_context_create($opts); $content = file_get_contents("http://metadata/computeMetadata/v1/$value", false, $context); return $content; } ?> Frontend Web Server
 
Backend that serviced this request
Name
ID
Hostname
Zone
Machine Type
Project
Internal IP
External IP
Proxy that handled this request
Address
 
EOF sudo mv /var/www/html/index.html /var/www/html/index.html.old [[ -n "${PROXY_PATH}" ]] && mkdir -p /var/www/html/${PROXY_PATH} && cp /var/www/html/index.php /var/www/html/${PROXY_PATH}/index.php systemctl enable apache2 systemctl restart apache2 ================================================ FILE: test/integration/build/templates/nginx_upstream.sh.tpl ================================================ #!/bin/bash -xe # adapted from https://github.com/GoogleCloudPlatform/terraform-google-lb-internal/blob/master/examples/simple/nginx_upstream.sh.tpl apt-get update apt-get install -y nginx cat - > /etc/nginx/sites-available/upstream < '827482578277', :gcp_project_name => "ppradhan", :gcp_project_id => "ppradhan", :gcp_project_number => "165434197229", # Determine the storage account name and the admin password :gcp_location => "europe-west2", :gcp_zone => "europe-west2-a", # Cloud functions are only available in certain regions :gcp_cloud_function_region => "us-central1", :gcp_int_vm_name => "gcp-inspec-int-linux-vm", :gcp_int_vm_size => "f1-micro", :gcp_int_vm_image => "ubuntu-os-cloud/ubuntu-1604-lts", :gcp_ext_vm_name => "gcp-inspec-ext-linux-vm", :gcp_ext_vm_size => "f1-micro", :gcp_ext_vm_image => "ubuntu-os-cloud/ubuntu-1604-lts", :gcp_ext_compute_address_name => "gcp-inspec-generic-ext-compute-address", :gcp_windows_int_vm_image => "windows-cloud/windows-server-2016-dc-core-v20180313", :gcp_windows_int_vm_name => "gcp-inspec-int-windows-vm", # Recommended to upgrade to a minimum of g1-small :gcp_windows_int_vm_size => "g1-small", :gcp_service_account_display_name => "gcp-inspec-service-account", # We need to randomize the name of this role to avoid e.g. # Error 400: You can't create a role with role_id (gcp_inspec_project_custom_role_id) where there is an existing role with that role_id in a deleted state. :gcp_project_iam_custom_role_id => "gcp_inspec_custom_role_id_#{add_random_string}", :gcp_compute_disk_name => "gcp-inspec-disk-#{add_random_string}", :gcp_compute_disk_type => "pd-standard", :gcp_compute_disk_image => "ubuntu-os-cloud/ubuntu-1604-lts", :gcp_ext_vm_data_disk_address_name => "gcp-inspec-generic-ext-compute-data-disk-address", :gcp_ext_vm_data_disk_name => "gcp-inspec-generic-ext-linux-vm-data-disk", :gcp_ext_vm_data_disk_size => "f1-micro", :gcp_ext_vm_data_disk_image => "ubuntu-os-cloud/ubuntu-1604-lts", :gcp_storage_bucket_name => "gcp-inspec-storage-bucket-#{add_random_string}", :gcp_storage_bucket_acl => "gcp-inspec-storage-bucket-acl-#{add_random_string}", :gcp_storage_bucket_binding => "gcp-inspec-storage-bucket-iam-binding-#{add_random_string}", :gcp_storage_bucket_member => "gcp-inspec-storage-bucket-iam-member-#{add_random_string}", :gcp_storage_bucket_policy => "gcp-inspec-storage-bucket-iam-policy-#{add_random_string}", :gcp_storage_bucket_object => "gcp-inspec-storage-bucket-object-#{add_random_string}", :gcp_storage_bucket_object_name => "bucket-object-#{add_random_string}", # Google Load Balanced App example parameters :gcp_lb_network => "default", :gcp_lb_region => "europe-west2", :gcp_lb_zone => "europe-west2-a", :gcp_lb_zone_mig2 => "europe-west2-b", :gcp_lb_zone_mig3 => "europe-west2-c", :gcp_lb_fr_name => "gcp-inspec-app-lb-fr-mig1", :gcp_lb_ilb_name => "gcp-inspec-app-lb-internal", :gcp_lb_mig1_name => "gcp-inspec-app-mig1", :gcp_lb_mig2_name => "gcp-inspec-app-mig2", :gcp_lb_mig3_name => "gcp-inspec-app-mig3", # GKE example parameters :gcp_kube_cluster_name => "gcp-inspec-kube-cluster", :gcp_kube_cluster_zone => "europe-west2-a", :gcp_kube_cluster_size => 1, :gcp_kube_cluster_zone_extra1 => "europe-west2-b", :gcp_kube_cluster_zone_extra2 => "europe-west2-c", :gcp_kube_cluster_master_user => "gcp-inspec-kube-admin", :gcp_kube_cluster_master_pass => (("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a + %w{! @ # $ % & / ( ) + ? *}).sample(20).join, :gcp_kube_nodepool_name => "default-pool", :gcp_kms_key_ring_policy_name => "gcp-inspec-kms-key-ring-#{add_random_string}", :gcp_kms_key_ring_binding_member_name => "gcp-inspec-kms-key-ring-#{add_random_string}", :gcp_kms_crypto_key_name_policy => "gcp-inspec-kms-crypto-key-policy-#{add_random_string}", :gcp_kms_crypto_key_name_binding => "gcp-inspec-kms-crypto-key-binding-#{add_random_string}", :gcp_logging_vm_name => "gcp-inspec-logging-vm", :gcp_logging_bucket_name => "gcp-inspec-logging-#{add_random_string}", :gcp_logging_project_sink_name => "gcp-inspec-logging-project-#{add_random_string}", :gcp_logging_project_exclusion_name => "gcp-inspec-project-exclusion-#{add_random_string}", :gcp_network_name => "gcp-inspec-network", :gcp_subnetwork_name => "gcp-inspec-subnetwork", :gcp_vpn_gateway_name => "gcp-inspec-gateway", :gcp_vpn_tunnel_name => "gcp-inspec-tunnel", :gcp_fr_esp_name => "gcp-inspec-fr-esp", :gcp_fr_udp_name => "gcp-inspec-fr-udp", :gcp_address_name => "gcp-inspec-address", :gcp_vpn_address_name => "gcp-inspec-vpn-address", :gcp_db_instance_name => "gcp-inspec-db-#{add_random_string}", :gcp_db_name => "inspecgcp", :gcp_db_type => "MYSQL_5_7", :gcp_db_size => "db-f1-micro", :gcp_db_user_name => "inspecgcpuser", :gcp_db_user_password => (("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a + %w{! @ # $ % & / ( ) + ? *}).sample(20).join, :gcp_dns_zone_name => "dnszone-#{add_random_string}.com.", :gcp_organization_iam_custom_role_id => "org_role_#{add_random_string}", # Some resources require elevated privileges to create and therefore test against. The below flag is used to controls # both the terraform resource creation and the inspec test execution for those resources. Default behaviour is for this to # be disabled meaning a user needs no special GCP privileges to run the integration test pack. # # Note, would prefer to use boolean true or false here but will revisit for a future version of tf, see here for more detail: https://www.terraform.io/docs/configuration/variables.html :gcp_enable_privileged_resources => 1, # Some controls make use of the gcloud command and grep to discover live data to then test against. # Only test execution is affected by this flag, resource creation via terraform is unaffected. # Default behaviour is for this to be disabled, enable by changing the below flag. :gcp_enable_gcloud_calls => 0 } @config.each { |k, v| @config[k] = ENV[k.to_s.upcase] || v } end def config @config end def load_mm_vars loaded = YAML.load_file(File.join(File.dirname(__FILE__), 'mm-attributes.yml')) @config = loaded.merge(@config) end # Create JSON for terraform def store_json(file_name = "gcp-inspec.tfvars.json") load_mm_vars # These variables are used in InSpec controls but not terraform. Including them causes large warning messages about unused vars unused_vars = [:gcp_enable_gcloud_calls, :gcp_kube_nodepool_name] cfg = @config.clone unused_vars.each do |unused_var| cfg.delete(unused_var) end File.open(File.join(File.dirname(__FILE__), '..', 'build', file_name), "w") do |f| f.write(cfg.to_json) end end # Create YAML for inspec def store_yaml(file_name = "gcp-inspec-attributes.yaml") load_mm_vars File.open(File.join(File.dirname(__FILE__), '..', 'build', file_name), "w") do |f| f.write(@config.to_yaml) end end end end ================================================ FILE: test/integration/configuration/mm-attributes.yml ================================================ ssl_policy: name: 'inspec-gcp-ssl-policy' min_tls_version: 'TLS_1_2' profile: 'CUSTOM' custom_feature: 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384' custom_feature2: 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384' topic: name: 'inspec-gcp-topic' subscription: name: 'inspec-gcp-subscription' ack_deadline_seconds: 20 managed_zone: name: 'inspec-gcp-managed-zone' dns_name: 'my.domain.com.' description: 'A test DNS zone' label_key: key label_value: 'value' record_set: name: 'backend.my.domain.com.' type: 'A' ttl: 300 rrdatas1: '8.8.8.8' rrdatas2: '8.8.4.4' instance_group_manager: name: 'inspec-gcp-igm' base_instance_name: 'igm' named_port_name: 'port' named_port_port: 80 autoscaler: name: 'inspec-gcp-autoscaler' max_replicas: 5 min_replicas: 1 cooldown_period: 60 cpu_utilization_target: 0.5 target_pool: name: 'inspec-gcp-target-pool' session_affinity: CLIENT_IP trigger: trigger_template_project: trigger-project trigger_template_branch: trigger-branch trigger_template_repo: trigger-repo filename: cloudbuild.yaml health_check: name: inspec-gcp-health-check timeout_sec: 10 check_interval_sec: 10 tcp_health_check_port: 80 region_health_check: name: inspec-gcp-region-health-check region: us-central1 timeout_sec: 10 check_interval_sec: 10 tcp_health_check_port: 80 backend_service: name: inspec-gcp-backend-service description: A description port_name: http protocol: HTTP timeout_sec: 10 enable_cdn: true region_backend_service_health_check: name: inspec-gcp-region-health-check timeout_sec: 15 check_interval_sec: 15 tcp_health_check_port: 81 region_backend_service: name: inspec-gcp-region-backend-service description: A regional description protocol: TCP timeout_sec: 15 http_health_check: name: inspec-gcp-http-health-check request_path: /health_check timeout_sec: 20 check_interval_sec: 20 https_health_check: name: inspec-gcp-https-health-check request_path: /https_health_check timeout_sec: 15 check_interval_sec: 15 unhealthy_threshold: 3 instance_template: name: inspec-gcp-instance-template description: A description of the instance template instance_description: A description of the instance itself machine_type: f1-micro tag: foo can_ip_forward: false scheduling_automatic_restart: true scheduling_on_host_maintenance: MIGRATE disk_source_image: debian-cloud/debian-9 disk_auto_delete: true disk_boot: true network_interface_network: default service_account_scope: storage-ro global_address: name: inspec-gcp-global-address ip_version: IPV6 url_map: name: inspec-gcp-url-map description: URL map description host_rule_host: site.com path_matcher_name: allpaths path_rule_path: /home test_host: test.com test_path: /home http_proxy: name: inspec-gcp-http-proxy description: A HTTP proxy global_forwarding_rule: name: inspec-gcp-global-forwarding-rule port_range: 80-80 target_tcp_proxy: name: inspec-gcp-target-tcp-proxy proxy_header: NONE tcp_backend_service_name: gcp-inspec-tcp-backend-service route: name: inspec-gcp-route dest_range: 15.0.0.0/24 next_hop_ip: 10.2.0.1 priority: 100 router: name: inspec-gcp-router bgp_asn: 64514 bgp_advertise_mode: CUSTOM bgp_advertised_group: "ALL_SUBNETS" bgp_advertised_ip_range1: "1.2.3.4" bgp_advertised_ip_range2: "6.7.0.0/16" snapshot: name: inspec-gcp-disk-snapshot disk_name: inspec-snapshot-disk disk_type: pd-standard disk_image: debian-cloud/debian-10-buster-v20191014 https_proxy: name: inspec-gcp-https-proxy description: A HTTPS target proxy ssl_certificate: name: inspec-gcp-ssl-certificate description: A fake ssl certificate (DO NOT USE) certificate: | -----BEGIN CERTIFICATE----- MIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT BgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm b3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN AQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2 MDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP BgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM FUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z aXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH KoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ 4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O BBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn 0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O M3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ zqGNhIPGq2ULqXKK8BY= -----END CERTIFICATE----- private_key: | -----BEGIN EC PRIVATE KEY----- MHcCAQEEIObtRo8tkUqoMjeHhsOh2ouPpXCgBcP+EDxZCB/tws15oAoGCCqGSM49 AwEHoUQDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ4mzkzTv0dXyB750f OGN02HtkpBOZzzvUARTR10JQoSe2/5PIwQ== -----END EC PRIVATE KEY----- dataset: dataset_id: inspec_gcp_dataset friendly_name: A BigQuery dataset test description: Test BigQuery dataset description location: EU default_table_expiration_ms: 3600000 access_writer_role: WRITER access_writer_special_group: projectWriters bigquery_table: table_id: inspec_gcp_bigquery_table description: A BigQuery table expiration_time: 1738882264000 time_partitioning_type: DAY repository: name: inspec-gcp-repository folder: display_name: inspec-gcp-folder cloudfunction: name: inspec-gcp-function description: A description of the function available_memory_mb: 128 trigger_http: true timeout: 60 entry_point: hello env_var_value: val1 backend_bucket: name: inspec-gcp-backend-bucket description: Backend bucket example enable_cdn: true regional_node_pool: name: inspec-gcp-regional-node-pool cluster_name: inspec-gcp-regional-node-pool-cluster node_count: 1 initial_node_count: 1 org_sink: name: inspec-gcp-org-sink filter: resource.type = gce_instance standardappversion: version_id: v2 service: default runtime: nodejs10 entrypoint: "node ./app.js" port: "8080" ml_model: name: ml_model region: us-central1 description: My awesome ML model online_prediction_logging: true online_prediction_console_logging: true dataproc_cluster: name: inspec-dataproc-cluster label_key: label label_value: value config: master_config: num_instances: 1 machine_type: n1-standard-1 boot_disk_type: pd-ssd boot_disk_size_gb: 15 worker_config: num_instances: 2 machine_type: n1-standard-1 boot_disk_size_gb: 20 num_local_ssds: 1 preemptible_worker_config: num_instances: 0 software_config: prop_key: "dataproc:dataproc.allow.zero.workers" prop_value: "true" gce_cluster_config: tag: foo folder_exclusion: name: inspec-folder-exclusion description: My folder exclusion description filter: "resource.type = gce_instance AND severity <= DEBUG" filestore_instance: name: inspecgcp zone: us-central1-b tier: PREMIUM fileshare_capacity_gb: 2660 fileshare_name: inspecgcp network_name: default network_mode: MODE_IPV4 folder_sink: name: inspec-gcp-folder-sink filter: resource.type = gce_instance AND severity >= ERROR runtimeconfig_config: name: inspec-gcp-runtime-config description: My runtime configurations runtimeconfig_variable: name: prod-variables/hostname text: example.com redis: name: my-redis-cache tier: STANDARD_HA memory_size_gb: 1 region: us-central1 location_id: us-central1-a alternative_location_id: us-central1-f redis_version: REDIS_3_2 display_name: InSpec test instance reserved_ip_range: "192.168.0.0/29" label_key: key label_value: value network_endpoint_group: name: inspec-gcp-endpoint-group default_port: 90 global_network_endpoint_group: name: inspec-gcp-global-endpoint-group network_endpoint_type: INTERNET_IP_PORT default_port: 90 node_template: name: inspec-node-template label_key: key label_value: value node_group: name: inspec-node-group description: A description of the node group size: 0 router_nat: name: inspec-router-nat nat_ip_allocate_option: AUTO_ONLY source_subnetwork_ip_ranges_to_nat: ALL_SUBNETWORKS_ALL_IP_RANGES min_ports_per_vm: 2 log_config_enable: true log_config_filter: ERRORS_ONLY service: name: maps-android-backend.googleapis.com spannerinstance: config: regional-us-east1 name: spinstance display_name: inspectest num_nodes: 1 label_key: env label_value: test spannerdatabase: name: spdatabase instance: spinstance ddl: "CREATE TABLE test (test STRING(MAX),) PRIMARY KEY (test)" scheduler_job: # region must match where the apengine instance is deployed region: us-central1 name: job-name description: A description schedule: "*/8 * * * *" time_zone: America/New_York http_method: POST http_target_uri: https://example.com/ping service_perimeter: name: restrict_all title: restrict_all restricted_service: storage.googleapis.com policy_title: policytitle firewall: name: inspec-gcp-firewall source_tag: some-tag address: name: inspec-gcp-global-address address_type: INTERNAL address: "10.2.0.3" instance_group: name: inspec-instance-group description: My instance group for testing named_port_name: https named_port_port: 8080 instance: name: inspec-instance machine_type: n1-standard-1 tag_1: foo tag_2: bar metadata_key: '123' metadata_value: asdf sa_scope: https://www.googleapis.com/auth/compute.readonly startup_script: "echo hi > /test.txt" network: name: inspec-network routing_mode: REGIONAL subnetwork: name: inspec-subnet ip_cidr_range: "10.2.0.0/16" log_interval: INTERVAL_10_MIN log_sampling: .5 log_metadata: INCLUDE_ALL_METADATA rigm: name: inspec-rigm base_instance_name: rigm1 target_size: 1 named_port_name: https named_port_port: 8888 healing_delay: 300 vpn_tunnel: name: inspec-vpn-tunnel peer_ip: "15.0.0.120" shared_secret: super secret project_sink: name: inspec-gcp-org-sink filter: resource.type = gce_instance AND severity = DEBUG project_exclusion: name: inspec-project-exclusion description: My project exclusion description filter: resource.type = gce_instance AND severity <= DEBUG alert_policy: display_name: Display combiner: OR condition_display_name: condition condition_filter: "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\"" condition_duration: 60s condition_comparison: COMPARISON_GT dns_managed_zone: # managed zone dns_name must be randomly generated, so it happens in the other script name: example-zone description: example description dnssec_config_state: 'on' logging_metric: name: some/metric filter: 'resource.type=gae_app AND severity>=ERROR' metric_kind: DELTA value_type: INT64 compute_image: name: inspec-image source: https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz security_policy: name: sec-policy action: deny(403) priority: "1000" ip_range: "9.9.9.0/24" description: my description memcache_instance: name: mem-instance accelerator_type: name: accelerator_id global_operation: name: operation-1635274037755-5cf45e8217d56-c081cd9a-c3ea7346 operationType: "compute.externalVpnGateways.insert" interconnect_location: name: akl-zone1-1353 facility_provider_facility_id: 'Auckland - Albany' facility_provider: Vocus image_family_views: zone: us-central1-c name: image-1 source_type: RAW status: READY archive_size_bytes: 539099200 disk_size_gb: 3 family: test license_code: name: akl-zone1-1353 region_instance_group: name: instance-group-2 region: us-central1 size: 1 named_port_name: 'port' named_port_port: 80 container_engine_versions: valid_master_version: '1.21.5-gke.1802' valid_node_version: '1.21.5-gke.1802' sql_database_flag: name : audit_log type : STRING applies_to: MYSQL_5_6 allowed_string_values: ON requires_restart: true region_operation: name: operation-1641188435323-5d4a6f5b26934-9281422c-dce238f5 region: us-central1 operation_type: "compute.instanceGroupManagers.insert" status: DONE progress: 100 sql_connect: region: us-central1 database_version: POSTGRES_13 backend_type: SECOND_GEN cert_serial_number: 0 common_name: "Test-10001" sha1_fingerprint: "80c5c611c0a591db967c7dda3467e23127288fed" instance: test-pg zone_operation: name: operation-1641188179305-5d4a6e66fe2bd-8fd1812d-d97f3b69 zone: us-central1-a operation_type: "compute.instanceGroupManagers.insert" status: DONE progress: 100 public_delegated_prefix: name: test sql_operation: name: e5c522f1-8391-4830-a8ff-ff1cc4a7b2a5 status: DONE progress: 100 dlp: name: "i-inspec-gcp-dlp" location: "us-east-2" type: "INSPECT_JOB" state: "ACTIVE" inspectDetails: requestedOptions: snapshotInspectTemplate: "" jobConfig: storageConfig: hybridOptions: description: "test" tableOptions: "" job_attribute_name: "job_attribute-1" job_trigger_status: "HEALTHY" job_trigger_name: "name1" job_trigger_display_name: "dp" job_trigger_description: "description" description: "Description" display_name: "Displayname" deidentify_templates: name: "dlp-template-inspec" location: "europe-west2" type: "Infotype" project_location_repository: name : "projects/ppradhan/locations/us-central1/repositories/test-repository-1" parent : "projects/ppradhan/locations/us-central1" display_name: "test-repository-1" location: "us-central1" format: "DOCKER" project_id: "ppradhan" cloud_composer_v1: name : "example-composer-env" region : "us-central1" image_version : "composer-1.20.12-airflow-2.4.3" compute_service_attachment_conf: compute_service_attachment_name: "my-psc-ilb" description: "my-psc-ilb is a private service connection for the internal load balancer" region: "us-central1" enable_proxy_protocol: true connection_preference: "ACCEPT_AUTOMATIC" psc_ilb_consumer_address_name: "my-psc-ilb-consumer-address" subnetwork_id: "default" address_type: "INTERNAL" psc_ilb_consumer_name: "my-psc-ilb-consumer-forwarding-rule" network_id: "default" psc_ilb_target_service_name: "producer-forwarding-rule" load_balancing_scheme: "INTERNAL" all_ports: true producer_service_backend_name: "producer-backend-service" producer_service_health_check_name: "producer-health-check" producer_service_health_check_port: "80" psc_ilb_network_name: "psc-ilb-network" auto_create_subnetworks: false psc_ilb_producer_subnetwork_name: "psc-ilb-producer-subnetwork" subnetwork_ip_cidr_range: "10.0.0.0/16" psc_ilb_nat_name: "psc-ilb-nat" purpose: "PRIVATE_SERVICE_CONNECT" nat_ip_cidr_range: "10.1.0.0/16" organization_envgroup: project: "organizations/ppradhan" name : "test-env-group" hostnames: ["34.95.97.227.nip.io"] parent : "organizations/ppradhan/envgroups" state : "ACTIVE" created_at : "1698227493454" apigee_organization_envgroup_attachment: envgroup_id: "organizations/ppradhan/envgroups/test-env-group" environment: "test-env" vpn_gateway: project : "ppradhan" region : "us-central1" vpn_gateway : "4406948336461056012" kind : "value_kind" id : "value_id" creation_timestamp : "value_creationtimestamp" name : "inspec-vpn-gateway" description : "Inspec Test HA VPN Gateway" network : "gcp-inspec-network" self_link : "value_selflink" label_fingerprint : "value_labelfingerprint" stack_type : "IPV4_ONLY" region_network_endpoint_group: name: "inspec" region: "us-central1" network_endpoint_type: "PRIVATE_SERVICE_CONNECT" target_service: "us-central1-logging.googleapis.com" apigee_organization_apis: name : "firstproxy" parent : "organizations/ppradhan" api_proxy_type : "PROGRAMMABLE" secrets_manager_v1: secret_id: "inspec-gcp-secret" crypto_key_version: key_ring: "gcp-inspec-kms-key-ring" crypto_key: "gcp-inspec-kms-crypto-key-policy" region: "us-central-1" compute_machine_images: name: "image-1" instance: "inspec-test-instance" compute_node_template: name: "terraform-test-tmpl" region: "us-central1" node_type: "c2-node-60-240" network_attachments: name: "inspec-test" region: "us-central1" network: "inspec-network" compute_target_instance: name: "example-target" image_family: "debian-11" image_project: "debian-cloud" zone: "asia-east1-a" machine_type: "e2-medium" target_vm_name: "target-vm" compute_interconnect_attachment: name: "on-prem-attachment" edge_availability_domain: "AVAILABILITY_DOMAIN_1" type: "PARTNER" router_name: "router-1-ic-attachment" mtu: 1500 network_name: "network-1-ic-attachment" bgp_asn: 16550 compute_packet_mirroring: name: inspec-mirroring region: "us-central1" network: "inspec-network" compute_region_url_map: region: us-central1 name: example-regionurlmap description: a description compute_region_ssl_policy: name: "basic-ssl-policy" profile: "MODERN" region: "us-central1" compute_target_vpn_gateway: name: "vpn-1" network: "inspec-network" region: "us-central1" static_ip: "vpn-static-ip" tunnel: "tunnel1" compute_region_commitment: name: "my-region-commitment" plan: "THIRTY_SIX_MONTH" compute_target_grpc_proxy: name: "inspec-test-proxy" validate_for_proxyless: true url_map_name: "urlmap" description: "a description" backend_service_name: "backend" port_name: "grpc" protocol: "GRPC" timeout_sec: 10 health_check_name: "healthcheck" compute_target_ssl_proxy: name: "test-proxy" ssl_certificate_name: "default-cert" protocol: "SSL" health_check_name: "health-check" backend_service_name: "backend-service" bigtable_instance_cluster: name: "inspec-test" cluster: "inspec-test-c1" storage_type: "SSD" dataproc_metastore_service: name: "metastore-srv" location: "us-central1" tier: "DEVELOPER" version: "3.1.2" metastore_type: "DATAPROC_METASTORE" dataproc_metastore_federation: federation_id: "inspec-federation" location: "us-central1" apigee_instance_attachment: name : "inspec-test-instance-attachment" location: "us-central" instance : "inspec-test-instance" environment: "inspec-test-environment" description: "InSpec Apigee Instances" parent : "organizations/ppradhan" api_proxy_type : "PROGRAMMABLE" data_fusion_instance: name: "inspec-instance" location: "us-central1" type: "DEVELOPER" cloud_run_jobs: name: "inspec-tutorial1-20230915-182543" location: "us-central1" deletion_protection: "false" image: "us-central1-docker.pkg.dev/ppradhan/nas/balasubs_tutorial1_20230915_182543:latest" dataproc_serverless_batches: name: "inspec-test-batch-0052" location: "us-central1" main_class: "org.apache.spark.examples.SparkPi" args: "10" path: "file:///usr/lib/spark/examples/jars/spark-examples.jar" monitoring_group: name: "inspec-test-group" filter: "resource.metadata.name = has_substring(\"inspec\")" ================================================ FILE: test/integration/verify/controls/container_cluster.rb ================================================ title 'GKE Container Cluster Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The GKE cluster name.') gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The GKE cluster zone.') gcp_kube_cluster_master_user = input(:gcp_kube_cluster_master_user, value: '', description: 'The GKE cluster master user.') gcp_kube_cluster_master_pass = input(:gcp_kube_cluster_master_pass, value: '', description: 'The GKE cluster master password.') gcp_kube_cluster_zone_extra1 = input(:gcp_kube_cluster_zone_extra1, value: '', description: 'The GKE cluster secondary zone.') gcp_kube_cluster_zone_extra2 = input(:gcp_kube_cluster_zone_extra2, value: '', description: 'The GKE cluster tertiary zone.') control 'gcp-gke-container-cluster-1.0' do impact 1.0 title 'Ensure GKE Container Cluster was built correctly' describe google_container_cluster(project: gcp_project_id, location: gcp_kube_cluster_zone, name: gcp_kube_cluster_name) do it { should exist } its('name') { should eq gcp_kube_cluster_name } its('location') { should match gcp_kube_cluster_zone } # the cluster should not be tainted its('tainted?') { should be false } # the cluster should not be untrusted its('untrusted?') { should be false } # the cluster should be in running state its('status') { should eq 'RUNNING' } # locations should match those requested its('locations.sort'){should cmp [ gcp_kube_cluster_zone, gcp_kube_cluster_zone_extra1, gcp_kube_cluster_zone_extra2 ].sort} # importantly for the cluster, check the kube master user/password its('master_auth.username'){ should eq gcp_kube_cluster_master_user} its('master_auth.password'){ should eq gcp_kube_cluster_master_pass} # no special network settings currently applied its('network'){should eq "default"} its('subnetwork'){should eq "default"} # check node configuration settings its('node_config.disk_size_gb'){should eq 100} its('node_config.image_type'){should eq "COS"} its('node_config.machine_type'){should eq "n1-standard-1"} # check ipv4 cidr size its('node_ipv4_cidr_size'){should eq 24} # check there are two node pools in the cluster its('node_pools.count'){should eq 2} end end ================================================ FILE: test/integration/verify/controls/container_clusters.rb ================================================ title 'Retrieve all GCP Container Clusters for a project and zone' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The GKE cluster name.') gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The GKE cluster zone.') control 'gcp-container-clusters-1.0' do impact 1.0 title 'Ensure container clusters have the correct properties in bulk.' describe google_container_clusters(project: gcp_project_id, location: gcp_kube_cluster_zone) do it { should exist } its('count') { should be <= 10} its('cluster_names') { should include gcp_kube_cluster_name } its('cluster_statuses') { should include "RUNNING" } end end ================================================ FILE: test/integration/verify/controls/container_nodepool.rb ================================================ title 'GKE Container Node Pool Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The GKE cluster name.') gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The GKE cluster zone.') gcp_kube_cluster_size = input(:gcp_kube_cluster_size, value: '', description: 'The GKE cluster initial size.') gcp_kube_nodepool_name = input(:gcp_kube_nodepool_name, value:'', description: 'The GKE cluster node pool name.') control 'gcp-gke-container-node-pool-1.0' do impact 1.0 title 'Ensure GKE Container Node Pool was built correctly' describe google_container_node_pool(project: gcp_project_id, location: gcp_kube_cluster_zone, cluster_name: gcp_kube_cluster_name, nodepool_name: gcp_kube_nodepool_name) do it { should exist } its('name') { should eq gcp_kube_nodepool_name } # the cluster should not be tainted its('tainted?') { should be false } # the cluster should not be untrusted its('untrusted?') { should be false } # the cluster should be in running state its('status') { should eq 'RUNNING' } # check node pool configuration settings its('config.disk_size_gb'){should eq 100} its('config.image_type'){should eq "COS"} its('config.machine_type'){should eq "n1-standard-1"} # default initial node count should be set via the configuration file its('initial_node_count'){should eq gcp_kube_cluster_size} end end ================================================ FILE: test/integration/verify/controls/container_nodepools.rb ================================================ title 'Retrieve all GCP Container Cluster Node Pools for a project, cluster and zone' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The GKE cluster name.') gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The GKE cluster zone.') gcp_kube_nodepool_name = input(:gcp_kube_nodepool_name, value:'', description: 'The GKE cluster node pool name.') control 'gcp-container-cluster-node-pools-1.0' do impact 1.0 title 'Ensure container cluster node pools have the correct properties in bulk.' describe google_container_node_pools(project: gcp_project_id, location: gcp_kube_cluster_zone, cluster_name: gcp_kube_cluster_name) do it { should exist } its('count') { should be <= 10} its('node_pool_names') { should include gcp_kube_nodepool_name } its('node_pool_statuses') { should include "RUNNING" } end end ================================================ FILE: test/integration/verify/controls/gcp_project.rb ================================================ title 'Project Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_project_name = input(:gcp_project_name, value: '', description: 'The GCP project name.') gcp_project_number = input(:gcp_project_number, value: '', description: 'The GCP project number.') control 'gcp-project' do impact 1.0 title 'Ensure that the project was created and has the correct settings ' describe google_project(project: gcp_project_id) do it { should exist } its('name') { should eq gcp_project_name } its('project_number') { should eq gcp_project_number.to_i } its('lifecycle_state') { should eq "ACTIVE" } end describe google_project(project: gcp_project_number.to_i) do it { should exist } its('name') { should eq gcp_project_name } its('project_number') { should eq gcp_project_number.to_i } its('lifecycle_state') { should eq "ACTIVE" } end end ================================================ FILE: test/integration/verify/controls/generic_external_vm.rb ================================================ title 'External Virtual Machine Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') gcp_ext_vm_name = input(:gcp_ext_vm_name, value: '', description: 'The GCP VM name.') gcp_ext_vm_size = input(:gcp_ext_vm_size, value: '', description: 'The GCP VM machine type or size.') #gcp_int_vm_image = input(:gcp_ext_vm_image, value: '', description: 'The GCP VM image.') control 'gcp-generic-vm-linux-external-1.0' do impact 1.0 title 'Ensure External VM was built and has the correct properties' describe google_compute_instance(project: gcp_project_id, zone: gcp_zone, name: gcp_ext_vm_name) do it { should exist } its('name') { should eq gcp_ext_vm_name } its('zone') { should match gcp_zone } # the machine should not be tainted its('tainted?') { should be false } # the machine should not be untrusted its('untrusted?') { should be false } its('machine_size') { should eq gcp_ext_vm_size} # can't easily get the os family from running instance... #its('source_image') { should eq gcp_int_vm_image} # we get Skylake and Broadwell for example its('cpu_platform') { should match "Intel" } its('status') { should eq 'RUNNING' } # see if the disk is present with the correct name its('disk_count'){should eq 1} # see the internal vm controls for more on the below #its('disks_source') { should eq gcp_ext_vm_name } #it { should disks_source_name_equal(0,gcp_ext_vm_name) } its('first_disks_source_name') { should eq gcp_ext_vm_name } its('first_disks_first_license') { should match "ubuntu"} # confirm there is only one network interface attached its('network_interfaces_count'){should eq 1} # uniquely for the external VM, ensure we have a public IP address its('first_network_interface_nat_ip_exists'){ should be true } its('first_network_interface_name'){ should eq "external-nat" } its('first_network_interface_type'){ should eq "one_to_one_nat" } its('labels_keys') { should_not include 'label_does_not_exist' } end end ================================================ FILE: test/integration/verify/controls/generic_external_vm_data_disk.rb ================================================ title 'External Virtual Machine Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') gcp_ext_vm_data_disk_name = input(:gcp_ext_vm_data_disk_name, value: '', description: 'The GCP VM name.') gcp_ext_vm_data_disk_size = input(:gcp_ext_vm_size, value: '', description: 'The GCP VM machine type or size.') gcp_compute_disk_name = input(:gcp_compute_disk_name, value: '', description: 'The GCP VM attached disk name.') control 'gcp-generic-vm-linux-external-data-disk-1.0' do impact 1.0 title 'Ensure External VM was built with attached data disk and has the correct properties' describe google_compute_instance(project: gcp_project_id, zone: gcp_zone, name: gcp_ext_vm_data_disk_name) do it { should exist } its('name') { should eq gcp_ext_vm_data_disk_name } its('zone') { should match gcp_zone } # the machine should not be tainted its('tainted?') { should be false } # the machine should not be untrusted its('untrusted?') { should be false } its('machine_size') { should eq gcp_ext_vm_data_disk_size} # can't easily get the os family from running instance... #its('source_image') { should eq gcp_int_vm_image} # we get Skylake and Broadwell for example its('cpu_platform') { should match "Intel" } its('status') { should eq 'RUNNING' } # see if the disks are present and correct its('disk_count'){should eq 2} its('first_disks_source_name') { should eq gcp_ext_vm_data_disk_name } its('first_disks_first_license') { should match "ubuntu"} # properties specific to the VM with attached disk its('second_disks_device_name') { should eq gcp_compute_disk_name } its('second_disks_source_name') { should eq gcp_compute_disk_name } its('second_disks_first_license') { should match "ubuntu"} # confirm there is only one network interface attached its('network_interfaces_count'){should eq 1} # uniquely for the external VM, ensure we have a public IP address its('first_network_interface_nat_ip_exists'){ should be true } its('first_network_interface_name'){ should eq "external-nat" } its('first_network_interface_type'){ should eq "one_to_one_nat" } its('labels_keys') { should_not include 'non_existing_label' } end end ================================================ FILE: test/integration/verify/controls/generic_iam_role.rb ================================================ title 'IAM Role Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_project_iam_custom_role_id = input(:gcp_project_iam_custom_role_id, value: '', description: 'The GCP IAM custom role identifier.') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources,value:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-generic-iam-role' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure that the IAM role is correctly set up' describe google_project_iam_custom_role(project: gcp_project_id, name: gcp_project_iam_custom_role_id ) do # stage of a role in the launch lifecycle, should be GA (can be ALPHA, BETA, or GA) its('stage') { should eq "GA" } its('name') { should match gcp_project_iam_custom_role_id } its('included_permissions') { should eq ["iam.roles.list"] } end end ================================================ FILE: test/integration/verify/controls/generic_image_family.rb ================================================ title 'Image Family' gcp_int_vm_image = input(:gcp_ext_vm_image, value: '', description: 'The GCP VM image.') control 'gcp-generic-image-family-1.0' do impact 1.0 title 'Ensure that the image is correct' describe google_compute_image(project: gcp_int_vm_image.split('/').first, name: gcp_int_vm_image.split('/').last ) do its('name') { should match "ubuntu" } its('family') { should match "ubuntu" } # the image should be available for use its('status') { should eq "READY" } end end ================================================ FILE: test/integration/verify/controls/generic_internal_vm.rb ================================================ title 'Internal Virtual Machine Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') gcp_int_vm_name = input(:gcp_int_vm_name, value: '', description: 'The GCP VM name.') gcp_int_vm_size = input(:gcp_int_vm_size, value: '', description: 'The GCP VM size.') #gcp_int_vm_image = input(:gcp_int_vm_image, value: '', description: 'The GCP VM image.') control 'gcp-generic-vm-linux-internal-1.0' do impact 1.0 title 'Ensure Internal VM was built and has the correct properties' describe google_compute_instance(project: gcp_project_id, zone: gcp_zone, name: gcp_int_vm_name) do it { should exist } its('name') { should eq gcp_int_vm_name } its('zone') { should match gcp_zone } # the machine should not be tainted its('tainted?') { should be false } # the machine should not be untrusted its('untrusted?') { should be false } its('machine_type') { should match gcp_int_vm_size} # can't easily get the os family from running instance... #its('source_image') { should eq gcp_int_vm_image} # we get Skylake and Broadwell for example its('cpu_platform') { should match "Intel" } its('status') { should eq 'RUNNING' } # see if the disk is present with the correct name its('disk_count'){should eq 1} # confirm there is only one network interface attached # it { should have_network_tag('test') } # qn here on how best to pass arguments?? # # its('disks_source(0)') { should eq gcp_int_vm_name } # it { should disks_source_name_equal(0,gcp_int_vm_name) } its('first_disks_source_name') { should eq gcp_int_vm_name } its('first_disks_first_license') { should match "ubuntu"} end end ================================================ FILE: test/integration/verify/controls/generic_public_ip_address.rb ================================================ title 'Public IP Address Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') gcp_ext_compute_address_name = input(:gcp_ext_compute_address_name,value: '',description:'The GCP compute address.') gcp_ext_vm_name = input(:gcp_ext_vm_name, value: '', description: 'The GCP generic external VM name.') control 'gcp-generic-public-ip-address-1.0' do impact 1.0 title 'Ensure that the Public IP Address has been configured correctly' describe google_compute_address(project: gcp_project_id, location: gcp_location, name: gcp_ext_compute_address_name) do its('name') { should eq gcp_ext_compute_address_name } # the actual ip address should exist its('address_ip_exists') { should be true } # the address should not be tainted its('tainted?') { should be false } # the address should not be untrusted its('untrusted?') { should be false } its('region') { should match gcp_location} # we attached this to the external generic vm so the status should be "in_use" its('status') { should eq "IN_USE" } #in this case the generic external VM should be listed as the only user its('user_count') { should eq 1 } its('user_resource_name') { should eq gcp_ext_vm_name} end end ================================================ FILE: test/integration/verify/controls/generic_windows_internal_vm.rb ================================================ title 'Internal Windows Virtual Machine Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') gcp_windows_int_vm_name = input(:gcp_windows_int_vm_name, value: '', description: 'The GCP VM name.') gcp_windows_int_vm_size = input(:gcp_windows_int_vm_size, value: '', description: 'The GCP VM size.') #gcp_windows_int_vm_image = input(:gcp_int_vm_size, value: '', description: 'The GCP VM size.') control 'gcp-generic-vm-windows-internal-1.0' do impact 1.0 title 'Ensure Windows Internal VM was built and has the correct properties' describe google_compute_instance(project: gcp_project_id, zone: gcp_zone, name: gcp_windows_int_vm_name) do it { should exist } its('name') { should eq gcp_windows_int_vm_name } its('zone') { should match gcp_zone } # the machine should not be tainted its('tainted?') { should be false } # the machine should not be untrusted its('untrusted?') { should be false } its('machine_size') { should eq gcp_windows_int_vm_size} # can't easily get the os family from running instance... #its('source_image') { should eq gcp_int_vm_image} # we get Skylake and Broadwell for example its('cpu_platform') { should match "Intel" } its('status') { should eq 'RUNNING' } # see if the disk is present with the correct name its('disk_count'){should eq 1} its('first_disks_source_name') { should eq gcp_windows_int_vm_name } its('first_disks_first_license') { should match "windows"} end end ================================================ FILE: test/integration/verify/controls/google_access_context_manager_access_level.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_access_context_manager_access_level resource.' gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", "policy_title": "policytitle" }, description: 'Service perimeter definition') control 'google_access_context_manager_access_level-1.0' do impact 1.0 title 'google_access_context_manager_access_level resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } policy_name = google_access_context_manager_access_policies(org_id: gcp_organization_id).names.first describe google_access_context_manager_access_level(parent: policy_name, name: "ip_subnet") do it { should exist } its('title') { should cmp "ip_subnet" } its('basic.conditions.size') { should cmp 1 } its('basic.conditions.first.ip_subnetworks') { should include "192.0.2.0/24" } end describe google_access_context_manager_access_level(parent: policy_name, name: "none") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_access_context_manager_access_levels.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_access_context_manager_access_levels resource.' gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", "policy_title": "policytitle" }, description: 'Service perimeter definition') control 'google_access_context_manager_access_levels-1.0' do impact 1.0 title 'google_access_context_manager_access_levels resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } policy_name = google_access_context_manager_access_policies(org_id: gcp_organization_id).names.first describe google_access_context_manager_access_levels(parent: policy_name) do its('names') { should include "ip_subnet" } end end ================================================ FILE: test/integration/verify/controls/google_access_context_manager_access_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_access_context_manager_access_policies resource.' gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", "policy_title": "policytitle" }, description: 'Service perimeter definition') control 'google_access_context_manager_access_policies-1.0' do impact 1.0 title 'google_access_context_manager_access_policies resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_access_context_manager_access_policies(org_id: gcp_organization_id) do its('count') { should be >= 1 } its('titles') { should include service_perimeter['policy_title'] } end end ================================================ FILE: test/integration/verify/controls/google_access_context_manager_access_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_access_context_manager_access_policy resource.' gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", "policy_title": "policytitle" }, description: 'Service perimeter definition') control 'google_access_context_manager_access_policy-1.0' do impact 1.0 title 'google_access_context_manager_access_policy resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe.one do google_access_context_manager_access_policies(org_id: gcp_organization_id).names.each do |policy_name| describe google_access_context_manager_access_policy(name: policy_name) do it { should exist } its('title') { should cmp service_perimeter['policy_title'] } its('parent') { should match gcp_organization_id } end end end end ================================================ FILE: test/integration/verify/controls/google_access_context_manager_service_perimeter.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_access_context_manager_service_perimeter resource.' gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", "policy_title": "policytitle" }, description: 'Service perimeter definition') control 'google_access_context_manager_service_perimeter-1.0' do impact 1.0 title 'google_access_context_manager_service_perimeter resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe.one do google_access_context_manager_access_policies(org_id: gcp_organization_id).names.each do |policy_name| describe google_access_context_manager_service_perimeter(policy_name: policy_name, name: service_perimeter['name']) do it { should exist } its('title') { should cmp service_perimeter['title'] } its('status.restricted_services') { should include service_perimeter['restricted_service'] } end end end end ================================================ FILE: test/integration/verify/controls/google_access_context_manager_service_perimeters.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_access_context_manager_service_perimeters resource.' gcp_organization_id = input(:gcp_organization_id, value: 'gcp_organization_id', description: 'The identifier of the organization that is the parent of the perimeter') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", "policy_title": "policytitle" }, description: 'Service perimeter definition') control 'google_access_context_manager_service_perimeters-1.0' do impact 1.0 title 'google_access_context_manager_service_perimeters resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe.one do google_access_context_manager_access_policies(org_id: gcp_organization_id).names.each do |policy_name| describe google_access_context_manager_service_perimeters(policy_name: policy_name) do its('names') { should include service_perimeter['name'] } its('titles') { should include service_perimeter['title'] } end end end end ================================================ FILE: test/integration/verify/controls/google_apigee_endpoint_attachment.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_endpoint_attachment resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') endpoint_attachment = input('endpoint_attachment', value: { "name": "organizations/ppradhan/endpointAttachments/inspec-test-attachment", "parent": "organizations/ppradhan", "host": "7.0.0.2", "connection_state": "ACCEPTED", "service_attachment": "projects/ppradhan/regions/us-central1/serviceAttachments/my-psc-ilb", "location": "us-central1", "state": "ACTIVE" }, description: 'endpoint_attachment description') control 'google_apigee_endpoint_attachment-1.0' do impact 1.0 title 'google_apigee_endpoint_attachment resource test' describe google_apigee_endpoint_attachment(name: endpoint_attachment['name']) do it { should exist } its('host') { should cmp endpoint_attachment['host'] } its('connection_state') { should cmp endpoint_attachment['connection_state'] } its('service_attachment') { should cmp endpoint_attachment['service_attachment'] } its('location') { should cmp endpoint_attachment['location'] } its('name') { should cmp endpoint_attachment['name'] } its('state') { should cmp endpoint_attachment['state'] } end describe google_apigee_endpoint_attachment(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_apigee_endpoint_attachments.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_endpoint_attachments resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') endpoint_attachment = input('endpoint_attachment', value: { "name": "organizations/ppradhan/endpointAttachments/inspec-test-attachment", "parent": "organizations/ppradhan", "host": "7.0.0.2", "connection_state": "ACCEPTED", "service_attachment": "projects/ppradhan/regions/us-central1/serviceAttachments/my-psc-ilb", "location": "us-central1", "state": "ACTIVE" }, description: 'endpoint_attachment description') control 'google_apigee_endpoint_attachments-1.0' do impact 1.0 title 'google_apigee_endpoint_attachments resource test' describe google_apigee_endpoint_attachments() do it { should exist } its('hosts') { should include endpoint_attachment['host'] } its('connection_states') { should include endpoint_attachment['connection_state'] } its('service_attachments') { should include endpoint_attachment['service_attachment'] } its('locations') { should include endpoint_attachment['location'] } its('names') { should include endpoint_attachment['name'] } its('states') { should include endpoint_attachment['state'] } end end ================================================ FILE: test/integration/verify/controls/google_apigee_organization.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_organization resource.' organization = input('organization', value: { "name": "ppradhan", "parent": "organizations/ppradhan", "runtime_type": "CLOUD", "authorized_network": "default", "project_id": "ppradhan", "subscription_type": "PAID", "created_at": "1698225643253", "state": "ACTIVE", "analytics_region": "us-west1" }, description: 'organization description') control 'google_apigee_organization-1.0' do impact 1.0 title 'google_apigee_organization resource test' describe google_apigee_organization(name: organization['parent']) do it { should exist } its('runtime_type') { should cmp organization['runtime_type'] } its('authorized_network') { should cmp organization['authorized_network'] } its('project_id') { should cmp organization['project_id'] } its('subscription_type') { should cmp organization['subscription_type'] } its('created_at') { should cmp organization['created_at'] } its('state') { should cmp organization['state'] } its('name') { should cmp organization['name'] } its('analytics_region') { should cmp organization['analytics_region'] } end describe google_apigee_organization(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_apigee_organization_api.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_organization_api resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') organization_api = input('organization_api', value: { "name": "firstproxy", "parent": "organizations/ppradhan", "latest_revision_id": "value_latestrevisionid", "api_proxy_type": "PROGRAMMABLE" }, description: 'organization_api description') control 'google_apigee_organization_api-1.0' do impact 1.0 title 'google_apigee_organization_api resource test' describe google_apigee_organization_api(parent: organization_api['parent'],name: organization_api['name']) do it { should exist } its('latest_revision_id') { should cmp organization_api['latest_revision_id'] } its('api_proxy_type') { should cmp organization_api['api_proxy_type'] } its('name') { should cmp organization_api['name'] } end describe google_apigee_organization_api(parent: organization_api['parent'],name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_apigee_organization_apis.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_organization_apis resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') organization_api = input('organization_api', value: { "name": "firstproxy", "parent": "organizations/ppradhan", "latest_revision_id": "value_latestrevisionid", "api_proxy_type": "PROGRAMMABLE" }, description: 'organization_api description') control 'google_apigee_organization_apis-1.0' do impact 1.0 title 'google_apigee_organization_apis resource test' describe google_apigee_organization_apis(parent: organization_api['parent']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_apigee_organization_envgroup.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_organization_envgroup resource.' organization_envgroup = input('organization_envgroup', value: { "name": "test-env-group", "parent": "organizations/ppradhan/envgroups", "hostname": "34.95.97.227.nip.io", "state": "ACTIVE", "created_at": "1698227493454" }, description: 'organization_envgroup description') control 'google_apigee_organization_envgroup-1.0' do impact 1.0 title 'google_apigee_organization_envgroup resource test' describe google_apigee_organization_envgroup(name: "#{organization_envgroup['parent']}/#{organization_envgroup['name']}") do it { should exist } its('name') { should cmp organization_envgroup['name'] } its('hostnames') { should include organization_envgroup['hostname'] } its('state') { should cmp organization_envgroup['state'] } its('created_at') { should cmp organization_envgroup['created_at'] } end describe google_apigee_organization_envgroup(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_apigee_organization_envgroup_attachment.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_organization_envgroup_attachment resource.' organization_envgroup_attachment = input('organization_envgroup_attachment', value: { "name": "6741d6ad-1307-4f03-b02a-9fb4562c0ff3", "parent": "organizations/ppradhan/envgroups/test-env-group/attachments", "created_at": "1698227493793", "environment": "test-env", "environment_group_id": "test-env-group" }, description: 'organization_envgroup_attachment description') control 'google_apigee_organization_envgroup_attachment-1.0' do impact 1.0 title 'google_apigee_organization_envgroup_attachment resource test' describe google_apigee_organization_envgroup_attachment(name: "#{organization_envgroup_attachment['parent']}/#{organization_envgroup_attachment['name']}") do it { should exist } its('created_at') { should cmp organization_envgroup_attachment['created_at'] } its('environment') { should cmp organization_envgroup_attachment['environment'] } its('environment_group_id') { should cmp organization_envgroup_attachment['environment_group_id'] } its('name') { should cmp organization_envgroup_attachment['name'] } end describe google_apigee_organization_envgroup_attachment(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_apigee_organization_envgroup_attachments.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_organization_envgroup_attachments resource.' organization_envgroup_attachment = input('organization_envgroup_attachment', value: { "name": "6741d6ad-1307-4f03-b02a-9fb4562c0ff3", "parent": "organizations/ppradhan/envgroups/test-env-group", "created_at": "1698227493793", "environment": "test-env", "environment_group_id": "test-env-group" }, description: 'organization_envgroup_attachment description') control 'google_apigee_organization_envgroup_attachments-1.0' do impact 1.0 title 'google_apigee_organization_envgroup_attachments resource test' describe google_apigee_organization_envgroup_attachments(parent: organization_envgroup_attachment['parent']) do it { should exist } end describe google_apigee_organization_envgroup_attachments(parent: organization_envgroup_attachment['parent']).where(name: organization_envgroup_attachment['name']) do it { should exist } its("environment_group_ids") { should include organization_envgroup_attachment['environment_group_id'] } its("environments") { should include organization_envgroup_attachment['environment'] } end end ================================================ FILE: test/integration/verify/controls/google_apigee_organization_envgroups.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_organization_envgroups resource.' organization_envgroup = input("organization_envgroup", value: { "name": "test-env-group", "parent": "organizations/ppradhan", "hostname": "34.95.97.227.nip.io", "state": "ACTIVE" }, description: "organization_envgroup description") control 'google_apigee_organization_envgroups-1.0' do impact 1.0 title 'google_apigee_organization_envgroups resource test' describe google_apigee_organization_envgroups(parent: organization_envgroup["parent"]) do it { should exist } its("names") { should include organization_envgroup["name"] } end describe google_apigee_organization_envgroups(parent: organization_envgroup["parent"]).where(name: organization_envgroup["name"]) do it { should exist } its("names") { should include organization_envgroup["name"] } its("hostnames") { should include [organization_envgroup["hostname"]] } its("states") { should include organization_envgroup["state"] } end end ================================================ FILE: test/integration/verify/controls/google_apigee_organization_instance_attachment.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_organization_instance_attachment resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') organization_instance_attachment = input('organization_instance_attachment', value: { "name": "c4452279-f4dd-473c-b50d-de21bec8147b", "parent": "organizations/ppradhan/instances/us-central1", "environment": "inspec-test-env", "created_at": "1728297911815" }, description: 'organization_instance_attachment description') control 'google_apigee_organization_instance_attachment-1.0' do impact 1.0 title 'google_apigee_organization_instance_attachment resource test' describe google_apigee_organization_instance_attachment(name: organization_instance_attachment['name']) do it { should exist } its('name') { should cmp organization_instance_attachment['name'] } its('environment') { should cmp organization_instance_attachment['environment'] } its('created_at') { should cmp organization_instance_attachment['created_at'] } end describe google_apigee_organization_instance_attachment(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_apigee_organization_instance_attachments.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_organization_instance_attachments resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') organization_instance_attachment = input('organization_instance_attachment', value: { "name": "c4452279-f4dd-473c-b50d-de21bec8147b", "parent": "organizations/ppradhan/instances/us-central1", "environment": "inspec-test-env", "created_at": "1728297911815" }, description: 'organization_instance_attachment description') control 'google_apigee_organization_instance_attachments-1.0' do impact 1.0 title 'google_apigee_organization_instance_attachments resource test' describe google_apigee_organization_instance_attachments(parent: organization_instance_attachment['parent']) do it { should exist } its('name') { should include organization_instance_attachment['name'] } its('environment') { should include organization_instance_attachment['environment'] } its('created_at') { should include organization_instance_attachment['created_at'] } end end ================================================ FILE: test/integration/verify/controls/google_apigee_organizations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_apigee_organizations resource.' organization = input('organization', value: { "parent": "organizations", "project_id": "ppradhan", }, description: 'organization description') control 'google_apigee_organizations-1.0' do impact 1.0 title 'google_apigee_organizations resource test' describe google_apigee_organizations(parent: organization["parent"]) do it { should exist } its("project_ids") { should include "#{organization["project_id"]}" } end end ================================================ FILE: test/integration/verify/controls/google_appengine_standard_app_version.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_appengine_standard_app_version resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project location.') standardappversion = input('standardappversion', value: { "version_id": "v2", "service": "default", "runtime": "nodejs10", "entrypoint": "node ./app.js", "port": "8080" }, description: 'Cloud App Engine definition') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization') control 'google_appengine_standard_app_version-1.0' do impact 1.0 title 'google_appengine_standard_app_version resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_appengine_standard_app_version(project: gcp_project_id, location: gcp_location, version_id: standardappversion['version_id'], service: standardappversion['service']) do it { should exist } its('version_id') { should eq standardappversion['version_id'] } its('runtime') { should eq standardappversion['runtime'] } end end ================================================ FILE: test/integration/verify/controls/google_appengine_standard_app_versions.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_appengine_standard_app_versions resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project location.') standardappversion = input('standardappversion', value: { "version_id": "v2", "service": "default", "runtime": "nodejs10", "entrypoint": "node ./app.js", "port": "8080" }, description: 'Cloud App Engine definition') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization') control 'google_appengine_standard_app_versions-1.0' do impact 1.0 title 'google_appengine_standard_app_versions resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_appengine_standard_app_versions(project: gcp_project_id, location: gcp_location,service: standardappversion['service']) do its('runtimes') { should include standardappversion['runtime'] } end end ================================================ FILE: test/integration/verify/controls/google_artifactregistry_project_location_repositories.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_artifactregistry_project_location_repositories resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project identifier.') project_location_repository = input('project_location_repository', value: { "name": "projects/#{gcp_project_id}/locations/#{gcp_location}/repositories/test-repository-1", "parent": "projects/#{gcp_project_id}/locations/#{gcp_location}" }, description: 'project_location_repository description') control 'google_artifactregistry_project_location_repositories-1.0' do impact 1.0 title 'google_artifactregistry_project_location_repositories resource test' describe google_artifactregistry_project_location_repositories(parent: project_location_repository['parent']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_artifactregistry_project_location_repository.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_artifactregistry_project_location_repository resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project identifier.') project_location_repository = input('project_location_repository', value: { "name": "projects/#{gcp_project_id}/locations/#{gcp_location}/repositories/test-repository-1", "parent": "projects/#{gcp_project_id}/locations/#{gcp_location}" }, description: 'project_location_repository description') control 'google_artifactregistry_project_location_repository-1.0' do impact 1.0 title 'google_artifactregistry_project_location_repository resource test' describe google_artifactregistry_project_location_repository(name: project_location_repository['name']) do it { should exist } end describe google_artifactregistry_project_location_repository(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_bigquery_dataset.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_bigquery_dataset resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dataset = input('dataset', value: { "dataset_id": "inspec_gcp_dataset", "friendly_name": "A BigQuery dataset test", "description": "Test BigQuery dataset description", "location": "EU", "default_table_expiration_ms": 3600000, "access_writer_role": "WRITER", "access_writer_special_group": "projectWriters" }, description: 'BigQuery dataset definition') control 'google_bigquery_dataset-1.0' do impact 1.0 title 'google_bigquery_dataset resource test' describe google_bigquery_dataset(project: gcp_project_id, name: dataset['dataset_id']) do it { should exist } its('friendly_name') { should eq dataset['friendly_name'] } its('location') { should eq dataset['location'] } its('description') { should eq dataset['description'] } its('name') { should eq dataset['dataset_id'] } its('default_table_expiration_ms') { should cmp dataset['default_table_expiration_ms'] } end describe.one do google_bigquery_dataset(project: gcp_project_id, name: dataset['dataset_id']).access.each do |dataset_access| describe dataset_access do its('role') { should eq dataset['access_writer_role'] } its('special_group') { should eq dataset['access_writer_special_group'] } end end end describe google_bigquery_dataset(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_bigquery_datasets.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_bigquery_datasets resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dataset = input('dataset', value: { "dataset_id": "inspec_gcp_dataset", "friendly_name": "A BigQuery dataset test", "description": "Test BigQuery dataset description", "location": "EU", "default_table_expiration_ms": 3600000, "access_writer_role": "WRITER", "access_writer_special_group": "projectWriters" }, description: 'BigQuery dataset definition') control 'google_bigquery_datasets-1.0' do impact 1.0 title 'google_bigquery_datasets resource test' describe google_bigquery_datasets(project: gcp_project_id) do its('count') { should be >= 1 } its('friendly_names') { should include dataset['friendly_name'] } its('locations') { should include dataset['location'] } end google_bigquery_datasets(project: gcp_project_id).ids.each do |name| google_bigquery_dataset(project: gcp_project_id, name: name.split(':').last).access.each do |access| describe access do # No bigquery dataset should allow access to allUsers its('iam_member') { should_not cmp 'allUsers' } end end end end ================================================ FILE: test/integration/verify/controls/google_bigquery_table.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_bigquery_table resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') bigquery_table = input('bigquery_table', value: { "table_id": "inspec_gcp_bigquery_table", "description": "A BigQuery table", "expiration_time": 1738882264000, "time_partitioning_type": "DAY" }, description: 'BigQuery table definition') dataset = input('dataset', value: { "dataset_id": "inspec_gcp_dataset", "friendly_name": "A BigQuery dataset test", "description": "Test BigQuery dataset description", "location": "EU", "default_table_expiration_ms": 3600000, "access_writer_role": "WRITER", "access_writer_special_group": "projectWriters" }, description: 'BigQuery dataset definition') control 'google_bigquery_table-1.0' do impact 1.0 title 'google_bigquery_table resource test' describe google_bigquery_table(project: gcp_project_id, dataset: dataset['dataset_id'], name: bigquery_table['table_id']) do it { should exist } its('expiration_time') { should cmp bigquery_table['expiration_time'] } its('time_partitioning.type') { should eq bigquery_table['time_partitioning_type'] } its('description') { should eq bigquery_table['description'] } end describe google_bigquery_table(project: gcp_project_id, dataset: dataset['dataset_id'], name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_bigquery_tables.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_bigquery_tables resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') bigquery_table = input('bigquery_table', value: { "table_id": "inspec_gcp_bigquery_table", "description": "A BigQuery table", "expiration_time": 1738882264000, "time_partitioning_type": "DAY" }, description: 'BigQuery table definition') dataset = input('dataset', value: { "dataset_id": "inspec_gcp_dataset", "friendly_name": "A BigQuery dataset test", "description": "Test BigQuery dataset description", "location": "EU", "default_table_expiration_ms": 3600000, "access_writer_role": "WRITER", "access_writer_special_group": "projectWriters" }, description: 'BigQuery dataset definition') control 'google_bigquery_tables-1.0' do impact 1.0 title 'google_bigquery_tables resource test' describe.one do google_bigquery_tables(project: gcp_project_id, dataset: dataset['dataset_id']).table_references.each do |table_reference| describe google_bigquery_table(project: gcp_project_id, dataset: dataset['dataset_id'], name: table_reference.table_id) do its('expiration_time') { should cmp bigquery_table['expiration_time'] } its('description') { should eq bigquery_table['description'] } end end end end ================================================ FILE: test/integration/verify/controls/google_bigtableadmin_cluster.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_bigtableadmin_cluster resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') cluster = input('cluster', value: { "name": "projects/ppradhan/instances/inspec-test/clusters/inspec-test-c1", "parent": "projects/ppradhan/instances/inspec-test", "location": "projects/ppradhan/locations/us-central1-f", "state": "READY", "default_storage_type": "SSD" }, description: 'cluster description') control 'google_bigtableadmin_cluster-1.0' do impact 1.0 title 'google_bigtableadmin_cluster resource test' describe google_bigtableadmin_cluster(name: cluster['name']) do it { should exist } its('name') { should cmp cluster['name'] } its('location') { should cmp cluster['location'] } its('state') { should cmp cluster['state'] } its('default_storage_type') { should cmp cluster['default_storage_type'] } end describe google_bigtableadmin_cluster(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_bigtableadmin_cluster_backup.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_bigtableadmin_cluster_backup resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') cluster_backup = input('cluster_backup', value: { "name": "projects/ppradhan/instances/inspec-test/clusters/inspec-test-c1/backups/inspec-day1-backup", "parent": "projects/ppradhan/instances/inspec-test/clusters/inspec-test-c1", "source_table": "projects/ppradhan/instances/inspec-test/tables/inspec", "source_backup": "value_sourcebackup", "expire_time": "2024-09-25T07:08:29.584Z", "start_time": "2024-09-24T07:08:31.252667Z", "end_time": "2024-09-24T07:08:31.627350Z", "size_bytes": "value_sizebytes", "state": "READY" }, description: 'cluster_backup description') control 'google_bigtableadmin_cluster_backup-1.0' do impact 1.0 title 'google_bigtableadmin_cluster_backup resource test' describe google_bigtableadmin_cluster_backup(name: cluster_backup['name']) do it { should exist } its('name') { should cmp cluster_backup['name'] } its('source_table') { should cmp cluster_backup['source_table'] } its('expire_time') { should cmp cluster_backup['expire_time'] } its('start_time') { should cmp cluster_backup['start_time'] } its('end_time') { should cmp cluster_backup['end_time'] } its('state') { should cmp cluster_backup['state'] } end describe google_bigtableadmin_cluster_backup(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_bigtableadmin_cluster_backups.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_bigtableadmin_cluster_backups resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') cluster_backup = input('cluster_backup', value: { "name": "projects/ppradhan/instances/inspec-test/clusters/inspec-test-c1/backups/inspec-day1-backup", "parent": "projects/ppradhan/instances/inspec-test/clusters/inspec-test-c1", "source_table": "projects/ppradhan/instances/inspec-test/tables/inspec", "source_backup": "value_sourcebackup", "expire_time": "2024-09-25T07:08:29.584Z", "start_time": "2024-09-24T07:08:31.252667Z", "end_time": "2024-09-24T07:08:31.627350Z", "size_bytes": "value_sizebytes", "state": "READY" }, description: 'cluster_backup description') control 'google_bigtableadmin_cluster_backups-1.0' do impact 1.0 title 'google_bigtableadmin_cluster_backups resource test' describe google_bigtableadmin_cluster_backups(parent: cluster_backup['parent']) do it { should exist } its('names') { should include cluster_backup['name'] } its('source_tables') { should include cluster_backup['source_table'] } its('expire_times') { should include cluster_backup['expire_time'] } its('start_times') { should include cluster_backup['start_time'] } its('end_times') { should include cluster_backup['end_time'] } its('states') { should include cluster_backup['state'] } end end ================================================ FILE: test/integration/verify/controls/google_bigtableadmin_clusters.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_bigtableadmin_clusters resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') cluster = input('cluster', value: { "name": "projects/ppradhan/instances/inspec-test/clusters/inspec-test-c1", "parent": "projects/ppradhan/instances/inspec-test", "location": "projects/ppradhan/locations/us-central1-f", "state": "READY", "default_storage_type": "SSD" }, description: 'cluster description') control 'google_bigtableadmin_clusters-1.0' do impact 1.0 title 'google_bigtableadmin_clusters resource test' describe google_bigtableadmin_clusters(parent: cluster['parent']) do it { should exist } its('names') { should include cluster['name'] } its('locations') { should include cluster['location'] } its('states') { should include cluster['state'] } its('default_storage_types') { should include cluster['default_storage_type'] } end end ================================================ FILE: test/integration/verify/controls/google_bigtableadmin_instance_app_profile.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_bigtableadmin_instance_app_profile resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') instance_app_profile = input('instance_app_profile', value: { "name": "projects/ppradhan/instances/inspec-test/appProfiles/inspec-test-profile", "parent": "projects/ppradhan/instances/inspec-test", "etag": "value_etag", "description": "value_description", "priority": "PRIORITY_HIGH" }, description: 'instance_app_profile description') control 'google_bigtableadmin_instance_app_profile-1.0' do impact 1.0 title 'google_bigtableadmin_instance_app_profile resource test' describe google_bigtableadmin_instance_app_profile(name: instance_app_profile['name']) do it { should exist } its('name') { should cmp instance_app_profile['name'] } its('etag') { should cmp instance_app_profile['etag'] } its('description') { should cmp instance_app_profile['description'] } its('priority') { should cmp instance_app_profile['priority'] } end describe google_bigtableadmin_instance_app_profile(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_bigtableadmin_instance_app_profiles.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_bigtableadmin_instance_app_profiles resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') instance_app_profile = input('instance_app_profile', value: { "name": "projects/ppradhan/instances/inspec-test/appProfiles/inspec-test-profile", "parent": "projects/ppradhan/instances/inspec-test", "etag": "value_etag", "description": "value_description", "priority": "PRIORITY_HIGH" }, description: 'instance_app_profile description') control 'google_bigtableadmin_instance_app_profiles-1.0' do impact 1.0 title 'google_bigtableadmin_instance_app_profiles resource test' describe google_bigtableadmin_instance_app_profiles(parent: instance_app_profile['parent']) do it { should exist } its('names') { should include project_instance_app_profile['name'] } end end ================================================ FILE: test/integration/verify/controls/google_billing_project_billing_info.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_billing_project_billing_info resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_billing_account = input(:gcp_billing_account, value: 'gcp_billing_account', description: 'The GCP billing account name.') gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_billing_project_billing_info-1.0' do impact 1.0 title 'google_billing_project_billing_info resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_billing_project_billing_info(project_id: gcp_project_id) do it { should exist } its('billing_account_name') { should eq gcp_billing_account } its('billing_enabled') { should eq true } end end ================================================ FILE: test/integration/verify/controls/google_cloud_scheduler_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_cloud_scheduler_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') scheduler_job = input('scheduler_job', value: { "region": "us-central1", "name": "job-name", "description": "A description", "schedule": "*/8 * * * *", "time_zone": "America/New_York", "http_method": "POST", "http_target_uri": "https://example.com/ping" }, description: 'Cloud Scheduler Job configuration') control 'google_cloud_scheduler_job-1.0' do impact 1.0 title 'google_cloud_scheduler_job resource test' describe google_cloud_scheduler_job(project: gcp_project_id, region: scheduler_job['region'], name: scheduler_job['name']) do it { should exist } its('description') { should cmp scheduler_job['description'] } its('schedule') { should cmp scheduler_job['schedule'] } its('time_zone') { should cmp scheduler_job['time_zone'] } its('http_target.http_method') { should cmp scheduler_job['http_method'] } its('http_target.uri') { should cmp scheduler_job['http_target_uri'] } end end ================================================ FILE: test/integration/verify/controls/google_cloud_scheduler_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_cloud_scheduler_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') scheduler_job = input('scheduler_job', value: { "region": "us-central1", "name": "job-name", "description": "A description", "schedule": "*/8 * * * *", "time_zone": "America/New_York", "http_method": "POST", "http_target_uri": "https://example.com/ping" }, description: 'Cloud Scheduler Job configuration') control 'google_cloud_scheduler_jobs-1.0' do impact 1.0 title 'google_cloud_scheduler_jobs resource test' google_cloud_scheduler_jobs(project: gcp_project_id, region: scheduler_job['location']).names.each do |name| describe google_cloud_scheduler_job(project: gcp_project_id, region: scheduler_job['region'], name: name) do it { should exist } its('description') { should cmp scheduler_job['description'] } its('schedule') { should cmp scheduler_job['schedule'] } its('time_zone') { should cmp scheduler_job['time_zone'] } its('http_target.http_method') { should cmp scheduler_job['http_method'] } its('http_target.uri') { should cmp scheduler_job['http_target_uri'] } end end end ================================================ FILE: test/integration/verify/controls/google_cloudbuild_trigger.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_cloudbuild_trigger resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') trigger = input('trigger', value: { "trigger_template_project": "trigger-project", "trigger_template_branch": "trigger-branch", "trigger_template_repo": "trigger-repo", "filename": "cloudbuild.yaml" }, description: 'CloudBuild trigger definition') control 'google_cloudbuild_trigger-1.0' do impact 1.0 title 'google_cloudbuild_trigger resource test' describe google_cloudbuild_triggers(project: gcp_project_id) do its('count') { should eq 1 } end google_cloudbuild_triggers(project: gcp_project_id).ids.each do |id| describe google_cloudbuild_trigger(project: gcp_project_id, id: id) do its('filename') { should eq trigger['filename'] } its('trigger_template.branch_name') { should eq trigger['trigger_template_branch'] } its('trigger_template.repo_name') { should eq trigger['trigger_template_repo'] } its('trigger_template.project_id') { should eq trigger['trigger_template_project'] } end end end ================================================ FILE: test/integration/verify/controls/google_cloudbuild_triggers.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_cloudbuild_triggers resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') trigger = input('trigger', value: { "trigger_template_project": "trigger-project", "trigger_template_branch": "trigger-branch", "trigger_template_repo": "trigger-repo", "filename": "cloudbuild.yaml" }, description: 'CloudBuild trigger definition') control 'google_cloudbuild_triggers-1.0' do impact 1.0 title 'google_cloudbuild_triggers resource test' describe google_cloudbuild_triggers(project: gcp_project_id) do its('count') { should eq 1 } end google_cloudbuild_triggers(project: gcp_project_id).ids.each do |id| describe google_cloudbuild_trigger(project: gcp_project_id, id: id) do its('filename') { should eq trigger['filename'] } its('trigger_template.branch_name') { should eq trigger['trigger_template_branch'] } its('trigger_template.repo_name') { should eq trigger['trigger_template_repo'] } its('trigger_template.project_id') { should eq trigger['trigger_template_project'] } end end end ================================================ FILE: test/integration/verify/controls/google_cloudfunctions_cloud_function.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_cloudfunctions_cloud_function resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_cloud_function_region = input(:gcp_cloud_function_region, value: 'gcp_cloud_function_region', description: 'The Cloud Function region.') cloudfunction = input('cloudfunction', value: { "name": "inspec-gcp-function", "description": "A description of the function", "available_memory_mb": 128, "trigger_http": true, "timeout": 60, "entry_point": "hello", "env_var_value": "val1" }, description: 'Cloud Function definition') control 'google_cloudfunctions_cloud_function-1.0' do impact 1.0 title 'google_cloudfunctions_cloud_function resource test' describe google_cloudfunctions_cloud_function(project: gcp_project_id, location: gcp_cloud_function_region, name: cloudfunction['name']) do it { should exist } its('description') { should eq cloudfunction['description'] } its('available_memory_mb') { should eq cloudfunction['available_memory_mb'] } its('https_trigger.url') { should match /\/inspec-gcp-function$/ } its('entry_point') { should eq cloudfunction['entry_point'] } its('environment_variables') { should include('MY_ENV_VAR' => cloudfunction['env_var_value']) } end describe google_cloudfunctions_cloud_function(project: gcp_project_id, location: gcp_cloud_function_region, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_cloudfunctions_cloud_functions.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_cloudfunctions_cloud_functions resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_cloud_function_region = input(:gcp_cloud_function_region, value: 'gcp_cloud_function_region', description: 'The Cloud Function region.') cloudfunction = input('cloudfunction', value: { "name": "inspec-gcp-function", "description": "A description of the function", "available_memory_mb": 128, "trigger_http": true, "timeout": 60, "entry_point": "hello", "env_var_value": "val1" }, description: 'Cloud Function definition') control 'google_cloudfunctions_cloud_functions-1.0' do impact 1.0 title 'google_cloudfunctions_cloud_functions resource test' describe google_cloudfunctions_cloud_functions(project: gcp_project_id, location: gcp_cloud_function_region) do its('descriptions') { should include cloudfunction['description'] } its('entry_points') { should include cloudfunction['entry_point'] } end end ================================================ FILE: test/integration/verify/controls/google_composer_project_location_environment.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_composer_project_location_environment resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_location_environment = input('project_location_environment', value: { "parent": "projects/ppradhan/locations/us-central1", "name": "projects/ppradhan/locations/us-central1/environments/example-composer-env", "state": "RUNNING", }, description: 'project_location_environment description') control 'google_composer_project_location_environment-1.0' do impact 1.0 title 'google_composer_project_location_environment resource test' describe google_composer_project_location_environment(name: project_location_environment['name']) do it { should exist } its('name') { should cmp project_location_environment['name'] } its('state') { should cmp project_location_environment['state'] } end describe google_composer_project_location_environment(name: "does_not_exist") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_composer_project_location_environments.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_composer_project_location_environments resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_location_environment = input('project_location_environment', value: { "parent": "projects/ppradhan/locations/us-central1", "name": "projects/ppradhan/locations/us-central1/environments/example-composer-env", "state": "RUNNING", }, description: 'project_location_environment description') control 'google_composer_project_location_environments-2.0' do describe google_composer_project_location_environments(parent: project_location_environment['parent']) do it { should exist } its('names') { should include(project_location_environment['name']) } its('states') { should include(project_location_environment['state']) } end describe google_composer_project_location_environments(parent: "projects/ppradhan/locations/us-east2") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_composer_project_location_image_versions.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_composer_project_location_image_versions resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_location_image_version = input('project_location_image_version', value: { "parent": "projects/ppradhan/locations/us-central1" }, description: 'project_location_image_version description') control 'google_composer_project_location_image_versions-1.0' do impact 1.0 title 'google_composer_project_location_image_versions resource test' describe google_composer_project_location_image_versions(parent: project_location_image_version['parent']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_accelerator_type.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_accelerator_type resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') accelerator_type = input('accelerator_type', value: null, description: 'The accelerator type') control 'google_compute_accelerator_type-1.0' do impact 1.0 title 'google_compute_accelerator_type resource test' describe google_compute_accelerator_type(project: gcp_project_id, zone: 'us-east1-b', name: accelerator_type['name']) do it { should exist } it { should be_up } end end ================================================ FILE: test/integration/verify/controls/google_compute_accelerator_types.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_accelerator_types resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') accelerator_type = input('accelerator_type', value: null, description: 'The accelerator type') control 'google_compute_accelerator_types-1.0' do impact 1.0 title 'google_compute_accelerator_types resource test' describe google_compute_accelerator_types(project: gcp_project_id, zone: 'us-east1-b') do it { should exist } it { should be_up } end end ================================================ FILE: test/integration/verify/controls/google_compute_address.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_address resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') address = input('address', value: { "name": "inspec-gcp-global-address", "address_type": "INTERNAL", "address": "10.2.0.3" }, description: 'Address definition') control 'google_compute_address-1.0' do impact 1.0 title 'google_compute_address resource test' describe google_compute_address(project: gcp_project_id, location: gcp_location, name: address['name']) do it { should exist } its('address') { should eq address['address'] } its('address_type') { should eq address['address_type'] } its('user_count') { should eq 0 } end describe google_compute_address(project: gcp_project_id, location: gcp_location, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_addresses.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_addresses resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') address = input('address', value: { "name": "inspec-gcp-global-address", "address_type": "INTERNAL", "address": "10.2.0.3" }, description: 'Address definition') control 'google_compute_addresses-1.0' do impact 1.0 title 'google_compute_addresses resource test' describe google_compute_addresses(project: gcp_project_id, location: gcp_location) do its('addresses') { should include address['address'] } its('names') { should include address['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_autoscaler.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_autoscaler resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'The GCP project zone.') instance_group_manager = input('instance_group_manager', value: { "name": "inspec-gcp-igm", "base_instance_name": "igm", "named_port_name": "port", "named_port_port": 80 }, description: 'Instance group manager definition') autoscaler = input('autoscaler', value: { "name": "inspec-gcp-autoscaler", "max_replicas": 5, "min_replicas": 1, "cooldown_period": 60, "cpu_utilization_target": 0.5 }, description: 'Autoscaler definition') control 'google_compute_autoscaler-1.0' do impact 1.0 title 'google_compute_autoscaler resource test' describe google_compute_autoscaler(project: gcp_project_id, zone: gcp_zone, name: autoscaler['name']) do it { should exist } its('target') { should match /\/inspec-gcp-igm$/ } its('autoscaling_policy.max_num_replicas') { should eq autoscaler['max_replicas'] } its('autoscaling_policy.min_num_replicas') { should eq autoscaler['min_replicas'] } its('autoscaling_policy.cool_down_period_sec') { should eq autoscaler['cooldown_period'] } its('autoscaling_policy.cpu_utilization.utilization_target') { should eq autoscaler['cpu_utilization_target'] } end describe google_compute_autoscaler(project: gcp_project_id, zone: gcp_zone, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_autoscalers.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_autoscalers resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'The GCP project zone.') instance_group_manager = input('instance_group_manager', value: { "name": "inspec-gcp-igm", "base_instance_name": "igm", "named_port_name": "port", "named_port_port": 80 }, description: 'Instance group manager definition') autoscaler = input('autoscaler', value: { "name": "inspec-gcp-autoscaler", "max_replicas": 5, "min_replicas": 1, "cooldown_period": 60, "cpu_utilization_target": 0.5 }, description: 'Autoscaler definition') control 'google_compute_autoscalers-1.0' do impact 1.0 title 'google_compute_autoscalers resource test' autoscalers = google_compute_autoscalers(project: gcp_project_id, zone: gcp_zone) describe.one do autoscalers.autoscaling_policies.each do |autoscaling_policy| describe autoscaling_policy do its('max_num_replicas') { should eq autoscaler['max_replicas'] } its('min_num_replicas') { should eq autoscaler['min_replicas'] } its('cool_down_period_sec') { should eq autoscaler['cooldown_period'] } its('cpu_utilization.utilization_target') { should eq autoscaler['cpu_utilization_target'] } end end end end ================================================ FILE: test/integration/verify/controls/google_compute_backend_bucket.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_backend_bucket resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_storage_bucket_name = input(:gcp_storage_bucket_name, value: 'gcp_storage_bucket_name', description: 'The GCS bucket name to use for the backend bucket.') backend_bucket = input('backend_bucket', value: { "name": "inspec-gcp-backend-bucket", "description": "Backend bucket example", "enable_cdn": true }, description: 'Backend bucket definition') control 'google_compute_backend_bucket-1.0' do impact 1.0 title 'google_compute_backend_bucket resource test' describe google_compute_backend_bucket(project: gcp_project_id, name: backend_bucket['name']) do it { should exist } its('description') { should eq backend_bucket['description'] } its('enable_cdn') { should be backend_bucket['enable_cdn'] } end describe google_compute_backend_bucket(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_backend_buckets.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_backend_buckets resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_storage_bucket_name = input(:gcp_storage_bucket_name, value: 'gcp_storage_bucket_name', description: 'The GCS bucket name to use for the backend bucket.') backend_bucket = input('backend_bucket', value: { "name": "inspec-gcp-backend-bucket", "description": "Backend bucket example", "enable_cdn": true }, description: 'Backend bucket definition') control 'google_compute_backend_buckets-1.0' do impact 1.0 title 'google_compute_backend_buckets resource test' describe google_compute_backend_buckets(project: gcp_project_id, name: backend_bucket['name']) do its('descriptions') { should include backend_bucket['description'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_backend_service.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_backend_service resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') backend_service = input('backend_service', value: { "name": "inspec-gcp-backend-service", "description": "A description", "port_name": "http", "protocol": "HTTP", "timeout_sec": 10, "enable_cdn": true }, description: 'Backend service definition') control 'google_compute_backend_service-1.0' do impact 1.0 title 'google_compute_backend_service resource test' describe google_compute_backend_service(project: gcp_project_id, name: backend_service['name']) do it { should exist } its('description') { should eq backend_service['description'] } its('port_name') { should eq backend_service['port_name'] } its('protocol') { should eq backend_service['protocol'] } its('timeout_sec') { should eq backend_service['timeout_sec'] } its('enable_cdn') { should eq backend_service['enable_cdn'] } end describe google_compute_backend_service(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_backend_services.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_backend_services resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') backend_service = input('backend_service', value: { "name": "inspec-gcp-backend-service", "description": "A description", "port_name": "http", "protocol": "HTTP", "timeout_sec": 10, "enable_cdn": true }, description: 'Backend service definition') control 'google_compute_backend_services-1.0' do impact 1.0 title 'google_compute_backend_services resource test' describe google_compute_backend_services(project: gcp_project_id) do its('count') { should be >= 1 } its('names') { should include backend_service['name'] } its('port_names') { should include backend_service['port_name'] } its('protocols') { should include backend_service['protocol'] } its('timeout_secs') { should include backend_service['timeout_sec'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_disk.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_disk resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'The GCP project zone.') snapshot = input('snapshot', value: { "name": "inspec-gcp-disk-snapshot", "disk_name": "inspec-snapshot-disk", "disk_type": "pd-standard", "disk_image": "debian-cloud/debian-10-buster-v20191014" }, description: 'Disk snapshot description') gcp_compute_disk_name = snapshot["disk_name"] gcp_compute_disk_image = snapshot["disk_image"] gcp_compute_disk_type = snapshot["disk_type"] control 'google_compute_disk-1.0' do impact 1.0 title 'google_compute_disk resource test' most_recent_image = google_compute_image(project: gcp_compute_disk_image.split('/').first, name: gcp_compute_disk_image.split('/').last) describe google_compute_disk(project: gcp_project_id, name: gcp_compute_disk_name, zone: gcp_zone) do it { should exist } # Test that the image is the most recent image for the family its('source_image') { should match most_recent_image.self_link } its('type') { should match gcp_compute_disk_type } end describe.one do google_compute_disk(project: gcp_project_id, name: gcp_compute_disk_name, zone: gcp_zone).labels.each_pair do |key, value| describe key do it { should cmp "environment" } end end end describe google_compute_disk(project: gcp_project_id, name: 'nonexistent', zone: gcp_zone) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_disk_type.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_disk_type resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') disk_type = input('disk_type', value: null, description: 'The accelerator type') control 'google_compute_disk_type-1.0' do impact 1.0 title 'google_compute_disk_type resource test' describe google_compute_disk_type(project: gcp_project_id, zone: 'us-east1-b', name: accelerator_type['name']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_disk_types.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_disk_types resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') disk_type = input('disk_type', value: null, description: 'The accelerator type') control 'google_compute_disk_types-1.0' do impact 1.0 title 'google_compute_disk_types resource test' describe google_compute_disk_types(project: gcp_project_id, zone: 'us-east1-b') do it { should exist } it { should be_up } end end ================================================ FILE: test/integration/verify/controls/google_compute_disks.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_disks resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'The GCP project zone.') snapshot = input('snapshot', value: { "name": "inspec-gcp-disk-snapshot", "disk_name": "inspec-snapshot-disk", "disk_type": "pd-standard", "disk_image": "debian-cloud/debian-10-buster-v20191014" }, description: 'Disk snapshot description') gcp_compute_disk_name = snapshot["disk_name"] gcp_compute_disk_image = snapshot["disk_image"] gcp_compute_disk_type = snapshot["disk_type"] control 'google_compute_disks-1.0' do impact 1.0 title 'google_compute_disks resource test' most_recent_image = google_compute_image(project: gcp_compute_disk_image.split('/').first, name: gcp_compute_disk_image.split('/').last) describe google_compute_disks(project: gcp_project_id, zone: gcp_zone) do it { should exist } its('names') { should include snapshot['disk_name'] } its('source_images') { should include most_recent_image.self_link } end end ================================================ FILE: test/integration/verify/controls/google_compute_external_vpn_gateway.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_external_vpn_gateway resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') external_vpn_gateway = input('external_vpn_gateway', value: { "name": "external-gateway", "redundancy_type": "SINGLE_IP_INTERNALLY_REDUNDANT", "description": "An externally managed VPN gateway", }, description: 'The externally managed vpn gateway.') control 'google_compute_external_vpn_gateway-1.0' do impact 1.0 title 'google_compute_external_vpn_gateway resource test' describe google_compute_external_vpn_gateway(project: gcp_project_id, name: external_vpn_gateway['name']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_external_vpn_gateways.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_external_vpn_gateways resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') control 'google_compute_external_vpn_gateways-1.0' do impact 1.0 title 'google_compute_external_vpn_gateways resource test' describe google_compute_external_vpn_gateways(project: gcp_project_id) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_firewall.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_firewall resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') firewall = input('firewall', value: { "name": "inspec-gcp-firewall", "source_tag": "some-tag" }, description: 'Firewall rule definition') control 'google_compute_firewall-1.0' do impact 1.0 title 'google_compute_firewall resource test' describe google_compute_firewall(project: gcp_project_id, name: firewall['name']) do its('direction') { should cmp 'INGRESS' } its('log_config_enabled?') { should be true } its('source_tags') { should include firewall['source_tag'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_firewalls.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_firewalls resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') firewall = input('firewall', value: { "name": "inspec-gcp-firewall", "source_tag": "some-tag" }, description: 'Firewall rule definition') control 'google_compute_firewalls-1.0' do impact 1.0 title 'google_compute_firewalls resource test' describe google_compute_firewalls(project: gcp_project_id) do its('count') { should be >= 1 } its('firewall_names') { should include firewall['name'] } its('firewall_directions') { should include 'INGRESS' } end end ================================================ FILE: test/integration/verify/controls/google_compute_firewalls_handwritten.rb ================================================ title 'Firewalls Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_enable_gcloud_calls = input(:gcp_enable_gcloud_calls,value:0,description:'Flag to enable the use of gcloud command line to pull in live data to test against.') control 'gcp-firewalls-1.0' do only_if { gcp_enable_gcloud_calls.to_i == 1 } impact 1.0 title 'Ensure firewalls have the correct properties in bulk' describe google_compute_firewalls(project: gcp_project_id) do it { should exist } its('count') { should be <= 100} # assume this is a development setup for a moment its('firewall_names') { should include "default-allow-ssh" } its('firewall_names') { should include "default-allow-rdp" } its('firewall_names') { should include "default-allow-internal" } its('firewall_names') { should include "default-allow-icmp" } # Only make the call if the configuration flag is specified and the test will run gcp_firewall_id = `gcloud compute firewall-rules list --filter="name=default-allow-ssh" --format=json | grep id | grep -o '[0-9]\\+'`.chomp its('firewall_ids') { should include gcp_firewall_id } end end ================================================ FILE: test/integration/verify/controls/google_compute_firewalls_loop.rb ================================================ title 'Loop over all GCP Firewalls' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') control 'gcp-firewalls-loop-1.0' do impact 1.0 title 'Ensure firewalls have the correct properties in bulk using google_compute_firewall for detail.' google_compute_firewalls(project: gcp_project_id).firewall_names.each do |firewall_name| describe google_compute_firewall(project: gcp_project_id, name: firewall_name) do it { should exist } its('direction') { should be_in ["INGRESS","EGRESS"] } end end end ================================================ FILE: test/integration/verify/controls/google_compute_forwarding_rule.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_forwarding_rule resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_lb_region = input(:gcp_lb_region, value: 'gcp_lb_region', description: 'The region used for the forwarding rule.') gcp_fr_udp_name = input(:gcp_fr_udp_name, value: 'gcp_fr_udp_name', description: 'The forwarding rule name.') control 'google_compute_forwarding_rule-1.0' do impact 1.0 title 'google_compute_forwarding_rule resource test' describe google_compute_forwarding_rule(project: gcp_project_id, region: gcp_lb_region, name: "#{gcp_fr_udp_name}-500") do it { should exist } its('region') { should match gcp_lb_region } its('creation_timestamp') { should be > Time.now - 365*60*60*24*10 } its('load_balancing_scheme') { should match 'EXTERNAL' } its('port_range') { should match "500-500" } its('ip_protocol') { should match "UDP" } end describe google_compute_forwarding_rule(project: gcp_project_id, region: gcp_lb_region, name: "nonexistent") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_forwarding_rules.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_forwarding_rules resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_lb_region = input(:gcp_lb_region, value: 'gcp_lb_region', description: 'The region used for the forwarding rule.') gcp_fr_udp_name = input(:gcp_fr_udp_name, value: 'gcp_fr_udp_name', description: 'The forwarding rule name.') control 'google_compute_forwarding_rules-1.0' do impact 1.0 title 'google_compute_forwarding_rules resource test' describe google_compute_forwarding_rules(project: gcp_project_id, region: gcp_lb_region) do its('forwarding_rule_names') { should include "#{gcp_fr_udp_name}-500" } end end ================================================ FILE: test/integration/verify/controls/google_compute_global_address.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_global_address resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') global_address = input('global_address', value: { "name": "inspec-gcp-global-address", "ip_version": "IPV6" }, description: 'Compute Global Address definition') control 'google_compute_global_address-1.0' do impact 1.0 title 'google_compute_global_address resource test' describe google_compute_global_address(project: gcp_project_id, name: global_address['name']) do it { should exist } its('ip_version') { should eq global_address['ip_version'] } end describe google_compute_global_address(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_global_addresses.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_global_addresses resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') global_address = input('global_address', value: { "name": "inspec-gcp-global-address", "ip_version": "IPV6" }, description: 'Compute Global Address definition') control 'google_compute_global_addresses-1.0' do impact 1.0 title 'google_compute_global_addresses resource test' describe google_compute_global_addresses(project: gcp_project_id, name: global_address['name']) do its('count') { should be >= 1 } its('names') { should include global_address['name'] } its('ip_versions') { should include global_address['ip_version'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_global_forwarding_rule.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_global_forwarding_rule resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') global_forwarding_rule = input('global_forwarding_rule', value: { "name": "inspec-gcp-global-forwarding-rule", "port_range": "80-80" }, description: 'Compute global forwarding rule definition') control 'google_compute_global_forwarding_rule-1.0' do impact 1.0 title 'google_compute_global_forwarding_rule resource test' describe google_compute_global_forwarding_rule(project: gcp_project_id, name: global_forwarding_rule['name']) do it { should exist } its('port_range') { should eq global_forwarding_rule['port_range'] } its('target') { should match /\/inspec-gcp-http-proxy$/ } end describe google_compute_global_forwarding_rule(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_global_forwarding_rules.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_global_forwarding_rules resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') global_forwarding_rule = input('global_forwarding_rule', value: { "name": "inspec-gcp-global-forwarding-rule", "port_range": "80-80" }, description: 'Compute global forwarding rule definition') control 'google_compute_global_forwarding_rules-1.0' do impact 1.0 title 'google_compute_global_forwarding_rules resource test' describe google_compute_global_forwarding_rules(project: gcp_project_id) do its('count') { should be >= 1 } its('port_ranges') { should include global_forwarding_rule['port_range'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_global_network_endpoint_group.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_global_network_endpoint_group resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') global_network_endpoint_group = input('global_network_endpoint_group', value: { "name": "inspec-gcp-global-endpoint-group", "network_endpoint_type": "INTERNET_IP_PORT", "default_port": 90 }, description: 'global_network_endpoint_group description') control 'google_compute_global_network_endpoint_group-1.0' do impact 1.0 title 'google_compute_global_network_endpoint_group resource test' describe google_compute_global_network_endpoint_group(project: gcp_project_id, name: global_network_endpoint_group['name']) do it { should exist } its('kind') { should cmp global_network_endpoint_group['kind'] } its('id') { should cmp global_network_endpoint_group['id'] } its('default_port') { should cmp global_network_endpoint_group['default_port'] } its('creation_timestamp') { should cmp global_network_endpoint_group['creation_timestamp'] } its('self_link') { should cmp global_network_endpoint_group['self_link'] } its('name') { should cmp global_network_endpoint_group['name'] } its('description') { should cmp global_network_endpoint_group['description'] } its('network_endpoint_type') { should cmp global_network_endpoint_group['network_endpoint_type'] } its('region') { should cmp global_network_endpoint_group['region'] } its('zone') { should cmp global_network_endpoint_group['zone'] } its('network') { should cmp global_network_endpoint_group['network'] } its('subnetwork') { should cmp global_network_endpoint_group['subnetwork'] } its('psc_target_service') { should cmp global_network_endpoint_group['psc_target_service'] } end describe google_compute_global_network_endpoint_group(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_global_network_endpoint_groups.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_global_network_endpoint_groups resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') global_network_endpoint_group = input('global_network_endpoint_group', value: { "name": "inspec-gcp-global-endpoint-group", "network_endpoint_type": "INTERNET_IP_PORT", "default_port": 90 }, description: 'global_network_endpoint_group description') control 'google_compute_global_network_endpoint_groups-1.0' do impact 1.0 title 'google_compute_global_network_endpoint_groups resource test' describe google_compute_global_network_endpoint_groups(project: gcp_project_id) do it { should exist } its('default_ports') { should include global_network_endpoint_group['default_port'] } its('names') { should include global_network_endpoint_group['name'] } its('network_endpoint_types'){ should include global_network_endpoint_group['network_endpoint_type'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_global_operation.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_global_operation resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') global_operation = input('global_operation', value: { "name": "operation-1635274037755-5cf45e8217d56-c081cd9a-c3ea7346", "operationType": "compute.externalVpnGateways.delete" }, description: 'Global operation rule definition') control 'google_compute_global_operation-1.0' do impact 1.0 title 'google_compute_global_operation resource test' describe google_compute_global_operation(project: gcp_project_id, name: global_operation['name']) do it { should exist } its('operation_type') { should include global_operation['operationType'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_global_operations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_global_operations resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') global_operation = input('global_operation', value: { "name": "operation-1634799391539-5ced765030229-be5d5765-6623920f", "operationType": "compute.externalVpnGateways.delete" }, description: 'Global operation rule definition') control 'google_compute_global_operations-1.0' do impact 1.0 title 'google_compute_global_operations resource test' describe google_compute_global_operations(project: gcp_project_id) do it { should exist } its('operation_types') { should include global_operation[:operationType] } end end ================================================ FILE: test/integration/verify/controls/google_compute_health_check.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_health_check resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') health_check = input('health_check', value: { "name": "inspec-gcp-health-check", "timeout_sec": 10, "check_interval_sec": 10, "tcp_health_check_port": 80 }, description: 'Health check definition') control 'google_compute_health_check-1.0' do impact 1.0 title 'google_compute_health_check resource test' describe google_compute_health_check(project: gcp_project_id, name: health_check['name']) do it { should exist } its('timeout_sec') { should eq health_check['timeout_sec'] } its('tcp_health_check.port') { should eq health_check['tcp_health_check_port'] } end describe google_compute_health_check(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_health_check_service.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_health_check_service resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_health_check_service = input('region_health_check_service', value: { "name": "instance-group-2", "region": "us-central1", "health_status_aggregation_policy": "NO_AGGREGATION" }, description: 'HealthCheckService resources that have been configured for the specified project in the given region') control 'google_compute_health_check_service-1.0' do impact 1.0 title 'google_compute_health_check_service resource test' describe google_compute_health_check_service(project: gcp_project_id, region: region_health_check_service['region'], name: region_health_check_service['name']) do it { should exist } its('name') { should eq region_health_check_service['name'] } its('health_status_aggregation_policy') { should eq region_health_check_service['health_status_aggregation_policy'] } end describe google_compute_health_check_service(project: gcp_project_id, region: region_health_check_service['region'], name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_health_check_services.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_health_check_services resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_health_check_service = input('region_health_check_service', value: { "name": "instance-group-2", "region": "us-central1", "health_status_aggregation_policy": "NO_AGGREGATION" }, description: 'HealthCheckService resources that have been configured for the specified project in the given region') control 'google_compute_health_check_services-1.0' do impact 1.0 title 'google_compute_health_check_services resource test' describe google_compute_health_check_services(project: gcp_project_id, region: region_health_check_service['region']) do it { should exist } its('names') { should include region_health_check_service['name'] } its('health_status_aggregation_policies') { should include region_health_check_service['health_status_aggregation_policy'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_health_checks.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_health_checks resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') health_check = input('health_check', value: { "name": "inspec-gcp-health-check", "timeout_sec": 10, "check_interval_sec": 10, "tcp_health_check_port": 80 }, description: 'Health check definition') control 'google_compute_health_checks-1.0' do impact 1.0 title 'google_compute_health_checks resource test' describe google_compute_health_checks(project: gcp_project_id) do its('names') { should include health_check['name'] } its('timeout_secs') { should include health_check['timeout_sec'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_http_health_check.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_http_health_check resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') http_health_check = input('http_health_check', value: { "name": "inspec-gcp-http-health-check", "request_path": "/health_check", "timeout_sec": 20, "check_interval_sec": 20 }, description: 'HTTP health check definition') control 'google_compute_http_health_check-1.0' do impact 1.0 title 'google_compute_http_health_check resource test' describe google_compute_http_health_check(project: gcp_project_id, name: http_health_check['name']) do it { should exist } its('timeout_sec') { should eq http_health_check['timeout_sec'] } its('request_path') { should eq http_health_check['request_path'] } its('check_interval_sec') { should eq http_health_check['check_interval_sec'] } end describe google_compute_http_health_check(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_http_health_checks.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_http_health_checks resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') http_health_check = input('http_health_check', value: { "name": "inspec-gcp-http-health-check", "request_path": "/health_check", "timeout_sec": 20, "check_interval_sec": 20 }, description: 'HTTP health check definition') control 'google_compute_http_health_checks-1.0' do impact 1.0 title 'google_compute_http_health_checks resource test' describe google_compute_http_health_checks(project: gcp_project_id) do its('names') { should include http_health_check['name'] } its('timeout_secs') { should include http_health_check['timeout_sec'] } its('check_interval_secs') { should include http_health_check['check_interval_sec'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_https_health_check.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_https_health_check resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') https_health_check = input('https_health_check', value: { "name": "inspec-gcp-https-health-check", "request_path": "/https_health_check", "timeout_sec": 15, "check_interval_sec": 15, "unhealthy_threshold": 3 }, description: 'HTTPS health check definition') control 'google_compute_https_health_check-1.0' do impact 1.0 title 'google_compute_https_health_check resource test' describe google_compute_https_health_check(project: gcp_project_id, name: https_health_check['name']) do it { should exist } its('timeout_sec') { should eq https_health_check['timeout_sec'] } its('request_path') { should eq https_health_check['request_path'] } its('check_interval_sec') { should eq https_health_check['check_interval_sec'] } its('unhealthy_threshold') { should eq https_health_check['unhealthy_threshold'] } end describe google_compute_https_health_check(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_https_health_checks.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_https_health_checks resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') https_health_check = input('https_health_check', value: { "name": "inspec-gcp-https-health-check", "request_path": "/https_health_check", "timeout_sec": 15, "check_interval_sec": 15, "unhealthy_threshold": 3 }, description: 'HTTPS health check definition') control 'google_compute_https_health_checks-1.0' do impact 1.0 title 'google_compute_https_health_checks resource test' describe google_compute_https_health_checks(project: gcp_project_id) do its('names') { should include https_health_check['name'] } its('timeout_secs') { should include https_health_check['timeout_sec'] } its('check_interval_secs') { should include https_health_check['check_interval_sec'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_image.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_image resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') compute_image = input('compute_image', value: { "name": "inspec-image", "source": "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz" }, description: 'Compute image description') control 'google_compute_image-1.0' do impact 1.0 title 'google_compute_image resource test' describe google_compute_image(project: gcp_project_id, name: compute_image['name']) do it { should exist } its('disk_size_gb') { should cmp 3 } end describe google_compute_image(project: gcp_project_id, name: 'notfound') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_image_family_view.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_image_family_view resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') image_family_views = input('image_family_views', value: { "zone": "us-central1-c", "name": "image-1", "source_type": "RAW", "status": "READY", "archive_size_bytes": 539099200, "disk_size_gb": 3, "family": "test" }, description: 'Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.') control 'google_compute_image_family_view-1.0' do impact 1.0 title 'google_compute_image_family_view resource test' describe google_compute_image_family_view(project: gcp_project_id, zone: image_family_views['zone'], name: image_family_views['family']) do it { should exist } its('image_name') { should eq image_family_views['name'] } its('image_source_type') { should eq image_family_views['source_type'] } its('image_family') { should eq image_family_views['family'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_instance.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_instance resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'GCP zone name of the compute disk') instance = input('instance', value: { "name": "inspec-instance", "machine_type": "n1-standard-1", "tag_1": "foo", "tag_2": "bar", "metadata_key": "123", "metadata_value": "asdf", "sa_scope": "https://www.googleapis.com/auth/compute.readonly", "startup_script": "echo hi > /test.txt" }, description: 'Compute instance description') control 'google_compute_instance-1.0' do impact 1.0 title 'google_compute_instance resource test' describe google_compute_instance(project: gcp_project_id, zone: gcp_zone, name: instance['name']) do it { should exist } its('machine_type') { should match instance['machine_type'] } its('tags.items') { should include instance['tag_1'] } its('tags.items') { should include instance['tag_2'] } its('tag_count') { should cmp 2 } its('service_account_scopes') { should include instance['sa_scope'] } its('metadata_keys') { should include instance['metadata_key'] } its('metadata_values') { should include instance['metadata_value'] } end describe google_compute_instance(project: gcp_project_id, zone: gcp_zone, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_instance_group.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_instance_group resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'GCP zone name') instance_group = input('instance_group', value: { "name": "inspec-instance-group", "description": "My instance group for testing", "named_port_name": "https", "named_port_port": 8080 }, description: 'Instance group') control 'google_compute_instance_group-1.0' do impact 1.0 title 'google_compute_instance_group resource test' describe google_compute_instance_group(project: gcp_project_id, zone: gcp_zone, name: instance_group['name']) do it { should exist } its('description') { should cmp instance_group['description'] } its('named_ports.count') { should cmp 1 } its('named_ports.first.name') { should cmp instance_group['named_port_name'] } its('named_ports.first.port') { should cmp instance_group['named_port_port'] } end describe google_compute_instance_group(project: gcp_project_id, zone: gcp_zone, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_instance_group_manager.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_instance_group_manager resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'The GCP project zone.') instance_group_manager = input('instance_group_manager', value: { "name": "inspec-gcp-igm", "base_instance_name": "igm", "named_port_name": "port", "named_port_port": 80 }, description: 'Instance group manager definition') control 'google_compute_instance_group_manager-1.0' do impact 1.0 title 'google_compute_instance_group_manager resource test' describe google_compute_instance_group_manager(project: gcp_project_id, zone: gcp_zone, name: instance_group_manager['name']) do it { should exist } its('base_instance_name') { should eq instance_group_manager['base_instance_name'] } its('named_ports.count') { should cmp 1 } its('named_ports.first.name') { should eq instance_group_manager['named_port_name'] } its('named_ports.first.port') { should eq instance_group_manager['named_port_port'] } end describe google_compute_instance_group_manager(project: gcp_project_id, zone: gcp_zone, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_instance_group_managers.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_instance_group_managers resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'The GCP project zone.') instance_group_manager = input('instance_group_manager', value: { "name": "inspec-gcp-igm", "base_instance_name": "igm", "named_port_name": "port", "named_port_port": 80 }, description: 'Instance group manager definition') control 'google_compute_instance_group_managers-1.0' do impact 1.0 title 'google_compute_instance_group_managers resource test' describe google_compute_instance_group_managers(project: gcp_project_id, zone: gcp_zone) do its('base_instance_names') { should include instance_group_manager['base_instance_name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_instance_groups.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_instance_groups resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'GCP zone name') instance_group = input('instance_group', value: { "name": "inspec-instance-group", "description": "My instance group for testing", "named_port_name": "https", "named_port_port": 8080 }, description: 'Instance group') control 'google_compute_instance_groups-1.0' do impact 1.0 title 'google_compute_instance_groups resource test' describe google_compute_instance_groups(project: gcp_project_id, zone: gcp_zone) do its('instance_group_names') { should include instance_group['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_instance_groups_loop.rb ================================================ title 'Google compute instance groups properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_lb_zone = input(:gcp_lb_zone, value: '', description: 'The GCP pattern zone for the managed instance group (mig1).') control 'gcp-compute-instance-groups-loop-1.0' do impact 1.0 title 'Ensure compute instance groups have the correct properties by looping in detail and filtering' google_compute_instance_groups(project: gcp_project_id, zone: gcp_lb_zone).where(instance_group_name: /^gcp-inspec/).instance_group_names.each do |instance_group_name| describe google_compute_instance_group(project: gcp_project_id, zone: 'europe-west2-a', name: instance_group_name) do it { should exist } its('size') { should be >= 0 } end end end ================================================ FILE: test/integration/verify/controls/google_compute_instance_label_loop.rb ================================================ title 'Loop over all GCP Zones to find all Compute Instances with a particular Label' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') control 'gcp-zones-compute-label-loop-1.0' do impact 1.0 title 'Ensure labels for compute instances across all zones have or do not have a particular label.' google_compute_zones(project: gcp_project_id).zone_names.each do |zone_name| google_compute_instances(project: gcp_project_id, zone: zone_name).instance_names.each do |instance_name| describe google_compute_instance(project: gcp_project_id, zone: zone_name, name: instance_name) do its('labels_keys') { should_not include 'operations_override_do_not_kill' } end end end end ================================================ FILE: test/integration/verify/controls/google_compute_instance_template.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_instance_template resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') instance_template = input('instance_template', value: { "name": "inspec-gcp-instance-template", "description": "A description of the instance template", "instance_description": "A description of the instance itself", "machine_type": "f1-micro", "tag": "foo", "can_ip_forward": false, "scheduling_automatic_restart": true, "scheduling_on_host_maintenance": "MIGRATE", "disk_source_image": "debian-cloud/debian-9", "disk_auto_delete": true, "disk_boot": true, "network_interface_network": "default", "service_account_scope": "storage-ro" }, description: 'An instance template definition') control 'google_compute_instance_template-1.0' do impact 1.0 title 'google_compute_instance_template resource test' describe google_compute_instance_template(project: gcp_project_id, name: instance_template['name']) do it { should exist } its('description') { should eq instance_template['description'] } its('properties.description') { should eq instance_template['instance_description'] } its('properties.machine_type') { should eq instance_template['machine_type'] } its('properties.tags.items') { should include instance_template['tag'] } its('properties.disks.count') { should eq 1 } its('properties.disks.first.auto_delete') { should eq instance_template['disk_auto_delete'] } its('properties.disks.first.boot') { should eq instance_template['disk_boot'] } its('properties.network_interfaces.count') { should eq 1 } its('properties.service_accounts.count') { should eq 1 } end describe google_compute_instance_template(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_instance_templates.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_instance_templates resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') instance_template = input('instance_template', value: { "name": "inspec-gcp-instance-template", "description": "A description of the instance template", "instance_description": "A description of the instance itself", "machine_type": "f1-micro", "tag": "foo", "can_ip_forward": false, "scheduling_automatic_restart": true, "scheduling_on_host_maintenance": "MIGRATE", "disk_source_image": "debian-cloud/debian-9", "disk_auto_delete": true, "disk_boot": true, "network_interface_network": "default", "service_account_scope": "storage-ro" }, description: 'An instance template definition') control 'google_compute_instance_templates-1.0' do impact 1.0 title 'google_compute_instance_templates resource test' describe google_compute_instance_templates(project: gcp_project_id) do its('names') { should include instance_template['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_instances.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_instances resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'GCP zone name of the compute disk') instance = input('instance', value: { "name": "inspec-instance", "machine_type": "n1-standard-1", "tag_1": "foo", "tag_2": "bar", "metadata_key": "123", "metadata_value": "asdf", "sa_scope": "https://www.googleapis.com/auth/compute.readonly", "startup_script": "echo hi > /test.txt" }, description: 'Compute instance description') control 'google_compute_instances-1.0' do impact 1.0 title 'google_compute_instances resource test' describe google_compute_instances(project: gcp_project_id, zone: gcp_zone) do its('instance_names') { should include instance['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_interconnect.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_interconnect resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') control 'google_compute_interconnect-1.0' do impact 1.0 title 'google_compute_interconnect resource test' describe google_compute_interconnect(project: gcp_project_id) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_interconnect_attachment.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_interconnect_attachment resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') interconnect_attachment = input('interconnect_attachment', value: { "name": "on-prem-attachment", "project": "ppradhan", "region": "us-central1", "kind": "compute#interconnectAttachment", "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/interconnectAttachments/on-prem-attachment", "encryption": "NONE", "stack_type": "IPV4_ONLY", }, description: 'interconnect_attachment description') control 'google_compute_interconnect_attachment-1.0' do impact 1.0 title 'google_compute_interconnect_attachment resource test' describe google_compute_interconnect_attachment(name: interconnect_attachment['name'], project: gcp_project_id, region: interconnect_attachment['region']) do it { should exist } its('kind') { should cmp interconnect_attachment['kind'] } its('description') { should cmp interconnect_attachment['description'] } its('self_link') { should cmp interconnect_attachment['self_link'] } its('name') { should cmp interconnect_attachment['name'] } its('encryption') { should cmp interconnect_attachment['encryption'] } its('stack_type') { should cmp interconnect_attachment['stack_type'] } end describe google_compute_interconnect_attachment(name: "donotexist", project: gcp_project_id, region: interconnect_attachment['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_interconnect_attachments.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_interconnect_attachments resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') interconnect_attachment = input('interconnect_attachment', value: { "project": "ppradhan", "region": "us-central1", }, description: 'interconnect_attachment description') control 'google_compute_interconnect_attachments-1.0' do impact 1.0 title 'google_compute_interconnect_attachments resource test' describe google_compute_interconnect_attachments(project: gcp_project_id, region: interconnect_attachment['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_interconnect_location.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_interconnect_location resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') interconnect_location = input('interconnect_location', value: { "name": "akl-zone1-1353", "facility_provider_facility_id": "Auckland - Albany", "facility_provider": "Vocus" }, description: 'Retrieves the list of interconnect locations available to the specified project.') control 'google_compute_interconnect_location-1.0' do impact 1.0 title 'google_compute_interconnect_location resource test' describe google_compute_interconnect_location(project: gcp_project_id, name: interconnect_location['name']) do it { should exist } its('facility_provider_facility_id') { should eq interconnect_location['facility_provider_facility_id'] } its('facility_provider') { should eq interconnect_location['facility_provider'] } end describe google_compute_interconnect_location(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_interconnect_locations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_interconnect_locations resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') interconnect_location = input('interconnect_location', value: { "name": "akl-zone1-1353", "facility_provider_facility_id": "Auckland - Albany", "facility_provider": "Vocus" }, description: 'Retrieves the list of interconnect locations available to the specified project.') control 'google_compute_interconnect_locations-1.0' do impact 1.0 title 'google_compute_interconnect_locations resource test' describe google_compute_interconnect_locations(project: gcp_project_id) do its('names') { should include interconnect_location['name'] } its('facility_provider_facility_ids') { should include interconnect_location['facility_provider_facility_id'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_interconnects.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_interconnects resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') control 'google_compute_interconnects-1.0' do impact 1.0 title 'google_compute_interconnects resource test' describe google_compute_interconnects(project: gcp_project_id) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_license.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_license resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') license = input('license', value: { "network_attachment": "value_networkattachment", "project": "windows-cloud", "region": "us-central1", "kind": "compute#license", "name": "mirantis-container-runtime", "id": "3607075093511293736", "license_code": "value_licensecode", "creation_timestamp": "value_creationtimestamp", "description": "value_description", "self_link": "value_selflink" }, description: 'license description') control 'google_compute_license-1.0' do impact 1.0 title 'google_compute_license resource test' describe google_compute_license(name: license['id'], project: gcp_project_id, region: license['region']) do it { should exist } its('kind') { should cmp license['kind'] } its('name') { should cmp license['name'] } its('id') { should cmp license['id'] } its('license_code') { should cmp license['license_code'] } its('creation_timestamp') { should cmp license['creation_timestamp'] } its('description') { should cmp license['description'] } its('self_link') { should cmp license['self_link'] } end describe google_compute_license(name: license['id'], project: gcp_project_id, region: license['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_license_code.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_license_code resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') license_code = input('license_code', value: { "name": "akl-zone1-1353" }, description: 'License codes are mirrored across all projects that have permissions to read the License Code.') control 'google_compute_license_code-1.0' do impact 1.0 title 'google_compute_license_code resource test' describe google_compute_license_code(project: gcp_project_id, name: license_code['name']) do it { should exist } end describe google_compute_license_code(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_licenses.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_licenses resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') license = input('license', value: { "network_attachment": "value_networkattachment", "project": "windows-cloud", "region": "us-central1", "kind": "compute#license", "name": "mirantis-container-runtime", "id": "3607075093511293736", "license_code": "value_licensecode", "creation_timestamp": "value_creationtimestamp", "description": "value_description", "self_link": "value_selflink" }, description: 'license description') control 'google_compute_licenses-1.0' do impact 1.0 title 'google_compute_licenses resource test' describe google_compute_licenses(project: gcp_project_id, region: license['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_machine_image.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_machine_image resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') machine_image = input('machine_image', value: { "project": "ppradhan", "kind": "compute#machineImage", "id": "7552526330490377685", "creation_timestamp": "value_creationtimestamp", "name": "image-1", "description": "value_description", "self_link": "value_selflink", "source_instance": "value_sourceinstance", "status": "value_status", "total_storage_bytes": "value_totalstoragebytes" }, description: 'machine_image description') control 'google_compute_machine_image-1.0' do impact 1.0 title 'google_compute_machine_image resource test' describe google_compute_machine_image(name: machine_image['name'], project: gcp_project_id) do it { should exist } its('kind') { should cmp machine_image['kind'] } its('id') { should cmp machine_image['id'] } its('creation_timestamp') { should cmp machine_image['creation_timestamp'] } its('name') { should cmp machine_image['name'] } its('description') { should cmp machine_image['description'] } its('self_link') { should cmp machine_image['self_link'] } its('source_instance') { should cmp machine_image['source_instance'] } its('status') { should cmp machine_image['status'] } its('total_storage_bytes') { should cmp machine_image['total_storage_bytes'] } end describe google_compute_machine_image(name: machine_image['name'], project: gcp_project_id) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_machine_images.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_machine_images resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') machine_image = input('machine_image', value: { "project": "ppradhan", "kind": "compute#machineImage", "id": "7552526330490377685", "creation_timestamp": "value_creationtimestamp", "name": "image-1", "description": "value_description", "self_link": "value_selflink", "source_instance": "value_sourceinstance", "status": "value_status", "total_storage_bytes": "value_totalstoragebytes" }, description: 'machine_image description') control 'google_compute_machine_images-1.0' do impact 1.0 title 'google_compute_machine_images resource test' describe google_compute_machine_images(project: gcp_project_id) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_machine_type.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_machine_type resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') machine_type = input('machine_type', value: { "project": "ppradhan", "zone": "us-central1-a", "kind": "compute#machineType", "id": "1000012", "creation_timestamp": "value_creationtimestamp", "name": "a2-highgpu-1g", "description": "value_description", "maximum_persistent_disks_size_gb": "value_maximumpersistentdiskssizegb", "self_link": "value_selflink" }, description: 'machine_type description') control 'google_compute_machine_type-1.0' do impact 1.0 title 'google_compute_machine_type resource test' describe google_compute_machine_type(name: machine_type['name'], project: gcp_project_id, zone: machine_type['zone']) do it { should exist } its('kind') { should cmp machine_type['kind'] } its('id') { should cmp machine_type['id'] } its('creation_timestamp') { should cmp machine_type['creation_timestamp'] } its('name') { should cmp machine_type['name'] } its('description') { should cmp machine_type['description'] } its('maximum_persistent_disks_size_gb') { should cmp machine_type['maximum_persistent_disks_size_gb'] } its('zone') { should cmp machine_type['zone'] } its('self_link') { should cmp machine_type['self_link'] } end describe google_compute_machine_type(name: machine_type['name'], project: gcp_project_id, zone: machine_type['zone']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_machine_types.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_machine_types resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') machine_type = input('machine_type', value: { "project": "ppradhan", "zone": "us-central1-a", "kind": "compute#machineType", "id": "1000012", "creation_timestamp": "value_creationtimestamp", "name": "a2-highgpu-1g", "description": "value_description", "maximum_persistent_disks_size_gb": "value_maximumpersistentdiskssizegb", "self_link": "value_selflink" }, description: 'machine_type description') control 'google_compute_machine_types-1.0' do impact 1.0 title 'google_compute_machine_types resource test' describe google_compute_machine_types(project: gcp_project_id, zone: machine_type['zone']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_network.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_network resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') network = input('network', value: { "name": "inspec-network", "routing_mode": "REGIONAL" }, description: 'Network description') control 'google_compute_network-1.0' do impact 1.0 title 'google_compute_network resource test' describe google_compute_network(project: gcp_project_id, name: network['name']) do it { should exist } its('routing_config.routing_mode') { should cmp network['routing_mode'] } end describe google_compute_network(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_network_attachment.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_network_attachment resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') network_attachment = input('network_attachment', value: { "network_attachment": "inspec-test", "project": "ppradhan", "region": "us-central1", "kind": "value_kind", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "inspec-test", "description": "value_description", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "connection_preference": "value_connectionpreference", "fingerprint": "value_fingerprint", "network": "inspec-network" }, description: 'network_attachment description') control 'google_compute_network_attachment-1.0' do impact 1.0 title 'google_compute_network_attachment resource test' describe google_compute_network_attachment(network_attachment: network_attachment['network_attachment'], project: gcp_project_id, region: network_attachment['region']) do it { should exist } its('kind') { should cmp network_attachment['kind'] } its('id') { should cmp network_attachment['id'] } its('creation_timestamp') { should cmp network_attachment['creation_timestamp'] } its('name') { should cmp network_attachment['name'] } its('description') { should cmp network_attachment['description'] } its('self_link') { should cmp network_attachment['self_link'] } its('self_link_with_id') { should cmp network_attachment['self_link_with_id'] } its('region') { should cmp network_attachment['region'] } its('connection_preference') { should cmp network_attachment['connection_preference'] } its('fingerprint') { should cmp network_attachment['fingerprint'] } its('network') { should cmp network_attachment['network'] } end describe google_compute_v1_network_attachment(name: network_attachment['network_attachment'], project: gcp_project_id, region: network_attachment['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_network_attachments.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_network_attachments resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') network_attachment = input('network_attachment', value: { "network_attachment": "inspec-test", "project": "ppradhan", "region": "us-central1", "kind": "value_kind", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "inspec-test", "description": "value_description", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "connection_preference": "value_connectionpreference", "fingerprint": "value_fingerprint", "network": "inspec-network" }, description: 'network_attachment description') control 'google_compute_network_attachments-1.0' do impact 1.0 title 'google_compute_network_attachments resource test' describe google_compute_network_attachments(project: gcp_project_id, region: network_attachment['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_network_edge_security_service.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_network_edge_security_service resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') network_edge_security_service = input('network_edge_security_service', value: { "machine_type": "value_machinetype", "project": "ppradhan", "zone": "us-central1-a", "kind": "compute#networkEdgeSecurityService", "id": "6659048510113795180", "creation_timestamp": "value_creationtimestamp", "name": "new-network-edge-security-service", "description": "value_description", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "region": "us-central1", "fingerprint": "value_fingerprint", "security_policy": "value_securitypolicy" }, description: 'network_edge_security_service description') control 'google_compute_network_edge_security_service-1.0' do impact 1.0 title 'google_compute_network_edge_security_service resource test' describe google_compute_network_edge_security_service(name: network_edge_security_service['name'], project: gcp_project_id, region: network_edge_security_service['region']) do it { should exist } its('kind') { should cmp network_edge_security_service['kind'] } its('id') { should cmp network_edge_security_service['id'] } its('creation_timestamp') { should cmp network_edge_security_service['creation_timestamp'] } its('name') { should cmp network_edge_security_service['name'] } its('description') { should cmp network_edge_security_service['description'] } its('self_link') { should cmp network_edge_security_service['self_link'] } its('self_link_with_id') { should cmp network_edge_security_service['self_link_with_id'] } its('region') { should cmp network_edge_security_service['region'] } its('fingerprint') { should cmp network_edge_security_service['fingerprint'] } its('security_policy') { should cmp network_edge_security_service['security_policy'] } end describe google_compute_network_edge_security_service(name: network_edge_security_service['name'], project: gcp_project_id, region: network_edge_security_service['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_network_endpoint_group.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_network_endpoint_group resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') network_endpoint_group = input('network_endpoint_group', value: { "name": "inspec-gcp-endpoint-group", "default_port": 90 }, description: 'Network endpoint group description') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'GCP zone name') control 'google_compute_network_endpoint_group-1.0' do impact 1.0 title 'google_compute_network_endpoint_group resource test' describe google_compute_network_endpoint_group(project: gcp_project_id, zone: gcp_zone, name: network_endpoint_group['name']) do it { should exist } its('default_port') { should cmp network_endpoint_group['default_port'] } end describe google_compute_network_endpoint_group(project: gcp_project_id, zone: gcp_zone, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_network_endpoint_groups.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_network_endpoint_groups resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') network_endpoint_group = input('network_endpoint_group', value: { "name": "inspec-gcp-endpoint-group", "default_port": 90 }, description: 'Network endpoint group description') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'GCP zone name') control 'google_compute_network_endpoint_groups-1.0' do impact 1.0 title 'google_compute_network_endpoint_groups resource test' describe google_compute_network_endpoint_groups(project: gcp_project_id, zone: gcp_zone) do its('default_ports') { should include network_endpoint_group['default_port'] } its('names') { should include network_endpoint_group['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_network_firewall_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_network_firewall_policies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') network_firewall_policy = input('network_firewall_policy', value: { "project": "value_project", "kind": "compute#firewallPolicy", "id": "3379931040786965079", "creation_timestamp": "value_creationtimestamp", "name": "inspec-test", "description": "", "fingerprint": "value_fingerprint", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "short_name": "value_shortname", "display_name": "value_displayname", "parent": "value_parent", "region": "value_region" }, description: 'network_firewall_policy description') control 'google_compute_network_firewall_policies-1.0' do impact 1.0 title 'google_compute_network_firewall_policies resource test' describe google_compute_network_firewall_policies(project: gcp_project_id) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_network_firewall_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_network_firewall_policy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') network_firewall_policy = input('network_firewall_policy', value: { "project": "value_project", "kind": "compute#firewallPolicy", "id": "3379931040786965079", "creation_timestamp": "value_creationtimestamp", "name": "inspec-test", "description": "", "fingerprint": "value_fingerprint", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "short_name": "value_shortname", "display_name": "value_displayname", "parent": "value_parent", "region": "value_region" }, description: 'network_firewall_policy description') control 'google_compute_network_firewall_policy-1.0' do impact 1.0 title 'google_compute_network_firewall_policy resource test' describe google_compute_network_firewall_policy(name: network_firewall_policy['name'], project: gcp_project_id) do it { should exist } its('kind') { should cmp network_firewall_policy['kind'] } its('id') { should cmp network_firewall_policy['id'] } its('creation_timestamp') { should cmp network_firewall_policy['creation_timestamp'] } its('name') { should cmp network_firewall_policy['name'] } its('description') { should cmp network_firewall_policy['description'] } its('fingerprint') { should cmp network_firewall_policy['fingerprint'] } its('self_link') { should cmp network_firewall_policy['self_link'] } its('self_link_with_id') { should cmp network_firewall_policy['self_link_with_id'] } its('short_name') { should cmp network_firewall_policy['short_name'] } its('display_name') { should cmp network_firewall_policy['display_name'] } its('parent') { should cmp network_firewall_policy['parent'] } its('region') { should cmp network_firewall_policy['region'] } end describe google_compute_network_firewall_policy(name: network_firewall_policy['name'], project: gcp_project_id) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_networks.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_networks resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') network = input('network', value: { "name": "inspec-network", "routing_mode": "REGIONAL" }, description: 'Network description') control 'google_compute_networks-1.0' do impact 1.0 title 'google_compute_networks resource test' describe google_compute_networks(project: gcp_project_id) do its('network_names') { should include network['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_node_group.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_node_group resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') node_group = input('node_group', value: { "name": "inspec-node-group", "description": "A description of the node group", "size": 0 }, description: 'Node group description') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'GCP zone name') control 'google_compute_node_group-1.0' do impact 1.0 title 'google_compute_node_group resource test' describe google_compute_node_group(project: gcp_project_id, zone: gcp_zone, name: node_group['name']) do it { should exist } its('description') { should cmp node_group['description'] } its('size') { should cmp node_group['size'] } end describe google_compute_node_group(project: gcp_project_id, zone: gcp_zone, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_node_groups.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_node_groups resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') node_group = input('node_group', value: { "name": "inspec-node-group", "description": "A description of the node group", "size": 0 }, description: 'Node group description') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'GCP zone name') control 'google_compute_node_groups-1.0' do impact 1.0 title 'google_compute_node_groups resource test' describe google_compute_node_groups(project: gcp_project_id, zone: gcp_zone) do it { should exist } its('descriptions') { should include node_group['description'] } its('sizes') { should include node_group['size'] } its('names') { should include node_group['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_node_template.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_node_template resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') node_template = input('node_template', value: { "name": "inspec-node-template", "label_key": "key", "label_value": "value" }, description: 'Node template description') control 'google_compute_node_template-1.0' do impact 1.0 title 'google_compute_node_template resource test' describe google_compute_node_template(project: gcp_project_id, region: gcp_location, name: node_template['name']) do it { should exist } its('node_affinity_labels') { should include(node_template['label_key'] => node_template['label_value']) } end describe google_compute_node_template(project: gcp_project_id, region: gcp_location, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_node_templates.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_node_templates resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') node_template = input('node_template', value: { "name": "inspec-node-template", "label_key": "key", "label_value": "value" }, description: 'Node template description') control 'google_compute_node_templates-1.0' do impact 1.0 title 'google_compute_node_templates resource test' describe google_compute_node_templates(project: gcp_project_id, region: gcp_location) do its('names') { should include node_template['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_node_type.rb ================================================ # frozen_string_literal: true # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_node_type resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') node_type = input('node_type', value: { "node_type": 'c2-node-60-240', "project": 'ppradhan', "zone": 'us-central1-a', "full_zone": 'https://www.googleapis.com/compute/v1/projects/ppradhan/zones/us-central1-a', "kind": 'compute#nodeType', "name": 'c2-node-60-240', "description": '60 CPUs and 240 GB RAM', "cpu_platform": 'Intel Cascade Lake', "self_link": 'https://www.googleapis.com/compute/v1/projects/ppradhan/zones/us-central1-a/nodeTypes/c2-node-60-240', }, description: 'node_type description') control 'google_compute_node_type-1.0' do impact 1.0 title 'google_compute_node_type resource test' describe google_compute_node_type(node_type: node_type['node_type'], project: gcp_project_id, zone: node_type['zone']) do it { should exist } its('kind') { should cmp node_type['kind'] } its('name') { should cmp node_type['name'] } its('description') { should cmp node_type['description'] } its('cpu_platform') { should cmp node_type['cpu_platform'] } its('zone') { should cmp node_type['full_zone'] } its('self_link') { should cmp node_type['self_link'] } end describe google_compute_node_type(node_type: 'n1-standard-1', project: gcp_project_id, zone: 'us-central1-b') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_node_types.rb ================================================ # frozen_string_literal: true # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_node_types resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') node_type = input('node_type', value: { "zone": 'us-central1-a', "full_zone": 'https://www.googleapis.com/compute/v1/projects/ppradhan/zones/us-central1-a', "name": 'c2-node-60-240', }, description: 'node_type description') control 'google_compute_node_types-1.0' do impact 1.0 title 'google_compute_node_types resource test' describe google_compute_node_types(project: gcp_project_id, zone: node_type['zone']) do it { should exist } its('count') { should be >= 1 } its('names') { should include node_type['name'] } its('zones') { should include node_type['full_zone'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_packet_mirroring.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_packet_mirroring resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') packet_mirroring = input('packet_mirroring', value: { "project": "ppradhan", "region": "us-central1", "kind": "compute#packetMirroring", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "name": "inspec-test-policy", "description": "value_description", "enable": "value_enable" }, description: 'packet_mirroring description') control 'google_compute_packet_mirroring-1.0' do impact 1.0 title 'google_compute_packet_mirroring resource test' describe google_compute_packet_mirroring(name: packet_mirroring['name'], project: gcp_project_id, region: packet_mirroring['region']) do it { should exist } its('kind') { should cmp packet_mirroring['kind'] } its('id') { should cmp packet_mirroring['id'] } its('creation_timestamp') { should cmp packet_mirroring['creation_timestamp'] } its('self_link') { should cmp packet_mirroring['self_link'] } its('self_link_with_id') { should cmp packet_mirroring['self_link_with_id'] } its('name') { should cmp packet_mirroring['name'] } its('description') { should cmp packet_mirroring['description'] } its('region') { should cmp packet_mirroring['region'] } its('enable') { should cmp packet_mirroring['enable'] } end describe google_compute_packet_mirroring(name: packet_mirroring['name'], project: gcp_project_id, region: packet_mirroring['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_packet_mirrorings.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_packet_mirrorings resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') packet_mirroring = input('packet_mirroring', value: { "project": "ppradhan", "region": "us-central1", "kind": "compute#packetMirroring", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "name": "inspec-test-policy", "description": "value_description", "enable": "value_enable" }, description: 'packet_mirroring description') control 'google_compute_packet_mirrorings-1.0' do impact 1.0 title 'google_compute_packet_mirrorings resource test' describe google_compute_packet_mirrorings(project: gcp_project_id, region: packet_mirroring['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_project_info.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_project_info resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') control 'google_compute_project_info-1.0' do impact 1.0 title 'google_compute_project_info resource test' describe google_compute_project_info(project: gcp_project_id) do it { should exist } its('default_service_account') { should match "developer.gserviceaccount.com" } end end ================================================ FILE: test/integration/verify/controls/google_compute_public_delegated_prefix.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_public_delegated_prefix resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') public_delegated_prefix = attribute('public_delegated_prefix', default: { "name": "test" }, description: 'PublicDelegatedPrefix resource in the given region') control 'google_compute_public_delegated_prefix-1.0' do impact 1.0 title 'google_compute_public_delegated_prefix resource test' describe google_compute_public_delegated_prefix(project: gcp_project_id, region: 'us-east1-b', name: public_delegated_prefix['name']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_public_delegated_prefixes.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_public_delegated_prefixes resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') public_delegated_prefix = attribute('public_delegated_prefix', default: { "name": "test" }, description: 'PublicDelegatedPrefix resource in the given region') control 'google_compute_public_delegated_prefixes-1.0' do impact 1.0 title 'google_compute_public_delegated_prefixes resource test' describe google_compute_public_delegated_prefixes(project: gcp_project_id, region: 'us-east1-b') do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') control 'google_compute_region-1.0' do impact 1.0 title 'google_compute_region resource test' describe google_compute_region(project: gcp_project_id, name: gcp_location) do it { should exist } it { should be_up } its('zone_names') { should include "#{gcp_location}-a" } end describe google_compute_region(project: gcp_project_id, name: 'notthere') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_autoscaler.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_autoscaler resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_autoscaler = input('region_autoscaler', value: { "project": "value_project", "region": "us-central1", "kind": "compute#autoscaler", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "inspec-test-group-2", "description": "value_description", "target": "value_target", "zone": "value_zone", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "status": "value_status" }, description: 'region_autoscaler description') control 'google_compute_region_autoscaler-1.0' do impact 1.0 title 'google_compute_region_autoscaler resource test' describe google_compute_region_autoscaler(name: region_autoscaler['name'], project: gcp_project_id, region: region_autoscaler['region']) do it { should exist } its('kind') { should cmp region_autoscaler['kind'] } its('id') { should cmp region_autoscaler['id'] } its('creation_timestamp') { should cmp region_autoscaler['creation_timestamp'] } its('name') { should cmp region_autoscaler['name'] } its('description') { should cmp region_autoscaler['description'] } its('target') { should cmp region_autoscaler['target'] } its('zone') { should cmp region_autoscaler['zone'] } its('region') { should cmp region_autoscaler['region'] } its('self_link') { should cmp region_autoscaler['self_link'] } its('self_link_with_id') { should cmp region_autoscaler['self_link_with_id'] } its('status') { should cmp region_autoscaler['status'] } end describe google_compute_region_autoscaler(name: region_autoscaler['name'], project: gcp_project_id, region: region_autoscaler['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_autoscalers.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_autoscalers resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_autoscaler = input('region_autoscaler', value: { "project": "value_project", "region": "us-central1", "kind": "compute#autoscaler", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "inspec-test-group-2", "description": "value_description", "target": "value_target", "zone": "value_zone", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "status": "value_status" }, description: 'region_autoscaler description') control 'google_compute_region_autoscalers-1.0' do impact 1.0 title 'google_compute_region_autoscalers resource test' describe google_compute_region_autoscalers(project: gcp_project_id, region: region_autoscaler['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_backend_service.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_backend_service resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') region_backend_service = input('region_backend_service', value: { "name": "inspec-gcp-region-backend-service", "description": "A regional description", "protocol": "TCP", "timeout_sec": 15 }, description: 'Backend service definition') control 'google_compute_region_backend_service-1.0' do impact 1.0 title 'google_compute_region_backend_service resource test' describe google_compute_region_backend_service(project: gcp_project_id, region: gcp_location, name: region_backend_service['name']) do it { should exist } its('description') { should eq region_backend_service['description'] } its('protocol') { should eq region_backend_service['protocol'] } its('timeout_sec') { should eq region_backend_service['timeout_sec'] } end describe google_compute_region_backend_service(project: gcp_project_id, region: gcp_location, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_backend_services.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_backend_services resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') region_backend_service = input('region_backend_service', value: { "name": "inspec-gcp-region-backend-service", "description": "A regional description", "protocol": "TCP", "timeout_sec": 15 }, description: 'Backend service definition') control 'google_compute_region_backend_services-1.0' do impact 1.0 title 'google_compute_region_backend_services resource test' describe google_compute_region_backend_services(project: gcp_project_id, region: gcp_location) do its('count') { should be >= 1 } its('names') { should include region_backend_service['name'] } its('protocols') { should include region_backend_service['protocol'] } its('timeout_secs') { should include region_backend_service['timeout_sec'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_commitment.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_commitment resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_commitment = input('region_commitment', value: { "project": "ppradhan", "region": "us-central1", "full_region": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1", "target_vpn_gateway": "value_targetvpngateway", "kind": "compute#commitment", "name": "my-region-commitment", "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/commitments/my-region-commitment", "status": "NOT_YET_ACTIVE", "status_message": "The commitment is not yet active (its startTimestamp is in the future). It will not apply to current resource usage.", "plan": "THIRTY_SIX_MONTH", "type": "GENERAL_PURPOSE", "category": "MACHINE", }, description: 'region_commitment description') control 'google_compute_region_commitment-1.0' do impact 1.0 title 'google_compute_region_commitment resource test' describe google_compute_region_commitment(name: region_commitment['name'], project: gcp_project_id, region: region_commitment['region']) do it { should exist } its('kind') { should cmp region_commitment['kind'] } its('name') { should cmp region_commitment['name'] } its('region') { should cmp region_commitment['full_region'] } its('self_link') { should cmp region_commitment['self_link'] } its('status') { should cmp region_commitment['status'] } its('status_message') { should cmp region_commitment['status_message'] } its('plan') { should cmp region_commitment['plan'] } its('type') { should cmp region_commitment['type'] } its('category') { should cmp region_commitment['category'] } end describe google_compute_region_commitment(name: "donotexist", project: gcp_project_id, region: region_commitment['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_commitments.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_commitments resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_commitment = input('region_commitment', value: { "project": "ppradhan", "region": "us-central1", }, description: 'region_commitment description') control 'google_compute_region_commitments-1.0' do impact 1.0 title 'google_compute_region_commitments resource test' describe google_compute_region_commitments(project: gcp_project_id, region: region_commitment['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_disk_type.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_disk_type resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_disk_type = input('region_disk_type', value: { "project": "ppradhan", "region": "us-central1", "kind": "compute#diskType", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "pd-balanced", "description": "Balanced Persistent Disk", "valid_disk_size": "100", "zone": "value_zone", "self_link": "value_selflink", "default_disk_size_gb": "value_defaultdisksizegb" }, description: 'region_disk_type description') control 'google_compute_region_disk_type-1.0' do impact 1.0 title 'google_compute_region_disk_type resource test' describe google_compute_region_disk_type(disk_type: region_disk_type['name'], project: gcp_project_id, region: region_disk_type['region']) do it { should exist } its('kind') { should cmp region_disk_type['kind'] } its('id') { should cmp region_disk_type['id'] } its('creation_timestamp') { should cmp region_disk_type['creation_timestamp'] } its('name') { should cmp region_disk_type['name'] } its('description') { should cmp region_disk_type['description'] } its('valid_disk_size') { should cmp region_disk_type['valid_disk_size'] } its('zone') { should cmp region_disk_type['zone'] } its('self_link') { should cmp region_disk_type['self_link'] } its('default_disk_size_gb') { should cmp region_disk_type['default_disk_size_gb'] } its('region') { should cmp region_disk_type['region'] } end describe google_compute_region_disk_type(disk_type: 'nonexist', project: gcp_project_id, region: region_disk_type['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_disk_types.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_disk_types resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_disk_type = input('region_disk_type', value: { "project": "ppradhan", "region": "us-central1", "kind": "compute#diskType", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "pd-balanced", "description": "Balanced Persistent Disk", "valid_disk_size": "100", "zone": "value_zone", "self_link": "value_selflink", "default_disk_size_gb": "value_defaultdisksizegb" }, description: 'region_disk_type description') control 'google_compute_region_disk_types-1.0' do impact 1.0 title 'google_compute_region_disk_types resource test' describe google_compute_region_disk_types(project: gcp_project_id, region: region_disk_type['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_health_check.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_health_check resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_health_check = input(:region_health_check, value: { "name": "inspec-gcp-region-health-check", "region": "us-central1", "timeout_sec": 10, "check_interval_sec": 10, "tcp_health_check_port": 80 }, description: 'The GCP project region health check') gcp_compute_health_check_name = region_health_check["name"] gcp_compute_health_check_region_name = region_health_check["region"] control 'google_compute_region_health_check-1.0' do impact 1.0 title 'google_compute_region_health_check resource test' describe google_compute_region_health_check(project: gcp_project_id, region: gcp_compute_health_check_region_name, name: gcp_compute_health_check_name) do it { should exist } its('type') { should eq "TCP" } end describe google_compute_region_health_check(project: gcp_project_id, region: 'europe-west2', name: 'notthere') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_health_checks.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_health_checks resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_health_check = input(:region_health_check, value: { "name": "inspec-gcp-region-health-check", "region": "us-central1", "timeout_sec": 10, "check_interval_sec": 10, "tcp_health_check_port": 80 }, description: 'The GCP project region health check') gcp_compute_health_check_name = region_health_check["name"] gcp_compute_health_check_region_name = region_health_check["region"] control 'google_compute_region_health_checks-1.0' do impact 1.0 title 'google_compute_region_health_checks resource test' describe google_compute_region_health_checks(project: gcp_project_id, region: gcp_compute_health_check_region_name) do its('types') { should include "TCP" } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_instance_group.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_instance_group resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') region_instance_group = input('region_instance_group', value: { "name": "instance-group-2", "region": "us-central1", "size": 1, "named_port_name": "port", "named_port_port": 80 }, description: 'Compute region instance group description') control 'google_compute_region_instance_group-1.0' do impact 1.0 title 'google_compute_region_instance_group resource test' describe google_compute_region_instance_group(project: gcp_project_id, region: region_instance_group['region'], name: region_instance_group['name']) do it { should exist } its('name') { should eq region_instance_group['name'] } its('size') { should eq region_instance_group['size'] } its('named_ports.first.name') { should eq region_instance_group['named_port_name'] } its('named_ports.first.port') { should eq region_instance_group['named_port_port'] } end describe google_compute_region_instance_group(project: gcp_project_id, region: gcp_location, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_instance_group_manager.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_instance_group_manager resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') rigm = input('rigm', value: { "name": "inspec-rigm", "base_instance_name": "rigm1", "target_size": 1, "named_port_name": "https", "named_port_port": 8888, "healing_delay": 300 }, description: 'Compute region instance group manager description') control 'google_compute_region_instance_group_manager-1.0' do impact 1.0 title 'google_compute_region_instance_group_manager resource test' describe google_compute_region_instance_group_manager(project: gcp_project_id, region: gcp_location, name: rigm['name']) do it { should exist } its('base_instance_name') { should eq rigm['base_instance_name'] } its('target_size') { should eq rigm['target_size'] } its('named_ports.first.name') { should eq rigm['named_port_name'] } its('named_ports.first.port') { should eq rigm['named_port_port'] } its('auto_healing_policies.first.initial_delay_sec') { should eq rigm['healing_delay'] } end describe google_compute_region_instance_group_manager(project: gcp_project_id, region: gcp_location, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_instance_group_managers.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_instance_group_managers resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') rigm = input('rigm', value: { "name": "inspec-rigm", "base_instance_name": "rigm1", "target_size": 1, "named_port_name": "https", "named_port_port": 8888, "healing_delay": 300 }, description: 'Compute region instance group manager description') control 'google_compute_region_instance_group_managers-1.0' do impact 1.0 title 'google_compute_region_instance_group_managers resource test' describe google_compute_region_instance_group_managers(project: gcp_project_id, region: gcp_location) do its('instance_group_manager_names') { should include rigm['name'] } its('base_instance_names') { should include rigm['base_instance_name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_instance_groups.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_instance_groups resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') region_instance_group = input('region_instance_group', value: { "name": "instance-group-2", "region": "us-central1", "size": 1, "named_port_name": "port", "named_port_port": 80 }, description: 'Compute region instance group description') control 'google_compute_region_instance_groups-1.0' do impact 1.0 title 'google_compute_region_instance_groups resource test' describe google_compute_region_instance_groups(project: gcp_project_id, region: region_instance_group['region']) do it { should exist } its('names') { should include region_instance_group['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_network_endpoint_group.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_network_endpoint_group resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_network_endpoint_group = input('region_network_endpoint_group', value: { "network_endpoint_group": "apigee-us-west1-xw8iaictllv4", "project": "value_project", "kind": "value_kind", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "self_link": "value_selflink", "name": "value_name", "description": "value_description", "network_endpoint_type": "value_networkendpointtype", "region": "us-west1", "zone": "value_zone", "network": "value_network", "subnetwork": "value_subnetwork", "psc_target_service": "value_psctargetservice" }, description: 'region_network_endpoint_group description') control 'google_compute_region_network_endpoint_group-1.0' do impact 1.0 title 'google_compute_region_network_endpoint_group resource test' describe google_compute_region_network_endpoint_group(network_endpoint_group: region_network_endpoint_group['network_endpoint_group'], project: gcp_project_id, region: region_network_endpoint_group['region']) do it { should exist } its('kind') { should cmp region_network_endpoint_group['kind'] } its('id') { should cmp region_network_endpoint_group['id'] } its('creation_timestamp') { should cmp region_network_endpoint_group['creation_timestamp'] } its('self_link') { should cmp region_network_endpoint_group['self_link'] } its('name') { should cmp region_network_endpoint_group['name'] } its('description') { should cmp region_network_endpoint_group['description'] } its('network_endpoint_type') { should cmp region_network_endpoint_group['network_endpoint_type'] } its('region') { should cmp region_network_endpoint_group['region'] } its('zone') { should cmp region_network_endpoint_group['zone'] } its('network') { should cmp region_network_endpoint_group['network'] } its('subnetwork') { should cmp region_network_endpoint_group['subnetwork'] } its('psc_target_service') { should cmp region_network_endpoint_group['psc_target_service'] } end describe google_compute_region_network_endpoint_group(network_endpoint_group: region_network_endpoint_group['network_endpoint_group'], project: gcp_project_id, region: region_network_endpoint_group['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_network_endpoint_groups.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_network_endpoint_groups resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_network_endpoint_group = input('region_network_endpoint_group', value: { "network_endpoint_group": "apigee-us-west1-xw8iaictllv4", "project": "value_project", "kind": "value_kind", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "self_link": "value_selflink", "name": "value_name", "description": "value_description", "network_endpoint_type": "value_networkendpointtype", "region": "us-west1", "zone": "value_zone", "network": "value_network", "subnetwork": "value_subnetwork", "psc_target_service": "value_psctargetservice" }, description: 'region_network_endpoint_group description') control 'google_compute_region_network_endpoint_groups-1.0' do impact 1.0 title 'google_compute_region_network_endpoint_groups resource test' describe google_compute_region_network_endpoint_groups(project: gcp_project_id, region: region_network_endpoint_group['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_operation.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_operation resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_operation = input('region_operation', value: { "name": "operation-1641188435323-5d4a6f5b26934-9281422c-dce238f5", "region": "us-central1", "operation_type": "compute.instanceGroupManagers.insert", "status": "DONE", "progress": 100 }, description: 'Operation resources contained within the specified region') control 'google_compute_region_operation-1.0' do impact 1.0 title 'google_compute_region_operation resource test' describe google_compute_region_operation(project: gcp_project_id, region: region_operation['region'], name: region_operation['name']) do it { should exist } its('name') { should eq region_operation['name'] } its('status') { should eq region_operation['status'] } its('progress') { should eq region_operation['progress'] } end describe google_compute_region_operation(project: gcp_project_id, region: region_operation['region'], name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_operations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_operations resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_operation = input('region_operation', value: { "name": "operation-1641188435323-5d4a6f5b26934-9281422c-dce238f5", "region": "us-central1", "operation_type": "compute.instanceGroupManagers.insert", "status": "DONE", "progress": 100 }, description: 'Operation resources contained within the specified region') control 'google_compute_region_operations-1.0' do impact 1.0 title 'google_compute_region_operations resource test' describe google_compute_region_operations(project: gcp_project_id, region: region_operation['region']) do it { should exist } its('names') { should include region_operation['name'] } its('progresses') { should include region_operation['progress'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_security_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_security_policies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_security_policy = input('region_security_policy', value: { "securitypolicy": "value_securitypolicy" }, description: 'region_security_policy description') control 'google_compute_region_security_policies-1.0' do impact 1.0 title 'google_compute_region_security_policies resource test' describe google_compute_region_security_policies(project: gcp_project_id, region: region_security_policy['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_security_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_security_policy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_security_policy = input('region_security_policy', value: { "securitypolicy": "value_securitypolicy" }, description: 'region_security_policy description') control 'google_compute_region_security_policy-1.0' do impact 1.0 title 'google_compute_region_security_policy resource test' describe google_compute_region_security_policy(project: gcp_project_id, region: region_security_policy['region'], security_policy: region_security_policy['securityPolicy']) do it { should exist } its('kind') { should cmp region_security_policy['kind'] } its('id') { should cmp region_security_policy['id'] } its('creation_timestamp') { should cmp region_security_policy['creation_timestamp'] } its('name') { should cmp region_security_policy['name'] } its('description') { should cmp region_security_policy['description'] } its('fingerprint') { should cmp region_security_policy['fingerprint'] } its('self_link') { should cmp region_security_policy['self_link'] } its('self_link_with_id') { should cmp region_security_policy['self_link_with_id'] } its('type') { should cmp region_security_policy['type'] } its('label_fingerprint') { should cmp region_security_policy['label_fingerprint'] } its('display_name') { should cmp region_security_policy['display_name'] } its('parent') { should cmp region_security_policy['parent'] } its('region') { should cmp region_security_policy['region'] } end describe google_compute_region_security_policy(project: gcp_project_id, region: region_security_policy['region'], security_policy: region_security_policy['securityPolicy']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_ssl_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_ssl_policies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_ssl_policy = input('region_ssl_policy', value: { "project": "ppradhan", "region": "us-central1", }, description: 'region_ssl_policy description') control 'google_compute_region_ssl_policies-1.0' do impact 1.0 title 'google_compute_region_ssl_policies resource test' describe google_compute_region_ssl_policies(project: gcp_project_id, region: region_ssl_policy['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_ssl_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_ssl_policy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_ssl_policy = input('region_ssl_policy', value: { "project": "ppradhan", "region": "us-central1", "full_region": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1", "kind": "compute#sslPolicy", "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/sslPolicies/basic-ssl-policy", "name": "basic-ssl-policy", "profile": "MODERN", "min_tls_version": "TLS_1_0", }, description: 'region_ssl_policy description') control 'google_compute_region_ssl_policy-1.0' do impact 1.0 title 'google_compute_region_ssl_policy resource test' describe google_compute_region_ssl_policy(project: gcp_project_id, region: region_ssl_policy['region'], name: region_ssl_policy['name']) do it { should exist } its('kind') { should cmp region_ssl_policy['kind'] } its('self_link') { should cmp region_ssl_policy['self_link'] } its('name') { should cmp region_ssl_policy['name'] } its('profile') { should cmp region_ssl_policy['profile'] } its('min_tls_version') { should cmp region_ssl_policy['min_tls_version'] } its('region') { should cmp region_ssl_policy['full_region'] } end describe google_compute_region_ssl_policy(project: gcp_project_id, region: region_ssl_policy['region'], name: "donotexist") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_target_http_proxies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_target_http_proxies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_target_http_proxy = input('region_target_http_proxy', value: { "health_check_service": "value_healthcheckservice", "project": "value_project", "region": "value_region", "kind": "value_kind", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "value_name", "description": "value_description", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "url_map": "value_urlmap", "fingerprint": "value_fingerprint" }, description: 'region_target_http_proxy description') control 'google_compute_region_target_http_proxies-1.0' do impact 1.0 title 'google_compute_region_target_http_proxies resource test' describe google_compute_region_target_http_proxies(project: gcp_project_id, region: region_target_http_proxy['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_target_http_proxy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_target_http_proxy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_target_http_proxy = input('region_target_http_proxy', value: { "health_check_service": "value_healthcheckservice", "project": "value_project", "region": "value_region", "kind": "value_kind", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "value_name", "description": "value_description", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "url_map": "value_urlmap", "fingerprint": "value_fingerprint" }, description: 'region_target_http_proxy description') control 'google_compute_region_target_http_proxy-1.0' do impact 1.0 title 'google_compute_region_target_http_proxy resource test' describe google_compute_region_target_http_proxy(project: gcp_project_id, region: region_target_http_proxy['region'], targetHttpProxy: region_target_http_proxy['targetHttpProxy']) do it { should exist } its('kind') { should cmp region_target_http_proxy['kind'] } its('id') { should cmp region_target_http_proxy['id'] } its('creation_timestamp') { should cmp region_target_http_proxy['creation_timestamp'] } its('name') { should cmp region_target_http_proxy['name'] } its('description') { should cmp region_target_http_proxy['description'] } its('self_link') { should cmp region_target_http_proxy['self_link'] } its('self_link_with_id') { should cmp region_target_http_proxy['self_link_with_id'] } its('url_map') { should cmp region_target_http_proxy['url_map'] } its('region') { should cmp region_target_http_proxy['region'] } its('fingerprint') { should cmp region_target_http_proxy['fingerprint'] } end describe google_compute_region_target_http_proxy(project: gcp_project_id, region: region_target_http_proxy['region'], targetHttpProxy: region_target_http_proxy['targetHttpProxy']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_target_https_proxies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_target_https_proxies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_target_https_proxy = input('region_target_https_proxy', value: { "project": "value_project", "region": "value_region", "target_https_proxy": "value_targethttpsproxy", "kind": "value_kind", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "value_name", "description": "value_description", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "url_map": "value_urlmap", "certificate_map": "value_certificatemap", "quic_override": "value_quicoverride", "ssl_policy": "value_sslpolicy", "server_tls_policy": "value_servertlspolicy", "authentication": "value_authentication", "authorization_policy": "value_authorizationpolicy", "authorization": "value_authorization", "fingerprint": "value_fingerprint", "tls_early_data": "value_tlsearlydata" }, description: 'region_target_https_proxy description') control 'google_compute_region_target_https_proxies-1.0' do impact 1.0 title 'google_compute_region_target_https_proxies resource test' describe google_compute_region_target_https_proxies(project: gcp_project_id, region: region_target_https_proxy['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_target_https_proxy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_target_https_proxy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_target_https_proxy = input('region_target_https_proxy', value: { "project": "value_project", "region": "value_region", "target_https_proxy": "value_targethttpsproxy", "kind": "value_kind", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "value_name", "description": "value_description", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "url_map": "value_urlmap", "certificate_map": "value_certificatemap", "quic_override": "value_quicoverride", "ssl_policy": "value_sslpolicy", "server_tls_policy": "value_servertlspolicy", "authentication": "value_authentication", "authorization_policy": "value_authorizationpolicy", "authorization": "value_authorization", "fingerprint": "value_fingerprint", "tls_early_data": "value_tlsearlydata" }, description: 'region_target_https_proxy description') control 'google_compute_region_target_https_proxy-1.0' do impact 1.0 title 'google_compute_region_target_https_proxy resource test' describe google_compute_region_target_https_proxy(project: gcp_project_id, region: region_target_https_proxy['region'], targetHttpsProxy: region_target_https_proxy['targetHttpsProxy']) do it { should exist } its('kind') { should cmp region_target_https_proxy['kind'] } its('id') { should cmp region_target_https_proxy['id'] } its('creation_timestamp') { should cmp region_target_https_proxy['creation_timestamp'] } its('name') { should cmp region_target_https_proxy['name'] } its('description') { should cmp region_target_https_proxy['description'] } its('self_link') { should cmp region_target_https_proxy['self_link'] } its('self_link_with_id') { should cmp region_target_https_proxy['self_link_with_id'] } its('url_map') { should cmp region_target_https_proxy['url_map'] } its('certificate_map') { should cmp region_target_https_proxy['certificate_map'] } its('quic_override') { should cmp region_target_https_proxy['quic_override'] } its('ssl_policy') { should cmp region_target_https_proxy['ssl_policy'] } its('region') { should cmp region_target_https_proxy['region'] } its('server_tls_policy') { should cmp region_target_https_proxy['server_tls_policy'] } its('authentication') { should cmp region_target_https_proxy['authentication'] } its('authorization_policy') { should cmp region_target_https_proxy['authorization_policy'] } its('authorization') { should cmp region_target_https_proxy['authorization'] } its('fingerprint') { should cmp region_target_https_proxy['fingerprint'] } its('tls_early_data') { should cmp region_target_https_proxy['tls_early_data'] } end describe google_compute_region_target_https_proxy(project: gcp_project_id, region: region_target_https_proxy['region'], targetHttpsProxy: region_target_https_proxy['targetHttpsProxy']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_url_map.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_region_url_map resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') region_url_map = input('region_url_map', value: { "project": "ppradhan", "region": "us-central1", "full_region": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1", "kind": "compute#urlMap", "name": "example-regionurlmap", "description": "a description", "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/urlMaps/example-regionurlmap", "default_service": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/backendServices/home" }, description: 'region_url_map description') control 'google_compute_region_url_map-1.0' do impact 1.0 title 'google_compute_region_url_map resource test' describe google_compute_region_url_map(project: gcp_project_id, region: region_url_map['region'], name: region_url_map['name']) do it { should exist } its('kind') { should cmp region_url_map['kind'] } its('name') { should cmp region_url_map['name'] } its('description') { should cmp region_url_map['description'] } its('self_link') { should cmp region_url_map['self_link'] } its('default_service') { should cmp region_url_map['default_service'] } its('region') { should cmp region_url_map['full_region'] } end describe google_compute_region_url_map(project: gcp_project_id, region: region_url_map['region'], name: "donotexist") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_url_maps.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- region_for_url_map = input(:region_for_url_map, value: 'us-central1', description: 'region_url_map region.') control 'google_compute_region_url_maps-1.0' do impact 1.0 title 'google_compute_region_url_maps resource test' describe google_compute_region_url_maps(project: gcp_project_id, region: region_for_url_map) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_region_zones_loop.rb ================================================ title 'Loop over all zones in a GCP region' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_region = input(:gcp_location, value: '', description: 'The GCP region being used.') control 'gcp-region-zones-loop-1.0' do impact 1.0 title 'Ensure all zones in a region are available using google_compute_zone for detail.' google_compute_region(project: gcp_project_id, name: gcp_region).zone_names.each do |zone_name| describe google_compute_zone(project: gcp_project_id, name: zone_name) do it { should be_up } end end end ================================================ FILE: test/integration/verify/controls/google_compute_regional_disk.rb ================================================ title 'Test GCP google_compute_regional_disk resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_region = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') gcp_compute_disk_name = input(:gcp_compute_disk_name, value: 'gcp_compute_disk_name', description: 'GCP Compute disk name.') gcp_compute_disk_type = input(:gcp_compute_disk_type, value: 'gcp_compute_disk_type', description: 'GCP Compute disk type.') control 'google_compute_regional_disk-1.0' do impact 1.0 title 'google_compute_regional_disk resource test' describe google_compute_regional_disk(project: gcp_project_id, name: "#{gcp_compute_disk_name}-regional", region: gcp_region) do it { should exist } its('type') { should match gcp_compute_disk_type } end describe google_compute_regional_disk(project: gcp_project_id, name: 'nonexistent', region: gcp_region) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_regions.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_regions resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') control 'google_compute_regions-1.0' do impact 1.0 title 'google_compute_regions resource test' describe google_compute_regions(project: gcp_project_id) do its('count') { should be >= 1 } its('region_names') { should include "#{gcp_location}" } its('region_statuses') { should_not include "DOWN" } its('region_ids') { should include "1290" } end end ================================================ FILE: test/integration/verify/controls/google_compute_regions_loop.rb ================================================ title 'Loop over all GCP Regions' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') control 'gcp-regions-loop-1.0' do impact 1.0 title 'Ensure regions have the correct properties in bulk using google_compute_region for detail.' google_compute_regions(project: gcp_project_id).region_names.each do |region_name| describe google_compute_region(project: gcp_project_id, name: region_name) do it { should be_up } end end end ================================================ FILE: test/integration/verify/controls/google_compute_reservation.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_reservation resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') reservation = input('reservation', value: { "project": "value_project", "reservation": "value_reservation", "zone": "value_zone", "kind": "value_kind", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "description": "value_description", "name": "value_name", "commitment": "value_commitment", "status": "value_status", "delete_at_time": "value_deleteattime" }, description: 'reservation description') control 'google_compute_reservation-1.0' do impact 1.0 title 'google_compute_reservation resource test' describe google_compute_reservation(project: gcp_project_id, name: reservation['name'], zone: reservation['zone']) do it { should exist } its('kind') { should cmp reservation['kind'] } its('id') { should cmp reservation['id'] } its('creation_timestamp') { should cmp reservation['creation_timestamp'] } its('self_link') { should cmp reservation['self_link'] } its('self_link_with_id') { should cmp reservation['self_link_with_id'] } its('zone') { should cmp reservation['zone'] } its('description') { should cmp reservation['description'] } its('name') { should cmp reservation['name'] } its('commitment') { should cmp reservation['commitment'] } its('status') { should cmp reservation['status'] } its('delete_at_time') { should cmp reservation['delete_at_time'] } end describe google_compute_reservation(project: gcp_project_id, name: "does_not_exit", zone: reservation['zone']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_reservations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_reservations resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') reservation = input('reservation', value: { "project": "value_project", "reservation": "value_reservation", "zone": "value_zone", "kind": "value_kind", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "description": "value_description", "name": "value_name", "commitment": "value_commitment", "status": "value_status", "delete_at_time": "value_deleteattime" }, description: 'reservation description') control 'google_compute_reservations-1.0' do impact 1.0 title 'google_compute_reservations resource test' describe google_compute_reservations(project: gcp_project_id, zone: reservation['zone']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_resource_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_resource_policies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') resource_policy = input('resource_policy', value: { "project": "value_project", "region": "us-central1", "kind": "compute#resourcePolicy", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "description": "value_description", "name": "schedule-1", "status": "value_status" }, description: 'resource_policy description') control 'google_compute_resource_policies-1.0' do impact 1.0 title 'google_compute_resource_policies resource test' describe google_compute_resource_policies(project: gcp_project_id, region: resource_policy['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_resource_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_resource_policy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') resource_policy = input('resource_policy', value: { "project": "value_project", "region": "us-central1", "kind": "compute#resourcePolicy", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "self_link": "value_selflink", "self_link_with_id": "value_selflinkwithid", "description": "value_description", "name": "schedule-1", "status": "value_status" }, description: 'resource_policy description') control 'google_compute_resource_policy-1.0' do impact 1.0 title 'google_compute_resource_policy resource test' describe google_compute_resource_policy(project: gcp_project_id, region: resource_policy['region'], resourcePolicy: resource_policy['resourcePolicy']) do it { should exist } its('kind') { should cmp resource_policy['kind'] } its('id') { should cmp resource_policy['id'] } its('creation_timestamp') { should cmp resource_policy['creation_timestamp'] } its('self_link') { should cmp resource_policy['self_link'] } its('self_link_with_id') { should cmp resource_policy['self_link_with_id'] } its('region') { should cmp resource_policy['region'] } its('description') { should cmp resource_policy['description'] } its('name') { should cmp resource_policy['name'] } its('status') { should cmp resource_policy['status'] } end describe google_compute_resource_policy(project: gcp_project_id, region: resource_policy['region'], resourcePolicy: resource_policy['resourcePolicy']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_route.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_route resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') route = input('route', value: { "name": "inspec-gcp-route", "dest_range": "15.0.0.0/24", "next_hop_ip": "10.2.0.1", "priority": 100 }, description: 'Compute route description') gcp_network_name = input(:gcp_network_name, value: 'gcp_network_name', description: 'GCP network name') control 'google_compute_route-1.0' do impact 1.0 title 'google_compute_route resource test' describe google_compute_route(project: gcp_project_id, name: route['name']) do it { should exist } its('dest_range') { should eq route['dest_range'] } its('network') { should match /\/#{gcp_network_name}$/ } its('next_hop_ip') { should eq route['next_hop_ip'] } its('priority') { should eq route['priority'] } end describe google_compute_route(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_router.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_router resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') router = input('router', value: { "name": "inspec-gcp-router", "bgp_asn": 64514, "bgp_advertise_mode": "CUSTOM", "bgp_advertised_group": "ALL_SUBNETS", "bgp_advertised_ip_range1": "1.2.3.4", "bgp_advertised_ip_range2": "6.7.0.0/16" }, description: 'Compute router description') gcp_network_name = input(:gcp_network_name, value: 'gcp_network_name', description: 'GCP network name') control 'google_compute_router-1.0' do impact 1.0 title 'google_compute_router resource test' describe google_compute_router(project: gcp_project_id, region: gcp_location, name: router['name']) do it { should exist } its('bgp.asn') { should eq router['bgp_asn'] } its('bgp.advertise_mode') { should eq router['bgp_advertise_mode'] } its('bgp.advertised_groups') { should include router['bgp_advertised_group'] } its('bgp.advertised_ip_ranges.count') { should eq 2 } its('bgp.advertised_ip_ranges.first.range') { should eq router['bgp_advertised_ip_range1'] } its('bgp.advertised_ip_ranges.last.range') { should eq router['bgp_advertised_ip_range2'] } its('network') { should match /\/#{gcp_network_name}$/ } end describe google_compute_router(project: gcp_project_id, region: gcp_location, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_router_nat.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_router_nat resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') router = input('router', value: { "name": "inspec-gcp-router", "bgp_asn": 64514, "bgp_advertise_mode": "CUSTOM", "bgp_advertised_group": "ALL_SUBNETS", "bgp_advertised_ip_range1": "1.2.3.4", "bgp_advertised_ip_range2": "6.7.0.0/16" }, description: 'Compute router description') router_nat = input('router_nat', value: { "name": "inspec-router-nat", "nat_ip_allocate_option": "AUTO_ONLY", "source_subnetwork_ip_ranges_to_nat": "ALL_SUBNETWORKS_ALL_IP_RANGES", "min_ports_per_vm": 2, "log_config_enable": true, "log_config_filter": "ERRORS_ONLY" }, description: 'Compute router NAT description') control 'google_compute_router_nat-1.0' do impact 1.0 title 'google_compute_router_nat resource test' describe google_compute_router_nat(project: gcp_project_id, region: gcp_location, router: router['name'], name: router_nat['name']) do it { should exist } its('nat_ip_allocate_option') { should cmp router_nat['nat_ip_allocate_option'] } its('source_subnetwork_ip_ranges_to_nat') { should cmp router_nat['source_subnetwork_ip_ranges_to_nat'] } its('min_ports_per_vm') { should cmp router_nat['min_ports_per_vm'] } its('log_config.enable') { should cmp router_nat['log_config_enable'] } its('log_config.filter') { should cmp router_nat['log_config_filter'] } end describe google_compute_router(project: gcp_project_id, region: gcp_location, router: 'nonexistent', name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_router_nats.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_router_nats resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') router = input('router', value: { "name": "inspec-gcp-router", "bgp_asn": 64514, "bgp_advertise_mode": "CUSTOM", "bgp_advertised_group": "ALL_SUBNETS", "bgp_advertised_ip_range1": "1.2.3.4", "bgp_advertised_ip_range2": "6.7.0.0/16" }, description: 'Compute router description') router_nat = input('router_nat', value: { "name": "inspec-router-nat", "nat_ip_allocate_option": "AUTO_ONLY", "source_subnetwork_ip_ranges_to_nat": "ALL_SUBNETWORKS_ALL_IP_RANGES", "min_ports_per_vm": 2, "log_config_enable": true, "log_config_filter": "ERRORS_ONLY" }, description: 'Compute router NAT description') control 'google_compute_router_nats-1.0' do impact 1.0 title 'google_compute_router_nats resource test' describe google_compute_router_nats(project: gcp_project_id, region: gcp_location, router: router['name']) do its('names') { should include router_nat['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_routers.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_routers resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') router = input('router', value: { "name": "inspec-gcp-router", "bgp_asn": 64514, "bgp_advertise_mode": "CUSTOM", "bgp_advertised_group": "ALL_SUBNETS", "bgp_advertised_ip_range1": "1.2.3.4", "bgp_advertised_ip_range2": "6.7.0.0/16" }, description: 'Compute router description') gcp_network_name = input(:gcp_network_name, value: 'gcp_network_name', description: 'GCP network name') control 'google_compute_routers-1.0' do impact 1.0 title 'google_compute_routers resource test' describe google_compute_routers(project: gcp_project_id, region: gcp_location) do its('names') { should include router['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_routes.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_routes resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') route = input('route', value: { "name": "inspec-gcp-route", "dest_range": "15.0.0.0/24", "next_hop_ip": "10.2.0.1", "priority": 100 }, description: 'Compute route description') gcp_network_name = input(:gcp_network_name, value: 'gcp_network_name', description: 'GCP network name') control 'google_compute_routes-1.0' do impact 1.0 title 'google_compute_routes resource test' describe google_compute_routes(project: gcp_project_id) do its('count') { should be >= 1 } its('dest_ranges') { should include route['dest_range'] } its('next_hop_ips') { should include route['next_hop_ip'] } its('priorities') { should include route['priority'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_security_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_security_policies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') security_policy = input('security_policy', value: { "name": "sec-policy", "action": "deny(403)", "priority": "1000", "ip_range": "9.9.9.0/24", "description": "my description" }, description: 'Security Policy description') control 'google_compute_security_policies-1.0' do impact 1.0 title 'google_compute_security_policies resource test' describe google_compute_security_policies(project: gcp_project_id) do its('count') { should be >= 1 } its('names') { should include security_policy['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_security_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_security_policy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') security_policy = input('security_policy', value: { "name": "sec-policy", "action": "deny(403)", "priority": "1000", "ip_range": "9.9.9.0/24", "description": "my description" }, description: 'Security Policy description') control 'google_compute_security_policy-1.0' do impact 1.0 title 'google_compute_security_policy resource test' describe google_compute_security_policy(project: gcp_project_id, name: security_policy['name']) do it { should exist } its('rules.size') { should cmp 2 } its('rules.first.priority') { should cmp security_policy['priority'] } its('rules.first.match.config.src_ip_ranges.first') { should cmp security_policy['ip_range'] } end describe google_compute_security_policy(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_service_attachment.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_service_attachment resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') service_attachment = input('service_attachment', value: { "project": "ppradhan", "region": "us-central1", "service_attachment": "my-psc-ilb", "service_attachment_2": "my-psc-ilb-2", "kind": "compute#serviceAttachment", "name": "my-psc-ilb", "description": "my-psc-ilb is a private service connection for the internal load balancer", "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/serviceAttachments/my-psc-ilb", "target_service": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/forwardingRules/producer-forwarding-rule", "connection_preference": "ACCEPT_AUTOMATIC", }, description: 'service_attachment description') control 'google_compute_service_attachment-1.0' do impact 1.0 title 'google_compute_service_attachment resource test' describe google_compute_service_attachment(project: gcp_project_id, region: service_attachment['region'], service_attachment: service_attachment['service_attachment']) do it { should exist } its('kind') { should cmp service_attachment['kind'] } its('name') { should cmp service_attachment['name'] } its('description') { should cmp service_attachment['description'] } its('self_link') { should cmp service_attachment['self_link'] } its('region') { should include service_attachment['region'] } its('producer_forwarding_rule') { should cmp service_attachment['producer_forwarding_rule'] } its('target_service') { should cmp service_attachment['target_service'] } its('connection_preference') { should cmp service_attachment['connection_preference'] } end describe google_compute_service_attachment(project: gcp_project_id, region: service_attachment['region'], service_attachment: service_attachment['service_attachment_2']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_service_attachments.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_service_attachments resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') service_attachment = input('service_attachment', value: { "project": "ppradhan", "region": "us-central1", "service_attachment": "my-psc-ilb", "kind": "compute#serviceAttachment", "name": "my-psc-ilb", "description": "my-psc-ilb is a private service connection for the internal load balancer", "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/serviceAttachments/my-psc-ilb", "target_service": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/forwardingRules/producer-forwarding-rule", "connection_preference": "ACCEPT_AUTOMATIC", }, description: 'service_attachment description') control 'google_compute_service_attachments-1.0' do impact 1.0 title 'google_compute_service_attachments resource test' describe google_compute_service_attachments(project: gcp_project_id, region: service_attachment['region']) do it { should exist } its("names") { should include service_attachment['name'] } its("self_links") { should include service_attachment['self_link'] } its("kinds") { should include service_attachment['kind'] } its("descriptions") { should include service_attachment['description'] } its("target_services") { should include service_attachment['target_service'] } its("connection_preferences") { should include service_attachment['connection_preference'] } end describe google_compute_service_attachments(project: gcp_project_id, region: "us-west2") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_snapshot.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_snapshot resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'GCP zone name of the compute disk') snapshot = input('snapshot', value: { "name": "inspec-gcp-disk-snapshot", "disk_name": "inspec-snapshot-disk", "disk_type": "pd-standard", "disk_image": "debian-cloud/debian-10-buster-v20191014" }, description: 'Compute disk snapshot description') control 'google_compute_snapshot-1.0' do impact 1.0 title 'google_compute_snapshot resource test' describe google_compute_snapshot(project: gcp_project_id, name: snapshot['name']) do it { should exist } its('source_disk') { should match snapshot['disk_name'] } end describe google_compute_snapshot(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_snapshots.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_snapshots resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'GCP zone name of the compute disk') snapshot = input('snapshot', value: { "name": "inspec-gcp-disk-snapshot", "disk_name": "inspec-snapshot-disk", "disk_type": "pd-standard", "disk_image": "debian-cloud/debian-10-buster-v20191014" }, description: 'Compute disk snapshot description') control 'google_compute_snapshots-1.0' do impact 1.0 title 'google_compute_snapshots resource test' describe google_compute_snapshots(project: gcp_project_id) do its('count') { should be >= 1 } end describe.one do google_compute_snapshots(project: gcp_project_id).names do |snapshot_name| describe google_compute_snapshot(project: gcp_project_id, name: snapshot_name) do its('source_disk') { should match snapshot['disk_name'] } end end end end ================================================ FILE: test/integration/verify/controls/google_compute_ssl_certificate.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_ssl_certificate resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') ssl_certificate = input('ssl_certificate', value: { "name": "inspec-gcp-ssl-certificate", "description": "A fake ssl certificate (DO NOT USE)", "certificate": "-----BEGIN CERTIFICATE-----\nMIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG\nEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT\nBgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm\nb3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN\nAQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2\nMDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP\nBgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM\nFUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z\naXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH\nKoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ\n4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O\nBBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn\n0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O\nM3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ\nzqGNhIPGq2ULqXKK8BY=\n-----END CERTIFICATE-----\n", "private_key": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIObtRo8tkUqoMjeHhsOh2ouPpXCgBcP+EDxZCB/tws15oAoGCCqGSM49\nAwEHoUQDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ4mzkzTv0dXyB750f\nOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwQ==\n-----END EC PRIVATE KEY-----\n" }, description: 'A GCP SSL certificate definition') control 'google_compute_ssl_certificate-1.0' do impact 1.0 title 'google_compute_ssl_certificate resource test' describe google_compute_ssl_certificate(project: gcp_project_id, name: ssl_certificate['name']) do it { should exist } its('description') { should eq ssl_certificate['description'] } its('certificate') { should eq ssl_certificate['certificate'] } end describe google_compute_ssl_certificate(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_ssl_certificates.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_ssl_certificates resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') ssl_certificate = input('ssl_certificate', value: { "name": "inspec-gcp-ssl-certificate", "description": "A fake ssl certificate (DO NOT USE)", "certificate": "-----BEGIN CERTIFICATE-----\nMIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG\nEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT\nBgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm\nb3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN\nAQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2\nMDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP\nBgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM\nFUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z\naXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH\nKoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ\n4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O\nBBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn\n0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O\nM3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ\nzqGNhIPGq2ULqXKK8BY=\n-----END CERTIFICATE-----\n", "private_key": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIObtRo8tkUqoMjeHhsOh2ouPpXCgBcP+EDxZCB/tws15oAoGCCqGSM49\nAwEHoUQDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ4mzkzTv0dXyB750f\nOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwQ==\n-----END EC PRIVATE KEY-----\n" }, description: 'A GCP SSL certificate definition') control 'google_compute_ssl_certificates-1.0' do impact 1.0 title 'google_compute_ssl_certificates resource test' describe google_compute_ssl_certificates(project: gcp_project_id) do its('names') { should include ssl_certificate['name'] } its('descriptions') { should include ssl_certificate['description'] } its('certificates') { should include ssl_certificate['certificate'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_ssl_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_ssl_policies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') ssl_policy = input('ssl_policy', value: { "name": "inspec-gcp-ssl-policy", "min_tls_version": "TLS_1_2", "profile": "CUSTOM", "custom_feature": "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "custom_feature2": "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" }) control 'google_compute_ssl_policies-1.0' do impact 1.0 title 'google_compute_ssl_policies resource test' describe google_compute_ssl_policies(project: gcp_project_id) do it { should exist } its('names') { should include ssl_policy['name'] } its('profiles') { should include ssl_policy['profile'] } its('count') { should eq 1 } end google_compute_ssl_policies(project: gcp_project_id).names.each do |policy_name| describe google_compute_ssl_policy(project: gcp_project_id, name: policy_name) do its('min_tls_version') { should eq ssl_policy['min_tls_version'] } end end end ================================================ FILE: test/integration/verify/controls/google_compute_ssl_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_ssl_policy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') ssl_policy = input('ssl_policy', value: { "name": "inspec-gcp-ssl-policy", "min_tls_version": "TLS_1_2", "profile": "CUSTOM", "custom_feature": "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "custom_feature2": "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" }) control 'google_compute_ssl_policy-1.0' do impact 1.0 title 'google_compute_ssl_policy resource test' describe google_compute_ssl_policy(project: gcp_project_id, name: ssl_policy['name']) do it { should exist } its('min_tls_version') { should eq ssl_policy['min_tls_version'] } its('profile') { should eq ssl_policy['profile'] } its('custom_features') { should include ssl_policy['custom_feature'] } its('custom_features') { should include ssl_policy['custom_feature2'] } end describe google_compute_ssl_policy(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_subnetwork.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_subnetwork resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') subnetwork = input('subnetwork', value: { "name": "inspec-subnet", "ip_cidr_range": "10.2.0.0/16", "log_interval": "INTERVAL_10_MIN", "log_sampling": 0.5, "log_metadata": "INCLUDE_ALL_METADATA" }, description: 'Compute subnetwork description') control 'google_compute_subnetwork-1.0' do impact 1.0 title 'google_compute_subnetwork resource test' describe google_compute_subnetwork(project: gcp_project_id, region: gcp_location, name: subnetwork['name']) do it { should exist } its('ip_cidr_range') { should eq subnetwork['ip_cidr_range'] } its('log_config.enable') { should be true } its('log_config.flow_sampling') { should cmp subnetwork['log_sampling'] } its('log_config.aggregation_interval') { should cmp subnetwork['log_interval'] } its('log_config.metadata') { should include subnetwork['log_metadata'] } end describe google_compute_subnetwork(project: gcp_project_id, region: gcp_location, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_subnetworks.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_subnetworks resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') subnetwork = input('subnetwork', value: { "name": "inspec-subnet", "ip_cidr_range": "10.2.0.0/16", "log_interval": "INTERVAL_10_MIN", "log_sampling": 0.5, "log_metadata": "INCLUDE_ALL_METADATA" }, description: 'Compute subnetwork description') control 'google_compute_subnetworks-1.0' do impact 1.0 title 'google_compute_subnetworks resource test' describe google_compute_subnetworks(project: gcp_project_id, region: gcp_location) do its('ip_cidr_ranges') { should include subnetwork['ip_cidr_range'] } its('subnetwork_names') { should include subnetwork['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_grpc_proxies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_grpc_proxies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') control 'google_compute_target_grpc_proxies-1.0' do impact 1.0 title 'google_compute_target_grpc_proxies resource test' describe google_compute_target_grpc_proxies(project: gcp_project_id) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_grpc_proxy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_grpc_proxy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') target_grpc_proxy = input('target_grpc_proxy', value: { "project": "ppradhan", "kind": "compute#targetGrpcProxy", "name": "inspec-test-proxy", "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/global/targetGrpcProxies/inspec-test-proxy", "url_map": "https://www.googleapis.com/compute/v1/projects/ppradhan/global/urlMaps/urlmap", }, description: 'target_grpc_proxy description') control 'google_compute_target_grpc_proxy-1.0' do impact 1.0 title 'google_compute_target_grpc_proxy resource test' describe google_compute_target_grpc_proxy(project: gcp_project_id, name: target_grpc_proxy['name']) do it { should exist } its('kind') { should cmp target_grpc_proxy['kind'] } its('name') { should cmp target_grpc_proxy['name'] } its('self_link') { should cmp target_grpc_proxy['self_link'] } its('url_map') { should cmp target_grpc_proxy['url_map'] } end describe google_compute_target_grpc_proxy(project: gcp_project_id, name: "donotexist") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_http_proxies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_http_proxies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') http_proxy = input('http_proxy', value: { "name": "inspec-gcp-http-proxy", "description": "A HTTP proxy" }, description: 'Compute HTTP proxy definition') control 'google_compute_target_http_proxies-1.0' do impact 1.0 title 'google_compute_target_http_proxies resource test' describe google_compute_target_http_proxies(project: gcp_project_id) do its('names') { should include http_proxy['name'] } its('descriptions') { should include http_proxy['description'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_http_proxy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_http_proxy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') http_proxy = input('http_proxy', value: { "name": "inspec-gcp-http-proxy", "description": "A HTTP proxy" }, description: 'Compute HTTP proxy definition') control 'google_compute_target_http_proxy-1.0' do impact 1.0 title 'google_compute_target_http_proxy resource test' describe google_compute_target_http_proxy(project: gcp_project_id, name: http_proxy['name']) do it { should exist } its('description') { should eq http_proxy['description'] } its('url_map') { should match /\/inspec-gcp-url-map$/ } end describe google_compute_target_http_proxy(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_https_proxies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_https_proxies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') https_proxy = input('https_proxy', value: { "name": "inspec-gcp-https-proxy", "description": "A HTTPS target proxy" }, description: 'Compute HTTPS proxy definition') control 'google_compute_target_https_proxies-1.0' do impact 1.0 title 'google_compute_target_https_proxies resource test' describe google_compute_target_https_proxies(project: gcp_project_id) do its('names') { should include https_proxy['name'] } its('descriptions') { should include https_proxy['description'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_https_proxy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_https_proxy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') https_proxy = input('https_proxy', value: { "name": "inspec-gcp-https-proxy", "description": "A HTTPS target proxy" }, description: 'Compute HTTPS proxy definition') control 'google_compute_target_https_proxy-1.0' do impact 1.0 title 'google_compute_target_https_proxy resource test' describe google_compute_target_https_proxy(project: gcp_project_id, name: https_proxy['name']) do it { should exist } its('url_map') { should match /\/inspec-gcp-url-map$/ } its('description') { should eq https_proxy['description'] } end describe google_compute_target_https_proxy(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_instance.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_instance resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') target_instance = input('target_instance', value: { "project": "ppradhan", "region": "asia-east1", "url_map": "value_urlmap", "kind": "compute#targetInstance", "name": "example-target", "zone": "asia-east1-a", "full_zone": "https://www.googleapis.com/compute/v1/projects/ppradhan/zones/asia-east1-a", "nat_policy": "NO_NAT", "instance": "https://www.googleapis.com/compute/v1/projects/ppradhan/zones/asia-east1-a/instances/target-vm", "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/zones/asia-east1-a/targetInstances/example-target", }, description: 'target_instance description') control 'google_compute_target_instance-1.0' do impact 1.0 title 'google_compute_target_instance resource test' describe google_compute_target_instance(project: gcp_project_id, name: target_instance['name'], zone: target_instance['zone']) do it { should exist } its('kind') { should cmp target_instance['kind'] } its('name') { should cmp target_instance['name'] } its('zone') { should cmp target_instance['full_zone'] } its('nat_policy') { should cmp target_instance['nat_policy'] } its('instance') { should cmp target_instance['instance'] } its('self_link') { should cmp target_instance['self_link'] } end describe google_compute_target_instance(project: gcp_project_id, name: "donotexist", zone: target_instance['zone']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_instances.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_instances resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') ti_zone = input(:ti_zone, value: 'asia-east1-a', description: 'target_instance zone.') control 'google_compute_target_instances-1.0' do impact 1.0 title 'google_compute_target_instances resource test' describe google_compute_target_instances(project: gcp_project_id, zone: ti_zone) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_pool.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_pool resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') gcp_ext_vm_name = input(:gcp_ext_vm_name, value: 'gcp_ext_vm_name', description: 'The name of a VM instance.') target_pool = input('target_pool', value: { "name": "inspec-gcp-target-pool", "session_affinity": "CLIENT_IP" }, description: 'Target pool definition') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'The GCP zone.') control 'google_compute_target_pool-1.0' do impact 1.0 title 'google_compute_target_pool resource test' describe google_compute_target_pool(project: gcp_project_id, region: gcp_location, name: target_pool['name']) do it { should exist } its('session_affinity') { should eq target_pool['session_affinity'] } it { should has_target_instance(gcp_ext_vm_name, gcp_zone) } end describe google_compute_target_pool(project: gcp_project_id, region: gcp_location, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_pools.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_pools resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') gcp_ext_vm_name = input(:gcp_ext_vm_name, value: 'gcp_ext_vm_name', description: 'The name of a VM instance.') target_pool = input('target_pool', value: { "name": "inspec-gcp-target-pool", "session_affinity": "CLIENT_IP" }, description: 'Target pool definition') gcp_zone = input(:gcp_zone, value: 'gcp_zone', description: 'The GCP zone.') control 'google_compute_target_pools-1.0' do impact 1.0 title 'google_compute_target_pools resource test' describe google_compute_target_pools(project: gcp_project_id, region: gcp_location) do its('names') { should include target_pool['name'] } its('session_affinities') { should include target_pool['session_affinity'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_ssl_proxies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_ssl_proxies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') target_ssl_proxy = input('target_ssl_proxy', value: { "name": "test-proxy", }, description: 'target_ssl_proxy description') control 'google_compute_target_ssl_proxies-1.0' do impact 1.0 title 'google_compute_target_ssl_proxies resource test' describe google_compute_target_ssl_proxies(project: gcp_project_id) do it { should exist } its('names') { should include target_ssl_proxy['name'] } its('names') { should_not include 'nonexistent' } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_ssl_proxy.rb ================================================ title 'Test GCP google_compute_target_ssl_proxy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') target_ssl_proxy = input('target_ssl_proxy', value: { "project": "ppradhan", "kind": "compute#targetSslProxy", "creation_timestamp": "value_creationtimestamp", "name": "test-proxy", "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/global/targetSslProxies/test-proxy", "service": "https://www.googleapis.com/compute/v1/projects/ppradhan/global/backendServices/backend-service", "proxy_header": "NONE", }, description: 'target_ssl_proxy description') control 'google_compute_target_ssl_proxy-1.0' do impact 1.0 title 'google_compute_target_ssl_proxy resource test' describe google_compute_target_ssl_proxy(project: gcp_project_id, name: target_ssl_proxy['name']) do it { should exist } its('kind') { should cmp target_ssl_proxy['kind'] } its('name') { should cmp target_ssl_proxy['name'] } its('self_link') { should cmp target_ssl_proxy['self_link'] } its('service') { should cmp target_ssl_proxy['service'] } its('proxy_header') { should cmp target_ssl_proxy['proxy_header'] } end describe google_compute_target_ssl_proxy(project: gcp_project_id, name: "donotexist") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_tcp_proxies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_tcp_proxies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') target_tcp_proxy = input('target_tcp_proxy', value: { "name": "inspec-gcp-target-tcp-proxy", "proxy_header": "NONE", "tcp_backend_service_name": "gcp-inspec-tcp-backend-service" }, description: 'Compute TCP proxy definition') control 'google_compute_target_tcp_proxies-1.0' do impact 1.0 title 'google_compute_target_tcp_proxies resource test' describe google_compute_target_tcp_proxies(project: gcp_project_id) do its('names') { should include target_tcp_proxy['name'] } its('proxy_headers') { should include target_tcp_proxy['proxy_header'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_tcp_proxy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_tcp_proxy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') target_tcp_proxy = input('target_tcp_proxy', value: { "name": "inspec-gcp-target-tcp-proxy", "proxy_header": "NONE", "tcp_backend_service_name": "gcp-inspec-tcp-backend-service" }, description: 'Compute TCP proxy definition') control 'google_compute_target_tcp_proxy-1.0' do impact 1.0 title 'google_compute_target_tcp_proxy resource test' describe google_compute_target_tcp_proxy(project: gcp_project_id, name: target_tcp_proxy['name']) do it { should exist } its('proxy_header') { should eq target_tcp_proxy['proxy_header'] } its('service') { should match /\/gcp-inspec-tcp-backend-service$/ } end describe google_compute_target_tcp_proxy(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_vpn_gateway.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_vpn_gateway resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') target_vpn_gateway = input('target_vpn_gateway', value: { "project": "value_project", "region": "us-central1", "kind": "compute#targetVpnGateway", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "vpn-1", "description": "value_description", "network": "value_network", "status": "value_status", "self_link": "value_selflink", "label_fingerprint": "value_labelfingerprint" }, description: 'target_vpn_gateway description') control 'google_compute_target_vpn_gateway-1.0' do impact 1.0 title 'google_compute_target_vpn_gateway resource test' describe google_compute_target_vpn_gateway(project: gcp_project_id, region: target_vpn_gateway['region'], name: target_vpn_gateway['name']) do it { should exist } its('kind') { should cmp target_vpn_gateway['kind'] } its('id') { should cmp target_vpn_gateway['id'] } its('creation_timestamp') { should cmp target_vpn_gateway['creation_timestamp'] } its('name') { should cmp target_vpn_gateway['name'] } its('description') { should cmp target_vpn_gateway['description'] } its('region') { should cmp target_vpn_gateway['region'] } its('network') { should cmp target_vpn_gateway['network'] } its('status') { should cmp target_vpn_gateway['status'] } its('self_link') { should cmp target_vpn_gateway['self_link'] } its('label_fingerprint') { should cmp target_vpn_gateway['label_fingerprint'] } end describe google_compute_target_vpn_gateway(project: gcp_project_id, region: target_vpn_gateway['region'], name: target_vpn_gateway['name']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_target_vpn_gateways.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_target_vpn_gateways resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') target_vpn_gateway = input('target_vpn_gateway', value: { "project": "value_project", "region": "us-central1", "kind": "compute#targetVpnGateway", "id": "value_id", "creation_timestamp": "value_creationtimestamp", "name": "vpn-1", "description": "value_description", "network": "value_network", "status": "value_status", "self_link": "value_selflink", "label_fingerprint": "value_labelfingerprint" }, description: 'target_vpn_gateway description') control 'google_compute_target_vpn_gateways-1.0' do impact 1.0 title 'google_compute_target_vpn_gateways resource test' describe google_compute_target_vpn_gateways(project: gcp_project_id, region: target_vpn_gateway['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_url_map.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_url_map resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') url_map = input('url_map', value: { "name": "inspec-gcp-url-map", "description": "URL map description", "host_rule_host": "site.com", "path_matcher_name": "allpaths", "path_rule_path": "/home", "test_host": "test.com", "test_path": "/home" }, description: 'Compute URL map definition') backend_service = input('backend_service', value: { "name": "inspec-gcp-backend-service", "description": "A description", "port_name": "http", "protocol": "HTTP", "timeout_sec": 10, "enable_cdn": true }, description: 'Backend service definition') control 'google_compute_url_map-1.0' do impact 1.0 title 'google_compute_url_map resource test' describe google_compute_url_map(project: gcp_project_id, name: url_map['name']) do it { should exist } its('description') { should eq url_map['description'] } its('default_service') { should match /\/inspec-gcp-backend-service$/ } its('host_rules.count') { should eq 1 } its('host_rules.first.hosts') { should include url_map['host_rule_host'] } its('path_matchers.count') { should eq 1 } its('path_matchers.first.default_service') { should match /\/inspec-gcp-backend-service$/ } its('tests.count') { should eq 1 } its('tests.first.host') { should eq url_map['test_host'] } its('tests.first.path') { should eq url_map['test_path'] } end describe google_compute_url_map(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_url_maps.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_url_maps resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') url_map = input('url_map', value: { "name": "inspec-gcp-url-map", "description": "URL map description", "host_rule_host": "site.com", "path_matcher_name": "allpaths", "path_rule_path": "/home", "test_host": "test.com", "test_path": "/home" }, description: 'Compute URL map definition') backend_service = input('backend_service', value: { "name": "inspec-gcp-backend-service", "description": "A description", "port_name": "http", "protocol": "HTTP", "timeout_sec": 10, "enable_cdn": true }, description: 'Backend service definition') control 'google_compute_url_maps-1.0' do impact 1.0 title 'google_compute_url_maps resource test' describe google_compute_url_maps(project: gcp_project_id) do its('names') { should include url_map['name'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_vms.rb ================================================ title 'Virtual Machines Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') gcp_ext_vm_data_disk_name = input(:gcp_ext_vm_data_disk_name, value: '', description: 'A valid GCP VM name to check for.') gcp_enable_gcloud_calls = input(:gcp_enable_gcloud_calls,value:0,description:'Flag to enable the use of gcloud command line to pull in live data to test against.') control 'gcp-vms-1.0' do only_if { gcp_enable_gcloud_calls.to_i == 1 } impact 1.0 title 'Ensure VMs have the correct properties in bulk' describe google_compute_instances(project: gcp_project_id, zone: gcp_zone) do it { should exist } its('count') { should be <= 100} its('instance_ids.count') { should be > 0 } its('instance_names') { should include gcp_ext_vm_data_disk_name } # Only make the call if the configuration flag is specified and the test will run gcp_instance_id = `gcloud compute instances list --filter="name=gcp-inspec-ext-linux-vm" --format=json | grep id | grep -o '[0-9]\\+'`.chomp its('instance_ids') { should include gcp_instance_id } end end ================================================ FILE: test/integration/verify/controls/google_compute_vms_loop.rb ================================================ title 'Loop over all GCP Virtual Machines' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') control 'gcp-vms-loop-1.0' do impact 1.0 title 'Ensure VMs have the correct properties in bulk using google_compute_instance for detail.' google_compute_instances(project: gcp_project_id, zone: gcp_zone).instance_names.each do |instance_name| describe google_compute_instance(project: gcp_project_id, zone: gcp_zone, name: instance_name) do it { should exist } its('zone') { should match gcp_zone } its('status') { should be_in ['RUNNING', 'PROVISIONING', 'STAGING', 'STOPPING', 'TERMINATED'] } end end end ================================================ FILE: test/integration/verify/controls/google_compute_vpn_gateway.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_vpn_gateway resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') vpn_gateway = input('vpn_gateway', value: { "project": "ppradhan", "region": "us-central1", "vpn_gateway": "2245103640699591658", "kind": "value_kind", "id": "2245103640699591658", "creation_timestamp": "2023-12-12T05:49:57.914-08:00", "name": "inspec-vpn-gateway", "description": "value_description", "network": "https://www.googleapis.com/compute/v1/projects/ppradhan/global/networks/network1", "self_link": "value_selflink", "label_fingerprint": "value_labelfingerprint", "stack_type": "IPV4_ONLY" }, description: 'vpn_gateway description') control 'google_compute_vpn_gateway-1.0' do impact 1.0 title 'google_compute_vpn_gateway resource test' describe google_compute_vpn_gateway(project: gcp_project_id, region: vpn_gateway['region'], vpnGateway: vpn_gateway['vpnGateway']) do it { should exist } its('kind') { should cmp vpn_gateway['kind'] } its('id') { should cmp vpn_gateway['id'] } its('creation_timestamp') { should cmp vpn_gateway['creation_timestamp'] } its('name') { should cmp vpn_gateway['name'] } its('description') { should cmp vpn_gateway['description'] } its('region') { should cmp vpn_gateway['region'] } its('network') { should cmp vpn_gateway['network'] } its('self_link') { should cmp vpn_gateway['self_link'] } its('label_fingerprint') { should cmp vpn_gateway['label_fingerprint'] } its('stack_type') { should cmp vpn_gateway['stack_type'] } end describe google_compute_vpn_gateway(project: gcp_project_id, region: vpn_gateway['region'], vpnGateway: vpn_gateway['vpnGateway']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_vpn_gateways.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_vpn_gateways resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') vpn_gateway = input('vpn_gateway', value: { "project": "ppradhan", "region": "us-central1", "vpn_gateway": "2245103640699591658", "kind": "value_kind", "id": "2245103640699591658", "creation_timestamp": "2023-12-12T05:49:57.914-08:00", "name": "inspec-vpn-gateway", "description": "value_description", "network": "https://www.googleapis.com/compute/v1/projects/ppradhan/global/networks/network1", "self_link": "value_selflink", "label_fingerprint": "value_labelfingerprint", "stack_type": "IPV4_ONLY" }, description: 'vpn_gateway description') control 'google_compute_vpn_gateways-1.0' do impact 1.0 title 'google_compute_vpn_gateways resource test' describe google_compute_vpn_gateways(project: gcp_project_id, region: vpn_gateway['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_vpn_tunnel.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_vpn_tunnel resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') vpn_tunnel = input('vpn_tunnel', value: { "name": "inspec-vpn-tunnel", "peer_ip": "15.0.0.120", "shared_secret": "super secret" }, description: 'Compute VPN tunnel description') control 'google_compute_vpn_tunnel-1.0' do impact 1.0 title 'google_compute_vpn_tunnel resource test' describe google_compute_vpn_tunnel(project: gcp_project_id, region: gcp_location, name: vpn_tunnel['name']) do it { should exist } its('peer_ip') { should eq vpn_tunnel['peer_ip'] } end describe google_compute_vpn_tunnel(project: gcp_project_id, region: gcp_location, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_vpn_tunnels.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_vpn_tunnels resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') vpn_tunnel = input('vpn_tunnel', value: { "name": "inspec-vpn-tunnel", "peer_ip": "15.0.0.120", "shared_secret": "super secret" }, description: 'Compute VPN tunnel description') control 'google_compute_vpn_tunnels-1.0' do impact 1.0 title 'google_compute_vpn_tunnels resource test' describe google_compute_vpn_tunnels(project: gcp_project_id, region: gcp_location) do its('vpn_tunnel_names') { should include vpn_tunnel['name'] } its('peer_ips') { should include vpn_tunnel['peer_ip'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_xpn_resources.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_xpn_resources resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') xpn_resources = input('xpn_resources', value: { "id": "skilled-circle-407309", "type": "PROJECT" }, description: 'xpn_resources description') control 'google_compute_xpn_resources-1.0' do impact 1.0 title 'google_compute_xpn_resources resource test' describe google_compute_xpn_resources(project: gcp_project_id) do it { should exist } its('ids') { should include xpn_resources['id']} its('types') { should include xpn_resources['type']} end end ================================================ FILE: test/integration/verify/controls/google_compute_zone.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_zone resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') control 'google_compute_zone-1.0' do impact 1.0 title 'google_compute_zone resource test' describe google_compute_zone(project: gcp_project_id, name: "us-central1-a") do it { should exist } it { should be_up } end end ================================================ FILE: test/integration/verify/controls/google_compute_zone_operation.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_zone_operation resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') zone_operation = input('zone_operation', value: { "name": "operation-1641188179305-5d4a6e66fe2bd-8fd1812d-d97f3b69", "zone": "us-central1-a", "operation_type": "compute.instanceGroupManagers.insert", "status": "DONE", "progress": 100 }, description: 'Operation resources contained within the specified zone') control 'google_compute_zone_operation-1.0' do impact 1.0 title 'google_compute_zone_operation resource test' describe google_compute_zone_operation(project: gcp_project_id, zone: zone_operation['zone'], name: zone_operation['name']) do it { should exist } its('name') { should eq zone_operation['name'] } its('status') { should eq zone_operation['status'] } its('progress') { should eq zone_operation['progress'] } end describe google_compute_zone_operation(project: gcp_project_id, zone: zone_operation['zone'], name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_compute_zone_operations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_zone_operations resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') zone_operation = input('zone_operation', value: { "name": "operation-1641188179305-5d4a6e66fe2bd-8fd1812d-d97f3b69", "zone": "us-central1-a", "operation_type": "compute.instanceGroupManagers.insert", "status": "DONE", "progress": 100 }, description: 'Operation resources contained within the specified zone') control 'google_compute_zone_operations-1.0' do impact 1.0 title 'google_compute_zone_operations resource test' describe google_compute_zone_operations(project: gcp_project_id, zone: zone_operation['zone']) do it { should exist } its('names') { should include zone_operation['name'] } its('progresses') { should include zone_operation['progress'] } end end ================================================ FILE: test/integration/verify/controls/google_compute_zones.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_compute_zones resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') control 'google_compute_zones-1.0' do impact 1.0 title 'google_compute_zones resource test' google_compute_zones(project: gcp_project_id).zone_names.each do |zone_name| describe google_compute_zone(project: gcp_project_id, name: zone_name) do it { should exist } it { should be_up } end end end ================================================ FILE: test/integration/verify/controls/google_compute_zones_loop.rb ================================================ title 'Loop over all GCP Zones' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') control 'gcp-zones-loop-1.0' do impact 1.0 title 'Ensure zones have the correct properties in bulk using google_compute_zone for detail.' google_compute_zones(project: gcp_project_id).zone_names.each do |zone_name| describe google_compute_zone(project: gcp_project_id, name: zone_name) do it { should exist } its('status') { should eq 'UP' } # or equivalently it { should be_up } end end end ================================================ FILE: test/integration/verify/controls/google_container_cluster.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_container_cluster resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: 'gcp_kube_cluster_name', description: 'GCP container cluster name') gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: 'gcp_kube_cluster_zone', description: 'GCP container cluster zone') gcp_kube_cluster_size = input(:gcp_kube_cluster_size, value: 'gcp_kube_cluster_size', description: 'GCP container cluster size') gcp_kube_cluster_zone_extra1 = input(:gcp_kube_cluster_zone_extra1, value: 'gcp_kube_cluster_zone_extra1', description: 'First extra zone for the cluster') gcp_kube_cluster_zone_extra2 = input(:gcp_kube_cluster_zone_extra2, value: 'gcp_kube_cluster_zone_extra2', description: 'Second extra zone for the cluster') gcp_kube_cluster_master_user = input(:gcp_kube_cluster_master_user, value: 'gcp_kube_cluster_master_user', description: 'GCP container cluster admin username') control 'google_container_cluster-1.0' do impact 1.0 title 'google_container_cluster resource test' describe google_container_cluster(project: gcp_project_id, location: gcp_kube_cluster_zone, name: gcp_kube_cluster_name) do it { should exist } its('locations.sort'){ should cmp [ gcp_kube_cluster_zone, gcp_kube_cluster_zone_extra1, gcp_kube_cluster_zone_extra2 ].sort } its('private_cluster_config.enable_private_endpoint') { should eq true} its('master_auth.username') { should eq gcp_kube_cluster_master_user } its('fleet.project') { should eq nil } its('fleet.membership') { should eq nil } its('fleet.to_s') { should include "ClusterFleet" } end describe google_container_cluster(project: gcp_project_id, location: gcp_kube_cluster_zone, name: 'nonexistent') do it { should_not exist } end describe google_container_cluster(project: gcp_project_id, location: gcp_kube_cluster_zone, name: gcp_kube_cluster_name, beta: true) do it { should exist } its('release_channel.channel') { should cmp "RAPID" } end end ================================================ FILE: test/integration/verify/controls/google_container_clusters.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_container_clusters resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: 'gcp_kube_cluster_name', description: 'GCP container cluster name') gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: 'gcp_kube_cluster_zone', description: 'GCP container cluster zone') gcp_kube_cluster_size = input(:gcp_kube_cluster_size, value: 'gcp_kube_cluster_size', description: 'GCP container cluster size') gcp_kube_cluster_zone_extra1 = input(:gcp_kube_cluster_zone_extra1, value: 'gcp_kube_cluster_zone_extra1', description: 'First extra zone for the cluster') gcp_kube_cluster_zone_extra2 = input(:gcp_kube_cluster_zone_extra2, value: 'gcp_kube_cluster_zone_extra2', description: 'Second extra zone for the cluster') gcp_kube_cluster_master_user = input(:gcp_kube_cluster_master_user, value: 'gcp_kube_cluster_master_user', description: 'GCP container cluster admin username') control 'google_container_clusters-1.0' do impact 1.0 title 'google_container_clusters resource test' describe google_container_clusters(project: gcp_project_id, location: gcp_kube_cluster_zone) do its('cluster_names') { should include gcp_kube_cluster_name } end end ================================================ FILE: test/integration/verify/controls/google_container_node_pool.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_container_node_pool resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: 'gcp_kube_cluster_zone', description: 'The zone that the kube cluster resides in.') gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: 'gcp_kube_cluster_name', description: 'The parent container clusters name.') regional_node_pool = input('regional_node_pool', value: { "name": "inspec-gcp-regional-node-pool", "cluster_name": "inspec-gcp-regional-node-pool-cluster", "node_count": 1, "initial_node_count": 1 }, description: 'Regional Node Pool definition') control 'google_container_node_pool-1.0' do impact 1.0 title 'google_container_node_pool resource test' describe google_container_node_pool(project: gcp_project_id, location: gcp_kube_cluster_zone, cluster_name: gcp_kube_cluster_name, nodepool_name: regional_node_pool['name']) do it { should exist } its('initial_node_count') { should eq regional_node_pool['initial_node_count']} end describe google_container_node_pool(project: gcp_project_id, location: gcp_kube_cluster_zone, cluster_name: gcp_kube_cluster_name, nodepool_name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_container_node_pools.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_container_node_pools resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: 'gcp_kube_cluster_zone', description: 'The zone that the kube cluster resides in.') gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: 'gcp_kube_cluster_name', description: 'The parent container clusters name.') regional_node_pool = input('regional_node_pool', value: { "name": "inspec-gcp-regional-node-pool", "cluster_name": "inspec-gcp-regional-node-pool-cluster", "node_count": 1, "initial_node_count": 1 }, description: 'Regional Node Pool definition') control 'google_container_node_pools-1.0' do impact 1.0 title 'google_container_node_pools resource test' describe google_container_node_pools(project: gcp_project_id, location: gcp_kube_cluster_zone, cluster_name: gcp_kube_cluster_name) do its('initial_node_counts') { should include regional_node_pool['initial_node_count']} end end ================================================ FILE: test/integration/verify/controls/google_container_server_config.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_container_server_config resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: 'gcp_kube_cluster_zone', description: 'The zone that the kube cluster resides in.') gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: 'gcp_kube_cluster_name', description: 'The parent container clusters name.') container_engine_versions = input('container_engine_versions', value: { "valid_master_version": "1.21.5-gke.1802", "valid_node_version": "1.21.5-gke.1802" }, description: 'Google Kubernetes Engine versions in a zone or region for a given project.') control 'google_container_server_config-1.0' do impact 1.0 title 'google_container_server_config resource test' describe google_container_server_config(project: gcp_project_id, location: gcp_kube_cluster_zone) do its('valid_master_versions') { should include container_engine_versions['valid_master_version']} its('valid_node_versions') { should include container_engine_versions['valid_node_version']} end end ================================================ FILE: test/integration/verify/controls/google_data_fusion_instance.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_data_fusion_instance resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') instance = input('instance', value: { "name": "projects/ppradhan/locations/us-central1/instances/inspec-instance", "parent": "projects/ppradhan/locations/us-central1", "type": "DEVELOPER", "state": "ACTIVE", "create_time": "2024-10-09T12:34:49.544484250Z", "update_time": "2024-10-09T12:53:56.928042766Z", "version": "6.10.1", "service_account": "cloud-datafusion-management-sa@b0ed40f9567706323-tp.iam.gserviceaccount.com", "p4_service_account": "service-165434197229@gcp-sa-datafusion.iam.gserviceaccount.com", "serviceEndpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.googleusercontent.com", "zone": "us-central1-c", "api_endpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.googleusercontent.com/api", "gcs_bucket": "gs://df-1770363587862806578-7atlcp4ghmi67nkzaizbbqaaaa", "tenant_project_id": "b0ed40f9567706323-tp", "workforce_identity_service_endpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.byoid.googleusercontent.com.", "patch_revision": "6.10.1.1" }, description: 'instance description') control 'google_data_fusion_instance-1.0' do impact 1.0 title 'google_data_fusion_instance resource test' describe google_data_fusion_instance(name: instance['name']) do it { should exist } its('name') { should cmp instance['name'] } its('description') { should cmp instance['description'] } its('type') { should cmp instance['type'] } its('create_time') { should cmp instance['create_time'] } its('update_time') { should cmp instance['update_time'] } its('state') { should cmp instance['state'] } its('service_account') { should cmp instance['service_account'] } its('p4_service_account') { should cmp instance['p4_service_account'] } its('tenant_project_id') { should cmp instance['tenant_project_id'] } its('dataproc_service_account') { should cmp instance['dataproc_service_account'] } its('workforce_identity_service_endpoint') { should cmp instance['workforce_identity_service_endpoint'] } its('patch_revision') { should cmp instance['patch_revision'] } its('tenant_project_id') { should cmp instance['tenant_project_id'] } its('api_endpoint') { should cmp instance['api_endpoint'] } its('gcs_bucket') { should cmp instance['gcs_bucket'] } its('zone') { should cmp instance['zone'] } end describe google_data_fusion_instance(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_data_fusion_instances.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_data_fusion_instances resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') instance = input('instance', value: { "name": "projects/ppradhan/locations/us-central1/instances/inspec-instance", "parent": "projects/ppradhan/locations/us-central1", "type": "DEVELOPER", "state": "ACTIVE", "create_time": "2024-10-09T12:34:49.544484250Z", "update_time": "2024-10-09T12:53:56.928042766Z", "version": "6.10.1", "service_account": "cloud-datafusion-management-sa@b0ed40f9567706323-tp.iam.gserviceaccount.com", "p4_service_account": "service-165434197229@gcp-sa-datafusion.iam.gserviceaccount.com", "serviceEndpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.googleusercontent.com", "zone": "us-central1-c", "api_endpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.googleusercontent.com/api", "gcs_bucket": "gs://df-1770363587862806578-7atlcp4ghmi67nkzaizbbqaaaa", "tenant_project_id": "b0ed40f9567706323-tp", "workforce_identity_service_endpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.byoid.googleusercontent.com.", "patch_revision": "6.10.1.1" }, description: 'instance description') control 'google_data_fusion_instances-1.0' do impact 1.0 title 'google_data_fusion_instances resource test' describe google_data_fusion_instances(parent: instance['parent']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_dataflow_project_location_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataflow_project_location_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_location_job = input('project_location_job', value: { "location": "us-central1", "project_id": "ppradhan", "id": "2024-02-06_06_34_50-7804426594194635797", "name": "inspec-test-job", "type": "value_type", "steps_location": "value_stepslocation", "current_state": "value_currentstate", "current_state_time": "value_currentstatetime", "requested_state": "value_requestedstate", "create_time": "value_createtime", "replace_job_id": "value_replacejobid", "client_request_id": "value_clientrequestid", "replaced_by_job_id": "value_replacedbyjobid", "start_time": "value_starttime", "created_from_snapshot_id": "value_createdfromsnapshotid" }, description: 'project_location_job description') control 'google_dataflow_project_location_job-1.0' do impact 1.0 title 'google_dataflow_project_location_job resource test' describe google_dataflow_project_location_job(job: project_location_job['id'], location: project_location_job['location'], projectId: project_location_job['project_id']) do it { should exist } its('id') { should cmp project_location_job['id'] } its('project_id') { should cmp project_location_job['project_id'] } its('name') { should cmp project_location_job['name'] } its('type') { should cmp project_location_job['type'] } its('steps_location') { should cmp project_location_job['steps_location'] } its('current_state') { should cmp project_location_job['current_state'] } its('current_state_time') { should cmp project_location_job['current_state_time'] } its('requested_state') { should cmp project_location_job['requested_state'] } its('create_time') { should cmp project_location_job['create_time'] } its('replace_job_id') { should cmp project_location_job['replace_job_id'] } its('client_request_id') { should cmp project_location_job['client_request_id'] } its('replaced_by_job_id') { should cmp project_location_job['replaced_by_job_id'] } its('location') { should cmp project_location_job['location'] } its('start_time') { should cmp project_location_job['start_time'] } its('created_from_snapshot_id') { should cmp project_location_job['created_from_snapshot_id'] } end describe google_dataflow_project_location_job(job: project_location_job['id'], location: project_location_job['location'], projectId: project_location_job['project_id']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dataflow_project_location_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataflow_project_location_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_location_job = input('project_location_job', value: { "location": "us-central1", "project_id": "ppradhan", "id": "2024-02-06_06_34_50-7804426594194635797", "name": "inspec-test-job", "type": "value_type", "steps_location": "value_stepslocation", "current_state": "value_currentstate", "current_state_time": "value_currentstatetime", "requested_state": "value_requestedstate", "create_time": "value_createtime", "replace_job_id": "value_replacejobid", "client_request_id": "value_clientrequestid", "replaced_by_job_id": "value_replacedbyjobid", "start_time": "value_starttime", "created_from_snapshot_id": "value_createdfromsnapshotid" }, description: 'project_location_job description') control 'google_dataflow_project_location_jobs-1.0' do impact 1.0 title 'google_dataflow_project_location_jobs resource test' describe google_dataflow_project_location_jobs(location: project_location_job['location'], project: project_location_job['project_id']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_autoscaling_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_autoscaling_policies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') autoscaling_policy = input('autoscaling_policy', value: { "name": "projects/ppradhan/regions/us-central1/autoscalingPolicies/inspec-policy-cf1d", "parent": "projects/ppradhan/regions/us-central1", "id": "inspec-policy-cf1d" }, description: 'autoscaling_policy description') control 'google_dataproc_autoscaling_policies-1.0' do impact 1.0 title 'google_dataproc_autoscaling_policies resource test' describe google_dataproc_autoscaling_policies(parent: autoscaling_policy['parent']) do it { should exist } its('ids') { should include autoscaling_policy['id'] } its('names') { should include autoscaling_policy['name'] } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_autoscaling_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_autoscaling_policy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') autoscaling_policy = input('autoscaling_policy', value: { "name": "projects/ppradhan/regions/us-central1/autoscalingPolicies/inspec-policy-cf1d", "parent": "projects/ppradhan/regions/us-central1", "id": "inspec-policy-cf1d" }, description: 'autoscaling_policy description') control 'google_dataproc_autoscaling_policy-1.0' do impact 1.0 title 'google_dataproc_autoscaling_policy resource test' describe google_dataproc_autoscaling_policy(name: autoscaling_policy['name']) do it { should exist } its('id') { should cmp autoscaling_policy['id'] } its('name') { should cmp autoscaling_policy['name'] } end describe google_dataproc_autoscaling_policy(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_batch.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_batch resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') batch = input('batch', value: { "name": "projects/ppradhan/locations/us-central1/batches/inspec-test-batch-0052", "parent": "projects/ppradhan/locations/us-central1", "uuid": "5a1b8402-2aa5-4578-98ee-2ff12ff2a14e", "create_time": "2024-10-15T06:42:29.671473Z", "state": "SUCCEEDED", "state_time": "2024-10-15T06:44:55.114445Z", "creator": "bala-local@ppradhan.iam.gserviceaccount.com", "operation": "projects/ppradhan/regions/us-central1/operations/19a2ac29-3564-49b8-8116-c36dd98d9cd5" }, description: 'batch description') control 'google_dataproc_batch-1.0' do impact 1.0 title 'google_dataproc_batch resource test' describe google_dataproc_batch(name: batch['name']) do it { should exist } its('name') { should cmp batch['name'] } its('uuid') { should cmp batch['uuid'] } its('create_time') { should cmp batch['create_time'] } its('state') { should cmp batch['state'] } its('state_message') { should cmp batch['state_message'] } its('state_time') { should cmp batch['state_time'] } its('creator') { should cmp batch['creator'] } its('operation') { should cmp batch['operation'] } end describe google_dataproc_batch(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_batches.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_batches resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') batch = input('batch', value: { "name": "projects/ppradhan/locations/us-central1/batches/inspec-test-batch-0052", "parent": "projects/ppradhan/locations/us-central1", "uuid": "5a1b8402-2aa5-4578-98ee-2ff12ff2a14e", "create_time": "2024-10-15T06:42:29.671473Z", "state": "SUCCEEDED", "state_time": "2024-10-15T06:44:55.114445Z", "creator": "bala-local@ppradhan.iam.gserviceaccount.com", "operation": "projects/ppradhan/regions/us-central1/operations/19a2ac29-3564-49b8-8116-c36dd98d9cd5" }, description: 'batch description') control 'google_dataproc_batches-1.0' do impact 1.0 title 'google_dataproc_batches resource test' describe google_dataproc_batches(parent: batch['parent']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_cluster.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_cluster resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') dataproc_cluster = input('dataproc_cluster', value: { "name": "inspec-dataproc-cluster", "label_key": "label", "label_value": "value", "config": { "master_config": { "num_instances": 1, "machine_type": "n1-standard-1", "boot_disk_type": "pd-ssd", "boot_disk_size_gb": 15 }, "worker_config": { "num_instances": 2, "machine_type": "n1-standard-1", "boot_disk_size_gb": 20, "num_local_ssds": 1 }, "preemptible_worker_config": { "num_instances": 0 }, "software_config": { "prop_key": "dataproc:dataproc.allow.zero.workers", "prop_value": "true" }, "gce_cluster_config": { "tag": "foo" } } }, description: 'Dataproc cluster definition') control 'google_dataproc_cluster-1.0' do impact 1.0 title 'google_dataproc_cluster resource test' describe google_dataproc_cluster(project: gcp_project_id, region: gcp_location, cluster_name: dataproc_cluster['name']) do it { should exist } its('labels') { should include(dataproc_cluster['label_key'] => dataproc_cluster['label_value']) } its('config.master_config.num_instances') { should cmp dataproc_cluster['config']['master_config']['num_instances'] } its('config.worker_config.num_instances') { should cmp dataproc_cluster['config']['worker_config']['num_instances'] } its('config.master_config.machine_type_uri') { should match dataproc_cluster['config']['master_config']['machine_type'] } its('config.worker_config.machine_type_uri') { should match dataproc_cluster['config']['worker_config']['machine_type'] } its('config.software_config.properties') { should include(dataproc_cluster['config']['software_config']['prop_key'] => dataproc_cluster['config']['software_config']['prop_value']) } its('project_id') { should eq gcp_project_id } its('cluster_uuid') { should eq "test-uuid-67ff7c8e-558a-45ad-97c7" } end describe google_dataproc_cluster(project: gcp_project_id, region: gcp_location, cluster_name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_clusters.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_clusters resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project region.') dataproc_cluster = input('dataproc_cluster', value: { "name": "inspec-dataproc-cluster", "label_key": "label", "label_value": "value", "config": { "master_config": { "num_instances": 1, "machine_type": "n1-standard-1", "boot_disk_type": "pd-ssd", "boot_disk_size_gb": 15 }, "worker_config": { "num_instances": 2, "machine_type": "n1-standard-1", "boot_disk_size_gb": 20, "num_local_ssds": 1 }, "preemptible_worker_config": { "num_instances": 0 }, "software_config": { "prop_key": "dataproc:dataproc.allow.zero.workers", "prop_value": "true" }, "gce_cluster_config": { "tag": "foo" } } }, description: 'Dataproc cluster definition') control 'google_dataproc_clusters-1.0' do impact 1.0 title 'google_dataproc_clusters resource test' describe google_dataproc_clusters(project: gcp_project_id, region: gcp_location) do its('count') { should be >= 1 } its('cluster_names') { should include dataproc_cluster['name'] } its('project_ids') { should include gcp_project_id } its('cluster_uuids') { should include "test-uuid-67ff7c8e-558a-45ad-97c7" } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') job = input('job', value: { "job_id": "job-46b1a728", "project_id": "ppradhan", "region": "europe-west2", "driver_output_resource_uri": "gs://dataproc-staging-europe-west2-165434197229-ycz8tbcn/google-cloud-dataproc-metainfo/0c01e2dd-85d5-4bac-9e53-b7c4ebd1c6b8/jobs/job-46b1a728/driveroutput", "driver_control_files_uri": "gs://dataproc-staging-europe-west2-165434197229-ycz8tbcn/google-cloud-dataproc-metainfo/0c01e2dd-85d5-4bac-9e53-b7c4ebd1c6b8/jobs/job-46b1a728/", "job_uuid": "96a1cb4b-1083-416b-ac8a-3ebd39e478c3" }, description: 'job description') control 'google_dataproc_job-1.0' do impact 1.0 title 'google_dataproc_job resource test' describe google_dataproc_job(job_id: job['job_id'], project_id: job['project_id'], region: job['region']) do it { should exist } its('driver_output_resource_uri') { should cmp job['driver_output_resource_uri'] } its('driver_control_files_uri') { should cmp job['driver_control_files_uri'] } its('job_uuid') { should cmp job['job_uuid'] } end describe google_dataproc_job(job_id: job['jobId'], project_id: job['project_id'], region: job['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') job = input('job', value: { "job_id": "job-46b1a728", "project_id": "ppradhan", "region": "europe-west2", "driver_output_resource_uri": "gs://dataproc-staging-europe-west2-165434197229-ycz8tbcn/google-cloud-dataproc-metainfo/0c01e2dd-85d5-4bac-9e53-b7c4ebd1c6b8/jobs/job-46b1a728/driveroutput", "driver_control_files_uri": "gs://dataproc-staging-europe-west2-165434197229-ycz8tbcn/google-cloud-dataproc-metainfo/0c01e2dd-85d5-4bac-9e53-b7c4ebd1c6b8/jobs/job-46b1a728/", "job_uuid": "96a1cb4b-1083-416b-ac8a-3ebd39e478c3" }, description: 'job description') control 'google_dataproc_jobs-1.0' do impact 1.0 title 'google_dataproc_jobs resource test' describe google_dataproc_jobs(project_id: job['project_id'], region: job['region']) do it { should exist } its('driver_output_resource_uris') { should include job['driver_output_resource_uri'] } its('driver_control_files_uris') { should include job['driver_control_files_uri'] } its('job_uuids') { should include job['job_uuid'] } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_metastore_federation.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_metastore_federation resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') federation = input('federation', value: { "name": "projects/ppradhan/locations/us-central1/federations/inspec-federation", "parent": "projects/ppradhan/locations/us-central1", "create_time": "2024-07-23T11:59:46.629125267Z", "update_time": "2024-07-23T12:01:30.424230443Z", "version": "3.1.2", "endpoint_uri": "https://standalone-federation-inspec-federation-4082ad6a-ct6cldpepa-uc.a.run.app:443", "state": "ACTIVE", "state_message": "value_statemessage", "uid": "d9600d29-81c5-47f1-8db6-4ffe194841fe" }, description: 'federation description') control 'google_dataproc_metastore_federation-1.0' do impact 1.0 title 'google_dataproc_metastore_federation resource test' describe google_dataproc_metastore_federation(name: federation['name']) do it { should exist } its('name') { should cmp federation['name'] } its('create_time') { should cmp federation['create_time'] } its('update_time') { should cmp federation['update_time'] } its('version') { should cmp federation['version'] } its('endpoint_uri') { should cmp federation['endpoint_uri'] } its('state') { should cmp federation['state'] } its('state_message') { should cmp federation['state_message'] } its('uid') { should cmp federation['uid'] } end describe google_dataproc_metastore_federation(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_metastore_federations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_metastore_federations resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') federation = input('federation', value: { "name": "projects/ppradhan/locations/us-central1/federations/inspec-federation", "parent": "projects/ppradhan/locations/us-central1", "create_time": "2024-07-23T11:59:46.629125267Z", "update_time": "2024-07-23T12:01:30.424230443Z", "version": "3.1.2", "endpoint_uri": "https://standalone-federation-inspec-federation-4082ad6a-ct6cldpepa-uc.a.run.app:443", "state": "ACTIVE", "state_message": "value_statemessage", "uid": "d9600d29-81c5-47f1-8db6-4ffe194841fe" }, description: 'federation description') control 'google_dataproc_metastore_federations-1.0' do impact 1.0 title 'google_dataproc_metastore_federations resource test' describe google_dataproc_metastore_federations(parent: federation['parent']) do it { should exist } its('names') { should include federation['name'] } its('create_times') { should include federation['create_time'] } its('update_times') { should include federation['update_time'] } its('versions') { should include federation['version'] } its('endpoint_uris') { should include federation['endpoint_uri'] } its('states') { should include federation['state'] } its('uids') { should include federation['uid'] } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_metastore_service.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_metastore_service resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_location_service = input('project_location_service', value: { "name": "projects/ppradhan/locations/us-central1/services/metastore-srv", "parent": "projects/ppradhan/locations/us-central1", "create_time": "2024-07-11T10:37:41.096165514Z", "update_time": "2024-07-11T11:17:30.112145404Z", "network": "projects/ppradhan/global/networks/default", "endpoint_uri": "thrift://10.104.64.28:9080", "state": "ACTIVE", "state_message": "The service is ready to use", "artifact_gcs_uri": "gs://gcs-bucket-metastore-srv-2a1c2d78-1aab-4f1b-b6cd-388796854ab8", "tier": "DEVELOPER", "uid": "2a1c2d78-1aab-4f1b-b6cd-388796854ab8", "release_channel": "STABLE", "database_type": "MYSQL" }, description: 'project_location_service description') control 'google_dataproc_metastore_service-1.0' do impact 1.0 title 'google_dataproc_metastore_service resource test' describe google_dataproc_metastore_service(name: project_location_service['name']) do it { should exist } its('name') { should cmp project_location_service['name'] } its('create_time') { should cmp project_location_service['create_time'] } its('update_time') { should cmp project_location_service['update_time'] } its('network') { should cmp project_location_service['network'] } its('endpoint_uri') { should cmp project_location_service['endpoint_uri'] } its('state') { should cmp project_location_service['state'] } its('state_message') { should cmp project_location_service['state_message'] } its('artifact_gcs_uri') { should cmp project_location_service['artifact_gcs_uri'] } its('tier') { should cmp project_location_service['tier'] } its('uid') { should cmp project_location_service['uid'] } its('release_channel') { should cmp project_location_service['release_channel'] } its('database_type') { should cmp project_location_service['database_type'] } end describe google_dataproc_metastore_service(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_metastore_service_backup.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_metastore_service_backup resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') service_backup = input('service_backup', value: { "name": "projects/ppradhan/locations/us-central1/services/inspec-test/backups/inspec-backup-fa90", "parent": "projects/ppradhan/locations/us-central1/services/inspec-test", "create_time": "2024-08-19T12:06:12.158023685Z", "end_time": "2024-08-19T12:09:42.670413Z", "state": "ACTIVE", "description": "value_description" }, description: 'service_backup description') control 'google_dataproc_metastore_service_backup-1.0' do impact 1.0 title 'google_dataproc_metastore_service_backup resource test' describe google_dataproc_metastore_service_backup(name: service_backup['name']) do it { should exist } its('name') { should cmp service_backup['name'] } its('create_time') { should cmp service_backup['create_time'] } its('end_time') { should cmp service_backup['end_time'] } its('state') { should cmp service_backup['state'] } its('description') { should cmp service_backup['description'] } end describe google_dataproc_metastore_service_backup(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_metastore_service_backups.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_metastore_service_backups resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') service_backup = input('service_backup', value: { "name": "projects/ppradhan/locations/us-central1/services/inspec-test/backups/inspec-backup-fa90", "parent": "projects/ppradhan/locations/us-central1/services/inspec-test", "create_time": "2024-08-19T12:06:12.158023685Z", "end_time": "2024-08-19T12:09:42.670413Z", "state": "ACTIVE", "description": "value_description" }, description: 'service_backup description') control 'google_dataproc_metastore_service_backups-1.0' do impact 1.0 title 'google_dataproc_metastore_service_backups resource test' describe google_dataproc_metastore_service_backups(parent: service_backup['parent']) do it { should exist } its('names') { should include service_backup['name'] } its('create_times') { should include service_backup['create_time'] } its('end_times') { should include service_backup['end_time'] } its('states') { should include service_backup['state'] } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_metastore_services.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_metastore_services resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_location_service = input('project_location_service', value: { "name": "projects/ppradhan/locations/us-central1/services/metastore-srv", "parent": "projects/ppradhan/locations/us-central1", "create_time": "2024-07-11T10:37:41.096165514Z", "update_time": "2024-07-11T11:17:30.112145404Z", "network": "projects/ppradhan/global/networks/default", "endpoint_uri": "thrift://10.104.64.28:9080", "state": "ACTIVE", "state_message": "The service is ready to use", "artifact_gcs_uri": "gs://gcs-bucket-metastore-srv-2a1c2d78-1aab-4f1b-b6cd-388796854ab8", "tier": "DEVELOPER", "uid": "2a1c2d78-1aab-4f1b-b6cd-388796854ab8", "release_channel": "STABLE", "database_type": "MYSQL" }, description: 'project_location_service description') control 'google_dataproc_metastore_services-1.0' do impact 1.0 title 'google_dataproc_metastore_services resource test' describe google_dataproc_metastore_services(parent: project_location_service['parent']) do it { should exist } its('names') { should include project_location_service['name'] } its('create_times') { should include project_location_service['create_time'] } its('update_times') { should include project_location_service['update_time'] } its('networks') { should include project_location_service['network'] } its('endpoint_uris') { should include project_location_service['endpoint_uri'] } its('states') { should include project_location_service['state'] } its('state_messages') { should include project_location_service['state_message'] } its('artifact_gcs_uris') { should include project_location_service['artifact_gcs_uri'] } its('tiers') { should include project_location_service['tier'] } its('uids') { should include project_location_service['uid'] } its('release_channels') { should include project_location_service['release_channel'] } its('database_types') { should include project_location_service['database_type'] } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_session.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_session resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') session = input('session', value: { "name": "projects/ppradhan/locations/us-central1/sessions/inspec-runtime-0ae1-b98f4174", "parent": "projects/ppradhan/locations/us-central1", "uuid": "0b8d8483-b1ff-4f67-8e34-8d57987430a2", "create_time": "2024-08-19T06:59:23.721658Z", "state": "value_state", "state_message": "value_statemessage", "state_time": "value_statetime", "creator": "balasubramanian.s@chef.io", "user": "value_user", "session_template": "projects/ppradhan/locations/us-central1/sessionTemplates/inspec-runtime-0ae1" }, description: 'session description') control 'google_dataproc_session-1.0' do impact 1.0 title 'google_dataproc_session resource test' describe google_dataproc_session(name: session['name']) do it { should exist } its('name') { should cmp session['name'] } its('uuid') { should cmp session['uuid'] } its('create_time') { should cmp session['create_time'] } its('state') { should cmp session['state'] } its('state_message') { should cmp session['state_message'] } its('state_time') { should cmp session['state_time'] } its('creator') { should cmp session['creator'] } its('user') { should cmp session['user'] } its('session_template') { should cmp session['session_template'] } end describe google_dataproc_session(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_sessions.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_sessions resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') session = input('session', value: { "name": "projects/ppradhan/locations/us-central1/sessions/inspec-runtime-0ae1-b98f4174", "parent": "projects/ppradhan/locations/us-central1", "uuid": "0b8d8483-b1ff-4f67-8e34-8d57987430a2", "create_time": "2024-08-19T06:59:23.721658Z", "state": "value_state", "state_message": "value_statemessage", "state_time": "value_statetime", "creator": "balasubramanian.s@chef.io", "user": "value_user", "session_template": "projects/ppradhan/locations/us-central1/sessionTemplates/inspec-runtime-0ae1" }, description: 'session description') control 'google_dataproc_sessions-1.0' do impact 1.0 title 'google_dataproc_sessions resource test' describe google_dataproc_sessions(parent: session['parent']) do it { should exist } its('names') { should include session['name'] } its('uuids') { should include session['uuid'] } its('create_times') { should include session['create_time'] } its('creators') { should include session['creator'] } its('session_templates') { should include session['session_template'] } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_workflow_template.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_workflow_template resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') workflow_template = input('workflow_template', value: { "project": "ppradhan", "reservation": "value_reservation", "zone": "value_zone", "id": "template-8b819", "parent": "projects/ppradhan/regions/us-central1", "name": "projects/ppradhan/regions/us-central1/workflowTemplates/template-8b819", "create_time": "2024-06-17T09:08:05.009118Z", "update_time": "2024-06-17T09:08:05.009118Z", "dag_timeout": "value_dagtimeout" }, description: 'workflow_template description') control 'google_dataproc_workflow_template-1.0' do impact 1.0 title 'google_dataproc_workflow_template resource test' describe google_dataproc_workflow_template(name: workflow_template['name']) do it { should exist } its('id') { should cmp workflow_template['id'] } its('name') { should cmp workflow_template['name'] } its('create_time') { should cmp workflow_template['create_time'] } its('update_time') { should cmp workflow_template['update_time'] } its('dag_timeout') { should cmp workflow_template['dag_timeout'] } end describe google_dataproc_workflow_template(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dataproc_workflow_templates.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dataproc_workflow_templates resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') workflow_template = input('workflow_template', value: { "project": "ppradhan", "reservation": "value_reservation", "zone": "value_zone", "id": "template-8b819", "parent": "projects/ppradhan/regions/us-central1", "name": "projects/ppradhan/regions/us-central1/workflowTemplates/template-8b819", "create_time": "2024-06-17T09:08:05.009118Z", "update_time": "2024-06-17T09:08:05.009118Z", "dag_timeout": "value_dagtimeout" }, description: 'workflow_template description') control 'google_dataproc_workflow_templates-1.0' do impact 1.0 title 'google_dataproc_workflow_templates resource test' describe google_dataproc_workflow_templates(parent: workflow_template['parent']) do it { should exist } its('ids') { should include project_location_workflow_template['id'] } its('names') { should include project_location_workflow_template['name'] } its('create_times') { should include project_location_workflow_template['create_time'] } its('update_times') { should include project_location_workflow_template['update_time'] } end end ================================================ FILE: test/integration/verify/controls/google_dlp_dt.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dlp_dt resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dlp = input('dlp', value: { "name": "i-inspec-gcp-dlp", "location": "us-east-2", "type": "INSPECT_JOB", "state": "ACTIVE", "inspectDetails": { "requestedOptions": { "snapshotInspectTemplate": "", "jobConfig": { "storageConfig": { "hybridOptions": { "description": "test", "tableOptions": "" } } } } }, "description": "Description", "display_name": "Displayname", "job_attribute_name": "job_attribute-1", "job_trigger_status": "HEALTHY", "job_trigger_name": "name1", "job_trigger_display_name": "dp", "job_trigger_description": "description", "deidentify_templates": { "name": "dlp-template-inspec", "location": "europe-west2", "type": "Infotype" } }, description: 'DLP ') control 'google_dlp_dt-1.0' do impact 1.0 title 'google_dlp_dt resource test' describe google_dlp_dts(parent: "projects/#{gcp_project_id}/locations/#{dlp['deidentify_templates'][:location]}") do it { should exist } its('display_names') { should include dlp['deidentify_templates'][:name] } end end ================================================ FILE: test/integration/verify/controls/google_dlp_dts.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dlp_dts resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dlp = input('dlp', value: { "name": "i-inspec-gcp-dlp", "location": "us-east-2", "type": "INSPECT_JOB", "state": "ACTIVE", "inspectDetails": { "requestedOptions": { "snapshotInspectTemplate": "", "jobConfig": { "storageConfig": { "hybridOptions": { "description": "test", "tableOptions": "" } } } } }, "description": "Description", "display_name": "Displayname", "job_attribute_name": "job_attribute-1", "job_trigger_status": "HEALTHY", "job_trigger_name": "name1", "job_trigger_display_name": "dp", "job_trigger_description": "description", "deidentify_templates": { "name": "dlp-template-inspec", "location": "europe-west2", "type": "Infotype" } }, description: 'DLP ') control 'google_dlp_dts-1.0' do impact 1.0 title 'google_dlp_dts resource test' describe google_dlp_dt(parent: "projects/#{gcp_project_id}/locations/#{dlp['deidentify_templates'][:location]}", name: dlp['deidentify_templates'][:name]) do it { should exist } its('display_name') { should cmp dlp['deidentify_templates'][:name] } end describe google_dlp_dt(parent: "projects/#{gcp_project_id}/locations/#{dlp['deidentify_templates'][location]}", name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dlp_inspect_template.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dlp_inspect_template resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dlp = input('dlp', value: { "name": "i-inspec-gcp-dlp", "location": "us-east-2", "type": "INSPECT_JOB", "state": "ACTIVE", "inspectDetails": { "requestedOptions": { "snapshotInspectTemplate": "", "jobConfig": { "storageConfig": { "hybridOptions": { "description": "test", "tableOptions": "" } } } } }, "description": "Description", "display_name": "Displayname", "job_attribute_name": "job_attribute-1", "job_trigger_status": "HEALTHY", "job_trigger_name": "name1", "job_trigger_display_name": "dp", "job_trigger_description": "description", "deidentify_templates": { "name": "dlp-template-inspec", "location": "europe-west2", "type": "Infotype" } }, description: 'DLP ') control 'google_dlp_inspect_template-1.0' do impact 1.0 title 'google_dlp_inspect_template resource test' describe google_dlp_inspect_template(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}", name: dlp['name']) do it { should exist } its('name') { should cmp dlp['name'] } its('type') { should cmp dlp['type'] } its('state') { should cmp dlp['state'] } its('inspectDetails.requestedOptions.snapshotInspectTemplate') { should cmp dlp['inspectDetails']['requestedOptions']['snapshotInspectTemplate'] } end describe google_dlp_inspect_template(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}", name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dlp_inspect_templates.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dlp_inspect_templates resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dlp = input('dlp', value: { "name": "i-inspec-gcp-dlp", "location": "us-east-2", "type": "INSPECT_JOB", "state": "ACTIVE", "inspectDetails": { "requestedOptions": { "snapshotInspectTemplate": "", "jobConfig": { "storageConfig": { "hybridOptions": { "description": "test", "tableOptions": "" } } } } }, "description": "Description", "display_name": "Displayname", "job_attribute_name": "job_attribute-1", "job_trigger_status": "HEALTHY", "job_trigger_name": "name1", "job_trigger_display_name": "dp", "job_trigger_description": "description", "deidentify_templates": { "name": "dlp-template-inspec", "location": "europe-west2", "type": "Infotype" } }, description: 'DLP ') control 'google_dlp_inspect_templates-1.0' do impact 1.0 title 'google_dlp_inspect_templates resource test' describe google_dlp_inspect_templates(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}") do it { should exist } its('names') { should include dlp['name'] } its('types') { should include dlp['type'] } its('states') { should include dlp['state'] } end end ================================================ FILE: test/integration/verify/controls/google_dlp_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dlp_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dlp = input('dlp', value: { "name": "i-inspec-gcp-dlp", "location": "us-east-2", "type": "INSPECT_JOB", "state": "ACTIVE", "inspectDetails": { "requestedOptions": { "snapshotInspectTemplate": "", "jobConfig": { "storageConfig": { "hybridOptions": { "description": "test", "tableOptions": "" } } } } }, "description": "Description", "display_name": "Displayname", "job_attribute_name": "job_attribute-1", "job_trigger_status": "HEALTHY", "job_trigger_name": "name1", "job_trigger_display_name": "dp", "job_trigger_description": "description", "deidentify_templates": { "name": "dlp-template-inspec", "location": "europe-west2", "type": "Infotype" } }, description: 'DLP ') control 'google_dlp_job-1.0' do impact 1.0 title 'google_dlp_job resource test' describe google_dlp_job(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}", name: dlp['name']) do it { should exist } its('name') { should cmp dlp['name'] } its('type') { should cmp dlp['type'] } its('state') { should cmp dlp['state'] } its('inspectDetails.requestedOptions.snapshotInspectTemplate') { should cmp dlp['inspectDetails']['requestedOptions']['snapshotInspectTemplate'] } end describe google_dlp_job(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}", name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dlp_job_trigger.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dlp_job_trigger resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dlp = input('dlp', value: { "name": "i-inspec-gcp-dlp", "location": "us-east-2", "type": "INSPECT_JOB", "state": "ACTIVE", "inspectDetails": { "requestedOptions": { "snapshotInspectTemplate": "", "jobConfig": { "storageConfig": { "hybridOptions": { "description": "test", "tableOptions": "" } } } } }, "description": "Description", "display_name": "Displayname", "job_attribute_name": "job_attribute-1", "job_trigger_status": "HEALTHY", "job_trigger_name": "name1", "job_trigger_display_name": "dp", "job_trigger_description": "description", "deidentify_templates": { "name": "dlp-template-inspec", "location": "europe-west2", "type": "Infotype" } }, description: 'DLP ') control 'google_dlp_job_trigger-1.0' do impact 1.0 title 'google_dlp_job_trigger resource test' describe google_dlp_job_trigger(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}",name: dlp['job_trigger_name']) do it { should exist } its('name') { should cmp dlp['job_trigger_name'] } its('display_name') { should cmp dlp['job_trigger_display_name'] } its('description') { should cmp dlp['job_trigger_description'] } its('status') { should cmp dlp['job_trigger_status'] } end describe google_dlp_job_trigger(parent: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dlp_job_triggers.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dlp_job_triggers resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dlp = input('dlp', value: { "name": "i-inspec-gcp-dlp", "location": "us-east-2", "type": "INSPECT_JOB", "state": "ACTIVE", "inspectDetails": { "requestedOptions": { "snapshotInspectTemplate": "", "jobConfig": { "storageConfig": { "hybridOptions": { "description": "test", "tableOptions": "" } } } } }, "description": "Description", "display_name": "Displayname", "job_attribute_name": "job_attribute-1", "job_trigger_status": "HEALTHY", "job_trigger_name": "name1", "job_trigger_display_name": "dp", "job_trigger_description": "description", "deidentify_templates": { "name": "dlp-template-inspec", "location": "europe-west2", "type": "Infotype" } }, description: 'DLP ') control 'google_dlp_job_triggers-1.0' do impact 1.0 title 'google_dlp_job_triggers resource test' describe google_dlp_job_triggers(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}") do it { should exist } its('names') { should include dlp['job_trigger_name'] } its('display_name') { should include dlp['job_trigger_display_name'] } its('descriptions') { should include dlp['job_trigger_description'] } its('status') { should include dlp['job_trigger_status'] } end end ================================================ FILE: test/integration/verify/controls/google_dlp_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dlp_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dlp = input('dlp', value: { "name": "i-inspec-gcp-dlp", "location": "us-east-2", "type": "INSPECT_JOB", "state": "ACTIVE", "inspectDetails": { "requestedOptions": { "snapshotInspectTemplate": "", "jobConfig": { "storageConfig": { "hybridOptions": { "description": "test", "tableOptions": "" } } } } }, "description": "Description", "display_name": "Displayname", "job_attribute_name": "job_attribute-1", "job_trigger_status": "HEALTHY", "job_trigger_name": "name1", "job_trigger_display_name": "dp", "job_trigger_description": "description", "deidentify_templates": { "name": "dlp-template-inspec", "location": "europe-west2", "type": "Infotype" } }, description: 'DLP ') control 'google_dlp_jobs-1.0' do impact 1.0 title 'google_dlp_jobs resource test' describe google_dlp_jobs(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}") do it { should exist } its('names') { should include dlp['name'] } its('types') { should include dlp['type'] } its('states') { should include dlp['state'] } end end ================================================ FILE: test/integration/verify/controls/google_dlp_stored_info_type.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dlp_stored_info_type resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dlp = input('dlp', value: { "name": "i-inspec-gcp-dlp", "location": "us-east-2", "type": "INSPECT_JOB", "state": "ACTIVE", "inspectDetails": { "requestedOptions": { "snapshotInspectTemplate": "", "jobConfig": { "storageConfig": { "hybridOptions": { "description": "test", "tableOptions": "" } } } } }, "description": "Description", "display_name": "Displayname", "job_attribute_name": "job_attribute-1", "job_trigger_status": "HEALTHY", "job_trigger_name": "name1", "job_trigger_display_name": "dp", "job_trigger_description": "description", "deidentify_templates": { "name": "dlp-template-inspec", "location": "europe-west2", "type": "Infotype" } }, description: 'DLP ') control 'google_dlp_stored_info_type-1.0' do impact 1.0 title 'google_dlp_stored_info_type resource test' describe google_dlp_stored_info_type(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}",name: dlp['stored_info_type_name']) do it { should exist } its('name') { should cmp dlp['name'] } its('type') { should cmp dlp['type'] } its('state') { should cmp dlp['state'] } end describe google_dlp_stored_info_type(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}", name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dlp_stored_info_types.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dlp_stored_info_types resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dlp = input('dlp', value: { "name": "i-inspec-gcp-dlp", "location": "us-east-2", "type": "INSPECT_JOB", "state": "ACTIVE", "inspectDetails": { "requestedOptions": { "snapshotInspectTemplate": "", "jobConfig": { "storageConfig": { "hybridOptions": { "description": "test", "tableOptions": "" } } } } }, "description": "Description", "display_name": "Displayname", "job_attribute_name": "job_attribute-1", "job_trigger_status": "HEALTHY", "job_trigger_name": "name1", "job_trigger_display_name": "dp", "job_trigger_description": "description", "deidentify_templates": { "name": "dlp-template-inspec", "location": "europe-west2", "type": "Infotype" } }, description: 'DLP ') control 'google_dlp_stored_info_types-1.0' do impact 1.0 title 'google_dlp_stored_info_types resource test' describe google_dlp_stored_info_types(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}") do it { should exist } its('names') { should include dlp['name'] } end end ================================================ FILE: test/integration/verify/controls/google_dns_managed_zone.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dns_managed_zone resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_dns_zone_name = input(:gcp_dns_zone_name, value: 'gcp_dns_zone_name', description: 'The DNS name of the DNS zone.') dns_managed_zone = input('dns_managed_zone', value: {"name"=>"example-zone", "description"=>"example description", "dnssec_config_state"=>"on"}) control 'google_dns_managed_zone-1.0' do impact 1.0 title 'google_dns_managed_zone resource test' describe google_dns_managed_zone(project: gcp_project_id, zone: dns_managed_zone['name']) do it { should exist } its('dns_name') { should cmp gcp_dns_zone_name } its('description') { should cmp dns_managed_zone['description'] } its('zone_signing_key_algorithm') { should cmp 'rsasha256' } its('key_signing_key_algorithm') { should cmp 'rsasha512' } end describe google_dns_managed_zone(project: gcp_project_id, zone: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_dns_managed_zones.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dns_managed_zones resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_dns_zone_name = input(:gcp_dns_zone_name, value: 'gcp_dns_zone_name', description: 'The DNS name of the DNS zone.') dns_managed_zone = input('dns_managed_zone', value: {"name"=>"example-zone", "description"=>"example description", "dnssec_config_state"=>"on"}) control 'google_dns_managed_zones-1.0' do impact 1.0 title 'google_dns_managed_zones resource test' describe google_dns_managed_zones(project: gcp_project_id) do it { should exist } its('zone_names') { should include dns_managed_zone['name'] } its('zone_dns_names') { should include gcp_dns_zone_name } end end ================================================ FILE: test/integration/verify/controls/google_dns_resource_record_set.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dns_resource_record_set resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') record_set = input('record_set', value: { "name": "backend.my.domain.com.", "type": "A", "ttl": 300, "rrdatas1": "8.8.8.8", "rrdatas2": "8.8.4.4" }) managed_zone = input('managed_zone', value: { "name": "inspec-gcp-managed-zone", "dns_name": "my.domain.com.", "description": "A test DNS zone", "label_key": "key", "label_value": "value" }) control 'google_dns_resource_record_set-1.0' do impact 1.0 title 'google_dns_resource_record_set resource test' describe google_dns_resource_record_set(project: gcp_project_id, name: record_set['name'], type: record_set['type'], managed_zone: managed_zone['name']) do it { should exist } its('type') { should eq record_set['type'] } its('ttl') { should eq record_set['ttl'] } its('target') { should include record_set['rrdatas1'] } its('target') { should include record_set['rrdatas2'] } end end ================================================ FILE: test/integration/verify/controls/google_dns_resource_record_sets.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_dns_resource_record_sets resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') record_set = input('record_set', value: { "name": "backend.my.domain.com.", "type": "A", "ttl": 300, "rrdatas1": "8.8.8.8", "rrdatas2": "8.8.4.4" }) managed_zone = input('managed_zone', value: { "name": "inspec-gcp-managed-zone", "dns_name": "my.domain.com.", "description": "A test DNS zone", "label_key": "key", "label_value": "value" }) control 'google_dns_resource_record_sets-1.0' do impact 1.0 title 'google_dns_resource_record_sets resource test' describe google_dns_resource_record_sets(project: gcp_project_id, name: record_set['name'], managed_zone: managed_zone['name']) do its('count') { should eq 3 } its('types') { should include record_set['type'] } its('ttls') { should include record_set['ttl'] } its('targets.flatten') { should include record_set['rrdatas1'] } its('targets.flatten') { should include record_set['rrdatas2'] } end end ================================================ FILE: test/integration/verify/controls/google_filestore_instance.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_filestore_instance resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') filestore_instance = input('filestore_instance', value: {"name"=>"inspecgcp", "zone"=>"us-central1-b", "tier"=>"PREMIUM", "fileshare_capacity_gb"=>2660, "fileshare_name"=>"inspecgcp", "network_name"=>"default", "network_mode"=>"MODE_IPV4"}) control 'google_filestore_instance-1.0' do impact 1.0 title 'google_filestore_instance resource test' describe google_filestore_instance(project: gcp_project_id, zone: filestore_instance['zone'], name: filestore_instance['name']) do it { should exist } its('tier') { should cmp filestore_instance['tier'] } its('file_shares.count') { should cmp 1 } its('file_shares.first.capacity_gb') { should cmp filestore_instance['fileshare_capacity_gb'] } its('file_shares.first.name') { should cmp filestore_instance['fileshare_name'] } its('networks.count') { should cmp 1 } its('networks.first.network') { should cmp filestore_instance['network_name'] } its('networks.first.modes') { should include filestore_instance['network_mode'] } end describe google_filestore_instance(project: gcp_project_id, zone: filestore_instance['zone'], name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_filestore_instances.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_filestore_instances resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') filestore_instance = input('filestore_instance', value: {"name"=>"inspecgcp", "zone"=>"us-central1-b", "tier"=>"PREMIUM", "fileshare_capacity_gb"=>2660, "fileshare_name"=>"inspecgcp", "network_name"=>"default", "network_mode"=>"MODE_IPV4"}) control 'google_filestore_instances-1.0' do impact 1.0 title 'google_filestore_instances resource test' describe google_filestore_instances(project: gcp_project_id, zone: filestore_instance['zone']) do its('tiers') { should include filestore_instance['tier'] } end end ================================================ FILE: test/integration/verify/controls/google_iam_organization_custom_role.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_iam_organization_custom_role resource.' gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') gcp_organization_iam_custom_role_id = input(:gcp_organization_iam_custom_role_id, value: 'gcp_organization_iam_custom_role_id', description: 'The IAM custom role identifier.') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_iam_organization_custom_role-1.0' do impact 1.0 title 'google_iam_organization_custom_role resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_iam_organization_custom_role(org_id: gcp_organization_id, name: gcp_organization_iam_custom_role_id) do it { should exist } its('stage') { should eq 'GA' } its('included_permissions') { should eq ["iam.roles.list"] } end describe google_iam_organization_custom_role(org_id: gcp_organization_id, name: gcp_organization_iam_custom_role_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_iam_organization_custom_roles.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_iam_organization_custom_roles resource.' gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') gcp_organization_iam_custom_role_id = input(:gcp_organization_iam_custom_role_id, value: 'gcp_organization_iam_custom_role_id', description: 'The IAM custom role identifier.') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_iam_organization_custom_roles-1.0' do impact 1.0 title 'google_iam_organization_custom_roles resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_iam_organization_custom_roles(org_id: gcp_organization_id) do its('names') { should include "organizations/#{gcp_organization_id}/roles/#{gcp_organization_iam_custom_role_id}" } end end ================================================ FILE: test/integration/verify/controls/google_kms_crypto_key.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_crypto_key resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'GCP location') gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: 'gcp_kms_key_ring_policy_name', description: 'Key ring name') gcp_kms_crypto_key_name_policy = input(:gcp_kms_crypto_key_name_policy, value: 'gcp_kms_crypto_key_name_policy', description: 'Key name') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization') control 'google_kms_crypto_key-1.0' do impact 1.0 title 'google_kms_crypto_key resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_kms_crypto_key(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_policy_name, name: gcp_kms_crypto_key_name_policy) do it { should exist } its('crypto_key_name') { should cmp gcp_kms_crypto_key_name_policy } its('primary_state') { should eq "ENABLED" } its('purpose') { should eq "ENCRYPT_DECRYPT" } its('next_rotation_time') { should be > Time.now - 100000 } its('create_time') { should be > Time.now - 365*60*60*24*10 } end describe google_kms_crypto_key(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_policy_name, name: "nonexistent") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_kms_crypto_key_handwritten.rb ================================================ title 'Test single GCP KMS Crypto Key' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name,value:'',description:'GCP key ring name to test against.') gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') gcp_kms_crypto_key_name_policy = input(:gcp_kms_crypto_key_name_policy, value: '', description: 'The GCP cryto key name.') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources,value:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-kms-crypto-key-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure single GCP KMS Crypto Key has the correct properties.' describe google_kms_crypto_key(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_policy_name, name: gcp_kms_crypto_key_name_policy) do it { should exist } its('create_time') { should be > Time.now - 365*60*60*24*10 } its('crypto_key_name'){ should eq gcp_kms_crypto_key_name_policy } its('primary_state') { should eq "ENABLED" } its('purpose') { should eq "ENCRYPT_DECRYPT" } its('next_rotation_time') { should be > Time.now - 100000 } end end ================================================ FILE: test/integration/verify/controls/google_kms_crypto_key_iam_binding.rb ================================================ title 'GCP KMS Crypto Key IAM Binding Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name,value:'',description:'GCP key ring name to test against.') gcp_kms_crypto_key_name_policy = input(:gcp_kms_crypto_key_name_policy, value: '', description: 'The GCP cryto key name.') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources,value:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_kms_crypto_key_name_binding = input(:gcp_kms_crypto_key_name_binding,value:'',description:'GCP key ring name to test against.') gcp_kms_key_ring_binding_member_name = input(:gcp_kms_key_ring_binding_member_name, value: '', description: 'The GCP cryto key name.') control 'gcp-crypto-key-iam-binding-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure single KMS Crypto Key IAM Binding has the correct properties' describe google_kms_crypto_key_iam_binding(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_binding_member_name, crypto_key_name: gcp_kms_crypto_key_name_binding, role: "roles/editor") do it { should exist } its('members.count') { should eq 1} end describe google_kms_crypto_key_iam_binding(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_policy_name, crypto_key_name: gcp_kms_crypto_key_name_policy, role: "roles/editor") do it { should exist } its('members.count') { should eq 1} end end ================================================ FILE: test/integration/verify/controls/google_kms_crypto_key_iam_policy.rb ================================================ title 'GCP KMS Crypto Key IAM Bindings Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') gcp_kms_key_ring_binding_member_name = input(:gcp_kms_key_ring_binding_member_name,value:'',description:'GCP key ring name to test against.') gcp_kms_crypto_key_name_binding = input(:gcp_kms_crypto_key_name_binding,value:'',description:'Key in key ring to test.') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources,value:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-kms-crypto-key-iam-bindings-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure GCP KMS Crypto Key IAM Bindings have the correct properties in bulk' describe google_kms_crypto_key_iam_policy(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_binding_member_name, crypto_key_name: gcp_kms_crypto_key_name_binding) do it { should exist } its('count') { should be <= 100} its('iam_binding_roles') { should include "roles/editor" } end end ================================================ FILE: test/integration/verify/controls/google_kms_crypto_key_version.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_crypto_key_version resource.' gcp_project_id = input(:gcp_project_id, value: 'ppradhan', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'us-central1', description: 'GCP location') gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: 'gcp-inspec-kms-key-ring-aytsuncucfsfrvochsuubyovf', description: 'Key ring name') gcp_kms_crypto_key = input(:gcp_kms_crypto_key, value: 'gcp-inspec-kms-crypto-key-policy-rbgvmohbidtgdzfatbzwckttd', description: 'Key name') gcp_kms_crypto_key_version = input(:gcp_kms_crypto_key_version, value: '1', description: 'Version name') control 'google_kms_crypto_key_version-1.0' do impact 1.0 title 'google_kms_crypto_key_version resource test' describe google_kms_crypto_key_version(project: gcp_project_id, location: gcp_location, key_ring: gcp_kms_key_ring_policy_name, crypto_key: gcp_kms_crypto_key, name: gcp_kms_crypto_key_version) do it { should exist } its('crypto_key_name') { should cmp gcp_kms_crypto_key } its('primary_state') { should eq "ENABLED" } its('purpose') { should eq "ENCRYPT_DECRYPT" } its('next_rotation_time') { should be > Time.now - 100000 } its('create_time') { should be > Time.now - 365*60*60*24*10 } end describe google_kms_crypto_key_version(project: gcp_project_id, location: gcp_location, key_ring: gcp_kms_key_ring_policy_name, crypto_key: gcp_kms_crypto_key, name: gcp_kms_crypto_key_version) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_kms_crypto_key_versions.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_crypto_key_versions resource.' gcp_project_id = input(:gcp_project_id, value: 'ppradhan', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'us-central1', description: 'GCP location') gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: 'gcp-inspec-kms-key-ring-aytsuncucfsfrvochsuubyovf', description: 'Key ring name') gcp_kms_crypto_key = input(:gcp_kms_crypto_key, value: 'gcp-inspec-kms-crypto-key-policy-rbgvmohbidtgdzfatbzwckttd', description: 'Key name') gcp_kms_crypto_key_version = input(:gcp_kms_crypto_key_version, value: '1', description: 'Version name') control 'google_kms_crypto_key_versions-1.0' do impact 1.0 title 'google_kms_crypto_key_versions resource test' describe google_kms_crypto_key_versions(project: gcp_project_id, location: gcp_location, key_ring: gcp_kms_key_ring_policy_name, crypto_key: gcp_kms_crypto_key) do its('count') { should be >= 1 } its('crypto_key_names') { should include gcp_kms_crypto_key_name_policy } end end ================================================ FILE: test/integration/verify/controls/google_kms_crypto_keys.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_crypto_keys resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'GCP location') gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: 'gcp_kms_key_ring_policy_name', description: 'Key ring name') gcp_kms_crypto_key_name_policy = input(:gcp_kms_crypto_key_name_policy, value: 'gcp_kms_crypto_key_name_policy', description: 'Key name') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization') control 'google_kms_crypto_keys-1.0' do impact 1.0 title 'google_kms_crypto_keys resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_kms_crypto_keys(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_policy_name) do its('count') { should be >= 1 } its('crypto_key_names') { should include gcp_kms_crypto_key_name_policy } end end ================================================ FILE: test/integration/verify/controls/google_kms_crypto_keys_handwritten.rb ================================================ title 'GCP KMS Crypto Keys Properties' gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name,value:'',description:'GCP key ring name to test against.') gcp_kms_crypto_key_name_policy = input(:gcp_kms_crypto_key_name_policy, value: '', description: 'The GCP cryto key name.') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources,value:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_kms_crypto_key_name_binding = input(:gcp_kms_crypto_key_name_binding,value:'',description:'GCP key ring name to test against.') gcp_kms_key_ring_binding_member_name = input(:gcp_kms_key_ring_binding_member_name, value: '', description: 'The GCP cryto key name.') control 'gcp-crypto-keys-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure KMS crypto keys have the correct properties in bulk' describe google_kms_crypto_keys(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_policy_name) do it { should exist } its('count') { should eq 1} its ('crypto_key_names') { should include gcp_kms_crypto_key_name_policy } end describe google_kms_crypto_keys(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_binding_member_name) do it { should exist } its('count') { should eq 1} its ('crypto_key_names') { should include gcp_kms_crypto_key_name_binding } end end ================================================ FILE: test/integration/verify/controls/google_kms_ekm_connection.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_ekm_connection resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'GCP location') gcp_kms_connection_name = input(:gcp_kms_connection_name, value: 'gcp_kms_connection_name', description: 'GCP location') control 'google_kms_ekm_connection-1.0' do impact 1.0 title 'google_kms_ekm_connection resource test' describe google_kms_ekm_connection(project: gcp_project_id, location: gcp_location, name: gcp_kms_connection_name) do it { should exist } its('name') { should cmp gcp_kms_connection_name } end describe google_kms_ekm_connection(project: gcp_project_id, location: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_kms_ekm_connections.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_ekm_connections resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'GCP location') gcp_kms_connection_name = input(:gcp_kms_connection_name, value: 'gcp_kms_connection_name', description: 'GCP location') control 'google_kms_ekm_connections-1.0' do impact 1.0 title 'google_kms_ekm_connections resource test' describe google_kms_ekm_connections(project: gcp_project_id, location: gcp_location) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_kms_key_ring.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_key_ring resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'GCP location') gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: 'gcp_kms_key_ring_policy_name', description: 'Key ring name') gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization') control 'google_kms_key_ring-1.0' do impact 1.0 title 'google_kms_key_ring resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_kms_key_ring(project: gcp_project_id, location: gcp_location, name: gcp_kms_key_ring_policy_name) do it { should exist } its('create_time') { should be > Time.now - 365*60*60*24*10 } its('key_ring_name'){ should eq gcp_kms_key_ring_policy_name } its('key_ring_url'){ should match gcp_kms_key_ring_policy_name } end describe google_kms_key_ring(project: gcp_project_id, location: gcp_location, name: "nonexistent") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_kms_key_ring_handwritten.rb ================================================ title 'Test single GCP KMS Key Ring' gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name,default:'',description:'GCP key ring name to test against.') control 'gcp-key-ring-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure single KMS Key Ring has the correct properties.' describe google_kms_key_ring(project: gcp_project_id, location: gcp_location, name: gcp_kms_key_ring_policy_name) do it { should exist } its('create_time') { should be > Time.now - 365*60*60*24*10 } its('key_ring_name'){ should eq gcp_kms_key_ring_policy_name } end end ================================================ FILE: test/integration/verify/controls/google_kms_key_ring_iam_binding.rb ================================================ title 'Test single GCP KMS Key Ring IAM Binding' gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name,default:'',description:'GCP key ring name to test against.') gcp_kms_key_ring_binding_member_name = attribute(:gcp_kms_key_ring_binding_member_name,default:'',description:'GCP key ring name to test against.') gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-kms-key-ring-iam-binding-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure single GCP GCP KMS Key Ring IAM bindings have the correct properties. Examples below include attaching an IAM policy, binding and member to a key ring.' describe google_kms_key_ring_iam_binding(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_policy_name, role: "roles/editor") do it { should exist } its ('members.count'){ should eq 1 } end describe google_kms_key_ring_iam_binding(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_binding_member_name, role: "roles/editor") do it { should exist } its ('members.count'){ should eq 1 } end describe google_kms_key_ring_iam_binding(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_binding_member_name, role: "roles/owner") do it { should exist } its ('members.count'){ should eq 1 } end end ================================================ FILE: test/integration/verify/controls/google_kms_key_ring_iam_policy.rb ================================================ title 'GCP KMS Key Ring IAM Binding Properties' gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') gcp_kms_key_ring_binding_member_name = attribute(:gcp_kms_key_ring_binding_member_name,default:'',description:'GCP key ring name to test against.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-kms-key-ring-iam-bindings-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure GCP KMS Key Ring IAM bindings have the correct properties in bulk' describe google_kms_key_ring_iam_policy(project: gcp_project_id, location: gcp_location, key_ring_name: gcp_kms_key_ring_binding_member_name) do it { should exist } its('count') { should be <= 100} its('iam_binding_roles') { should include "roles/owner" } its('iam_binding_roles') { should include "roles/editor" } end end ================================================ FILE: test/integration/verify/controls/google_kms_key_ring_import_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_key_ring_import_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'GCP location') gcp_name = input(:gcp_name, value: 'gcp_name', description: 'GCP Name') control 'google_kms_key_ring_import_job-1.0' do impact 1.0 title 'google_kms_key_ring_import_job resource test' describe google_kms_key_ring_import_job(project: gcp_project_id, location: gcp_location, name: gcp_name) do it { should exist } end describe google_kms_key_ring_import_job(project: gcp_project_id, location: 'nonexistent', name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_kms_key_ring_import_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_key_ring_import_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'GCP location') gcp_name = input(:gcp_name, value: 'gcp_name', description: 'GCP Name') control 'google_kms_key_ring_import_jobs-1.0' do impact 1.0 title 'google_kms_key_ring_import_jobs resource test' describe google_kms_key_ring_import_job(project: gcp_project_id, location: gcp_location) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_kms_key_rings.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_key_rings resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'GCP location') gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name, default: 'gcp_kms_key_ring_policy_name', description: 'Key ring name') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_kms_key_rings-1.0' do impact 1.0 title 'google_kms_key_rings resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_kms_key_rings(project: gcp_project_id, location: gcp_location) do its('key_ring_names'){ should include gcp_kms_key_ring_policy_name } end describe.one do google_kms_key_rings(project: gcp_project_id, location: gcp_location).key_ring_urls do |url| describe url do it { should match gcp_kms_key_ring_policy_name } end end end end ================================================ FILE: test/integration/verify/controls/google_kms_key_rings_handwritten.rb ================================================ title 'GCP KMS Key Rings Properties' gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name,default:'',description:'GCP key ring name to test against.') gcp_kms_key_ring_binding_member_name = attribute(:gcp_kms_key_ring_binding_member_name,default:'',description:'GCP key ring name to test against.') control 'gcp-key-rings-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure KMS key rings have the correct properties in bulk' describe google_kms_key_rings(project: gcp_project_id, location: gcp_location) do it { should exist } its ('key_ring_names') { should include gcp_kms_key_ring_policy_name } its ('key_ring_names') { should include gcp_kms_key_ring_binding_member_name } end end ================================================ FILE: test/integration/verify/controls/google_kms_location.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_location resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'GCP location') control 'google_kms_location-1.0' do impact 1.0 title 'google_kms_location resource test' describe google_kms_location(project: gcp_project_id, location: gcp_location) do it { should exist } end describe google_kms_location(project: gcp_project_id, location: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_kms_locations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_kms_locations resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = input(:gcp_location, value: 'gcp_location', description: 'GCP location') control 'google_kms_locations-1.0' do impact 1.0 title 'google_kms_locations resource test' describe google_kms_locations(project: gcp_project_id) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_lb_firewall_ip_ranges.rb ================================================ title 'Firewall Rule Properties' gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') control 'google-lb-internal-firewall-rule-ip-ranges-1.0' do impact 1.0 title 'Ensure that the Firewall Rule has been configured correctly with extra focus on expected IP ranges' describe google_compute_firewall(project: gcp_project_id, name: "vm-hc-inspec-gcp") do its('name') { should eq "vm-hc-inspec-gcp" } # For the currently in scope rule, SSH should not be allowed its('allowed_ssh?') { should be false } # For the currently in scope rule, HTTP should be allowed its('allowed_http?') { should be true } # equivalently to the above helpers it { should_not allow_port_protocol("22", "tcp") } it { should allow_port_protocol("80", "tcp") } # the rule direction - ingress/egress its('direction') { should eq "INGRESS" } # source IP range list for the rule e.g. these are hard-coded in the underlying terraform template # source_ranges = ["130.211.0.0/22", "35.191.0.0/16"] # using the expected property directly its('source_ranges') { should_not eq ["0.0.0.0/0"] } # using the IP range helpers # # ensure rule is not exposed to the world it { should_not allow_ip_ranges ["0.0.0.0/0"] } # test for single known range being present it { should allow_ip_ranges ["130.211.0.0/22"] } # test for two known ranges being present it { should allow_ip_ranges ["130.211.0.0/22","35.191.0.0/16"] } # stricter, enforce only those ip ranges are present it { should allow_ip_ranges_only ["130.211.0.0/22","35.191.0.0/16"] } # ensure partial match fails it { should_not allow_ip_ranges_only ["130.211.0.0/22"] } end end ================================================ FILE: test/integration/verify/controls/google_lb_firewall_source_target_tags.rb ================================================ title 'Firewall Rule Properties' gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') control 'google-lb-internal-firewall-rule-target-tags-1.0' do impact 1.0 title 'Ensure that the Firewall Rule has been configured correctly and has expected source and target tags' describe google_compute_firewall(project: gcp_project_id, name: "inspec-gcp-tag-test-fw") do its('name') { should eq "inspec-gcp-tag-test-fw" } # For the currently in scope rule, SSH should not be allowed its('allowed_ssh?') { should be false } # For the currently in scope rule, HTTP should not be allowed its('allowed_http?') { should be true } # equivalently to the above helpers it { should_not allow_port_protocol("22", "tcp") } it { should allow_port_protocol("80", "tcp") } # the rule direction - ingress/egress its('direction') { should eq "INGRESS" } # now let's specifically concentrate on source and target tags for this rule # here we know the following should be true: # source tags => ["allow-gcp-inspec-app-mig1"] # target tags => ["allow-gcp-inspec-app-mig2", "allow-gcp-inspec-app-mig3"] # allow single tag - other tags present it { should allow_target_tags ["allow-gcp-inspec-app-mig2"] } # allow only specified tagss it { should allow_target_tags_only ["allow-gcp-inspec-app-mig2","allow-gcp-inspec-app-mig3"] } # should not allow non-existing tag it { should_not allow_target_tags ["not-present"] } # similarly for source tags it { should_not allow_source_tags ["not-present"] } # allow specified tag - could be others present it { should allow_source_tags ["allow-gcp-inspec-app-mig1"] } # allow only specified tag it { should allow_source_tags_only ["allow-gcp-inspec-app-mig1"] } # not allow a non-existing tag it { should_not allow_source_tags_only ["allow-gcp-inspec-app-mig1","not_existing"] } end end ================================================ FILE: test/integration/verify/controls/google_logging_folder_exclusion.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_logging_folder_exclusion resource.' folder_exclusion = attribute('folder_exclusion', default: {"name"=>"inspec-folder-exclusion", "description"=>"My folder exclusion description", "filter"=>"resource.type = gce_instance AND severity <= DEBUG"}) gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_logging_folder_exclusion-1.0' do impact 1.0 title 'google_logging_folder_exclusion resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } # Getting folder exclusions is complicated due to the name being generated by the server. # This can be drastically simplified if you have the name when writing the test describe.one do google_resourcemanager_folders(parent: "organizations/#{gcp_organization_id}").names.each do |folder_name| # name on a folder is in the form `folders/12345` google_logging_folder_exclusions(folder: folder_name.split('/')[1]).names.each do |exclusion_name| describe google_logging_folder_exclusion(folder: folder_name.split('/')[1], name: exclusion_name) do its('name'){ should cmp folder_exclusion['name'] } its('description'){ should cmp folder_exclusion['description'] } its('filter'){ should cmp folder_exclusion['filter'] } end end end end end ================================================ FILE: test/integration/verify/controls/google_logging_folder_exclusions.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_logging_folder_exclusions resource.' folder_exclusion = attribute('folder_exclusion', default: {"name"=>"inspec-folder-exclusion", "description"=>"My folder exclusion description", "filter"=>"resource.type = gce_instance AND severity <= DEBUG"}) gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_logging_folder_exclusions-1.0' do impact 1.0 title 'google_logging_folder_exclusions resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } # Getting folder exclusions is complicated due to the name being generated by the server. # This can be drastically simplified if you have the name when writing the test describe.one do google_resourcemanager_folders(parent: "organizations/#{gcp_organization_id}").names.each do |name| # name on a folder is in the form `folders/12345` describe google_logging_folder_exclusions(folder: name.split('/')[1]) do its('names'){ should include folder_exclusion['name'] } its('descriptions'){ should include folder_exclusion['description'] } its('filters'){ should include folder_exclusion['filter'] } end end end end ================================================ FILE: test/integration/verify/controls/google_logging_folder_log_sink.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_logging_folder_log_sink resource.' folder_sink = attribute('folder_sink', default: {"name"=>"inspec-gcp-folder-sink", "filter"=>"resource.type = gce_instance AND severity >= ERROR"}) gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_logging_folder_log_sink-1.0' do impact 1.0 title 'google_logging_folder_log_sink resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } # Getting folder sinks is complicated due to the name being generated by the server. # This can be drastically simplified if you have the folder name when writing the test describe.one do google_resourcemanager_folders(parent: "organizations/#{gcp_organization_id}").names.each do |folder_name| # name on a folder is in the form `folders/12345` describe google_logging_folder_log_sink(folder: folder_name.split('/')[1], name: folder_sink['name']) do it { should exist } its('filter') { should cmp folder_sink['filter'] } end end end end ================================================ FILE: test/integration/verify/controls/google_logging_folder_log_sinks.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_logging_folder_log_sinks resource.' folder_sink = attribute('folder_sink', default: {"name"=>"inspec-gcp-folder-sink", "filter"=>"resource.type = gce_instance AND severity >= ERROR"}) gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_logging_folder_log_sinks-1.0' do impact 1.0 title 'google_logging_folder_log_sinks resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } # Getting folder sinks is complicated due to the name being generated by the server. # This can be drastically simplified if you have the folder name when writing the test describe.one do google_resourcemanager_folders(parent: "organizations/#{gcp_organization_id}").names.each do |folder_name| # name on a folder is in the form `folders/12345` describe google_logging_folder_log_sinks(folder: folder_name.split('/')[1]) do its('names') { should include folder_sink['name'] } its('filters') { should include folder_sink['filter'] } end end end end ================================================ FILE: test/integration/verify/controls/google_logging_organization_log_sink.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_logging_organization_log_sink resource.' org_sink = attribute('org_sink', default: {"name"=>"inspec-gcp-org-sink", "filter"=>"resource.type = gce_instance"}) gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_logging_organization_log_sink-1.0' do impact 1.0 title 'google_logging_organization_log_sink resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_logging_organization_log_sink(organization: gcp_organization_id, name: org_sink['name']) do it { should exist } its('filter') { should cmp org_sink['filter'] } end describe google_logging_organization_log_sink(organization: gcp_organization_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_logging_organization_log_sinks.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_logging_organization_log_sinks resource.' org_sink = attribute('org_sink', default: {"name"=>"inspec-gcp-org-sink", "filter"=>"resource.type = gce_instance"}) gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_logging_organization_log_sinks-1.0' do impact 1.0 title 'google_logging_organization_log_sinks resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_logging_organization_log_sinks(organization: gcp_organization_id) do its('names') { should include org_sink['name'] } end end ================================================ FILE: test/integration/verify/controls/google_logging_project_exclusion.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_logging_project_exclusion resource.' project_exclusion = attribute('project_exclusion', default: {"name"=>"inspec-project-exclusion", "description"=>"My project exclusion description", "filter"=>"resource.type = gce_instance AND severity <= DEBUG"}) gcp_project_id = attribute(:gcp_project_id, default: gcp_project_id, description: 'The project identifier') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_logging_project_exclusion-1.0' do impact 1.0 title 'google_logging_project_exclusion resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_logging_project_exclusion(project: gcp_project_id, name: project_exclusion['name']) do it { should exist } its('description'){ should cmp project_exclusion['description'] } its('filter'){ should cmp project_exclusion['filter'] } end describe google_logging_project_exclusion(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_logging_project_exclusions.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_logging_project_exclusions resource.' project_exclusion = attribute('project_exclusion', default: {"name"=>"inspec-project-exclusion", "description"=>"My project exclusion description", "filter"=>"resource.type = gce_instance AND severity <= DEBUG"}) gcp_project_id = attribute(:gcp_project_id, default: gcp_project_id, description: 'The project identifier') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_logging_project_exclusions-1.0' do impact 1.0 title 'google_logging_project_exclusions resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_logging_project_exclusions(project: gcp_project_id) do its('names'){ should include project_exclusion['name'] } end end ================================================ FILE: test/integration/verify/controls/google_logging_project_sink.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_logging_project_sink resource.' project_sink = attribute('project_sink', default: {"name"=>"inspec-gcp-org-sink", "filter"=>"resource.type = gce_instance AND severity = DEBUG"}) gcp_project_id = attribute(:gcp_project_id, default: gcp_project_id, description: 'The project id.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_logging_project_sink-1.0' do impact 1.0 title 'google_logging_project_sink resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_logging_project_sink(project: gcp_project_id, name: project_sink['name']) do it { should exist } its('filter') { should cmp project_sink['filter'] } end describe google_logging_project_sink(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_logging_project_sinks.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_logging_project_sinks resource.' project_sink = attribute('project_sink', default: {"name"=>"inspec-gcp-org-sink", "filter"=>"resource.type = gce_instance AND severity = DEBUG"}) gcp_project_id = attribute(:gcp_project_id, default: gcp_project_id, description: 'The project id.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_logging_project_sinks-1.0' do impact 1.0 title 'google_logging_project_sinks resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_logging_project_sinks(project: gcp_project_id) do its('names') { should include project_sink['name'] } end end ================================================ FILE: test/integration/verify/controls/google_memcache_instance.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_memcache_instance resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') memcache_instance = attribute('memcache_instance', default: { "name": "mem-instance" }, description: 'Memcache settings') control 'google_memcache_instance-1.0' do impact 1.0 title 'google_memcache_instance resource test' describe google_memcache_instance(project: gcp_project_id, region: gcp_location, name: memcache_instance['name']) do it { should exist } its('node_count') { should cmp 1 } end describe google_memcache_instance(project: gcp_project_id, region: gcp_location, name: "nonexistent") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_memcache_instances.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_memcache_instances resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') memcache_instance = attribute('memcache_instance', default: { "name": "mem-instance" }, description: 'Memcache settings') control 'google_memcache_instances-1.0' do impact 1.0 title 'google_memcache_instances resource test' describe google_memcache_instances(project: gcp_project_id, region: gcp_location) do its('count') { should be >= 1 } its('node_counts') { should include 1 } end end ================================================ FILE: test/integration/verify/controls/google_ml_engine_model.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_ml_engine_model resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') ml_model = attribute('ml_model', default: { "name": "ml_model", "region": "us-central1", "description": "My awesome ML model", "online_prediction_logging": true, "online_prediction_console_logging": true }, description: 'Machine learning model definition') control 'google_ml_engine_model-1.0' do impact 1.0 title 'google_ml_engine_model resource test' describe google_ml_engine_model(project: gcp_project_id, name: ml_model['name']) do it { should exist } its('description') { should cmp ml_model['description'] } its('regions') { should include ml_model['region'] } its('online_prediction_logging') { should cmp ml_model['online_prediction_logging'] } its('online_prediction_console_logging') { should cmp ml_model['online_prediction_console_logging'] } end describe google_ml_engine_model(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_ml_engine_models.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_ml_engine_models resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') ml_model = attribute('ml_model', default: { "name": "ml_model", "region": "us-central1", "description": "My awesome ML model", "online_prediction_logging": true, "online_prediction_console_logging": true }, description: 'Machine learning model definition') control 'google_ml_engine_models-1.0' do impact 1.0 title 'google_ml_engine_models resource test' describe google_ml_engine_models(project: gcp_project_id) do its('descriptions') { should include ml_model['description'] } its('online_prediction_loggings') { should include ml_model['online_prediction_logging'] } its('online_prediction_console_loggings') { should include ml_model['online_prediction_console_logging'] } end end ================================================ FILE: test/integration/verify/controls/google_monitoring_group.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_monitoring_group resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') group = input('group', value: { "name": "projects/ppradhan/groups/1973775459523949291", "display_name": "inspec-test-group", "parent_name": "projects/ppradhan", "filter": "resource.metadata.name = has_substring(\"inspec\")" }, description: 'group description') control 'google_monitoring_group-1.0' do impact 1.0 title 'google_monitoring_group resource test' describe google_monitoring_group(name: group['name']) do it { should exist } its('name') { should cmp group['name'] } its('display_name') { should cmp group['display_name'] } its('filter') { should cmp group['filter'] } end describe google_monitoring_group(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_monitoring_groups.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_monitoring_groups resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') group = input('group', value: { "name": "projects/ppradhan/groups/1973775459523949291", "display_name": "inspec-test-group", "parent_name": "projects/ppradhan", "filter": "resource.metadata.name = has_substring(\"inspec\")" }, description: 'group description') control 'google_monitoring_groups-1.0' do impact 1.0 title 'google_monitoring_groups resource test' describe google_monitoring_groups(name: group['name']) do it { should exist } its('names') { should include group['name'] } its('display_names') { should include group['display_name'] } its('filters') { should include group['filter'] } end end ================================================ FILE: test/integration/verify/controls/google_organization.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_organization resource.' gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_organization-1.0' do impact 1.0 title 'google_organization resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_organization(name: "organizations/#{gcp_organization_id}") do its('name') { should eq "organizations/#{gcp_organization_id}" } its('lifecycle_state') { should cmp 'ACTIVE' } end end ================================================ FILE: test/integration/verify/controls/google_organizations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_organizations resource.' gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_organizations-1.0' do impact 1.0 title 'google_organizations resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_organizations do its('names') { should include "organizations/#{gcp_organization_id}" } end end ================================================ FILE: test/integration/verify/controls/google_orgpolicy_folder_constraints.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_orgpolicy_folder_constraints resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') folder_constraint = input('folder_constraint', value: { "parent": "organizations/827482578277", "name": "organizations/827482578277/constraints/ainotebooks.accessMode", "displayName": "Disable Create Default Service Account (Cloud Build)", "description": "This boolean constraint, when enforced, prevents the legacy Cloud Build service account from being created.", "constraintDefault": "DENY", "listConstraint": { "supportsUnder": true } }, description: 'folder_constraint description') control 'google_orgpolicy_folder_constraints-1.0' do impact 1.0 title 'google_orgpolicy_folder_constraints resource test' describe google_orgpolicy_folder_constraints(parent: folder_constraint['parent']) do it { should exist } its('names') { should include folder_constraint['name']} its('display_names') { should include folder_constraint['displayName']} its('descriptions') { should include folder_constraint['description']} its('constraint_defaults') { should include folder_constraint['constraintDefault']} its('list_constraints.first.supports_under') { should be true } end end ================================================ FILE: test/integration/verify/controls/google_orgpolicy_folder_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_orgpolicy_folder_policies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') folder_policy = input('folder_policy', value: { "name": "dataproc.enforceComputeDefaultServiceAccountCheck", "parent": "organizations/827482578277" }, description: 'folder_policy description') control 'google_orgpolicy_folder_policies-1.0' do impact 1.0 title 'google_orgpolicy_folder_policies resource test' describe google_orgpolicy_folder_policies(parent: folder_policy['parent']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_orgpolicy_folder_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_orgpolicy_folder_policy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') folder_policy = input('folder_policy', value: { "name": "dataproc.enforceComputeDefaultServiceAccountCheck", "parent": "organizations/827482578277" }, description: 'folder_policy description') control 'google_orgpolicy_folder_policy-1.0' do impact 1.0 title 'google_orgpolicy_folder_policy resource test' describe google_orgpolicy_folder_policy(parent: folder_policy['parent'], name: folder_policy['name']) do it { should exist } its('name') { should cmp organization_policy['name'] } end describe google_orgpolicy_folder_policy(parent: folder_policy['parent'], name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_orgpolicy_organization_constraints.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_orgpolicy_organization_constraints resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') organization_constraint = input('organization_constraint', value: { "parent": "organizations/827482578277", "name": "organizations/827482578277/constraints/ainotebooks.accessMode", "displayName": "Disable Create Default Service Account (Cloud Build)", "description": "This boolean constraint, when enforced, prevents the legacy Cloud Build service account from being created.", "constraintDefault": "DENY", "listConstraint": { "supportsUnder": true } }, description: 'organization_constraint description') control 'google_orgpolicy_organization_constraints-1.0' do impact 1.0 title 'google_orgpolicy_organization_constraints resource test' describe google_orgpolicy_organization_constraints(parent: organization_constraint['parent']) do it { should exist } its('names') { should include organization_constraint['name']} its('display_names') { should include organization_constraint['displayName']} its('descriptions') { should include organization_constraint['description']} its('constraint_defaults') { should include organization_constraint['constraintDefault']} its('list_constraints.first.supports_under') { should be true } end end ================================================ FILE: test/integration/verify/controls/google_orgpolicy_organization_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_orgpolicy_organization_policies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') organization_policy = input('organization_policy', value: { "name": "dataproc.enforceComputeDefaultServiceAccountCheck", "parent": "organizations/827482578277" }, description: 'organization_policy description') control 'google_orgpolicy_organization_policies-1.0' do impact 1.0 title 'google_orgpolicy_organization_policies resource test' describe google_orgpolicy_organization_policies(parent: organization_policy['parent']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_orgpolicy_organization_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_orgpolicy_organization_policy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') organization_policy = input('organization_policy', value: { "name": "dataproc.enforceComputeDefaultServiceAccountCheck", "parent": "organizations/827482578277" }, description: 'organization_policy description') control 'google_orgpolicy_organization_policy-1.0' do impact 1.0 title 'google_orgpolicy_organization_policy resource test' describe google_orgpolicy_organization_policy(parent: organization_policy['parent'], name: organization_policy['name']) do it { should exist } its('name') { should cmp organization_policy['name'] } end describe google_orgpolicy_organization_policy(parent: organization_policy['parent'], name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_orgpolicy_project_constraints.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_orgpolicy_project_constraints resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') organization_constraint = input('organization_constraint', value: { "parent": "projects/ppradhan", "name": "projects/ppradhan/constraints/ainotebooks.accessMode", "displayName": "Disable Create Default Service Account (Cloud Build)", "description": "This boolean constraint, when enforced, prevents the legacy Cloud Build service account from being created.", "constraintDefault": "DENY", "listConstraint": { "supportsUnder": true }, description: 'project_constraint description') control 'google_orgpolicy_project_constraints-1.0' do impact 1.0 title 'google_orgpolicy_project_constraints resource test' describe google_orgpolicy_project_constraints(parent: organization_constraint['parent']) do it { should exist } its('names') { should include organization_constraint['name']} its('display_names') { should include organization_constraint['displayName']} its('descriptions') { should include organization_constraint['description']} its('constraint_defaults') { should include organization_constraint['constraintDefault']} its('list_constraints.first.supports_under') { should be nil} end end ================================================ FILE: test/integration/verify/controls/google_orgpolicy_project_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_orgpolicy_project_policies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_policy = input('project_policy', value: { "parent": "projects/583826338486", "name": "iam.allowServiceAccountCredentialLifetimeExtension" }, description: 'project_policy description') control 'google_orgpolicy_project_policies-1.0' do impact 1.0 title 'google_orgpolicy_project_policies resource test' describe google_orgpolicy_project_policies(parent: project_policy['parent']) do it { should exist } its('name'){ should cmp project_policy['name']} end end ================================================ FILE: test/integration/verify/controls/google_orgpolicy_project_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_orgpolicy_project_policy resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_policy = input('project_policy', value: { "parent": "projects/583826338486", "name": "iam.allowServiceAccountCredentialLifetimeExtension" }, description: 'project_policy description') control 'google_orgpolicy_project_policy-1.0' do impact 1.0 title 'google_orgpolicy_project_policy resource test' describe google_orgpolicy_project_policy(parent: project_policy['parent'],name: project_policy['name']) do it { should exist } its('name'){ should cmp project_policy['name']} end describe google_orgpolicy_project_policy(parent: project_policy['parent'],name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_project.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_project resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') control 'google_project-1.0' do impact 1.0 title 'google_project resource test' describe google_project(project: gcp_project_id) do it { should exist } its('project_id') { should cmp gcp_project_id } its('lifecycle_state') { should cmp 'ACTIVE' } end end ================================================ FILE: test/integration/verify/controls/google_project_alert_policies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_project_alert_policies resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') alert_policy = attribute('alert_policy', default: { "display_name": "Display", "combiner": "OR", "condition_display_name": "condition", "condition_filter": "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\"", "condition_duration": "60s", "condition_comparison": "COMPARISON_GT" }, description: 'Alert Policy description') control 'google_project_alert_policies-1.0' do impact 1.0 title 'google_project_alert_policies resource test' describe google_project_alert_policies(project: gcp_project_id) do it { should exist } its('policy_display_names') { should include alert_policy['display_name']} its('combiners') { should include alert_policy['combiner']} end end ================================================ FILE: test/integration/verify/controls/google_project_alert_policy.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_project_alert_policy resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') alert_policy = attribute('alert_policy', default: { "display_name": "Display", "combiner": "OR", "condition_display_name": "condition", "condition_filter": "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\"", "condition_duration": "60s", "condition_comparison": "COMPARISON_GT" }, description: 'Alert Policy description') control 'google_project_alert_policy-1.0' do impact 1.0 title 'google_project_alert_policy resource test' describe.one do google_project_alert_policies(project: gcp_project_id).policy_names do |policy_name| describe google_project_alert_policy(project: gcp_project_id, name: policy_name) do it { should exist } its('display_name') { should cmp alert_policy['display_name']} its('combiner') { should cmp alert_policy['combiner']} it { should be_enabled } end end end end ================================================ FILE: test/integration/verify/controls/google_project_iam_binding.rb ================================================ title 'Test single GCP project IAM Binding' gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-project-iam-binding-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure single GCP project IAM binding has the correct properties.' describe google_project_iam_binding(project: gcp_project_id, role: "roles/compute.admin") do it { should exist } its ('members.count'){ should be >= 1 } end end ================================================ FILE: test/integration/verify/controls/google_project_iam_custom_role.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_project_iam_custom_role resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_project_iam_custom_role_id = attribute(:gcp_project_iam_custom_role_id, default: 'gcp_project_iam_custom_role_id', description: 'The IAM custom role identifier.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_project_iam_custom_role-1.0' do impact 1.0 title 'google_project_iam_custom_role resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_project_iam_custom_role(project: gcp_project_id, name: gcp_project_iam_custom_role_id) do it { should exist } its('stage') { should eq 'GA' } its('included_permissions') { should eq ["iam.roles.list"] } end describe google_project_iam_custom_role(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_project_iam_custom_roles.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_project_iam_custom_roles resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_project_iam_custom_role_id = attribute(:gcp_project_iam_custom_role_id, default: 'gcp_project_iam_custom_role_id', description: 'The IAM custom role identifier.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_project_iam_custom_roles-1.0' do impact 1.0 title 'google_project_iam_custom_roles resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_project_iam_custom_roles(project: gcp_project_id) do its('names') { should include "projects/#{gcp_project_id}/roles/#{gcp_project_iam_custom_role_id}" } end end ================================================ FILE: test/integration/verify/controls/google_project_logging_audit_config.rb ================================================ title 'Test GCP project logging audit configuration' gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') control 'gcp-project-audit-logging-config-1.0' do impact 1.0 title 'Ensure GCP project logging audit configuration has the correct properties.' describe google_project_logging_audit_config(project: gcp_project_id) do its('default_types') { should_not match /notthere/ } its('default_exempted_members') { should_not match /notthere/ } end end ================================================ FILE: test/integration/verify/controls/google_project_metric.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_project_metric resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') logging_metric = attribute('logging_metric', default: { "name": "some/metric", "filter": "resource.type=gae_app AND severity>=ERROR", "metric_kind": "DELTA", "value_type": "INT64" }, description: 'Logging metric definition') control 'google_project_metric-1.0' do impact 1.0 title 'google_project_metric resource test' describe google_project_metric(project: gcp_project_id, name: logging_metric['name']) do it { should exist } its('filter') { should cmp logging_metric['filter'] } its('metric_descriptor.metric_kind') { should cmp logging_metric['metric_kind'] } its('metric_descriptor.value_type') { should cmp logging_metric['value_type'] } end describe google_project_metric(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_project_metrics.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_project_metrics resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') logging_metric = attribute('logging_metric', default: { "name": "some/metric", "filter": "resource.type=gae_app AND severity>=ERROR", "metric_kind": "DELTA", "value_type": "INT64" }, description: 'Logging metric definition') control 'google_project_metrics-1.0' do impact 1.0 title 'google_project_metrics resource test' describe google_project_metrics(project: gcp_project_id) do it { should exist } its('metric_filters') { should include logging_metric['filter'] } its('metric_names') { should include logging_metric['name'] } end describe.one do google_project_metrics(project: gcp_project_id).metric_types.each do |metric_type| describe metric_type do it { should match logging_metric['name'] } end end end end ================================================ FILE: test/integration/verify/controls/google_project_service.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_project_service resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') service = attribute('service', default: { "name": "maps-android-backend.googleapis.com" }, description: 'Service description') control 'google_project_service-1.0' do impact 1.0 title 'google_project_service resource test' describe google_project_service(project: gcp_project_id, name: service['name']) do it { should exist } its('state') { should cmp "ENABLED" } end end ================================================ FILE: test/integration/verify/controls/google_project_services.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_project_services resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') service = attribute('service', default: { "name": "maps-android-backend.googleapis.com" }, description: 'Service description') control 'google_project_services-1.0' do impact 1.0 title 'google_project_services resource test' describe.one do google_project_services(project: gcp_project_id).names.each do |name| describe name do it { should match service['name'] } end end end end ================================================ FILE: test/integration/verify/controls/google_projects.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_projects resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') control 'google_projects-1.0' do impact 1.0 title 'google_projects resource test' describe google_projects() do its('count') { should be >= 1 } its('project_ids') { should include gcp_project_id } its('lifecycle_states') { should include 'ACTIVE' } end end ================================================ FILE: test/integration/verify/controls/google_projects_firewalls_loop.rb ================================================ title 'Loop over all GCP Projects and look at firewalls in INGRESS direction' control 'gcp-projects-firewalls-loop-1.0' do impact 1.0 title 'Ensure INGRESS firewalls in all projects have the correct properties using google_compute_firewall for detail.' google_projects.project_ids.each do |project_name| google_compute_firewalls(project: project_name).where(firewall_direction: 'INGRESS').firewall_names.each do |firewall_name| describe google_compute_firewall(project: project_name, name: firewall_name) do it { should exist } its('direction') { should eq "INGRESS" } # below uncommented is the same as the example in the README # leaving out as some of the terraform resources have SSH open # its('allowed_ssh?') { should be false } end end end end ================================================ FILE: test/integration/verify/controls/google_pubsub_subscription.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_pubsub_subscription resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') subscription = attribute('subscription', default: {"name"=>"inspec-gcp-subscription", "ack_deadline_seconds"=>20}) control 'google_pubsub_subscription-1.0' do impact 1.0 title 'google_pubsub_subscription resource test' describe google_pubsub_subscription(project: gcp_project_id, name: subscription['name']) do it { should exist } end describe google_pubsub_subscription(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_pubsub_subscriptions.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_pubsub_subscriptions resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') subscription = attribute('subscription', default: {"name"=>"inspec-gcp-subscription", "ack_deadline_seconds"=>20}) control 'google_pubsub_subscriptions-1.0' do impact 1.0 title 'google_pubsub_subscriptions resource test' describe google_pubsub_subscriptions(project: gcp_project_id) do its('count') { should be >= 1 } end google_pubsub_subscriptions(project: gcp_project_id).names.each do |subscription_name| describe google_pubsub_subscription(project: gcp_project_id, name: subscription_name) do it { should exist } end end end ================================================ FILE: test/integration/verify/controls/google_pubsub_topic.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_pubsub_topic resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') topic = attribute('topic', default: {"name"=>"inspec-gcp-topic"}) control 'google_pubsub_topic-1.0' do impact 1.0 title 'google_pubsub_topic resource test' describe google_pubsub_topic(project: gcp_project_id, name: topic['name']) do it { should exist } end describe google_pubsub_topic(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_pubsub_topics.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_pubsub_topics resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') topic = attribute('topic', default: {"name"=>"inspec-gcp-topic"}) control 'google_pubsub_topics-1.0' do impact 1.0 title 'google_pubsub_topics resource test' describe google_pubsub_topics(project: gcp_project_id) do it { should exist } its('names') { should include topic['name'] } its('count') { should be >=1 } end describe.one do google_pubsub_topics(project: gcp_project_id).names.each do |topic_name| describe google_pubsub_topic(project: gcp_project_id, name: topic_name) do it { should exist } end end end end ================================================ FILE: test/integration/verify/controls/google_redis_instance.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_redis_instance resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') redis = attribute('redis', default: {"name"=>"my-redis-cache", "tier"=>"STANDARD_HA", "memory_size_gb"=>1, "region"=>"us-central1", "location_id"=>"us-central1-a", "alternative_location_id"=>"us-central1-f", "redis_version"=>"REDIS_3_2", "display_name"=>"InSpec test instance", "reserved_ip_range"=>"192.168.0.0/29", "label_key"=>"key", "label_value"=>"value"}) control 'google_redis_instance-1.0' do impact 1.0 title 'google_redis_instance resource test' describe google_redis_instance(project: gcp_project_id, region: redis['region'], name: redis['name']) do it { should exist } its('tier') { should cmp redis['tier'] } its('memory_size_gb') { should cmp redis['memory_size_gb'] } its('alternative_location_id') { should cmp redis['alternative_location_id'] } its('redis_version') { should cmp redis['redis_version'] } its('display_name') { should cmp redis['display_name'] } its('reserved_ip_range') { should cmp redis['reserved_ip_range'] } its('labels') { should include(redis['label_key'] => redis['label_value']) } end describe google_redis_instance(project: gcp_project_id, region: redis['region'], name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_redis_instances.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_redis_instances resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') redis = attribute('redis', default: {"name"=>"my-redis-cache", "tier"=>"STANDARD_HA", "memory_size_gb"=>1, "region"=>"us-central1", "location_id"=>"us-central1-a", "alternative_location_id"=>"us-central1-f", "redis_version"=>"REDIS_3_2", "display_name"=>"InSpec test instance", "reserved_ip_range"=>"192.168.0.0/29", "label_key"=>"key", "label_value"=>"value"}) control 'google_redis_instances-1.0' do impact 1.0 title 'google_redis_instances resource test' describe google_redis_instances(project: gcp_project_id, region: redis['region']) do its('tiers') { should include redis['tier'] } its('memory_size_gbs') { should include redis['memory_size_gb'] } its('alternative_location_ids') { should include redis['alternative_location_id'] } its('redis_versions') { should include redis['redis_version'] } its('display_names') { should include redis['display_name'] } its('reserved_ip_ranges') { should include redis['reserved_ip_range'] } end end ================================================ FILE: test/integration/verify/controls/google_resourcemanager_folder.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_resourcemanager_folder resource.' folder = attribute('folder', default: {"display_name"=>"inspec-gcp-folder"}) gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_resourcemanager_folder-1.0' do impact 1.0 title 'google_resourcemanager_folder resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe.one do google_resourcemanager_folders(parent: "organizations/#{gcp_organization_id}").names.each do |name| describe google_resourcemanager_folder(name: name) do it { should exist } its('display_name') { should eq folder['display_name'] } end end end end ================================================ FILE: test/integration/verify/controls/google_resourcemanager_folders.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_resourcemanager_folders resource.' folder = attribute('folder', default: {"display_name"=>"inspec-gcp-folder"}) gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_resourcemanager_folders-1.0' do impact 1.0 title 'google_resourcemanager_folders resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe.one do google_resourcemanager_folders(parent: "organizations/#{gcp_organization_id}").display_names.each do |display_name| describe display_name do it { should eq folder['display_name'] } end end end end ================================================ FILE: test/integration/verify/controls/google_run_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_run_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') job = input('job', value: { "name": "projects/ppradhan/locations/us-central1/jobs/inspec-tutorial1-20230915-182543", "parent": "projects/ppradhan/locations/us-central1", "uid": "605bd3e1-4bf0-4a9d-85ea-23eae08f51dc", "generation": "1", "create_time": "2024-10-10T13:34:58.675033Z", "client": "cloud-console", "update_time": "value_updatetime", "delete_time": "value_deletetime", "expire_time": "value_expiretime", "creator": "value_creator", "last_modifier": "value_lastmodifier", "client_version": "value_clientversion", "launch_stage": "GA", "observed_generation": "1", "start_execution_token": "value_startexecutiontoken", "run_execution_token": "value_runexecutiontoken", "etag": "value_etag" }, description: 'job description') control 'google_run_job-1.0' do impact 1.0 title 'google_run_job resource test' describe google_run_job(name: job['name']) do it { should exist } its('name') { should cmp job['name'] } its('uid') { should cmp job['uid'] } its('generation') { should cmp job['generation'] } its('create_time') { should cmp job['create_time'] } its('update_time') { should cmp job['update_time'] } its('delete_time') { should cmp job['delete_time'] } its('expire_time') { should cmp job['expire_time'] } its('creator') { should cmp job['creator'] } its('last_modifier') { should cmp job['last_modifier'] } its('client') { should cmp job['client'] } its('client_version') { should cmp job['client_version'] } its('launch_stage') { should cmp job['launch_stage'] } its('observed_generation') { should cmp job['observed_generation'] } its('start_execution_token') { should cmp job['start_execution_token'] } its('run_execution_token') { should cmp job['run_execution_token'] } its('etag') { should cmp job['etag'] } end describe google_run_job(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_run_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_run_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') job = input('job', value: { "name": "projects/ppradhan/locations/us-central1/jobs/inspec-tutorial1-20230915-182543", "parent": "projects/ppradhan/locations/us-central1", "uid": "605bd3e1-4bf0-4a9d-85ea-23eae08f51dc", "generation": "1", "create_time": "2024-10-10T13:34:58.675033Z", "client": "cloud-console", "update_time": "value_updatetime", "delete_time": "value_deletetime", "expire_time": "value_expiretime", "creator": "value_creator", "last_modifier": "value_lastmodifier", "client_version": "value_clientversion", "launch_stage": "GA", "observed_generation": "1", "start_execution_token": "value_startexecutiontoken", "run_execution_token": "value_runexecutiontoken", "etag": "value_etag" }, description: 'job description') control 'google_run_jobs-1.0' do impact 1.0 title 'google_run_jobs resource test' describe google_run_jobs(parent: job['parent']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_run_service.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_run_service resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') service = input('service', value: { "name": "projects/ppradhan/locations/us-central1/services/inspec-function-1", "parent": "projects/ppradhan/locations/us-central1", "uri": "https://inspec-function-1-a6zd2ygfca-uc.a.run.app", "generation": "1", "createTime": "2024-07-22T10:31:56.322132Z", "updateTime": "2024-07-22T10:31:56.322132Z", "creator": "service-165434197229@gcf-admin-robot.iam.gserviceaccount.com", "ingress": "INGRESS_TRAFFIC_ALL" }, description: 'service description') control 'google_run_service-1.0' do impact 1.0 title 'google_run_service resource test' describe google_run_service(name: service['name']) do it { should exist } its('name') { should cmp service['name'] } its('uri') { should cmp service['uri'] } its('generation') { should cmp service['generation'] } its('create_time') { should cmp service['createTime'] } its('update_time') { should cmp service['updateTime'] } its('creator') { should cmp service['creator'] } its('ingress') { should cmp service['ingress'] } end describe google_run_service(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_run_services.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_run_services resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') service = input('service', value: { "name": "projects/ppradhan/locations/us-central1/services/inspec-function-1", "parent": "projects/ppradhan/locations/us-central1", "uri": "https://inspec-function-1-a6zd2ygfca-uc.a.run.app", "generation": "1", "createTime": "2024-07-22T10:31:56.322132Z", "updateTime": "2024-07-22T10:31:56.322132Z", "creator": "service-165434197229@gcf-admin-robot.iam.gserviceaccount.com", "ingress": "INGRESS_TRAFFIC_ALL" }, description: 'service description') control 'google_run_services-1.0' do impact 1.0 title 'google_run_services resource test' describe google_run_services(parent: service['parent']) do it { should exist } its('names') { should include service['name'] } its('uris') { should include service['uri'] } its('generations') { should include service['generation'] } its('create_times') { should include service['createTime'] } its('update_times') { should include service['updateTime'] } its('creators') { should include service['creator'] } its('ingresses') { should include service['ingress'] } end end ================================================ FILE: test/integration/verify/controls/google_runtime_config_config.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_runtime_config_config resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') runtimeconfig_config = attribute('runtimeconfig_config', default: {"name"=>"inspec-gcp-runtime-config", "description"=>"My runtime configurations"}) control 'google_runtime_config_config-1.0' do impact 1.0 title 'google_runtime_config_config resource test' describe google_runtime_config_config(project: gcp_project_id, name: runtimeconfig_config['name']) do it { should exist } its('description') { should cmp runtimeconfig_config['description'] } end describe google_runtime_config_config(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_runtime_config_configs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_runtime_config_configs resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') runtimeconfig_config = attribute('runtimeconfig_config', default: {"name"=>"inspec-gcp-runtime-config", "description"=>"My runtime configurations"}) control 'google_runtime_config_configs-1.0' do impact 1.0 title 'google_runtime_config_configs resource test' describe google_runtime_config_configs(project: gcp_project_id) do its('descriptions') { should include runtimeconfig_config['description'] } end end ================================================ FILE: test/integration/verify/controls/google_runtime_config_variable.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_runtime_config_variable resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') runtimeconfig_config = attribute('runtimeconfig_config', default: {"name"=>"inspec-gcp-runtime-config", "description"=>"My runtime configurations"}) runtimeconfig_variable = attribute('runtimeconfig_variable', default: {"name"=>"prod-variables/hostname", "text"=>"example.com"}) control 'google_runtime_config_variable-1.0' do impact 1.0 title 'google_runtime_config_variable resource test' describe google_runtime_config_variable(project: gcp_project_id, config: runtimeconfig_config['name'], name: runtimeconfig_variable['name']) do it { should exist } its('text') { should cmp runtimeconfig_variable['text'] } end describe google_runtime_config_variable(project: gcp_project_id, config: runtimeconfig_config['name'], name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_runtime_config_variables.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_runtime_config_variables resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') runtimeconfig_config = attribute('runtimeconfig_config', default: {"name"=>"inspec-gcp-runtime-config", "description"=>"My runtime configurations"}) runtimeconfig_variable = attribute('runtimeconfig_variable', default: {"name"=>"prod-variables/hostname", "text"=>"example.com"}) control 'google_runtime_config_variables-1.0' do impact 1.0 title 'google_runtime_config_variables resource test' describe google_runtime_config_variables(project: gcp_project_id, config: runtimeconfig_config['name']) do its('texts') { should include runtimeconfig_variable['text'] } end end ================================================ FILE: test/integration/verify/controls/google_secret_manager_secret.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_secret_manager_secret resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_secret = input('project_secret', value: { "name": "projects/ppradhan/secrets/inspec-gcp-secret", "parent": "projects/ppradhan", }, description: 'project_secret description') control 'google_secret_manager_secret-1.0' do impact 1.0 title 'google_secret_manager_secret resource test' describe google_secret_manager_secret(name: project_secret['name']) do it { should exist } end describe google_secret_manager_secret(name: "does_not_exit") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_secret_manager_secrets.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_secret_manager_secrets resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_secret = input('project_secret', value: { "name": "projects/ppradhan/secrets/inspec-gcp-secret", "parent": "projects/ppradhan", }, description: 'project_secret description') control 'google_secret_manager_secrets-1.0' do impact 1.0 title 'google_secret_manager_secrets resource test' describe google_secret_manager_secrets(parent: project_secret['parent']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_service_account.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_service_account resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The IAM service account display name.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_service_account-1.0' do impact 1.0 title 'google_service_account resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_service_account(project: gcp_project_id, name: "#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com") do it { should exist } its('display_name') { should cmp gcp_service_account_display_name } end describe google_service_account(project: gcp_project_id, name: "nonexistent@#{gcp_project_id}.iam.gserviceaccount.com") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_service_account_key.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_service_account_key resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The IAM service account display name.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_service_account_key-1.0' do impact 1.0 title 'google_service_account_key resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } google_service_account_keys(project: gcp_project_id, service_account: "#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com").key_names.each do |sa_key_name| describe google_service_account_key(project: gcp_project_id, service_account: "#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com", name: sa_key_name.split('/').last) do it { should exist } its('key_type') { should_not cmp 'USER_MANAGED' } end end end ================================================ FILE: test/integration/verify/controls/google_service_account_keys.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_service_account_keys resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The IAM service account display name.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_service_account_keys-1.0' do impact 1.0 title 'google_service_account_keys resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_service_account_keys(project: gcp_project_id, service_account: "#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com") do its('count') { should be <= 1000 } its('key_types') { should_not include 'USER_MANAGED' } end end ================================================ FILE: test/integration/verify/controls/google_service_accounts.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_service_accounts resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The IAM service account display name.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_service_accounts-1.0' do impact 1.0 title 'google_service_accounts resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_service_accounts(project: gcp_project_id, name: "#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com") do its('service_account_emails') { should include "#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com" } its('count') { should be <= 1000 } end end ================================================ FILE: test/integration/verify/controls/google_service_networking_service_connections.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_service_networking_service_connections resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') service_connection = input('service_connection', value: { "parent": "services/servicenetworking.googleapis.com", "network": "projects/ppradhan/global/networks/inspec-network" }, description: 'service_connection description') control 'google_service_networking_service_connections-1.0' do impact 1.0 title 'google_service_networking_service_connections resource test' describe google_servicenetworking_service_connections(parent: service_connection['parent'],service_connection['network']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_sourcerepo_repositories.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sourcerepo_repositories resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') repository = attribute('repository', default: { "name": "inspec-gcp-repository" }, description: 'Source Repository definition') control 'google_sourcerepo_repositories-1.0' do impact 1.0 title 'google_sourcerepo_repositories resource test' repo_name = repository['name'] describe.one do google_sourcerepo_repositories(project: gcp_project_id).names.each do |name| describe name do it { should match /\/repos\/#{repo_name}$/ } end end end end ================================================ FILE: test/integration/verify/controls/google_sourcerepo_repository.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sourcerepo_repository resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') repository = attribute('repository', default: { "name": "inspec-gcp-repository" }, description: 'Source Repository definition') control 'google_sourcerepo_repository-1.0' do impact 1.0 title 'google_sourcerepo_repository resource test' describe google_sourcerepo_repository(project: gcp_project_id, name: repository['name']) do it { should exist } end describe google_sourcerepo_repository(project: gcp_project_id, name: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_spanner_database.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_spanner_database resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') spannerdatabase = attribute('spannerdatabase', default: { "name": "spdatabase", "instance": "spinstance", "ddl": "CREATE TABLE test (test STRING(MAX),) PRIMARY KEY (test)" }, description: 'Cloud Spanner definition') control 'google_spanner_database-1.0' do impact 1.0 title 'google_spanner_database resource test' describe google_spanner_database(project: gcp_project_id, instance: spannerdatabase['instance'], name: spannerdatabase['name']) do it { should exist } its('name') { should match spannerdatabase['name'] } end end ================================================ FILE: test/integration/verify/controls/google_spanner_databases.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_spanner_databases resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') spannerdatabase = attribute('spannerdatabase', default: { "name": "spdatabase", "instance": "spinstance", "ddl": "CREATE TABLE test (test STRING(MAX),) PRIMARY KEY (test)" }, description: 'Cloud Spanner definition') control 'google_spanner_databases-1.0' do impact 1.0 title 'google_spanner_databases resource test' describe.one do google_spanner_databases(project: gcp_project_id, instance: spannerdatabase['instance']).names.each do |name| describe name do it { should match spannerdatabase['name'] } end end end end ================================================ FILE: test/integration/verify/controls/google_spanner_instance.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_spanner_instance resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') spannerinstance = attribute('spannerinstance', default: { "config": "regional-us-east1", "name": "spinstance", "display_name": "inspectest", "num_nodes": 1, "label_key": "env", "label_value": "test" }, description: 'Cloud Spanner definition') control 'google_spanner_instance-1.0' do impact 1.0 title 'google_spanner_instance resource test' describe google_spanner_instance(project: gcp_project_id, name: spannerinstance['name'], config: spannerinstance['config']) do it { should exist } its('config') { should match spannerinstance['config'] } its('name') { should match spannerinstance['name'] } its('display_name') { should eq spannerinstance['display_name'] } its('node_count') { should eq spannerinstance['num_nodes'] } its('labels') { should include(spannerinstance['label_key'] => spannerinstance['label_value']) } end end ================================================ FILE: test/integration/verify/controls/google_spanner_instance_iam_policy.rb ================================================ title 'Test GCP google_spanner_instance_iam_policy resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') spannerinstance = attribute('spannerinstance', default: { "config": "regional-us-east1", "name": "spinstance", "display_name": "inspectest", "num_nodes": 1, "label_key": "env", "label_value": "test" }, description: 'Cloud Spanner definition') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default:'', description: 'Service account display name.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_spanner_instance_iam_policy-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'google_spanner_instance_iam_policy resource test' describe.one do google_spanner_instance_iam_policy(project: gcp_project_id, name: spannerinstance['name']).bindings.each do |binding| describe binding do its('role') { should eq "roles/editor" } its('members') { should include "serviceAccount:#{gcp_service_account_display_name}-sp@#{gcp_project_id}.iam.gserviceaccount.com" } end end end end ================================================ FILE: test/integration/verify/controls/google_spanner_instances.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_spanner_instances resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') spannerinstance = attribute('spannerinstance', default: { "config": "regional-us-east1", "name": "spinstance", "display_name": "inspectest", "num_nodes": 1, "label_key": "env", "label_value": "test" }, description: 'Cloud Spanner definition') control 'google_spanner_instances-1.0' do impact 1.0 title 'google_spanner_instances resource test' describe.one do google_spanner_instances(project: gcp_project_id, config: spannerinstance['config']).configs.each do |config| describe config do it { should match spannerinstance['config'] } end end end end ================================================ FILE: test/integration/verify/controls/google_sql_connect.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_connect resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') sql_connect = attribute('sql_connect', default: { "region": "us-central1", "database_version": "POSTGRES_13", "backend_type": "SECOND_GEN", "cert_serial_number": 0, "common_name": "C=US,O=Google\\, Inc,CN=Google Cloud SQL Server CA,dnQualifier=68c79386-b63e-4998-8254-ba59729cdf78", "instance": "test-pg" }, description: 'Sql connect settings about a Cloud SQL instance') control 'google_sql_connect-1.0' do impact 1.0 title 'google_sql_connect resource test' describe google_sql_connect(project: gcp_project_id, instance: sql_connect['instance'], name: 'test') do it { should exist } its('region') { should include sql_connect['region'] } its('database_version') { should include sql_connect['database_version'] } its('backend_type') { should include sql_connect['backend_type'] } end end ================================================ FILE: test/integration/verify/controls/google_sql_database.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_database resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') gcp_db_name = attribute(:gcp_db_name, default: 'gcp_db_name', description: 'Database instance name.') control 'google_sql_database-1.0' do impact 1.0 title 'google_sql_database resource test' describe google_sql_database(project: gcp_project_id, instance: gcp_db_instance_name, name: gcp_db_name) do it { should exist } its('name') { should eq gcp_db_name } its('instance') { should eq gcp_db_instance_name } end end ================================================ FILE: test/integration/verify/controls/google_sql_database_instance.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_database_instance resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') control 'google_sql_database_instance-1.0' do impact 1.0 title 'google_sql_database_instance resource test' describe google_sql_database_instance(project: gcp_project_id, database: gcp_db_instance_name) do it { should exist } its('settings.activation_policy') { should eq 'ALWAYS' } its('settings.data_disk_size_gb') { should eq "10" } its('settings.data_disk_type') { should eq "PD_SSD"} its('settings.kind') { should eq "sql#settings"} its('settings.pricing_plan') { should eq "PER_USE"} its('settings.replication_type') { should eq "SYNCHRONOUS"} its('settings.storage_auto_resize') { should eq true} its('settings.storage_auto_resize_limit') { should eq "0"} its('settings.tier') { should eq 'db-custom-2-8192' } its('state') { should eq 'RUNNABLE' } its('backend_type') { should eq 'SECOND_GEN' } its('database_version') { should eq 'MYSQL_8_0_26' } end end ================================================ FILE: test/integration/verify/controls/google_sql_database_instances.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_database_instances resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') control 'google_sql_database_instances-1.0' do impact 1.0 title 'google_sql_database_instances resource test' describe google_sql_database_instances(project: gcp_project_id) do its('instance_states') { should include 'RUNNABLE' } its('instance_names') { should include gcp_db_instance_name } end end ================================================ FILE: test/integration/verify/controls/google_sql_databases.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_databases resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') gcp_db_name = attribute(:gcp_db_name, default: 'gcp_db_name', description: 'Database instance name.') control 'google_sql_databases-1.0' do impact 1.0 title 'google_sql_databases resource test' describe google_sql_databases(project: gcp_project_id, instance: gcp_db_instance_name) do it { should exist } its('names') { should include gcp_db_name } its('instances') { should include gcp_db_instance_name } end end ================================================ FILE: test/integration/verify/controls/google_sql_flags.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_flags resource.' sql_database_flag = attribute('sql_database_flag', default: { "name": "audit_log", "type": "STRING", "applies_to": "MYSQL_5_6", "allowed_string_values": true, "requires_restart": true }, description: 'Database flags for Cloud SQL instances') control 'google_sql_flags-1.0' do impact 1.0 title 'google_sql_flags resource test' describe google_sql_flags do its('names') { should include , sql_database_flag['name'] } its('types') { should include , sql_database_flag['type'] } its('applies_tos.first') { should include , sql_database_flag['applies_to'] } its('allowed_string_values.first') { should include , sql_database_flag['allowed_string_values'] } its('requires_restarts') { should include , sql_database_flag['requires_restart'] } end end ================================================ FILE: test/integration/verify/controls/google_sql_operation.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_operation resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') sql_operation = attribute('sql_operation', default: { "name": "e5c522f1-8391-4830-a8ff-ff1cc4a7b2a5", "status": "DONE", "operation_type": "CREATE" }, description: 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.') control 'google_sql_operation-1.0' do impact 1.0 title 'google_sql_operation resource test' describe google_sql_operation(project: gcp_project_id, operation: sql_operation['name']) do it { should exist } its('name') { should eq sql_operation['name'] } its('status') { should eq sql_operation['status'] } its('operation_type') { should eq sql_operation['operation_type'] } end describe google_sql_operation(project: gcp_project_id, operation: 'nonexistant') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_sql_operations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_operations resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') sql_operation = attribute('sql_operation', default: { "name": "e5c522f1-8391-4830-a8ff-ff1cc4a7b2a5", "status": "DONE", "operation_type": "CREATE" }, description: 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.') control 'google_sql_operations-1.0' do impact 1.0 title 'google_sql_operations resource test' describe google_sql_operations(project: gcp_project_id, instance: gcp_db_instance_name) do it { should exist } its('names') { should include sql_operation['name'] } its('statuses') { should include sql_operation['status'] } its('operation_types') { should include sql_operation['operation_type'] } end end ================================================ FILE: test/integration/verify/controls/google_sql_ssl_cert.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_ssl_cert resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') sql_connect = attribute('sql_connect', default: { "region": "us-central1", "database_version": "POSTGRES_13", "backend_type": "SECOND_GEN", "cert_serial_number": 0, "common_name": "C=US,O=Google\\, Inc,CN=Google Cloud SQL Server CA,dnQualifier=68c79386-b63e-4998-8254-ba59729cdf78", "sha1_fingerprint": "80c5c611c0a591db967c7dda3467e23127288fed", "instance": "test-pg" }, description: 'Sql connect settings about a Cloud SQL instance') control 'google_sql_ssl_cert-1.0' do impact 1.0 title 'google_sql_ssl_cert resource test' describe google_sql_ssl_cert(project: gcp_project_id, instance: sql_connect['instance'], sha1_fingerprint: sql_connect['sha1_fingerprint']) do it { should exist } its('instance') { should eq sql_connect['instance'] } its('common_name') { should eq sql_connect['common_name'] } its('sha1_fingerprint') { should eq sql_connect['sha1_fingerprint'] } end describe google_sql_ssl_cert(project: gcp_project_id, instance: 'nonexistent', sha1_fingerprint: sql_connect['sha1_fingerprint']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_sql_ssl_certs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_ssl_certs resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') sql_connect = attribute('sql_connect', default: { "region": "us-central1", "database_version": "POSTGRES_13", "backend_type": "SECOND_GEN", "cert_serial_number": 0, "common_name": "C=US,O=Google\\, Inc,CN=Google Cloud SQL Server CA,dnQualifier=68c79386-b63e-4998-8254-ba59729cdf78", "sha1_fingerprint": "80c5c611c0a591db967c7dda3467e23127288fed", "instance": "test-pg" }, description: 'Sql connect settings about a Cloud SQL instance') control 'google_sql_ssl_certs-1.0' do impact 1.0 title 'google_sql_ssl_certs resource test' describe google_sql_ssl_certs(project: gcp_project_id, instance: sql_connect['instance']) do it { should exist } its('instances') { should include sql_connect['instance'] } its('common_names') { should include sql_connect['common_name'] } its('sha1_fingerprints') { should include sql_connect['sha1_fingerprint'] } end describe google_sql_ssl_certs(project: gcp_project_id, instance: 'nonexistent') do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_sql_user.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_user resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') gcp_db_user_name = attribute(:gcp_db_user_name, default: 'gcp_db_user_name', description: 'SQL database user name.') control 'google_sql_user-1.0' do impact 1.0 title 'google_sql_user resource test' describe google_sql_user(project: gcp_project_id, database: gcp_db_instance_name, name: gcp_db_user_name, host: "example.com") do it { should exist } its('name') { should cmp gcp_db_user_name } its('instance') { should cmp gcp_db_instance_name } end describe google_sql_user(project: gcp_project_id, database: gcp_db_instance_name, name: "nonexistent", host: "example.com") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_sql_users.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_sql_users resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') gcp_db_user_name = attribute(:gcp_db_user_name, default: 'gcp_db_user_name', description: 'SQL database user name.') control 'google_sql_users-1.0' do impact 1.0 title 'google_sql_users resource test' describe google_sql_users(project: gcp_project_id, database: gcp_db_instance_name) do its('user_names') { should include gcp_db_user_name } end end ================================================ FILE: test/integration/verify/controls/google_storage_bucket.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_storage_bucket resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'GCP location') control 'google_storage_bucket-1.0' do impact 1.0 title 'google_storage_bucket resource test' describe google_storage_bucket(name: "inspec-gcp-static-#{gcp_project_id}") do it { should exist } its('location') { should cmp gcp_location.upcase } its('storage_class') { should eq "STANDARD" } its('labels') { should include("key" => "value") } its('retention_policy.retention_period') { should cmp 1000 } end describe google_storage_bucket(name: "nonexistent") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_storage_bucket_acl.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_storage_bucket_acl resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_storage_bucket_acl = attribute(:gcp_storage_bucket_acl, default: 'gcp_storage_bucket_acl', description: 'The name of the storage bucket with ACLs attached') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The name of the service account assigned permissions') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_storage_bucket_acl-1.0' do impact 1.0 title 'google_storage_bucket_acl resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_storage_bucket_acl(bucket: gcp_storage_bucket_acl, entity: "user-#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com") do it { should exist } its('role') { should cmp "OWNER" } its('bucket') { should eq gcp_storage_bucket_acl } its('email') { should include "#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com" } end describe google_storage_bucket_acl(bucket: gcp_storage_bucket_acl, entity: "allUsers") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_storage_bucket_iam_binding.rb ================================================ title 'Test single GCP storage bucket IAM binding' gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') gcp_storage_bucket_binding = attribute(:gcp_storage_bucket_binding, default: '', description: 'The GCP bucket with IAM binding.') gcp_storage_bucket_member = attribute(:gcp_storage_bucket_member, default: '', description: 'The GCP bucket with IAM member.') gcp_storage_bucket_policy = attribute(:gcp_storage_bucket_policy, default: '', description: 'The GCP bucket with IAM policy.') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default:'', description: 'Service account display name.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-storage-bucket-iam-binding-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure storage bucket IAM binding has the correct properties.' describe google_storage_bucket_iam_binding(bucket: gcp_storage_bucket_binding, role: 'roles/storage.objectViewer') do it { should exist } its ('members.count'){ should eq 1 } # i.e. our service account # below is brittle, could extract service account email from tf in the future... its('members') {should include "serviceAccount:#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com" } end describe google_storage_bucket_iam_binding(bucket: gcp_storage_bucket_member, role: 'roles/storage.objectViewer') do it { should exist } its ('members.count'){ should eq 1 } # i.e. our service account # below is brittle, could extract service account email from tf in the future... its('members') {should include "serviceAccount:#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com" } end describe google_storage_bucket_iam_binding(bucket: gcp_storage_bucket_policy, role: 'roles/storage.admin') do it { should exist } its ('members.count'){ should eq 1 } # i.e. our service account # below is brittle, could extract service account email from tf in the future... its('members') {should include "serviceAccount:#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com" } end end ================================================ FILE: test/integration/verify/controls/google_storage_bucket_object.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_storage_bucket_object resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_storage_bucket_object = attribute(:gcp_storage_bucket_object, default: 'gcp_storage_bucket_object', description: 'The name of the storage bucket with an object') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The name of the service account assigned permissions') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') gcp_storage_bucket_object_name = attribute(:gcp_storage_bucket_object_name, default: 'gcp_storage_bucket_object_name', description: 'The name of the object') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_storage_bucket_object-1.0' do impact 1.0 title 'google_storage_bucket_object resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_storage_bucket_object(bucket: gcp_storage_bucket_object, object: gcp_storage_bucket_object_name) do it { should exist } its('size.to_i') { should be > 0 } its('time_created') { should be > Time.now - 60*60*24*10 } its('time_updated') { should be > Time.now - 60*60*24*10 } end describe google_storage_bucket_object(bucket: gcp_storage_bucket_object, object: "nonexistent") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_storage_bucket_object_handwritten.rb ================================================ title 'Storage Bucket Object Properties' gcp_storage_bucket_object = attribute(:gcp_storage_bucket_object, default: '', description: 'The GCP bucket with objects.') gcp_storage_bucket_object_name = attribute(:gcp_storage_bucket_object_name, default: '', description: 'The GCP bucket object name.') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-storage-bucket-object-1.0' do only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure that the Storage Bucket Object has been created correctly' describe google_storage_bucket_object(bucket: gcp_storage_bucket_object, object: gcp_storage_bucket_object_name) do it { should exist } its('name') { should eq gcp_storage_bucket_object_name } its('size') { should be > 0 } its('content_type') { should eq "text/plain; charset=utf-8" } its('time_created') { should be > Time.now - 365*60*60*24*10 } its('time_updated') { should be > Time.now - 365*60*60*24*10 } end end ================================================ FILE: test/integration/verify/controls/google_storage_bucket_objects.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_storage_bucket_objects resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_storage_bucket_object = attribute(:gcp_storage_bucket_object, default: 'gcp_storage_bucket_object', description: 'The name of the storage bucket with an object') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The name of the service account assigned permissions') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') gcp_storage_bucket_object_name = attribute(:gcp_storage_bucket_object_name, default: 'gcp_storage_bucket_object_name', description: 'The name of the object') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_storage_bucket_objects-1.0' do impact 1.0 title 'google_storage_bucket_objects resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_storage_bucket_objects(bucket: gcp_storage_bucket_object) do its('object_names') { should include gcp_storage_bucket_object_name } its('count') { should be <= 10 } end end ================================================ FILE: test/integration/verify/controls/google_storage_buckets.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_storage_buckets resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'GCP location') control 'google_storage_buckets-1.0' do impact 1.0 title 'google_storage_buckets resource test' describe google_storage_buckets(project: gcp_project_id) do its('bucket_names') { should include "inspec-gcp-static-#{gcp_project_id}" } end end ================================================ FILE: test/integration/verify/controls/google_storage_default_object_acl.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_storage_default_object_acl resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_storage_bucket_name = attribute(:gcp_storage_bucket_name, default: 'gcp_storage_bucket_name', description: 'The name of the storage bucket with the default object ACL') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The name of the service account assigned permissions') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_storage_default_object_acl-1.0' do impact 1.0 title 'google_storage_default_object_acl resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_storage_default_object_acl(bucket: gcp_storage_bucket_name, entity: "user-#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com") do it { should exist } its('role') { should cmp "OWNER" } its('bucket') { should eq gcp_storage_bucket_name } its('email') { should include "#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com" } end describe google_storage_default_object_acl(bucket: gcp_storage_bucket_name, entity: "allUsers") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_storage_object_acl.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_storage_object_acl resource.' gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') gcp_storage_bucket_object = attribute(:gcp_storage_bucket_object, default: 'gcp_storage_bucket_object', description: 'The name of the storage bucket with ACLs attached') gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The name of the service account assigned permissions') gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') gcp_storage_bucket_object_name = attribute(:gcp_storage_bucket_object_name, default: 'gcp_storage_bucket_object_name', description: 'The name of the object with ACLs') gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') control 'google_storage_object_acl-1.0' do impact 1.0 title 'google_storage_object_acl resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_storage_object_acl(bucket: gcp_storage_bucket_object, object: gcp_storage_bucket_object_name, entity: "user-#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com") do it { should exist } its('role') { should cmp "OWNER" } its('bucket') { should eq gcp_storage_bucket_object } its('email') { should include "#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com" } end describe google_storage_object_acl(bucket: gcp_storage_bucket_object, object: gcp_storage_bucket_object_name, entity: "allUsers") do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_batch_prediction_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_batch_prediction_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') batch_prediction_job = input('batch_prediction_job', value: { "name": "5035574482811486208", "region": "us-central1", "parent": "value_parent", "create_time": "2023-09-15T11:46:26.533131Z", "model_version_id": "1", "end_time": "2023-09-15T11:59:58.296734Z", "start_time": "2023-09-15T11:48:37.092389Z", "update_time": "value_updatetime", "state": "JOB_STATE_SUCCEEDED", "model": "projects/165431197229/locations/us-central1/models/3496242467164913664", "display_name": "testpreded", "service_account": "value_serviceaccount" }, description: 'batch_prediction_job description') control 'google_vertex_ai_batch_prediction_job-1.0' do impact 1.0 title 'google_vertex_ai_batch_prediction_job resource test' describe google_vertex_ai_batch_prediction_job(name: "projects/#{gcp_project_id}/locations/#{batch_prediction_job['region']}/batchPredictionJobs/#{batch_prediction_job['name']}", region: batch_prediction_job['region']) do it { should exist } its('create_time') { should cmp batch_prediction_job['create_time'] } its('model_version_id') { should cmp batch_prediction_job['model_version_id'] } its('end_time') { should cmp batch_prediction_job['end_time'] } its('start_time') { should cmp batch_prediction_job['start_time'] } its('state') { should cmp batch_prediction_job['state'] } its('model') { should cmp batch_prediction_job['model'] } its('display_name') { should cmp batch_prediction_job['display_name'] } end describe google_vertex_ai_batch_prediction_job(name: "does_not_exit", region: batch_prediction_job['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_batch_prediction_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_batch_prediction_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') batch_prediction_job = input('batch_prediction_job', value: { "name": "value_name", "region": "us-central1", "parent": "value_parent", "create_time": "value_createtime", "model_version_id": "value_modelversionid", "end_time": "value_endtime", "start_time": "value_starttime", "update_time": "value_updatetime", "state": "value_state", "model": "value_model", "display_name": "value_displayname", "service_account": "value_serviceaccount" }, description: 'batch_prediction_job description') control 'google_vertex_ai_batch_prediction_jobs-1.0' do impact 1.0 title 'google_vertex_ai_batch_prediction_jobs resource test' describe google_vertex_ai_batch_prediction_jobs(parent: "projects/#{gcp_project_id}/locations/#{batch_prediction_job['region']}", region: batch_prediction_job['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_custom_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_custom_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') custom_job = input('custom_job', value: { "name": "value_name", "job_id": "job_id", "region": "value_region", "parent": "value_parent" }, description: 'custom_job description') control 'google_vertex_ai_custom_job-1.0' do impact 1.0 title 'google_vertex_ai_custom_job resource test' describe google_vertex_ai_custom_job(name: "projects/#{gcp_project_id}/locations/#{custom_job['region']}/customJobs/#{custom_job['job_id']}", region: custom_job['region']) do it { should exist } its('display_name') { should cmp custom_job['name'] } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_custom_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_custom_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') custom_job = input('custom_job', value: { "name": "value_name", "job_id": "job_id", "region": "value_region", "parent": "value_parent" }, description: 'custom_job description') control 'google_vertex_ai_custom_jobs-1.0' do impact 1.0 title 'google_vertex_ai_custom_jobs resource test' describe google_vertex_ai_custom_jobs(name: "projects/#{gcp_project_id}/locations/#{custom_job['region']}", region: custom_job['region']) do it { should exist } its ('display_names') { should include custom_job['name']} end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_dataset.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_dataset resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dataset = input('dataset', value: { "dataset_id": "inspec_gcp_dataset", "friendly_name": "A BigQuery dataset test", "description": "Test BigQuery dataset description", "location": "EU", "default_table_expiration_ms": 3600000, "access_writer_role": "WRITER", "access_writer_special_group": "projectWriters" }, description: 'dataset description') control 'google_vertex_ai_dataset-1.0' do impact 1.0 title 'google_vertex_ai_dataset resource test' describe google_vertex_ai_dataset(name: dataset['name'], region: dataset['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_dataset_data_item_annotations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_dataset_data_item_annotations resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dataset_data_item_annotation = input('dataset_data_item_annotation', value: { "name": "1746031646898913280", "region": "us-central1", "dataset": "1044994542735982592", "dataItem": "75173735366921", "parent": "projects/165434197229/locations/us-central1/datasets/1044994542735982592/dataItems/75173735366921/annotations/", }, description: 'dataset_data_item_annotation description') control 'google_vertex_ai_dataset_data_item_annotations-1.0' do impact 1.0 title 'google_vertex_ai_dataset_data_item_annotations resource test' describe google_vertex_ai_dataset_data_item_annotations(parent: "projects/#{gcp_project_id}/locations/#{dataset_data_item_annotation['region']}/datasets/#{dataset_data_item_annotation['dataset']}/dataItems/#{dataset_data_item_annotation['dataItem']}", region: dataset_data_item_annotation['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_datasets.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_datasets resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') dataset = input('dataset', value: { "dataset_id": "inspec_gcp_dataset", "friendly_name": "A BigQuery dataset test", "description": "Test BigQuery dataset description", "location": "EU", "default_table_expiration_ms": 3600000, "access_writer_role": "WRITER", "access_writer_special_group": "projectWriters" }, description: 'dataset description') control 'google_vertex_ai_datasets-1.0' do impact 1.0 title 'google_vertex_ai_datasets resource test' describe google_vertex_ai_dataset(parent: dataset['parent'], region: dataset['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_datasets_annotation_spec.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_datasets_annotation_spec resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') datasets_annotation_spec = input('datasets_annotation_spec', value: { "name": "5438527833485869056", "parent": "projects/165434197229/locations/us-central1/datasets/1044994542735982592/annotationSpecs/", "dataset": "1044994542735982592", "region": "us-central1", "display_name": "InSpec", "etag": "value_etag", "create_time": "value_createtime", "update_time": "value_updatetime" }, description: 'datasets_annotation_spec description') control 'google_vertex_ai_datasets_annotation_spec-1.0' do impact 1.0 title 'google_vertex_ai_datasets_annotation_spec resource test' describe google_vertex_ai_datasets_annotation_spec(name: "projects/#{gcp_project_id}/locations/#{datasets_annotation_spec['region']}/datasets/#{datasets_annotation_spec['dataset']}/annotationSpecs/#{datasets_annotation_spec['name']}", region: datasets_annotation_spec['region']) do it { should exist } its('display_name') { should cmp datasets_annotation_spec['display_name'] } its('name') { should cmp datasets_annotation_spec['name'] } its('etag') { should cmp datasets_annotation_spec['etag'] } its('create_time') { should cmp datasets_annotation_spec['create_time'] } its('update_time') { should cmp datasets_annotation_spec['update_time'] } end describe google_vertex_ai_datasets_annotation_spec(name: "does_not_exit", region: datasets_annotation_spec['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_datasets_data_items.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_datasets_data_items resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') datasets_data_item = input('datasets_data_item', value: { "parent": "value_parent", "region": "us-central1", "update_time": "value_updatetime", "etag": "value_etag", "name": "value", "create_time": "value_createtime", "dataset": "871737898477551616" }, description: 'datasets_data_item description') control 'google_vertex_ai_datasets_data_items-1.0' do impact 1.0 title 'google_vertex_ai_datasets_data_items resource test' describe google_vertex_ai_datasets_data_items(parent: "projects/#{gcp_project_id}/locations/#{datasets_data_item['region']}/datasets/#{datasets_data_item['dataset']}", region: datasets_data_item['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_datasets_saved_queries.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_datasets_saved_queries resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') datasets_saved_query = input('datasets_saved_query', value: { "parent": "projects/165434197229/locations/us-central1/datasets/1044994542735982592/savedQueries/", "region": "us-central1", "dataset": "1044994542735982592", "update_time": "value_updatetime", "problem_type": "value_problemtype", "name": "2236927819407949824", "create_time": "value_createtime", "etag": "value_etag", "display_name": "inspec-annotation-test", "annotation_filter": "value_annotationfilter" }, description: 'datasets_saved_query description') control 'google_vertex_ai_datasets_saved_queries-1.0' do impact 1.0 title 'google_vertex_ai_datasets_saved_queries resource test' describe google_vertex_ai_datasets_saved_queries(parent: "projects/#{gcp_project_id}/locations/#{datasets_saved_query['region']}/datasets/#{datasets_saved_query['dataset']}", region: datasets_saved_query['region']) do it { should exist } its('names') { should include datasets_saved_query['parent']+ datasets_saved_query['name']} its('display_names'){ should include datasets_saved_query['display_name']} end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_endpoint.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_endpoint resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') endpoint = input('endpoint', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "update_time": "value_updatetime", "model_deployment_monitoring_job": "value_modeldeploymentmonitoringjob", "description": "value_description", "network": "value_network", "display_name": "value_displayname", "etag": "value_etag", "create_time": "value_createtime" }, description: 'endpoint description') control 'google_vertex_ai_endpoint-1.0' do impact 1.0 title 'google_vertex_ai_endpoint resource test' describe google_vertex_ai_endpoint(name: "projects/#{gcp_project_id}/locations/#{endpoint['region']}/endpoints/#{endpoint['name']}", region: endpoint['region']) do it { should exist } its('update_time') { should cmp endpoint['update_time'] } its('model_deployment_monitoring_job') { should cmp endpoint['model_deployment_monitoring_job'] } its('description') { should cmp endpoint['description'] } its('network') { should cmp endpoint['network'] } its('display_name') { should cmp endpoint['display_name'] } its('etag') { should cmp endpoint['etag'] } its('create_time') { should cmp endpoint['create_time'] } its('name') { should cmp endpoint['name'] } end describe google_vertex_ai_endpoint(name: "does_not_exit", region: endpoint['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_endpoints.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_endpoints resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') endpoint = input('endpoint', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "update_time": "value_updatetime", "model_deployment_monitoring_job": "value_modeldeploymentmonitoringjob", "description": "value_description", "network": "value_network", "display_name": "value_displayname", "etag": "value_etag", "create_time": "value_createtime" }, description: 'endpoint description') control 'google_vertex_ai_endpoints-1.0' do impact 1.0 title 'google_vertex_ai_endpoints resource test' describe google_vertex_ai_endpoints(parent: "projects/#{gcp_project_id}/locations/#{endpoint['region']}", region: endpoint['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_featurestore.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_featurestore resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') featurestore = input('featurestore', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "state": "value_state", "create_time": "value_createtime", "etag": "value_etag", "update_time": "value_updatetime" }, description: 'featurestore description') control 'google_vertex_ai_featurestore-1.0' do impact 1.0 title 'google_vertex_ai_featurestore resource test' describe google_vertex_ai_featurestore(name: "projects/#{gcp_project_id}/locations/#{featurestore['region']}/featurestores/#{featurestore['name']}", region: featurestore['region']) do it { should exist } its('state') { should cmp featurestore['state'] } its('create_time') { should cmp featurestore['create_time'] } its('etag') { should cmp featurestore['etag'] } its('update_time') { should cmp featurestore['update_time'] } its('name') { should cmp featurestore['name'] } end describe google_vertex_ai_featurestore(name: "does_not_exit", region: featurestore['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_featurestore_entity_type_feature.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_featurestore_entity_type_feature resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') featurestore_entity_type_feature = input('featurestore_entity_type_feature', value: { "entityType": "entity_type_1", "region": "us-central1", "description": "true", "value_type": "BOOL", "etag": "AMEw9yPfyvUh079MW1h0I-rYtVk6aTxzOIr490RcrO6sz3wVrh239BhOrhH0TBNci9Uo", "update_time": "2023-09-14T07:44:10.341724Z", "featurestore": "feature_store_1" }, description: 'featurestore_entity_type_feature description') control 'google_vertex_ai_featurestore_entity_type_feature-1.0' do impact 1.0 title 'google_vertex_ai_featurestore_entity_type_feature resource test' describe google_vertex_ai_featurestore_entity_type_feature(name: "projects/#{gcp_project_id}/locations/#{featurestore_entity_type_feature['region']}/featurestores/#{featurestore_entity_type_feature['featurestore']}/entityTypes/#{featurestore_entity_type_feature['entityType']}", region: featurestore_entity_type_feature['region']) do it { should exist } its('etag') { should cmp featurestore_entity_type_feature['etag'] } its('name') { should cmp "projects/165434197229/locations/us-central1/featurestores/feature_store_1/entityTypes/entity_type_1" } end describe google_vertex_ai_featurestore_entity_type_feature(name: "does_not_exit", region: featurestore_entity_type_feature['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_featurestore_entity_type_features.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_featurestore_entity_type_features resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') featurestore_entity_type_feature = input('featurestore_entity_type_feature', value: { "entityType": "entity_type_1", "region": "us-central1", "description": "value_description", "create_time": "2023-09-14T07:42:36.438713Z", "etag": "AMEw9yPMYJMlc3n6zzbc0vVMquWBrXyW-qjvfoHwzRQVGwFT3LU75lZIahPMBkYQlHzZ", "update_time": "2023-09-14T07:42:36.438714Z", "featurestore": "feature_store_1", "value_type":"BOOL", }, description: 'featurestore_entity_type_feature description') control 'google_vertex_ai_featurestore_entity_type_features-1.0' do impact 1.0 title 'google_vertex_ai_featurestore_entity_type_features resource test' describe google_vertex_ai_featurestore_entity_type_features(parent: "projects/#{gcp_project_id}/locations/#{featurestore_entity_type_feature['region']}/featurestores/#{featurestore_entity_type_feature['featurestore']}/entityTypes/#{featurestore_entity_type_feature['entityType']}", region: featurestore_entity_type_feature['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_featurestores.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_featurestores resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') featurestore = input('featurestore', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "state": "value_state", "create_time": "value_createtime", "etag": "value_etag", "update_time": "value_updatetime" }, description: 'featurestore description') control 'google_vertex_ai_featurestores-1.0' do impact 1.0 title 'google_vertex_ai_featurestores resource test' describe google_vertex_ai_featurestores(parent: "projects/#{gcp_project_id}/locations/#{featurestore['region']}", region: featurestore['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_featurestores_entity_type.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_featurestores_entity_type resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') featurestores_entity_type = input('featurestores_entity_type', value: { "name": "entity_type_1", "region": "us-central1", "description": "value_description", "create_time": "2023-09-14T07:42:36.438713Z", "etag": "AMEw9yPMYJMlc3n6zzbc0vVMquWBrXyW-qjvfoHwzRQVGwFT3LU75lZIahPMBkYQlHzZ", "update_time": "2023-09-14T07:42:36.438714Z", "featurestore": "feature_store_1" }, description: 'featurestores_entity_type description') control 'google_vertex_ai_featurestores_entity_type-1.0' do impact 1.0 title 'google_vertex_ai_featurestores_entity_type resource test' describe google_vertex_ai_featurestores_entity_type(name: "projects/#{gcp_project_id}/locations/#{featurestores_entity_type['region']}/featurestores/#{featurestores_entity_type['featurestore']}/entityTypes/#{featurestores_entity_type['name']}", region: featurestores_entity_type['region']) do it { should exist } its('monitoring_config.snapshot_analysis.disabled') { should cmp true } its('monitoring_config.snapshot_analysis.staleness_days') { should cmp 21 } its('monitoring_config.numerical_threshold_config.value') { should cmp 0.3 } its('monitoring_config.categorical_threshold_config.value') { should cmp 0.3 } its('create_time') { should cmp featurestores_entity_type['create_time'] } its('etag') { should cmp featurestores_entity_type['etag'] } its('update_time') { should cmp featurestores_entity_type['update_time'] } end describe google_vertex_ai_featurestores_entity_type(name: "does_not_exit", region: featurestores_entity_type['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_featurestores_entity_types.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_featurestores_entity_types resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') featurestores_entity_type = input('featurestores_entity_type', value: { "name": "entity_type_1", "region": "us-central1", "parent": "value_parent", "description": "value_description", "create_time": "2023-09-14T07:42:36.438713Z", "etag": "AMEw9yOTGVIBT_QQ17nzZOq_p46_Xnjm2ZnaYi__v3FPk_Ofs9zb_qoKYnz3CALlXqzV", "update_time": "2023-09-14T07:42:36.438714Z", "featurestore": "feature_store_1" }, description: 'featurestores_entity_type description') control 'google_vertex_ai_featurestores_entity_types-1.0' do impact 1.0 title 'google_vertex_ai_featurestores_entity_types resource test' describe google_vertex_ai_featurestores_entity_types(parent: "projects/#{gcp_project_id}/locations/#{featurestores_entity_type['region']}/featurestores/#{featurestores_entity_type['featurestore']}", region: featurestores_entity_type['region']) do it { should exist } end end google_vertex_ai_featurestores_entity_types(parent: "projects/#{gcp_project_id}/locations/#{featurestores_entity_type['region']}/featurestores/gcp_feature_store_1", region: featurestores_entity_type['region']) ================================================ FILE: test/integration/verify/controls/google_vertex_ai_hyperparameter_tuning_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_hyperparameter_tuning_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') hyperparameter_tuning_job = input('hyperparameter_tuning_job', value: { "name": "9200900561803673600", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/hyperparameterTuningJobs/", "state": "JOB_STATE_RUNNING", "end_time": "value_endtime", "update_time": "value_updatetime", "start_time": "value_starttime", "create_time": "value_createtime", "display_name": "inspec-hyper-test-hyperparameter-tuning-job" }, description: 'hyperparameter_tuning_job description') control 'google_vertex_ai_hyperparameter_tuning_job-1.0' do impact 1.0 title 'google_vertex_ai_hyperparameter_tuning_job resource test' describe google_vertex_ai_hyperparameter_tuning_job(name: "projects/#{gcp_project_id}/locations/#{hyperparameter_tuning_job['region']}/hyperparameterTuningJobs/#{hyperparameter_tuning_job['name']}", region: hyperparameter_tuning_job['region']) do it { should exist } its('state') { should cmp hyperparameter_tuning_job['state'] } its('end_time') { should cmp hyperparameter_tuning_job['end_time'] } its('update_time') { should cmp hyperparameter_tuning_job['update_time'] } its('start_time') { should cmp hyperparameter_tuning_job['start_time'] } its('create_time') { should cmp hyperparameter_tuning_job['create_time'] } its('display_name') { should cmp hyperparameter_tuning_job['display_name'] } its('name') { should cmp hyperparameter_tuning_job['name'] } end describe google_vertex_ai_hyperparameter_tuning_job(name: "does_not_exit", region: hyperparameter_tuning_job['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_hyperparameter_tuning_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_hyperparameter_tuning_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') hyperparameter_tuning_job = input('hyperparameter_tuning_job', value: { "name": "9200900561803673600", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/hyperparameterTuningJobs/", "state": "JOB_STATE_RUNNING", "end_time": "value_endtime", "update_time": "value_updatetime", "start_time": "value_starttime", "create_time": "value_createtime", "display_name": "inspec-hyper-test-hyperparameter-tuning-job" }, description: 'hyperparameter_tuning_job description') control 'google_vertex_ai_hyperparameter_tuning_jobs-1.0' do impact 1.0 title 'google_vertex_ai_hyperparameter_tuning_jobs resource test' describe google_vertex_ai_hyperparameter_tuning_jobs(parent: "projects/#{gcp_project_id}/locations/#{hyperparameter_tuning_job['region']}", region: hyperparameter_tuning_job['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_index.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_index resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') index = input('index', value: { "name": "6386095475518341120", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/indexes/", "description": "value_description", "display_name": "test-index", "metadata_schema_uri": "value_metadataschemauri", "index_update_method": "value_indexupdatemethod", "update_time": "value_updatetime", "create_time": "value_createtime", "etag": "value_etag" }, description: 'index description') control 'google_vertex_ai_index-1.0' do impact 1.0 title 'google_vertex_ai_index resource test' describe google_vertex_ai_index(name: "projects/#{gcp_project_id}/locations/#{index['region']}/indexes/#{index['name']}", region: index['region']) do it { should exist } its('description') { should cmp index['description'] } its('name') { should cmp index['name'] } its('display_name') { should cmp index['display_name'] } its('metadata_schema_uri') { should cmp index['metadata_schema_uri'] } its('index_update_method') { should cmp index['index_update_method'] } its('update_time') { should cmp index['update_time'] } its('create_time') { should cmp index['create_time'] } its('etag') { should cmp index['etag'] } end describe google_vertex_ai_index(name: "does_not_exit", region: index['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_index_endpoint.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_index_endpoint resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') index_endpoint = input('index_endpoint', value: { "name": "7761100736749895680", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/index-endpoints/", "display_name": "inspec-index-endpoint", "create_time": "value_createtime", "network": "value_network", "update_time": "value_updatetime", "public_endpoint_domain_name": "value_publicendpointdomainname", "etag": "value_etag", "description": "value_description" }, description: 'index_endpoint description') control 'google_vertex_ai_index_endpoint-1.0' do impact 1.0 title 'google_vertex_ai_index_endpoint resource test' describe google_vertex_ai_index_endpoint(name: "projects/#{gcp_project_id}/locations/#{index_endpoint['region']}/indexEndpoints/#{index_endpoint['name']}", region: index_endpoint['region']) do it { should exist } its('display_name') { should cmp index_endpoint['display_name'] } its('create_time') { should cmp index_endpoint['create_time'] } its('name') { should cmp index_endpoint['name'] } its('network') { should cmp index_endpoint['network'] } its('update_time') { should cmp index_endpoint['update_time'] } its('public_endpoint_domain_name') { should cmp index_endpoint['public_endpoint_domain_name'] } its('etag') { should cmp index_endpoint['etag'] } its('description') { should cmp index_endpoint['description'] } end describe google_vertex_ai_index_endpoint(name: "does_not_exit", region: index_endpoint['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_index_endpoints.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_index_endpoints resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') index_endpoint = input('index_endpoint', value: { "name": "7761100736749895680", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/index-endpoints/", "display_name": "inspec-index-endpoint", "create_time": "value_createtime", "network": "value_network", "update_time": "value_updatetime", "public_endpoint_domain_name": "value_publicendpointdomainname", "etag": "value_etag", "description": "value_description" }, description: 'index_endpoint description') control 'google_vertex_ai_index_endpoints-1.0' do impact 1.0 title 'google_vertex_ai_index_endpoints resource test' describe google_vertex_ai_index_endpoints(parent: "projects/#{gcp_project_id}/locations/#{index_endpoint['region']}", region: index_endpoint['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_indices.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_indices resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') index = input('index', value: { "name": "6386095475518341120", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/indexes/", "description": "value_description", "display_name": "test-index", "metadata_schema_uri": "value_metadataschemauri", "index_update_method": "value_indexupdatemethod", "update_time": "value_updatetime", "create_time": "value_createtime", "etag": "value_etag" }, description: 'index description') control 'google_vertex_ai_indices-1.0' do impact 1.0 title 'google_vertex_ai_indices resource test' describe google_vertex_ai_indices(parent: "projects/#{gcp_project_id}/locations/#{index['region']}", region: index['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_metadata_store.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_metadata_store resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') metadata_store = input('metadata_store', value: { "name": "default", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/metadataStores/", "description": "value_description", "create_time": "value_createtime", "update_time": "value_updatetime" }, description: 'metadata_store description') control 'google_vertex_ai_metadata_store-1.0' do impact 1.0 title 'google_vertex_ai_metadata_store resource test' describe google_vertex_ai_metadata_store(name: "projects/#{gcp_project_id}/locations/#{metadata_store['region']}/metadataStores/#{metadata_store['name']}", region: metadata_store['region']) do it { should exist } its('description') { should cmp metadata_store['description'] } its('create_time') { should cmp metadata_store['create_time'] } its('update_time') { should cmp metadata_store['update_time'] } its('name') { should cmp metadata_store['name'] } end describe google_vertex_ai_metadata_store(name: "does_not_exit", region: metadata_store['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_metadata_stores.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_metadata_stores resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') metadata_store = input('metadata_store', value: { "name": "default", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/metadataStores/", "description": "value_description", "create_time": "value_createtime", "update_time": "value_updatetime" }, description: 'metadata_store description') control 'google_vertex_ai_metadata_stores-1.0' do impact 1.0 title 'google_vertex_ai_metadata_stores resource test' describe google_vertex_ai_metadata_stores(parent: "projects/#{gcp_project_id}/locations/#{metadata_store['region']}", region: metadata_store['region']) do it { should exist } its('names') { should include metadata_store['name']} end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_metadata_stores_artifact.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_metadata_stores_artifact resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') metadata_stores_artifact = input('metadata_stores_artifact', value: { "name": "2811503570633325756", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/metadataStores/default/artifacts/", "schema_version": "value_schemaversion", "display_name": "batchpredictionjob", "metadataStore": "default", "etag": "value_etag", "update_time": "value_updatetime", "state": "value_state", "uri": "value_uri", "create_time": "value_createtime", "schema_title": "value_schematitle", "description": "value_description" }, description: 'metadata_stores_artifact description') control 'google_vertex_ai_metadata_stores_artifact-1.0' do impact 1.0 title 'google_vertex_ai_metadata_stores_artifact resource test' describe google_vertex_ai_metadata_stores_artifact(name: "projects/#{gcp_project_id}/locations/#{metadata_stores_artifact['region']}/metadataStores/#{metadata_stores_artifact['metadataStore']}/artifacts/#{metadata_stores_artifact['name']}", region: metadata_stores_artifact['region']) do it { should exist } its('schema_version') { should cmp metadata_stores_artifact['schema_version'] } its('display_name') { should cmp metadata_stores_artifact['display_name'] } its('etag') { should cmp metadata_stores_artifact['etag'] } its('name') { should cmp metadata_stores_artifact['name'] } its('update_time') { should cmp metadata_stores_artifact['update_time'] } its('state') { should cmp metadata_stores_artifact['state'] } its('uri') { should cmp metadata_stores_artifact['uri'] } its('create_time') { should cmp metadata_stores_artifact['create_time'] } its('schema_title') { should cmp metadata_stores_artifact['schema_title'] } its('description') { should cmp metadata_stores_artifact['description'] } end describe google_vertex_ai_metadata_stores_artifact(name: "does_not_exit", region: metadata_stores_artifact['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_metadata_stores_artifacts.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_metadata_stores_artifacts resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') metadata_stores_artifact = input('metadata_stores_artifact', value: { "name": "2811503570633325756", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/metadataStores/default/artifacts/", "schema_version": "value_schemaversion", "display_name": "batchpredictionjob", "metadataStore": "default", "etag": "value_etag", "update_time": "value_updatetime", "state": "value_state", "uri": "value_uri", "create_time": "value_createtime", "schema_title": "value_schematitle", "description": "value_description" }, description: 'metadata_stores_artifact description') control 'google_vertex_ai_metadata_stores_artifacts-1.0' do impact 1.0 title 'google_vertex_ai_metadata_stores_artifacts resource test' describe google_vertex_ai_metadata_stores_artifacts(parent: "projects/#{gcp_project_id}/locations/#{metadata_stores_artifact['region']}/metadataStores/#{metadata_stores_artifact['metadataStore']}", region: metadata_stores_artifact['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_metadata_stores_context.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_metadata_stores_context resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') metadata_stores_context = input('metadata_stores_context', value: { "name": "autologging-experiment-w0apl7la-autologging-tf-experiment-w0apl7la", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/metadataStores/default/contexts/", "metadataStore": "default", "schema_title": "system.ExperimentRun", "etag": "value_etag", "description": "value_description", "display_name": "autologging-tf-experiment-w0apl7la", "schema_version": "value_schemaversion", "create_time": "value_createtime", "update_time": "value_updatetime" }, description: 'metadata_stores_context description') control 'google_vertex_ai_metadata_stores_context-1.0' do impact 1.0 title 'google_vertex_ai_metadata_stores_context resource test' describe google_vertex_ai_metadata_stores_context(name: "projects/#{gcp_project_id}/locations/#{metadata_stores_context['region']}/metadataStores/#{metadata_stores_context['metadataStore']}/contexts/#{metadata_stores_context['name']}", region: metadata_stores_context['region']) do it { should exist } its('name') { should cmp metadata_stores_context['name'] } its('schema_title') { should cmp metadata_stores_context['schema_title'] } its('etag') { should cmp metadata_stores_context['etag'] } its('description') { should cmp metadata_stores_context['description'] } its('display_name') { should cmp metadata_stores_context['display_name'] } its('schema_version') { should cmp metadata_stores_context['schema_version'] } its('create_time') { should cmp metadata_stores_context['create_time'] } its('update_time') { should cmp metadata_stores_context['update_time'] } end describe google_vertex_ai_metadata_stores_context(name: "does_not_exit", region: metadata_stores_context['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_metadata_stores_contexts.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_metadata_stores_contexts resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') metadata_stores_context = input('metadata_stores_context', value: { "name": "autologging-experiment-w0apl7la-autologging-tf-experiment-w0apl7la", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/metadataStores/default/contexts/", "metadataStore": "default", "schema_title": "system.ExperimentRun", "etag": "value_etag", "description": "value_description", "display_name": "autologging-tf-experiment-w0apl7la", "schema_version": "value_schemaversion", "create_time": "value_createtime", "update_time": "value_updatetime" }, description: 'metadata_stores_context description') control 'google_vertex_ai_metadata_stores_contexts-1.0' do impact 1.0 title 'google_vertex_ai_metadata_stores_contexts resource test' describe google_vertex_ai_metadata_stores_contexts(parent: "projects/#{gcp_project_id}/locations/#{metadata_stores_context['region']}/metadataStores/#{metadata_stores_context['metadataStore']}", region: metadata_stores_context['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_metadata_stores_execution.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_metadata_stores_execution resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') metadata_stores_execution = input('metadata_stores_execution', value: { "name": "12528100122877440041", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/metadataStores/default/executions/", "metadataStore": "default", "create_time": "value_createtime", "schema_version": "value_schemaversion", "state": "COMPLETE", "etag": "value_etag", "display_name": "endpoint-create-20230918054541-20230918054500491", "schema_title": "value_schematitle", "description": "value_description", "update_time": "value_updatetime" }, description: 'metadata_stores_execution description') control 'google_vertex_ai_metadata_stores_execution-1.0' do impact 1.0 title 'google_vertex_ai_metadata_stores_execution resource test' describe google_vertex_ai_metadata_stores_execution(name: "projects/#{gcp_project_id}/locations/#{metadata_stores_execution['region']}/metadataStores/#{metadata_stores_execution['metadataStore']}/executions/#{metadata_stores_execution['name']}", region: metadata_stores_execution['region']) do it { should exist } its('create_time') { should cmp metadata_stores_execution['create_time'] } its('schema_version') { should cmp metadata_stores_execution['schema_version'] } its('state') { should cmp metadata_stores_execution['state'] } its('name') { should cmp metadata_stores_execution['name'] } its('etag') { should cmp metadata_stores_execution['etag'] } its('display_name') { should cmp metadata_stores_execution['display_name'] } its('schema_title') { should cmp metadata_stores_execution['schema_title'] } its('description') { should cmp metadata_stores_execution['description'] } its('update_time') { should cmp metadata_stores_execution['update_time'] } end describe google_vertex_ai_metadata_stores_execution(name: "does_not_exit", region: metadata_stores_execution['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_metadata_stores_executions.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_metadata_stores_executions resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') metadata_stores_execution = input('metadata_stores_execution', value: { "name": "12528100122877440041", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/metadataStores/default/executions/", "metadataStore": "default", "create_time": "value_createtime", "schema_version": "value_schemaversion", "state": "COMPLETE", "etag": "value_etag", "display_name": "endpoint-create-20230918054541-20230918054500491", "schema_title": "value_schematitle", "description": "value_description", "update_time": "value_updatetime" }, description: 'metadata_stores_execution description') control 'google_vertex_ai_metadata_stores_executions-1.0' do impact 1.0 title 'google_vertex_ai_metadata_stores_executions resource test' describe google_vertex_ai_metadata_stores_executions(parent: "projects/#{gcp_project_id}/locations/#{metadata_stores_execution['region']}/metadataStores/#{metadata_stores_execution['metadataStore']}", region: metadata_stores_execution['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_metadata_stores_metadata_schema.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_metadata_stores_metadata_schema resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') metadata_stores_metadata_schema = input('metadata_stores_metadata_schema', value: { "name": "system-dag-execution-v0-0-1", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/metadataStores/default/metadataSchemas/", "metadataStore": "default", "schema_type": "EXECUTION_TYPE", "description": "value_description", "schema_version": "value_schemaversion", "create_time": "value_createtime", "schema": "value_schema" }, description: 'metadata_stores_metadata_schema description') control 'google_vertex_ai_metadata_stores_metadata_schema-1.0' do impact 1.0 title 'google_vertex_ai_metadata_stores_metadata_schema resource test' describe google_vertex_ai_metadata_stores_metadata_schema(name: "projects/#{gcp_project_id}/locations/#{metadata_stores_metadata_schema['region']}/metadataStores/#{metadata_stores_metadata_schema['metadataStore']}/metadataSchemas/#{metadata_stores_metadata_schema['name']}", region: metadata_stores_metadata_schema['region']) do it { should exist } its('schema_type') { should cmp metadata_stores_metadata_schema['schema_type'] } its('description') { should cmp metadata_stores_metadata_schema['description'] } its('schema_version') { should cmp metadata_stores_metadata_schema['schema_version'] } its('name') { should cmp metadata_stores_metadata_schema['name'] } its('create_time') { should cmp metadata_stores_metadata_schema['create_time'] } its('schema') { should cmp metadata_stores_metadata_schema['schema'] } end describe google_vertex_ai_metadata_stores_metadata_schema(name: "does_not_exit", region: metadata_stores_metadata_schema['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_metadata_stores_metadata_schemas.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_metadata_stores_metadata_schemas resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') metadata_stores_metadata_schema = input('metadata_stores_metadata_schema', value: { "name": "system-dag-execution-v0-0-1", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/metadataStores/default/metadataSchemas/", "metadataStore": "default", "schema_type": "EXECUTION_TYPE", "description": "value_description", "schema_version": "value_schemaversion", "create_time": "value_createtime", "schema": "value_schema" }, description: 'metadata_stores_metadata_schema description') control 'google_vertex_ai_metadata_stores_metadata_schemas-1.0' do impact 1.0 title 'google_vertex_ai_metadata_stores_metadata_schemas resource test' describe google_vertex_ai_metadata_stores_metadata_schemas(parent: "projects/#{gcp_project_id}/locations/#{metadata_stores_metadata_schema['region']}/metadataStores/#{metadata_stores_metadata_schema['metadataStore']}", region: metadata_stores_metadata_schema['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_model.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_model resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') model = input('model', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "update_time": "value_updatetime", "etag": "value_etag", "description": "value_description", "create_time": "value_createtime", "pipeline_job": "value_pipelinejob", "version_update_time": "value_versionupdatetime", "metadata_artifact": "value_metadataartifact", "metadata_schema_uri": "value_metadataschemauri", "version_id": "value_versionid", "artifact_uri": "value_artifacturi", "training_pipeline": "value_trainingpipeline", "display_name": "value_displayname", "version_create_time": "value_versioncreatetime", "version_description": "value_versiondescription" }, description: 'model description') control 'google_vertex_ai_model-1.0' do impact 1.0 title 'google_vertex_ai_model resource test' describe google_vertex_ai_model(name: "projects/#{gcp_project_id}/locations/#{model['region']}/models/#{model['name']}", region: model['region']) do it { should exist } its('name') { should cmp model['name'] } its('update_time') { should cmp model['update_time'] } its('etag') { should cmp model['etag'] } its('description') { should cmp model['description'] } its('create_time') { should cmp model['create_time'] } its('pipeline_job') { should cmp model['pipeline_job'] } its('version_update_time') { should cmp model['version_update_time'] } its('metadata_artifact') { should cmp model['metadata_artifact'] } its('metadata_schema_uri') { should cmp model['metadata_schema_uri'] } its('version_id') { should cmp model['version_id'] } its('artifact_uri') { should cmp model['artifact_uri'] } its('training_pipeline') { should cmp model['training_pipeline'] } its('display_name') { should cmp model['display_name'] } its('version_create_time') { should cmp model['version_create_time'] } its('version_description') { should cmp model['version_description'] } end describe google_vertex_ai_model(name: "does_not_exit", region: model['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_model_deployment_monitoring_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_model_deployment_monitoring_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') model_deployment_monitoring_job = input('model_deployment_monitoring_job', value: { "name": "4965515800912855040", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/modelDeploymentMonitoringJobs/", "state": "value_state", "analysis_instance_schema_uri": "value_analysisinstanceschemauri", "endpoint": "projects/165434197229/locations/us-central1/endpoints/5787303642054787072", "display_name": "churn", "schedule_state": "value_schedulestate", "predict_instance_schema_uri": "value_predictinstanceschemauri", "next_schedule_time": "value_nextscheduletime", "create_time": "value_createtime", "log_ttl": "value_logttl", "update_time": "value_updatetime" }, description: 'model_deployment_monitoring_job description') control 'google_vertex_ai_model_deployment_monitoring_job-1.0' do impact 1.0 title 'google_vertex_ai_model_deployment_monitoring_job resource test' describe google_vertex_ai_model_deployment_monitoring_job(name: "projects/#{gcp_project_id}/locations/#{model_deployment_monitoring_job['region']}/modelDeploymentMonitoringJobs/#{model_deployment_monitoring_job['name']}", region: model_deployment_monitoring_job['region']) do it { should exist } its('state') { should cmp model_deployment_monitoring_job['state'] } its('analysis_instance_schema_uri') { should cmp model_deployment_monitoring_job['analysis_instance_schema_uri'] } its('endpoint') { should cmp model_deployment_monitoring_job['endpoint'] } its('display_name') { should cmp model_deployment_monitoring_job['display_name'] } its('schedule_state') { should cmp model_deployment_monitoring_job['schedule_state'] } its('predict_instance_schema_uri') { should cmp model_deployment_monitoring_job['predict_instance_schema_uri'] } its('next_schedule_time') { should cmp model_deployment_monitoring_job['next_schedule_time'] } its('create_time') { should cmp model_deployment_monitoring_job['create_time'] } its('log_ttl') { should cmp model_deployment_monitoring_job['log_ttl'] } its('update_time') { should cmp model_deployment_monitoring_job['update_time'] } its('name') { should cmp model_deployment_monitoring_job['name'] } end describe google_vertex_ai_model_deployment_monitoring_job(name: "does_not_exit", region: model_deployment_monitoring_job['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_model_deployment_monitoring_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_model_deployment_monitoring_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') model_deployment_monitoring_job = input('model_deployment_monitoring_job', value: { "name": "4965515800912855040", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/modelDeploymentMonitoringJobs/", "state": "value_state", "analysis_instance_schema_uri": "value_analysisinstanceschemauri", "endpoint": "projects/165434197229/locations/us-central1/endpoints/5787303642054787072", "display_name": "churn", "schedule_state": "value_schedulestate", "predict_instance_schema_uri": "value_predictinstanceschemauri", "next_schedule_time": "value_nextscheduletime", "create_time": "value_createtime", "log_ttl": "value_logttl", "update_time": "value_updatetime" }, description: 'model_deployment_monitoring_job description') control 'google_vertex_ai_model_deployment_monitoring_jobs-1.0' do impact 1.0 title 'google_vertex_ai_model_deployment_monitoring_jobs resource test' describe google_vertex_ai_model_deployment_monitoring_jobs(parent: "projects/#{gcp_project_id}/locations/#{model_deployment_monitoring_job['region']}", region: model_deployment_monitoring_job['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_model_evaluation_slice.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_model_evaluation_slice resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') models_evaluations_slice = input('models_evaluations_slice', value: { "name": "1040489542048845967", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/models/1906524575261261824/evaluations/8892762874796048384/slices/", "create_time": "value_createtime", "model": "1906524575261261824", "evaluation": "8892762874796048384" }, description: 'models_evaluations_slice description') control 'google_vertex_ai_model_evaluation_slice-1.0' do impact 1.0 title 'google_vertex_ai_model_evaluation_slice resource test' describe google_vertex_ai_model_evaluation_slice(name: "projects/#{gcp_project_id}/locations/#{models_evaluations_slice['region']}/models/#{models_evaluations_slice['model']}/evaluations/#{models_evaluations_slice['evaluation']}/slices/#{models_evaluations_slice['slice']}", region: models_evaluations_slice['region']) do it { should exist } its('create_time') { should cmp models_evaluations_slice['create_time'] } its('name') { should cmp models_evaluations_slice['name'] } its('metrics_schema_uri') { should cmp models_evaluations_slice['metrics_schema_uri'] } end describe google_vertex_ai_model_evaluation_slice(name: "does_not_exit", region: models_evaluations_slice['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_model_evaluation_slices.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_model_evaluation_slices resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') models_evaluations_slice = input('models_evaluations_slice', value: { "name": "1040489542048845967", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/models/1906524575261261824/evaluations/8892762874796048384/slices/", "create_time": "value_createtime", "metrics_schema_uri": "value_metricsschemauri", "model": "1906524575261261824", "evaluation": "8892762874796048384" }, description: 'models_evaluations_slice description') control 'google_vertex_ai_model_evaluation_slices-1.0' do impact 1.0 title 'google_vertex_ai_model_evaluation_slices resource test' describe google_vertex_ai_model_evaluation_slices(parent: "projects/#{gcp_project_id}/locations/#{models_evaluations_slice['region']}/models/#{models_evaluations_slice['model']}/evaluations/#{models_evaluations_slice['evaluation']}", region: models_evaluations_slice['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_models.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_models resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') model = input('model', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "update_time": "value_updatetime", "etag": "value_etag", "description": "value_description", "create_time": "value_createtime", "pipeline_job": "value_pipelinejob", "version_update_time": "value_versionupdatetime", "metadata_artifact": "value_metadataartifact", "metadata_schema_uri": "value_metadataschemauri", "version_id": "value_versionid", "artifact_uri": "value_artifacturi", "training_pipeline": "value_trainingpipeline", "display_name": "value_displayname", "version_create_time": "value_versioncreatetime", "version_description": "value_versiondescription" }, description: 'model description') control 'google_vertex_ai_models-1.0' do impact 1.0 title 'google_vertex_ai_models resource test' describe google_vertex_ai_models(parent: "projects/#{gcp_project_id}/locations/#{model['region']}", region: model['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_models_evaluation.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_models_evaluation resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') models_evaluation = input('models_evaluation', value: { "name": "6359727915373953024", "model_name":"1367728693278932992", "region": "us-central1", "metrics_schema_uri": "gs://google-cloud-aiplatform/schema/modelevaluation/classification_metrics_1.0.0.yaml", "create_time": "2023-09-15T22:47:51.125611Z", "annotation_schema_uri": "gs://google-cloud-aiplatform/schema/dataset/annotation/text_classification_1.0.0.yaml", "display_name": "value_displayname" }, description: 'models_evaluation description') control 'google_vertex_ai_models_evaluation-1.0' do impact 1.0 title 'google_vertex_ai_models_evaluation resource test' describe google_vertex_ai_models_evaluation(name: "projects/#{gcp_project_id}/locations/#{models_evaluation['region']}/models/#{models_evaluation['model_name']}/evaluations/#{models_evaluation['name']}", region: models_evaluation['region']) do it { should exist } its('metrics_schema_uri') { should cmp models_evaluation['metrics_schema_uri'] } its('create_time') { should cmp models_evaluation['create_time'] } its('annotation_schema_uri') { should cmp models_evaluation['annotation_schema_uri'] } end describe google_vertex_ai_models_evaluation(name: "does_not_exit", region: models_evaluation['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_models_evaluations.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_models_evaluations resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') models_evaluation = input('models_evaluation', value: { "name": "6359727915373953024", "model_name":"1367728693278932992", "region": "us-central1", "data_item_schema_uri": "value_dataitemschemauri", "metrics_schema_uri": "value_metricsschemauri", "create_time": "value_createtime", "annotation_schema_uri": "value_annotationschemauri", "display_name": "value_displayname" }, description: 'models_evaluation description') control 'google_vertex_ai_models_evaluations-1.0' do impact 1.0 title 'google_vertex_ai_models_evaluations resource test' describe google_vertex_ai_models_evaluations(parent: "projects/#{gcp_project_id}/locations/#{models_evaluation['region']}/models/#{models_evaluation['model_name']}", region: models_evaluation['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_nas_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_nas_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') nas_job = input('nas_job', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "end_time": "value_endtime", "state": "value_state", "create_time": "value_createtime", "display_name": "value_displayname", "start_time": "value_starttime", "update_time": "value_updatetime" }, description: 'nas_job description') control 'google_vertex_ai_nas_job-1.0' do impact 1.0 title 'google_vertex_ai_nas_job resource test' describe google_vertex_ai_nas_job(name: "projects/#{gcp_project_id}/locations/#{nas_job['region']}/nasJobs/#{nas_job['name']}", region: nas_job['region']) do it { should exist } its('name') { should cmp nas_job['name'] } its('end_time') { should cmp nas_job['end_time'] } its('state') { should cmp nas_job['state'] } its('create_time') { should cmp nas_job['create_time'] } its('display_name') { should cmp nas_job['display_name'] } its('start_time') { should cmp nas_job['start_time'] } its('update_time') { should cmp nas_job['update_time'] } end describe google_vertex_ai_nas_job(name: "does_not_exit", region: nas_job['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_nas_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_nas_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') nas_job = input('nas_job', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "end_time": "value_endtime", "state": "value_state", "create_time": "value_createtime", "display_name": "value_displayname", "start_time": "value_starttime", "update_time": "value_updatetime" }, description: 'nas_job description') control 'google_vertex_ai_nas_jobs-1.0' do impact 1.0 title 'google_vertex_ai_nas_jobs resource test' describe google_vertex_ai_nas_jobs(parent: "projects/#{gcp_project_id}/locations/#{nas_job['region']}", region: nas_job['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_nas_jobs_nas_trial_detail.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_nas_jobs_nas_trial_detail resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') nas_jobs_nas_trial_detail = input('nas_jobs_nas_trial_detail', value: { "name": "1", "region": "us-central1", "nasJob": "3217974009958236160", "parent": "projects/ppradhan/locations/us-central1/nasJobs/3217974009958236160/nasTrialDetails/", "parameters": "value_parameters" }, description: 'nas_jobs_nas_trial_detail description') control 'google_vertex_ai_nas_jobs_nas_trial_detail-1.0' do impact 1.0 title 'google_vertex_ai_nas_jobs_nas_trial_detail resource test' describe google_vertex_ai_nas_jobs_nas_trial_detail(name: "projects/#{gcp_project_id}/locations/#{nas_jobs_nas_trial_detail['region']}/nasJobs/#{nas_jobs_nas_trial_detail['nasJob']}/nasTrialDetails/#{nas_jobs_nas_trial_detail['name']}", region: nas_jobs_nas_trial_detail['region']) do it { should exist } its('parameters') { should cmp nas_jobs_nas_trial_detail['parameters'] } its('name') { should cmp nas_jobs_nas_trial_detail['name'] } end describe google_vertex_ai_nas_jobs_nas_trial_detail(name: "does_not_exit", region: nas_jobs_nas_trial_detail['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_nas_jobs_nas_trial_details.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_nas_jobs_nas_trial_details resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') nas_jobs_nas_trial_detail = input('nas_jobs_nas_trial_detail', value: { "name": "1", "region": "us-central1", "nasJob": "3217974009958236160", "parent": "projects/ppradhan/locations/us-central1/nasJobs/3217974009958236160/nasTrialDetails/", "parameters": "value_parameters" }, description: 'nas_jobs_nas_trial_detail description') control 'google_vertex_ai_nas_jobs_nas_trial_details-1.0' do impact 1.0 title 'google_vertex_ai_nas_jobs_nas_trial_details resource test' describe google_vertex_ai_nas_jobs_nas_trial_details(parent: "projects/#{gcp_project_id}/locations/#{nas_jobs_nas_trial_detail['region']}/nasJobs/#{nas_jobs_nas_trial_detail['nasJob']}", region: nas_jobs_nas_trial_detail['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_pipeline_job.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_pipeline_job resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') pipeline_job = input('pipeline_job', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "end_time": "value_endtime", "update_time": "value_updatetime", "state": "value_state", "create_time": "value_createtime", "schedule_name": "value_schedulename", "start_time": "value_starttime", "service_account": "value_serviceaccount", "display_name": "value_displayname", "template_uri": "value_templateuri", "network": "value_network" }, description: 'pipeline_job description') control 'google_vertex_ai_pipeline_job-1.0' do impact 1.0 title 'google_vertex_ai_pipeline_job resource test' describe google_vertex_ai_pipeline_job(name: "projects/#{gcp_project_id}/locations/#{pipeline_job['region']}/pipelineJobs/#{pipeline_job['name']}", region: pipeline_job['region']) do it { should exist } its('end_time') { should cmp pipeline_job['end_time'] } its('update_time') { should cmp pipeline_job['update_time'] } its('state') { should cmp pipeline_job['state'] } its('create_time') { should cmp pipeline_job['create_time'] } its('name') { should cmp pipeline_job['name'] } its('schedule_name') { should cmp pipeline_job['schedule_name'] } its('start_time') { should cmp pipeline_job['start_time'] } its('service_account') { should cmp pipeline_job['service_account'] } its('display_name') { should cmp pipeline_job['display_name'] } its('template_uri') { should cmp pipeline_job['template_uri'] } its('network') { should cmp pipeline_job['network'] } end describe google_vertex_ai_pipeline_job(name: "does_not_exit", region: pipeline_job['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_pipeline_jobs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_pipeline_jobs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') pipeline_job = input('pipeline_job', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "end_time": "value_endtime", "update_time": "value_updatetime", "state": "value_state", "create_time": "value_createtime", "schedule_name": "value_schedulename", "start_time": "value_starttime", "service_account": "value_serviceaccount", "display_name": "value_displayname", "template_uri": "value_templateuri", "network": "value_network" }, description: 'pipeline_job description') control 'google_vertex_ai_pipeline_jobs-1.0' do impact 1.0 title 'google_vertex_ai_pipeline_jobs resource test' describe google_vertex_ai_pipeline_jobs(parent: "projects/#{gcp_project_id}/locations/#{pipeline_job['region']}", region: pipeline_job['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_schedule.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_schedule resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') schedule = input('schedule', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "started_run_count": "value_startedruncount", "cron": "value_cron", "last_pause_time": "value_lastpausetime", "create_time": "value_createtime", "start_time": "value_starttime", "max_run_count": "value_maxruncount", "next_run_time": "value_nextruntime", "update_time": "value_updatetime", "last_resume_time": "value_lastresumetime", "max_concurrent_run_count": "value_maxconcurrentruncount", "state": "value_state", "display_name": "value_displayname", "end_time": "value_endtime" }, description: 'schedule description') control 'google_vertex_ai_schedule-1.0' do impact 1.0 title 'google_vertex_ai_schedule resource test' describe google_vertex_ai_schedule(name: "projects/#{gcp_project_id}/locations/#{schedule['region']}/schedules/#{schedule['name']}", region: schedule['region']) do it { should exist } its('started_run_count') { should cmp schedule['started_run_count'] } its('name') { should cmp schedule['name'] } its('cron') { should cmp schedule['cron'] } its('last_pause_time') { should cmp schedule['last_pause_time'] } its('create_time') { should cmp schedule['create_time'] } its('start_time') { should cmp schedule['start_time'] } its('max_run_count') { should cmp schedule['max_run_count'] } its('next_run_time') { should cmp schedule['next_run_time'] } its('update_time') { should cmp schedule['update_time'] } its('last_resume_time') { should cmp schedule['last_resume_time'] } its('max_concurrent_run_count') { should cmp schedule['max_concurrent_run_count'] } its('state') { should cmp schedule['state'] } its('display_name') { should cmp schedule['display_name'] } its('end_time') { should cmp schedule['end_time'] } end describe google_vertex_ai_schedule(name: "does_not_exit", region: schedule['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_schedules.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_schedules resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') schedule = input('schedule', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "started_run_count": "value_startedruncount", "cron": "value_cron", "last_pause_time": "value_lastpausetime", "create_time": "value_createtime", "start_time": "value_starttime", "max_run_count": "value_maxruncount", "next_run_time": "value_nextruntime", "update_time": "value_updatetime", "last_resume_time": "value_lastresumetime", "max_concurrent_run_count": "value_maxconcurrentruncount", "state": "value_state", "display_name": "value_displayname", "end_time": "value_endtime" }, description: 'schedule description') control 'google_vertex_ai_schedules-1.0' do impact 1.0 title 'google_vertex_ai_schedules resource test' describe google_vertex_ai_schedules(parent: "projects/#{gcp_project_id}/locations/#{schedule['region']}", region: schedule['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_studies.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_studies resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') study = input('study', value: { "name": "2975668570413", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/studies/", "display_name": "ppradhan_study_20230921_205019", "state": "ACTIVE", "create_time": "value_createtime", "inactive_reason": "value_inactivereason" }, description: 'study description') control 'google_vertex_ai_studies-1.0' do impact 1.0 title 'google_vertex_ai_studies resource test' describe google_vertex_ai_studies(parent: "projects/#{gcp_project_id}/locations/#{study['region']}", region: study['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_studies_trial.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_studies_trial resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') studies_trial = input('studies_trial', value: { "name": "1", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/studies/2975668570413/trials/", "study": "890385007008", "start_time": "value_starttime", "end_time": "value_endtime", "infeasible_reason": "value_infeasiblereason", "client_id": "value_clientid", "custom_job": "value_customjob", "state": "value_state", "id": "1" }, description: 'studies_trial description') control 'google_vertex_ai_studies_trial-1.0' do impact 1.0 title 'google_vertex_ai_studies_trial resource test' describe google_vertex_ai_studies_trial(name: "projects/#{gcp_project_id}/locations/#{studies_trial['region']}/studies/#{studies_trial['study']}/trials/#{studies_trial['name']}", region: studies_trial['region']) do it { should exist } its('start_time') { should cmp studies_trial['start_time'] } its('end_time') { should cmp studies_trial['end_time'] } its('name') { should cmp studies_trial['name'] } its('infeasible_reason') { should cmp studies_trial['infeasible_reason'] } its('client_id') { should cmp studies_trial['client_id'] } its('custom_job') { should cmp studies_trial['custom_job'] } its('state') { should cmp studies_trial['state'] } its('id') { should cmp studies_trial['id'] } end describe google_vertex_ai_studies_trial(name: "does_not_exit", region: studies_trial['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_studies_trials.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_studies_trials resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') studies_trial = input('studies_trial', value: { "name": "1", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/studies/2975668570413/trials/", "study": "890385007008", "start_time": "value_starttime", "end_time": "value_endtime", "infeasible_reason": "value_infeasiblereason", "client_id": "value_clientid", "custom_job": "value_customjob", "state": "value_state", "id": "1" }, description: 'studies_trial description') control 'google_vertex_ai_studies_trials-1.0' do impact 1.0 title 'google_vertex_ai_studies_trials resource test' describe google_vertex_ai_studies_trials(parent: "projects/#{gcp_project_id}/locations/#{studies_trial['region']}/studies/#{studies_trial['study']}", region: studies_trial['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_study.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_study resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') study = input('study', value: { "name": "2975668570413", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/studies/", "display_name": "ppradhan_study_20230921_205019", "state": "ACTIVE", "create_time": "value_createtime", "inactive_reason": "value_inactivereason" }, description: 'study description') control 'google_vertex_ai_study-1.0' do impact 1.0 title 'google_vertex_ai_study resource test' describe google_vertex_ai_study(name: "projects/#{gcp_project_id}/locations/#{study['region']}/studies/#{study['name']}", region: study['region']) do it { should exist } its('name') { should cmp study['name'] } its('display_name') { should cmp study['display_name'] } its('state') { should cmp study['state'] } its('create_time') { should cmp study['create_time'] } its('inactive_reason') { should cmp study['inactive_reason'] } end describe google_vertex_ai_study(name: "does_not_exit", region: study['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_tensorboard.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_tensorboard resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') tensorboard = input('tensorboard', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "update_time": "value_updatetime", "blob_storage_path_prefix": "value_blobstoragepathprefix", "etag": "value_etag", "create_time": "value_createtime", "display_name": "value_displayname", "description": "value_description" }, description: 'tensorboard description') control 'google_vertex_ai_tensorboard-1.0' do impact 1.0 title 'google_vertex_ai_tensorboard resource test' describe google_vertex_ai_tensorboard(name: "projects/#{gcp_project_id}/locations/#{tensorboard['region']}/tensorboards/#{tensorboard['name']}", region: tensorboard['region']) do it { should exist } its('name') { should cmp tensorboard['name'] } its('update_time') { should cmp tensorboard['update_time'] } its('blob_storage_path_prefix') { should cmp tensorboard['blob_storage_path_prefix'] } its('etag') { should cmp tensorboard['etag'] } its('create_time') { should cmp tensorboard['create_time'] } its('display_name') { should cmp tensorboard['display_name'] } its('description') { should cmp tensorboard['description'] } end describe google_vertex_ai_tensorboard(name: "does_not_exit", region: tensorboard['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_tensorboard_experiment_run.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_tensorboard_experiment_run resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') tensorboard_experiment_run = input('tensorboard_experiment_run', value: { "name": "sklearn-2023-09-22-17-16-16-a25b0", "tensorboard": "1976367752880848896", "experiment": "autologging-experiment-fyc24zb2", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/tensorboards/1976367752880848896/experiments/autologging-experiment-fyc24zb2/runs/" }, description: 'tensorboard_experiment_run description') control 'google_vertex_ai_tensorboard_experiment_run-1.0' do impact 1.0 title 'google_vertex_ai_tensorboard_experiment_run resource test' describe google_vertex_ai_tensorboard_experiment_run(name: "projects/#{gcp_project_id}/locations/#{tensorboard_experiment_run['region']}/tensorboards/#{tensorboard_experiment_run['tensorboard']}/experiments/#{tensorboard_experiment_run['experiment']}/runs/#{tensorboard_experiment_run['run']}", region: tensorboard_experiment_run['region']) do it { should exist } end describe google_vertex_ai_tensorboard_experiment_run(name: "does_not_exit", region: tensorboard_experiment_run['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_tensorboard_experiment_run_time_series_resource.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_tensorboard_experiment_run_time_series_resource resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') tensorboard_experiment_run_time_series_resource = input('tensorboard_experiment_run_time_series_resource', value: { "name": "1197045318546358272", "tensorboard": "1143342559305662464", "experiment": "autologging-experiment-a6k29mzk", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/tensorboards/1143342559305662464/experiments/autologging-experiment-a6k29mzk/runs/autologging-tf-experiment-a6k29mzk/timeSeries/", "run": "autologging-tf-experiment-a6k29mzk", "plugin_name": "value_pluginname", "plugin_data": "value_plugindata", "description": "value_description", "etag": "value_etag", "display_name": "value_displayname", "update_time": "value_updatetime", "create_time": "value_createtime", "value_type": "value_valuetype" }, description: 'tensorboard_experiment_run_time_series_resource description') control 'google_vertex_ai_tensorboard_experiment_run_time_series_resource-1.0' do impact 1.0 title 'google_vertex_ai_tensorboard_experiment_run_time_series_resource resource test' describe google_vertex_ai_tensorboard_experiment_run_time_series_resource(name: "projects/#{gcp_project_id}/locations/#{tensorboard_experiment_run_time_series_resource['region']}/tensorboards/#{tensorboard_experiment_run_time_series_resource['tensorboard']}/experiments/#{tensorboard_experiment_run_time_series_resource['experiment']}/runs/#{tensorboard_experiment_run_time_series_resource['run']}/timeSeries/#{tensorboard_experiment_run_time_series_resource['timeSery']}", region: tensorboard_experiment_run_time_series_resource['region']) do it { should exist } its('plugin_name') { should cmp tensorboard_experiment_run_time_series_resource['plugin_name'] } its('plugin_data') { should cmp tensorboard_experiment_run_time_series_resource['plugin_data'] } its('description') { should cmp tensorboard_experiment_run_time_series_resource['description'] } its('etag') { should cmp tensorboard_experiment_run_time_series_resource['etag'] } its('display_name') { should cmp tensorboard_experiment_run_time_series_resource['display_name'] } its('update_time') { should cmp tensorboard_experiment_run_time_series_resource['update_time'] } its('create_time') { should cmp tensorboard_experiment_run_time_series_resource['create_time'] } its('name') { should cmp tensorboard_experiment_run_time_series_resource['name'] } its('value_type') { should cmp tensorboard_experiment_run_time_series_resource['value_type'] } end describe google_vertex_ai_tensorboard_experiment_run_time_series_resource(name: "does_not_exit", region: tensorboard_experiment_run_time_series_resource['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_tensorboard_experiment_run_time_series_resources.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_tensorboard_experiment_run_time_series_resources resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') tensorboard_experiment_run_time_series_resource = input('tensorboard_experiment_run_time_series_resource', value: { "name": "1197045318546358272", "tensorboard": "1143342559305662464", "experiment": "autologging-experiment-a6k29mzk", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/tensorboards/1143342559305662464/experiments/autologging-experiment-a6k29mzk/runs/autologging-tf-experiment-a6k29mzk/timeSeries/", "run": "autologging-tf-experiment-a6k29mzk", "plugin_name": "value_pluginname", "plugin_data": "value_plugindata", "description": "value_description", "etag": "value_etag", "display_name": "value_displayname", "update_time": "value_updatetime", "create_time": "value_createtime", "value_type": "value_valuetype" }, description: 'tensorboard_experiment_run_time_series_resource description') control 'google_vertex_ai_tensorboard_experiment_run_time_series_resources-1.0' do impact 1.0 title 'google_vertex_ai_tensorboard_experiment_run_time_series_resources resource test' describe google_vertex_ai_tensorboard_experiment_run_time_series_resources(parent: "projects/#{gcp_project_id}/locations/#{tensorboard_experiment_run_time_series_resource['region']}/tensorboards/#{tensorboard_experiment_run_time_series_resource['tensorboard']}/experiments/#{tensorboard_experiment_run_time_series_resource['experiment']}/runs/#{tensorboard_experiment_run_time_series_resource['run']}", region: tensorboard_experiment_run_time_series_resource['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_tensorboard_experiment_runs.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_tensorboard_experiment_runs resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') tensorboard_experiment_run = input('tensorboard_experiment_run', value: { "name": "sklearn-2023-09-22-17-16-16-a25b0", "tensorboard": "1976367752880848896", "experiment": "autologging-experiment-fyc24zb2", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/tensorboards/1976367752880848896/experiments/autologging-experiment-fyc24zb2/runs/" }, description: 'tensorboard_experiment_run description') control 'google_vertex_ai_tensorboard_experiment_runs-1.0' do impact 1.0 title 'google_vertex_ai_tensorboard_experiment_runs resource test' describe google_vertex_ai_tensorboard_experiment_runs(parent: "projects/#{gcp_project_id}/locations/#{tensorboard_experiment_run['region']}/tensorboards/#{tensorboard_experiment_run['tensorboard']}/experiments/#{tensorboard_experiment_run['experiment']}", region: tensorboard_experiment_run['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_tensorboards.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_tensorboards resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') tensorboard = input('tensorboard', value: { "name": "value_name", "region": "value_region", "parent": "value_parent", "update_time": "value_updatetime", "blob_storage_path_prefix": "value_blobstoragepathprefix", "etag": "value_etag", "create_time": "value_createtime", "display_name": "value_displayname", "description": "value_description" }, description: 'tensorboard description') control 'google_vertex_ai_tensorboards-1.0' do impact 1.0 title 'google_vertex_ai_tensorboards resource test' describe google_vertex_ai_tensorboards(parent: "projects/#{gcp_project_id}/locations/#{tensorboard['region']}", region: tensorboard['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_tensorboards_experiment.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_tensorboards_experiment resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') tensorboards_experiment = input('tensorboards_experiment', value: { "name": "inspec-tensor-experiment", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/tensorboards/6346548241290493952/experiments/", "description": "value_description", "tensorboard": "6346548241290493952", "source": "value_source", "display_name": "inspec-tensor-experiment", "create_time": "value_createtime", "update_time": "value_updatetime", "etag": "value_etag" }, description: 'tensorboards_experiment description') control 'google_vertex_ai_tensorboards_experiment-1.0' do impact 1.0 title 'google_vertex_ai_tensorboards_experiment resource test' describe google_vertex_ai_tensorboards_experiment(name: "projects/#{gcp_project_id}/locations/#{tensorboards_experiment['region']}/tensorboards/#{tensorboards_experiment['tensorboard']}/experiments/#{tensorboards_experiment['name']}", region: tensorboards_experiment['region']) do it { should exist } its('description') { should cmp tensorboards_experiment['description'] } its('source') { should cmp tensorboards_experiment['source'] } its('display_name') { should cmp tensorboards_experiment['display_name'] } its('create_time') { should cmp tensorboards_experiment['create_time'] } its('update_time') { should cmp tensorboards_experiment['update_time'] } its('name') { should cmp tensorboards_experiment['name'] } its('etag') { should cmp tensorboards_experiment['etag'] } end describe google_vertex_ai_tensorboards_experiment(name: "does_not_exit", region: tensorboards_experiment['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_tensorboards_experiments.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_tensorboards_experiments resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') tensorboards_experiment = input('tensorboards_experiment', value: { "name": "inspec-tensor-experiment", "region": "us-central1", "parent": "projects/165434197229/locations/us-central1/tensorboards/6346548241290493952/experiments/", "description": "value_description", "tensorboard": "6346548241290493952", "source": "value_source", "display_name": "inspec-tensor-experiment", "create_time": "value_createtime", "update_time": "value_updatetime", "etag": "value_etag" }, description: 'tensorboards_experiment description') control 'google_vertex_ai_tensorboards_experiments-1.0' do impact 1.0 title 'google_vertex_ai_tensorboards_experiments resource test' describe google_vertex_ai_tensorboards_experiments(parent: "projects/#{gcp_project_id}/locations/#{tensorboards_experiment['region']}/tensorboards/#{tensorboards_experiment['tensorboard']}", region: tensorboards_experiment['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_training_pipeline.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_training_pipeline resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') training_pipeline = input('training_pipeline', value: { "name": "value_name", "job_id": "job_id", "region": "value_region", "parent": "value_parent" }, description: 'training_pipeline description') control 'google_vertex_ai_training_pipeline-1.0' do impact 1.0 title 'google_vertex_ai_training_pipeline resource test' describe google_vertex_ai_training_pipeline(name: "projects/#{gcp_project_id}/locations/#{training_pipeline['region']}/trainingPipelines/#{training_pipeline['job_id']}", region: training_pipeline['region']) do it { should exist } end describe google_vertex_ai_training_pipeline(name: "does_not_exit", region: training_pipeline['region']) do it { should_not exist } end end ================================================ FILE: test/integration/verify/controls/google_vertex_ai_training_pipelines.rb ================================================ # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules and manual # changes will be clobbered when the file is regenerated. # # Please read more about how to change this file in README.md and # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- title 'Test GCP google_vertex_ai_training_pipelines resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') training_pipeline = input('training_pipeline', value: { "name": "value_name", "region": "value_region", "parent": "value_parent" }, description: 'training_pipeline description') control 'google_vertex_ai_training_pipelines-1.0' do impact 1.0 title 'google_vertex_ai_training_pipelines resource test' describe google_vertex_ai_training_pipelines(parent: "projects/#{gcp_project_id}/locations/#{training_pipeline['region']}", region: training_pipeline['region']) do it { should exist } end end ================================================ FILE: test/integration/verify/inspec.yml ================================================ name: inspec-gcp-integration-tests version: 0.11.0 inspec_version: '>= 4.7.3' depends: - name: inspec-gcp path: ../../../ ================================================ FILE: test/mock/mock-gcp.rb ================================================ # libraries/mock_gcp.rb require 'gcp_backend' module GcpBackend class MockGcp < GcpBackend::Google def initialize @compute = Google::Apis::ComputeV1::ComputeService.new end def get_region_notification_endpoints(_project, _region) region_notification_endpoint = Google::Apis::ComputeV1::NotificationEndpoint.new( id: '1234567890', name: 'test-notification-endpoint', description: 'A test notification endpoint', creation_timestamp: '2021-01-01T00:00:00.000-00:00', self_link: 'https://www.googleapis.com/compute/v1/projects/my-project/regions/us-central1/notificationEndpoints/test-notification-endpoint' ) region_notification_endpoints = Google::Apis::ComputeV1::NotificationEndpointList.new( items: [region_notification_endpoint] ) region_notification_endpoints end end end